NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
IceDwalkx.cxx
Go to the documentation of this file.
1
17
19
288
289#include "IceDwalkx.h"
290#include "Riostream.h"
291
292ClassImp(IceDwalkx); // Class implementation to enable ROOT I/O
293
295IceDwalkx::IceDwalkx(const char* name,const char* title) : IceLinefit(name,title)
296{
306
307 fEvt=0;
308 fDminA=75;
309 fDminI=60;
310 fDminIC=120;
311 fDminDC=50;
312 fDtmargA=0;
313 fDtmargI=0;
314 fDtmargIC=0;
315 fDtmargDC=0;
316 fMaxdhitA=3.07126;
317 fMaxdhitI=3;
318 fMaxdhitIC=3;
319 fMaxdhitDC=3;
320 fTangmaxA=15;
321 fTangmaxI=15;
322 fTangmaxIC=15;
323 fTangmaxDC=15;
324 fTdistmaxA=20;
325 fTdistmaxI=20;
326 fTdistmaxIC=20;
327 fTdistmaxDC=20;
328 fTinvolA=1;
329 fTinvolI=1;
330 fTinvolIC=1;
331 fTinvolDC=1;
336 fJiterateA=1;
337 fJiterateI=1;
338 fJiterateIC=1;
339 fJiterateDC=1;
340 fJdistmaxA=30;
341 fJdistmaxI=30;
342 fJdistmaxIC=30;
343 fJdistmaxDC=30;
344 fJinvolA=1;
345 fJinvolI=1;
346 fJinvolIC=1;
347 fJinvolDC=1;
348 fMaxmodA=999999;
349 fMaxmodI=999999;
350 fMaxmodIC=999999;
351 fMaxmodDC=999999;
352 fMinmodA=0;
353 fMinmodI=0;
354 fMinmodIC=0;
355 fMinmodDC=0;
356 fMaxhitsA=1;
357 fMaxhitsI=1;
358 fMaxhitsIC=1;
359 fMaxhitsDC=1;
360 fVgroupA=1;
361 fVgroupI=1;
362 fVgroupIC=1;
363 fVgroupDC=1;
364 fAsTypeA=3;
365 fAsTypeI=3;
366 fAsTypeIC=3;
367 fAsTypeDC=3;
368 fLambdaA=33.3;
369 fLambdaI=33;
370 fLambdaIC=30;
371 fLambdaDC=35;
372 fSlcI=0;
373 fSlcIC=0;
374 fSlcDC=0;
375 fTrackname="";
376 fCharge=0;
377 fConditional=1;
378}
379
388
389void IceDwalkx::SetDmin(Float_t d,TString s)
390{
403
404 if (s=="A") fDminA=d;
405 if (s=="I") fDminI=d;
406 if (s=="IC") fDminIC=d;
407 if (s=="DC") fDminDC=d;
408}
409
410void IceDwalkx::SetDtmarg(Int_t dt,TString s)
411{
424
425 if (s=="A") fDtmargA=dt;
426 if (s=="I") fDtmargI=dt;
427 if (s=="IC") fDtmargIC=dt;
428 if (s=="DC") fDtmargDC=dt;
429}
430
431void IceDwalkx::SetMaxDhit(Float_t d,TString s)
432{
445
446 if (s=="A") fMaxdhitA=d;
447 if (s=="I") fMaxdhitI=d;
448 if (s=="IC") fMaxdhitIC=d;
449 if (s=="DC") fMaxdhitDC=d;
450}
451
452void IceDwalkx::SetTangmax(Float_t ang,TString s)
453{
474
475 if (s=="A")
476 {
477 fTangmaxA=ang;
478 fJangmaxA=ang/2.;
479 }
480
481 if (s=="I")
482 {
483 fTangmaxI=ang;
484 fJangmaxI=ang/2.;
485 }
486
487 if (s=="IC")
488 {
489 fTangmaxIC=ang;
490 fJangmaxIC=ang/2.;
491 }
492
493 if (s=="DC")
494 {
495 fTangmaxDC=ang;
496 fJangmaxDC=ang/2.;
497 }
498}
499
500void IceDwalkx::SetTdistmax(Float_t d,TString s,Int_t invol)
501{
524
525 if (s=="A")
526 {
527 fTdistmaxA=d;
528 fTinvolA=invol;
529 }
530
531 if (s=="I")
532 {
533 fTdistmaxI=d;
534 fTinvolI=invol;
535 }
536
537 if (s=="IC")
538 {
539 fTdistmaxIC=d;
540 fTinvolIC=invol;
541 }
542
543 if (s=="DC")
544 {
545 fTdistmaxDC=d;
546 fTinvolDC=invol;
547 }
548}
549
550void IceDwalkx::SetJangmax(Float_t ang,TString s,Int_t iter)
551{
585
586 if (s=="A")
587 {
588 fJangmaxA=ang;
589 fJiterateA=iter;
590 }
591
592 if (s=="I")
593 {
594 fJangmaxI=ang;
595 fJiterateI=iter;
596 }
597
598 if (s=="IC")
599 {
600 fJangmaxIC=ang;
601 fJiterateIC=iter;
602 }
603
604 if (s=="DC")
605 {
606 fJangmaxDC=ang;
607 fJiterateDC=iter;
608 }
609}
610
611void IceDwalkx::SetJdistmax(Float_t d,TString s,Int_t invol)
612{
634
635 if (s=="A")
636 {
637 fJdistmaxA=d;
638 fJinvolA=invol;
639 }
640
641 if (s=="I")
642 {
643 fJdistmaxI=d;
644 fJinvolI=invol;
645 }
646
647 if (s=="IC")
648 {
649 fJdistmaxIC=d;
650 fJinvolIC=invol;
651 }
652
653 if (s=="DC")
654 {
655 fJdistmaxDC=d;
656 fJinvolDC=invol;
657 }
658}
659
660void IceDwalkx::SetVgroupUsage(Int_t flag,TString s)
661{
680
681 if (s=="A") fVgroupA=flag;
682 if (s=="I") fVgroupI=flag;
683 if (s=="IC") fVgroupIC=flag;
684 if (s=="DC") fVgroupDC=flag;
685}
686
687void IceDwalkx::SetAsType(Int_t flag,TString s)
688{
707
708 if (s=="A") fAsTypeA=flag;
709 if (s=="I") fAsTypeI=flag;
710 if (s=="IC") fAsTypeIC=flag;
711 if (s=="DC") fAsTypeDC=flag;
712}
713
714void IceDwalkx::SetScatteringLength(Float_t lambda,TString s)
715{
729
730 if (s=="A") fLambdaA=lambda;
731 if (s=="I") fLambdaI=lambda;
732 if (s=="IC") fLambdaIC=lambda;
733 if (s=="DC") fLambdaDC=lambda;
734}
735
737{
756
757 if (flag>=0 && flag<=2) fConditional=flag;
758}
759
760void IceDwalkx::Exec(Option_t* opt)
761{
767
768 TString name=opt;
769 NcJob* parent=(NcJob*)(gROOT->GetListOfTasks()->FindObject(name.Data()));
770
771 if (!parent) return;
772
773 fEvt=(IceEvent*)parent->GetObject("IceEvent");
774 if (!fEvt) return;
775
776 // Only process accepted events
777 NcDevice* seldev=(NcDevice*)fEvt->GetDevice("NcEventSelector");
778 if (seldev)
779 {
780 if (seldev->GetSignal("Select") < 0.1) return;
781 }
782
783 // Enter the reco parameters as a device in the event
784 NcDevice params;
785 params.SetNameTitle(ClassName(),"Reco parameters");
786 params.AddNamedSlot("DminA");
787 params.AddNamedSlot("DtmargA");
788 params.AddNamedSlot("MaxdhitA");
789 params.AddNamedSlot("TangmaxA");
790 params.AddNamedSlot("TdistmaxA");
791 params.AddNamedSlot("TinvolA");
792 params.AddNamedSlot("JangmaxA");
793 params.AddNamedSlot("JiterateA");
794 params.AddNamedSlot("JdistmaxA");
795 params.AddNamedSlot("JinvolA");
796 params.AddNamedSlot("MaxmodA");
797 params.AddNamedSlot("MinmodA");
798 params.AddNamedSlot("MaxhitsA");
799 params.AddNamedSlot("VgroupA");
800 params.AddNamedSlot("AsTypeA");
801 params.AddNamedSlot("LambdaA");
802
803 params.SetSignal(fDminA,"DminA");
804 params.SetSignal(fDtmargA,"DtmargA");
805 params.SetSignal(fMaxdhitA,"MaxhitA");
806 params.SetSignal(fTangmaxA,"TangmaxA");
807 params.SetSignal(fTdistmaxA,"TdistmaxA");
808 params.SetSignal(fTinvolA,"TinvolA");
809 params.SetSignal(fJangmaxA,"JangmaxA");
810 params.SetSignal(fJiterateA,"JiterateA");
811 params.SetSignal(fJdistmaxA,"JdistmaxA");
812 params.SetSignal(fJinvolA,"JinvolA");
813 params.SetSignal(fMaxmodA,"MaxmodA");
814 params.SetSignal(fMinmodA,"MinmodA");
815 params.SetSignal(fMaxhitsA,"MaxhitsA");
816 params.SetSignal(fVgroupA,"VgroupA");
817 params.SetSignal(fAsTypeA,"AsTypeA");
818 params.SetSignal(fLambdaA,"LambdaA");
819
820 params.AddNamedSlot("DminI");
821 params.AddNamedSlot("DtmargI");
822 params.AddNamedSlot("MaxdhitI");
823 params.AddNamedSlot("TangmaxI");
824 params.AddNamedSlot("TdistmaxI");
825 params.AddNamedSlot("TinvolI");
826 params.AddNamedSlot("JangmaxI");
827 params.AddNamedSlot("JiterateI");
828 params.AddNamedSlot("JdistmaxI");
829 params.AddNamedSlot("JinvolI");
830 params.AddNamedSlot("MaxmodI");
831 params.AddNamedSlot("MinmodI");
832 params.AddNamedSlot("MaxhitsI");
833 params.AddNamedSlot("VgroupI");
834 params.AddNamedSlot("AsTypeI");
835 params.AddNamedSlot("LambdaI");
836 params.AddNamedSlot("SlcI");
837
838 params.SetSignal(fDminI,"DminI");
839 params.SetSignal(fDtmargI,"DtmargI");
840 params.SetSignal(fMaxdhitI,"MaxhitI");
841 params.SetSignal(fTangmaxI,"TangmaxI");
842 params.SetSignal(fTdistmaxI,"TdistmaxI");
843 params.SetSignal(fTinvolI,"TinvolI");
844 params.SetSignal(fJangmaxI,"JangmaxI");
845 params.SetSignal(fJiterateI,"JiterateI");
846 params.SetSignal(fJdistmaxI,"JdistmaxI");
847 params.SetSignal(fJinvolI,"JinvolI");
848 params.SetSignal(fMaxmodI,"MaxmodI");
849 params.SetSignal(fMinmodI,"MinmodI");
850 params.SetSignal(fMaxhitsI,"MaxhitsI");
851 params.SetSignal(fVgroupI,"VgroupI");
852 params.SetSignal(fAsTypeI,"AsTypeI");
853 params.SetSignal(fLambdaI,"LambdaI");
854 params.SetSignal(fSlcI,"SlcI");
855
856 params.AddNamedSlot("DminIC");
857 params.AddNamedSlot("DtmargIC");
858 params.AddNamedSlot("MaxdhitIC");
859 params.AddNamedSlot("TangmaxIC");
860 params.AddNamedSlot("TdistmaxIC");
861 params.AddNamedSlot("TinvolIC");
862 params.AddNamedSlot("JangmaxIC");
863 params.AddNamedSlot("JiterateIC");
864 params.AddNamedSlot("JdistmaxIC");
865 params.AddNamedSlot("JinvolIC");
866 params.AddNamedSlot("MaxmodIC");
867 params.AddNamedSlot("MinmodIC");
868 params.AddNamedSlot("MaxhitsIC");
869 params.AddNamedSlot("VgroupIC");
870 params.AddNamedSlot("AsTypeIC");
871 params.AddNamedSlot("LambdaIC");
872 params.AddNamedSlot("SlcIC");
873
874 params.SetSignal(fDminIC,"DminIC");
875 params.SetSignal(fDtmargIC,"DtmargIC");
876 params.SetSignal(fMaxdhitIC,"MaxhitIC");
877 params.SetSignal(fTangmaxIC,"TangmaxIC");
878 params.SetSignal(fTdistmaxIC,"TdistmaxIC");
879 params.SetSignal(fTinvolIC,"TinvolIC");
880 params.SetSignal(fJangmaxIC,"JangmaxIC");
881 params.SetSignal(fJiterateIC,"JiterateIC");
882 params.SetSignal(fJdistmaxIC,"JdistmaxIC");
883 params.SetSignal(fJinvolIC,"JinvolIC");
884 params.SetSignal(fMaxmodIC,"MaxmodIC");
885 params.SetSignal(fMinmodIC,"MinmodIC");
886 params.SetSignal(fMaxhitsIC,"MaxhitsIC");
887 params.SetSignal(fVgroupIC,"VgroupIC");
888 params.SetSignal(fAsTypeIC,"AsTypeIC");
889 params.SetSignal(fLambdaIC,"LambdaIC");
890 params.SetSignal(fSlcIC,"SlcIC");
891
892 params.AddNamedSlot("DminDC");
893 params.AddNamedSlot("DtmargDC");
894 params.AddNamedSlot("MaxdhitDC");
895 params.AddNamedSlot("TangmaxDC");
896 params.AddNamedSlot("TdistmaxDC");
897 params.AddNamedSlot("TinvolDC");
898 params.AddNamedSlot("JangmaxDC");
899 params.AddNamedSlot("JiterateDC");
900 params.AddNamedSlot("JdistmaxDC");
901 params.AddNamedSlot("JinvolDC");
902 params.AddNamedSlot("MaxmodDC");
903 params.AddNamedSlot("MinmodDC");
904 params.AddNamedSlot("MaxhitsDC");
905 params.AddNamedSlot("VgroupDC");
906 params.AddNamedSlot("AsTypeDC");
907 params.AddNamedSlot("LambdaDC");
908 params.AddNamedSlot("SlcDC");
909
910 params.SetSignal(fDminDC,"DminDC");
911 params.SetSignal(fDtmargDC,"DtmargDC");
912 params.SetSignal(fMaxdhitDC,"MaxhitDC");
913 params.SetSignal(fTangmaxDC,"TangmaxDC");
914 params.SetSignal(fTdistmaxDC,"TdistmaxDC");
915 params.SetSignal(fTinvolDC,"TinvolDC");
916 params.SetSignal(fJangmaxDC,"JangmaxDC");
917 params.SetSignal(fJiterateDC,"JiterateDC");
918 params.SetSignal(fJdistmaxDC,"JdistmaxDC");
919 params.SetSignal(fJinvolDC,"JinvolDC");
920 params.SetSignal(fMaxmodDC,"MaxmodDC");
921 params.SetSignal(fMinmodDC,"MinmodDC");
922 params.SetSignal(fMaxhitsDC,"MaxhitsDC");
923 params.SetSignal(fVgroupDC,"VgroupDC");
924 params.SetSignal(fAsTypeDC,"AsTypeDC");
925 params.SetSignal(fLambdaDC,"LambdaDC");
926 params.SetSignal(fSlcDC,"SlcDC");
927
928 params.AddNamedSlot("ConditionalReco");
929 params.SetSignal(fConditional,"ConditionalReco");
930
931 fEvt->AddDevice(params);
932
933 // Flag to indicate that a track has been found
934 // to enable condional reconstruction
935 Int_t track=0;
936
937 // Perform the various reconstructions (conditionally)
938 Amanda();
939 track=IceCube();
940 if (!fConditional || !track) track=InIce();
941 if (fConditional != 2 || !track) track=DeepCore();
942}
943
945{
951
952 if (fMaxhitsA<0) return;
953
954 // Fetch all fired Amanda OMs for this event
955 TObjArray* aoms=fEvt->GetDevices("IceAOM");
956 if (!aoms) return;
957 Int_t naoms=aoms->GetEntries();
958 if (!naoms) return;
959
960 // Check for the minimum and/or maximum number of good fired Amanda OMs
961 Int_t ngood=0;
962 for (Int_t iom=0; iom<naoms; iom++)
963 {
964 IceGOM* omx=(IceGOM*)aoms->At(iom);
965 if (!omx) continue;
966 if (omx->GetDeadValue("ADC") || omx->GetDeadValue("LE") || omx->GetDeadValue("TOT")) continue;
967 ngood++;
968 }
969 if (ngood<fMinmodA || ngood>fMaxmodA) return;
970
971 const Float_t c=0.299792458; // Light speed in vacuum in meters per ns
972
973 // Storage of track elements.
974 TObjArray tes;
975 tes.SetOwner();
976
977 NcPosition r1;
978 NcPosition r2;
979 Nc3Vector r12;
980 Nc3Vector rsum;
981 NcPosition r0;
982 TObjArray hits1;
983 TObjArray hits2;
984 Int_t nh1,nh2;
985 NcSignal* sx1=0;
986 NcSignal* sx2=0;
987 Float_t dist=0;
988 Float_t t1,t2,dt,t0;
989 Float_t dtmax;
990 TObjArray hits;
991 TObjArray* ordered;
992
993 // Check the hits of Amanda OM pairs for possible track elements.
994 // Also all the good hits are stored in the meantime (to save CPU time)
995 // for hit association with the various track elements lateron.
996 NcTrack* te=0;
997 for (Int_t i1=0; i1<naoms; i1++) // First OM of the pair
998 {
999 IceGOM* omx1=(IceGOM*)aoms->At(i1);
1000 if (!omx1) continue;
1001 if (omx1->GetDeadValue("LE")) continue;
1002 r1=omx1->GetPosition();
1003 // Select all the good hits of this first OM
1004 hits1.Clear();
1005 // Determine the max. number of hits to be processed for this OM
1006 ordered=0;
1007 if (fMaxhitsA>0 && omx1->GetNhits()>fMaxhitsA) ordered=omx1->SortHits("LE",1,0,7);
1008 nh1=0;
1009 for (Int_t j1=1; j1<=omx1->GetNhits(); j1++)
1010 {
1011 if (ordered)
1012 {
1013 if (nh1>=fMaxhitsA) break;
1014 sx1=(NcSignal*)ordered->At(j1-1);
1015 }
1016 else
1017 {
1018 sx1=omx1->GetHit(j1);
1019 }
1020 if (!sx1) continue;
1021 if (sx1->GetDeadValue("ADC") || sx1->GetDeadValue("LE") || sx1->GetDeadValue("TOT")) continue;
1022 hits1.Add(sx1);
1023 // Also store all good hits in the total hit array
1024 hits.Add(sx1);
1025 nh1++;
1026 }
1027
1028 // No further pair to be formed with the last OM in the list
1029 if (i1==(naoms-1)) break;
1030
1031 nh1=hits1.GetEntries();
1032 if (!nh1) continue;
1033
1034 for (Int_t i2=i1+1; i2<naoms; i2++) // Second OM of the pair
1035 {
1036 IceGOM* omx2=(IceGOM*)aoms->At(i2);
1037 if (!omx2) continue;
1038 if (omx2->GetDeadValue("LE")) continue;
1039 r2=omx2->GetPosition();
1040 r12=r2-r1;
1041 dist=r12.GetNorm();
1042
1043 if (dist<=fDminA) continue;
1044
1045 // Select all the good hits of this second OM
1046 hits2.Clear();
1047 // Determine the max. number of hits to be processed for this OM
1048 ordered=0;
1049 if (fMaxhitsA>0 && omx2->GetNhits()>fMaxhitsA) ordered=omx2->SortHits("LE",1,0,7);
1050 nh2=0;
1051 for (Int_t j2=1; j2<=omx2->GetNhits(); j2++)
1052 {
1053 if (ordered)
1054 {
1055 if (nh2>=fMaxhitsA) break;
1056 sx2=(NcSignal*)ordered->At(j2-1);
1057 }
1058 else
1059 {
1060 sx2=omx2->GetHit(j2);
1061 }
1062 if (!sx2) continue;
1063 if (sx2->GetDeadValue("ADC") || sx2->GetDeadValue("LE") || sx2->GetDeadValue("TOT")) continue;
1064 hits2.Add(sx2);
1065 nh2++;
1066 }
1067
1068 nh2=hits2.GetEntries();
1069 if (!nh2) continue;
1070
1071 // Position r0 in between the two OMs and normalised relative direction r12
1072 rsum=(r1+r2)/2.;
1073 r0.SetPosition((Nc3Vector&)rsum);
1074 r12/=dist;
1075
1076 // Check all hit pair combinations of these two OMs for possible track elements
1077 dtmax=dist/c+float(fDtmargA);
1078 for (Int_t ih1=0; ih1<nh1; ih1++) // Hits of first OM
1079 {
1080 sx1=(NcSignal*)hits1.At(ih1);
1081 if (!sx1) continue;
1082 for (Int_t ih2=0; ih2<nh2; ih2++) // Hits of second OM
1083 {
1084 sx2=(NcSignal*)hits2.At(ih2);
1085 if (!sx2) continue;
1086 t1=sx1->GetSignal("LE",7);
1087 t2=sx2->GetSignal("LE",7);
1088 dt=t2-t1;
1089 t0=(t1+t2)/2.;
1090
1091 if (fabs(dt)>=dtmax) continue;
1092
1093 te=new NcTrack();
1094 tes.Add(te);
1095 if (dt<0) r12*=-1.;
1097 NcTimestamp* tsx=r0.GetTimestamp();
1098 tsx->Add(0,0,(int)t0);
1099 te->SetReferencePoint(r0);
1100 te->Set3Momentum(r12);
1101 }
1102 }
1103 } // end of loop over the second OM of the pair
1104 } // end of loop over first OM of the pair
1105
1106 // Association of hits to the various track elements.
1107 Float_t qmax=0;
1109
1110 // Selection on quality (Q value) in case of multiple track candidates
1111 SelectQvalue(tes,fAsTypeA,qmax);
1112
1113 Int_t nte=tes.GetEntries();
1114 if (!nte) return;
1115
1116 // Clustering of track candidates into jets
1117 TObjArray jets;
1118 jets.SetOwner();
1120
1121 Int_t njets=jets.GetEntries();
1122 if (!njets) return;
1123
1124 // Order the jets w.r.t. decreasing quality value
1125 ordered=fEvt->SortJets(-2,&jets);
1126 TObjArray jets2(*ordered);
1127
1128 // Merging of jets
1130
1131 // Production and storage of the final tracks
1132 TString name=fTrackname;
1133 if (name=="") name=ClassName();
1134 name+="A";
1135 TString title=ClassName();
1136 title+=" Amanda track";
1137 StoreTracks(jets2,fJangmaxA,name,title);
1138}
1139
1141{
1152
1153 if (fMaxhitsI<0) return 0;
1154
1155 // Fetch all fired InIce DOMs for this event
1156 TObjArray* idoms=fEvt->GetDevices("IceIDOM");
1157 if (!idoms) return 0;
1158 Int_t nidoms=idoms->GetEntries();
1159 if (!nidoms) return 0;
1160
1161 // Check for the minimum and/or maximum number of good fired DOMs
1162 Int_t ngood=0;
1163 for (Int_t idom=0; idom<nidoms; idom++)
1164 {
1165 IceGOM* omx=(IceGOM*)idoms->At(idom);
1166 if (!omx) continue;
1167 if (omx->GetDeadValue("ADC") || omx->GetDeadValue("LE") || omx->GetDeadValue("TOT")) continue;
1168 ngood++;
1169 }
1170 if (ngood<fMinmodI || ngood>fMaxmodI) return 0;
1171
1172 const Float_t c=0.299792458; // Light speed in vacuum in meters per ns
1173
1174 // Storage of track elements.
1175 TObjArray tes;
1176 tes.SetOwner();
1177
1178 NcPosition r1;
1179 NcPosition r2;
1180 Nc3Vector r12;
1181 Nc3Vector rsum;
1182 NcPosition r0;
1183 TObjArray hits1;
1184 TObjArray hits2;
1185 Int_t nh1,nh2;
1186 NcSignal* sx1=0;
1187 NcSignal* sx2=0;
1188 Float_t dist=0;
1189 Float_t t1,t2,dt,t0;
1190 Float_t dtmax;
1191 TObjArray hits;
1192 TObjArray* ordered;
1193
1194 // Check the hits of DOM pairs for possible track elements.
1195 // Also all the good hits are stored in the meantime (to save CPU time)
1196 // for hit association with the various track elements lateron.
1197 NcTrack* te=0;
1198 for (Int_t i1=0; i1<nidoms; i1++) // First DOM of the pair
1199 {
1200 IceGOM* omx1=(IceGOM*)idoms->At(i1);
1201 if (!omx1) continue;
1202 if (omx1->GetDeadValue("LE")) continue;
1203 r1=omx1->GetPosition();
1204 // Select all the good hits of this first DOM
1205 hits1.Clear();
1206 // Determine the max. number of hits to be processed for this DOM
1207 ordered=0;
1208 if (fMaxhitsI>0 && omx1->GetNhits()>fMaxhitsI) ordered=omx1->SortHits("LE",1,0,7);
1209 nh1=0;
1210 for (Int_t j1=1; j1<=omx1->GetNhits(); j1++)
1211 {
1212 if (ordered)
1213 {
1214 if (nh1>=fMaxhitsI) break;
1215 sx1=(NcSignal*)ordered->At(j1-1);
1216 }
1217 else
1218 {
1219 sx1=omx1->GetHit(j1);
1220 }
1221 if (!sx1) continue;
1222 if (sx1->GetDeadValue("ADC") || sx1->GetDeadValue("LE") || sx1->GetDeadValue("TOT")) continue;
1223 if (!fSlcI && sx1->GetSignal("SLC")) continue;
1224 hits1.Add(sx1);
1225 // Also store all good hits in the total hit array
1226 hits.Add(sx1);
1227 nh1++;
1228 }
1229
1230 // No further pair to be formed with the last DOM in the list
1231 if (i1==(nidoms-1)) break;
1232
1233 nh1=hits1.GetEntries();
1234 if (!nh1) continue;
1235
1236 for (Int_t i2=i1+1; i2<nidoms; i2++) // Second DOM of the pair
1237 {
1238 IceGOM* omx2=(IceGOM*)idoms->At(i2);
1239 if (!omx2) continue;
1240 if (omx2->GetDeadValue("LE")) continue;
1241 r2=omx2->GetPosition();
1242 r12=r2-r1;
1243 dist=r12.GetNorm();
1244
1245 if (dist<=fDminI) continue;
1246
1247 // Select all the good hits of this second DOM
1248 hits2.Clear();
1249 // Determine the max. number of hits to be processed for this DOM
1250 ordered=0;
1251 if (fMaxhitsI>0 && omx2->GetNhits()>fMaxhitsI) ordered=omx2->SortHits("LE",1,0,7);
1252 nh2=0;
1253 for (Int_t j2=1; j2<=omx2->GetNhits(); j2++)
1254 {
1255 if (ordered)
1256 {
1257 if (nh2>=fMaxhitsI) break;
1258 sx2=(NcSignal*)ordered->At(j2-1);
1259 }
1260 else
1261 {
1262 sx2=omx2->GetHit(j2);
1263 }
1264 if (!sx2) continue;
1265 if (sx2->GetDeadValue("ADC") || sx2->GetDeadValue("LE") || sx2->GetDeadValue("TOT")) continue;
1266 if (!fSlcI && sx2->GetSignal("SLC")) continue;
1267 hits2.Add(sx2);
1268 nh2++;
1269 }
1270
1271 nh2=hits2.GetEntries();
1272 if (!nh2) continue;
1273
1274 // Position r0 in between the two DOMs and normalised relative direction r12
1275 rsum=(r1+r2)/2.;
1276 r0.SetPosition((Nc3Vector&)rsum);
1277 r12/=dist;
1278
1279 // Check all hit pair combinations of these two DOMs for possible track elements
1280 dtmax=dist/c+float(fDtmargI);
1281 for (Int_t ih1=0; ih1<nh1; ih1++) // Hits of first DOM
1282 {
1283 sx1=(NcSignal*)hits1.At(ih1);
1284 if (!sx1) continue;
1285 for (Int_t ih2=0; ih2<nh2; ih2++) // Hits of second DOM
1286 {
1287 sx2=(NcSignal*)hits2.At(ih2);
1288 if (!sx2) continue;
1289 t1=sx1->GetSignal("LE",7);
1290 t2=sx2->GetSignal("LE",7);
1291 dt=t2-t1;
1292 t0=(t1+t2)/2.;
1293
1294 if (fabs(dt)>=dtmax) continue;
1295
1296 te=new NcTrack();
1297 tes.Add(te);
1298 if (dt<0) r12*=-1.;
1300 NcTimestamp* tsx=r0.GetTimestamp();
1301 tsx->Add(0,0,(int)t0);
1302 te->SetReferencePoint(r0);
1303 te->Set3Momentum(r12);
1304 }
1305 }
1306 } // end of loop over the second DOM of the pair
1307 } // end of loop over first DOM of the pair
1308
1309 // Association of hits to the various track elements.
1310 Float_t qmax=0;
1312
1313 // Selection on quality (Q value) in case of multiple track candidates
1314 SelectQvalue(tes,fAsTypeI,qmax);
1315
1316 Int_t nte=tes.GetEntries();
1317 if (!nte) return 0;
1318
1319 // Clustering of track candidates into jets
1320 TObjArray jets;
1321 jets.SetOwner();
1323
1324 Int_t njets=jets.GetEntries();
1325 if (!njets) return 0;
1326
1327 // Order the jets w.r.t. decreasing quality value
1328 ordered=fEvt->SortJets(-2,&jets);
1329 TObjArray jets2(*ordered);
1330
1331 // Merging of jets
1333
1334 // Production and storage of the final tracks
1335 TString name=fTrackname;
1336 if (name=="") name=ClassName();
1337 name+="I";
1338 TString title=ClassName();
1339 title+=" InIce track";
1340 StoreTracks(jets2,fJangmaxI,name,title);
1341
1342 return 1;
1343}
1344
1346{
1357
1358 if (fMaxhitsIC<0) return 0;
1359
1360 // Fetch all fired standard IceCube InIce DOMs for this event
1361 TObjArray* idoms=fEvt->GetDevices("IceICDOM");
1362 if (!idoms) return 0;
1363 Int_t nidoms=idoms->GetEntries();
1364 if (!nidoms) return 0;
1365
1366 // Check for the minimum and/or maximum number of good fired DOMs
1367 Int_t ngood=0;
1368 for (Int_t idom=0; idom<nidoms; idom++)
1369 {
1370 IceGOM* omx=(IceGOM*)idoms->At(idom);
1371 if (!omx) continue;
1372 if (omx->GetDeadValue("ADC") || omx->GetDeadValue("LE") || omx->GetDeadValue("TOT")) continue;
1373 ngood++;
1374 }
1375 if (ngood<fMinmodIC || ngood>fMaxmodIC) return 0;
1376
1377 const Float_t c=0.299792458; // Light speed in vacuum in meters per ns
1378
1379 // Storage of track elements.
1380 TObjArray tes;
1381 tes.SetOwner();
1382
1383 NcPosition r1;
1384 NcPosition r2;
1385 Nc3Vector r12;
1386 Nc3Vector rsum;
1387 NcPosition r0;
1388 TObjArray hits1;
1389 TObjArray hits2;
1390 Int_t nh1,nh2;
1391 NcSignal* sx1=0;
1392 NcSignal* sx2=0;
1393 Float_t dist=0;
1394 Float_t t1,t2,dt,t0;
1395 Float_t dtmax;
1396 TObjArray hits;
1397 TObjArray* ordered;
1398
1399 // Check the hits of DOM pairs for possible track elements.
1400 // Also all the good hits are stored in the meantime (to save CPU time)
1401 // for hit association with the various track elements lateron.
1402 NcTrack* te=0;
1403 for (Int_t i1=0; i1<nidoms; i1++) // First DOM of the pair
1404 {
1405 IceGOM* omx1=(IceGOM*)idoms->At(i1);
1406 if (!omx1) continue;
1407 if (omx1->GetDeadValue("LE")) continue;
1408 r1=omx1->GetPosition();
1409 // Select all the good hits of this first DOM
1410 hits1.Clear();
1411 // Determine the max. number of hits to be processed for this DOM
1412 ordered=0;
1413 if (fMaxhitsIC>0 && omx1->GetNhits()>fMaxhitsIC) ordered=omx1->SortHits("LE",1,0,7);
1414 nh1=0;
1415 for (Int_t j1=1; j1<=omx1->GetNhits(); j1++)
1416 {
1417 if (ordered)
1418 {
1419 if (nh1>=fMaxhitsIC) break;
1420 sx1=(NcSignal*)ordered->At(j1-1);
1421 }
1422 else
1423 {
1424 sx1=omx1->GetHit(j1);
1425 }
1426 if (!sx1) continue;
1427 if (sx1->GetDeadValue("ADC") || sx1->GetDeadValue("LE") || sx1->GetDeadValue("TOT")) continue;
1428 if (!fSlcIC && sx1->GetSignal("SLC")) continue;
1429 hits1.Add(sx1);
1430 // Also store all good hits in the total hit array
1431 hits.Add(sx1);
1432 nh1++;
1433 }
1434
1435 // No further pair to be formed with the last DOM in the list
1436 if (i1==(nidoms-1)) break;
1437
1438 nh1=hits1.GetEntries();
1439 if (!nh1) continue;
1440
1441 for (Int_t i2=i1+1; i2<nidoms; i2++) // Second DOM of the pair
1442 {
1443 IceGOM* omx2=(IceGOM*)idoms->At(i2);
1444 if (!omx2) continue;
1445 if (omx2->GetDeadValue("LE")) continue;
1446 r2=omx2->GetPosition();
1447 r12=r2-r1;
1448 dist=r12.GetNorm();
1449
1450 if (dist<=fDminIC) continue;
1451
1452 // Select all the good hits of this second DOM
1453 hits2.Clear();
1454 // Determine the max. number of hits to be processed for this DOM
1455 ordered=0;
1456 if (fMaxhitsIC>0 && omx2->GetNhits()>fMaxhitsIC) ordered=omx2->SortHits("LE",1,0,7);
1457 nh2=0;
1458 for (Int_t j2=1; j2<=omx2->GetNhits(); j2++)
1459 {
1460 if (ordered)
1461 {
1462 if (nh2>=fMaxhitsIC) break;
1463 sx2=(NcSignal*)ordered->At(j2-1);
1464 }
1465 else
1466 {
1467 sx2=omx2->GetHit(j2);
1468 }
1469 if (!sx2) continue;
1470 if (sx2->GetDeadValue("ADC") || sx2->GetDeadValue("LE") || sx2->GetDeadValue("TOT")) continue;
1471 if (!fSlcIC && sx2->GetSignal("SLC")) continue;
1472 hits2.Add(sx2);
1473 nh2++;
1474 }
1475
1476 nh2=hits2.GetEntries();
1477 if (!nh2) continue;
1478
1479 // Position r0 in between the two DOMs and normalised relative direction r12
1480 rsum=(r1+r2)/2.;
1481 r0.SetPosition((Nc3Vector&)rsum);
1482 r12/=dist;
1483
1484 // Check all hit pair combinations of these two DOMs for possible track elements
1485 dtmax=dist/c+float(fDtmargIC);
1486 for (Int_t ih1=0; ih1<nh1; ih1++) // Hits of first DOM
1487 {
1488 sx1=(NcSignal*)hits1.At(ih1);
1489 if (!sx1) continue;
1490 for (Int_t ih2=0; ih2<nh2; ih2++) // Hits of second DOM
1491 {
1492 sx2=(NcSignal*)hits2.At(ih2);
1493 if (!sx2) continue;
1494 t1=sx1->GetSignal("LE",7);
1495 t2=sx2->GetSignal("LE",7);
1496 dt=t2-t1;
1497 t0=(t1+t2)/2.;
1498
1499 if (fabs(dt)>=dtmax) continue;
1500
1501 te=new NcTrack();
1502 tes.Add(te);
1503 if (dt<0) r12*=-1.;
1505 NcTimestamp* tsx=r0.GetTimestamp();
1506 tsx->Add(0,0,(int)t0);
1507 te->SetReferencePoint(r0);
1508 te->Set3Momentum(r12);
1509 }
1510 }
1511 } // end of loop over the second DOM of the pair
1512 } // end of loop over first DOM of the pair
1513
1514 // Association of hits to the various track elements.
1515 Float_t qmax=0;
1517
1518 // Selection on quality (Q value) in case of multiple track candidates
1519 SelectQvalue(tes,fAsTypeIC,qmax);
1520
1521 Int_t nte=tes.GetEntries();
1522 if (!nte) return 0;
1523
1524 // Clustering of track candidates into jets
1525 TObjArray jets;
1526 jets.SetOwner();
1528
1529 Int_t njets=jets.GetEntries();
1530 if (!njets) return 0;
1531
1532 // Order the jets w.r.t. decreasing quality value
1533 ordered=fEvt->SortJets(-2,&jets);
1534 TObjArray jets2(*ordered);
1535
1536 // Merging of jets
1538
1539 // Production and storage of the final tracks
1540 TString name=fTrackname;
1541 if (name=="") name=ClassName();
1542 name+="IC";
1543 TString title=ClassName();
1544 title+=" standard IceCube track";
1545 StoreTracks(jets2,fJangmaxI,name,title);
1546
1547 return 1;
1548}
1549
1551{
1562
1563 if (fMaxhitsDC<0) return 0;
1564
1565 // Fetch all fired DeepCore DOMs for this event
1566 TObjArray* idoms=fEvt->GetDevices("IceDCDOM");
1567 if (!idoms) return 0;
1568 Int_t nidoms=idoms->GetEntries();
1569 if (!nidoms) return 0;
1570
1571 // Check for the minimum and/or maximum number of good fired DOMs
1572 Int_t ngood=0;
1573 for (Int_t idom=0; idom<nidoms; idom++)
1574 {
1575 IceGOM* omx=(IceGOM*)idoms->At(idom);
1576 if (!omx) continue;
1577 if (omx->GetDeadValue("ADC") || omx->GetDeadValue("LE") || omx->GetDeadValue("TOT")) continue;
1578 ngood++;
1579 }
1580 if (ngood<fMinmodDC || ngood>fMaxmodDC) return 0;
1581
1582 const Float_t c=0.299792458; // Light speed in vacuum in meters per ns
1583
1584 // Storage of track elements.
1585 TObjArray tes;
1586 tes.SetOwner();
1587
1588 NcPosition r1;
1589 NcPosition r2;
1590 Nc3Vector r12;
1591 Nc3Vector rsum;
1592 NcPosition r0;
1593 TObjArray hits1;
1594 TObjArray hits2;
1595 Int_t nh1,nh2;
1596 NcSignal* sx1=0;
1597 NcSignal* sx2=0;
1598 Float_t dist=0;
1599 Float_t t1,t2,dt,t0;
1600 Float_t dtmax;
1601 TObjArray hits;
1602 TObjArray* ordered;
1603
1604 // Check the hits of DOM pairs for possible track elements.
1605 // Also all the good hits are stored in the meantime (to save CPU time)
1606 // for hit association with the various track elements lateron.
1607 NcTrack* te=0;
1608 for (Int_t i1=0; i1<nidoms; i1++) // First DOM of the pair
1609 {
1610 IceGOM* omx1=(IceGOM*)idoms->At(i1);
1611 if (!omx1) continue;
1612 if (omx1->GetDeadValue("LE")) continue;
1613 r1=omx1->GetPosition();
1614 // Select all the good hits of this first DOM
1615 hits1.Clear();
1616 // Determine the max. number of hits to be processed for this DOM
1617 ordered=0;
1618 if (fMaxhitsDC>0 && omx1->GetNhits()>fMaxhitsDC) ordered=omx1->SortHits("LE",1,0,7);
1619 nh1=0;
1620 for (Int_t j1=1; j1<=omx1->GetNhits(); j1++)
1621 {
1622 if (ordered)
1623 {
1624 if (nh1>=fMaxhitsDC) break;
1625 sx1=(NcSignal*)ordered->At(j1-1);
1626 }
1627 else
1628 {
1629 sx1=omx1->GetHit(j1);
1630 }
1631 if (!sx1) continue;
1632 if (sx1->GetDeadValue("ADC") || sx1->GetDeadValue("LE") || sx1->GetDeadValue("TOT")) continue;
1633 if (!fSlcDC && sx1->GetSignal("SLC")) continue;
1634 hits1.Add(sx1);
1635 // Also store all good hits in the total hit array
1636 hits.Add(sx1);
1637 nh1++;
1638 }
1639
1640 // No further pair to be formed with the last DOM in the list
1641 if (i1==(nidoms-1)) break;
1642
1643 nh1=hits1.GetEntries();
1644 if (!nh1) continue;
1645
1646 for (Int_t i2=i1+1; i2<nidoms; i2++) // Second DOM of the pair
1647 {
1648 IceGOM* omx2=(IceGOM*)idoms->At(i2);
1649 if (!omx2) continue;
1650 if (omx2->GetDeadValue("LE")) continue;
1651 r2=omx2->GetPosition();
1652 r12=r2-r1;
1653 dist=r12.GetNorm();
1654
1655 if (dist<=fDminDC) continue;
1656
1657 // Select all the good hits of this second DOM
1658 hits2.Clear();
1659 // Determine the max. number of hits to be processed for this DOM
1660 ordered=0;
1661 if (fMaxhitsDC>0 && omx2->GetNhits()>fMaxhitsDC) ordered=omx2->SortHits("LE",1,0,7);
1662 nh2=0;
1663 for (Int_t j2=1; j2<=omx2->GetNhits(); j2++)
1664 {
1665 if (ordered)
1666 {
1667 if (nh2>=fMaxhitsDC) break;
1668 sx2=(NcSignal*)ordered->At(j2-1);
1669 }
1670 else
1671 {
1672 sx2=omx2->GetHit(j2);
1673 }
1674 if (!sx2) continue;
1675 if (sx2->GetDeadValue("ADC") || sx2->GetDeadValue("LE") || sx2->GetDeadValue("TOT")) continue;
1676 if (!fSlcDC && sx2->GetSignal("SLC")) continue;
1677 hits2.Add(sx2);
1678 nh2++;
1679 }
1680
1681 nh2=hits2.GetEntries();
1682 if (!nh2) continue;
1683
1684 // Position r0 in between the two DOMs and normalised relative direction r12
1685 rsum=(r1+r2)/2.;
1686 r0.SetPosition((Nc3Vector&)rsum);
1687 r12/=dist;
1688
1689 // Check all hit pair combinations of these two DOMs for possible track elements
1690 dtmax=dist/c+float(fDtmargDC);
1691 for (Int_t ih1=0; ih1<nh1; ih1++) // Hits of first DOM
1692 {
1693 sx1=(NcSignal*)hits1.At(ih1);
1694 if (!sx1) continue;
1695 for (Int_t ih2=0; ih2<nh2; ih2++) // Hits of second DOM
1696 {
1697 sx2=(NcSignal*)hits2.At(ih2);
1698 if (!sx2) continue;
1699 t1=sx1->GetSignal("LE",7);
1700 t2=sx2->GetSignal("LE",7);
1701 dt=t2-t1;
1702 t0=(t1+t2)/2.;
1703
1704 if (fabs(dt)>=dtmax) continue;
1705
1706 te=new NcTrack();
1707 tes.Add(te);
1708 if (dt<0) r12*=-1.;
1710 NcTimestamp* tsx=r0.GetTimestamp();
1711 tsx->Add(0,0,(int)t0);
1712 te->SetReferencePoint(r0);
1713 te->Set3Momentum(r12);
1714 }
1715 }
1716 } // end of loop over the second DOM of the pair
1717 } // end of loop over first DOM of the pair
1718
1719 // Association of hits to the various track elements.
1720 Float_t qmax=0;
1722
1723 // Selection on quality (Q value) in case of multiple track candidates
1724 SelectQvalue(tes,fAsTypeDC,qmax);
1725
1726 Int_t nte=tes.GetEntries();
1727 if (!nte) return 0;
1728
1729 // Clustering of track candidates into jets
1730 TObjArray jets;
1731 jets.SetOwner();
1733
1734 Int_t njets=jets.GetEntries();
1735 if (!njets) return 0;
1736
1737 // Order the jets w.r.t. decreasing quality value
1738 ordered=fEvt->SortJets(-2,&jets);
1739 TObjArray jets2(*ordered);
1740
1741 // Merging of jets
1743
1744 // Production and storage of the final tracks
1745 TString name=fTrackname;
1746 if (name=="") name=ClassName();
1747 name+="DC";
1748 TString title=ClassName();
1749 title+=" DeepCore track";
1750 StoreTracks(jets2,fJangmaxI,name,title);
1751
1752 return 1;
1753}
1754
1755void IceDwalkx::AssociateHits(TObjArray& tes,TObjArray& hits,Int_t vgroup,Float_t maxdhit,Int_t astype,Float_t& qmax,Float_t lambda)
1756{
1762
1763 const Float_t pi=acos(-1.);
1764 const Float_t c=0.299792458; // Light speed in vacuum in meters per ns
1765 const Float_t npice=1.31768387; // Phase refractive index (c/v_phase) of ice
1766 const Float_t ngice=1.35075806; // Group refractive index (c/v_group) of ice
1767 const Float_t thetac=acos(1./npice); // Cherenkov angle (in radians)
1768
1769 // Angular reduction of complement of thetac due to v_phase and v_group difference
1770 Float_t alphac=0;
1771 if (vgroup) alphac=atan((1.-npice/ngice)/sqrt(npice*npice-1.));
1772
1773 Int_t nte=tes.GetEntries();
1774 Int_t nh=hits.GetEntries();
1775 Float_t d=0;
1776 Nc3Vector p;
1777 NcPosition r1;
1778 NcPosition r2;
1779 Nc3Vector r12;
1780 Float_t t1;
1781 Float_t dist,t0,tgeo,tres;
1782 NcSample levers; // Statistics of the assoc. hit lever arms
1783 levers.SetStoreMode(1);// Enable median calculation
1784 NcSample hprojs; // Statistics of the assoc. hit position projections on the track w.r.t. r0
1785 hprojs.SetStoreMode(1);// Enable median calculation
1786 NcSample times; // Statistics of the time residuals of the associated hits
1787 times.SetStoreMode(1); // Enable median calculation
1788 NcSignal fit; // Storage of Q value etc... for each track candidate
1789 fit.AddNamedSlot("QTC");
1790 fit.AddNamedSlot("Nstrings");
1791 fit.AddNamedSlot("SpanL");
1792 fit.AddNamedSlot("MedianL");
1793 fit.AddNamedSlot("MeanL");
1794 fit.AddNamedSlot("SigmaL");
1795 fit.AddNamedSlot("SpreadL");
1796 fit.AddNamedSlot("ExpSpreadL");
1797 fit.AddNamedSlot("Span");
1798 fit.AddNamedSlot("Median");
1799 fit.AddNamedSlot("Mean");
1800 fit.AddNamedSlot("Sigma");
1801 fit.AddNamedSlot("Spread");
1802 fit.AddNamedSlot("ExpSpread");
1803 fit.AddNamedSlot("MedianT");
1804 fit.AddNamedSlot("MeanT");
1805 fit.AddNamedSlot("SigmaT");
1806 fit.AddNamedSlot("SpreadT");
1807 fit.AddNamedSlot("term1");
1808 fit.AddNamedSlot("term2");
1809 fit.AddNamedSlot("term3");
1810 fit.AddNamedSlot("term4");
1811 fit.AddNamedSlot("term5");
1812 Int_t nah=0; // Number of associated hits
1813 Int_t nas=0; // Number of associated strings
1814 Float_t qtc=0; // Quality parameter for the track (candidate)
1815 Float_t nax=0; // Associated hits and/or strings value to build the QTC for a certain TE
1816 Float_t lmin,lmax,spanl,medianl,meanl,sigmal,spreadl,expspreadl;
1817 Float_t hproj,hprojmin,hprojmax,span,median,mean,sigma,spread,expspread;
1818 Float_t mediant,meant,sigmat,spreadt;
1819 Float_t term1,term2,term3,term4,term5;
1820 qmax=0;
1821 for (Int_t jte=0; jte<nte; jte++)
1822 {
1823 NcTrack* te=(NcTrack*)tes.At(jte);
1824 if (!te) continue;
1825 NcPosition* tr0=te->GetReferencePoint();
1826 NcTimestamp* tt0=tr0->GetTimestamp();
1827 t0=fEvt->GetDifference(tt0,"ns");
1828 p=te->Get3Momentum();
1829 levers.Reset();
1830 hprojs.Reset();
1831 times.Reset();
1832 for (Int_t jh=0; jh<nh; jh++)
1833 {
1834 NcSignal* sx1=(NcSignal*)hits.At(jh);
1835 if (!sx1) continue;
1836 IceGOM* omx=(IceGOM*)sx1->GetDevice();
1837 if (!omx) continue;
1838 r1=omx->GetPosition();
1839 d=te->GetDistance(r1);
1840 r12=r1-(*tr0);
1841 hproj=p.Dot(r12);
1842 dist=hproj+d/tan(pi/2.-thetac-alphac);
1843 tgeo=t0+dist/c;
1844 t1=sx1->GetSignal("LE",7);
1845 tres=t1-tgeo;
1846
1847 d=d/sin(thetac); // The distance traveled by a cherenkov photon
1848
1849 if (tres<-30 || tres>300 || d>maxdhit*lambda) continue;
1850
1851 // Associate this hit to the TE
1852 te->AddSignal(*sx1);
1853 levers.Enter(fabs(hproj));
1854 hprojs.Enter(hproj);
1855 times.Enter(tres);
1856 }
1857
1858 // Determine the Q quality of the various TE's.
1859 // Good quality TE's will be called track candidates (TC's)
1860 nah=te->GetNsignals();
1861 nas=fEvt->GetNstrings(*te,"IceGOM");
1862 nax=0;
1863 if (astype==1) nax=nah;
1864 if (astype==2) nax=nas;
1865 if (astype==3) nax=nah*nas;
1866 lmin=levers.GetMinimum(1);
1867 lmax=levers.GetMaximum(1);
1868 spanl=lmax-lmin;
1869 medianl=levers.GetMedian(1);
1870 meanl=levers.GetMean(1);
1871 sigmal=levers.GetSigma(1);
1872 spreadl=levers.GetSpread(1);
1873 // Expected spread for a flat distribution
1874 expspreadl=0;
1875 if (spanl>0) expspreadl=(0.5*pow(lmin,2)+0.5*pow(lmax,2)+pow(medianl,2)-medianl*(lmin+lmax))/spanl;
1876 hprojmin=hprojs.GetMinimum(1);
1877 hprojmax=hprojs.GetMaximum(1);
1878 span=hprojmax-hprojmin;
1879 median=hprojs.GetMedian(1);
1880 mean=hprojs.GetMean(1);
1881 sigma=hprojs.GetSigma(1);
1882 spread=hprojs.GetSpread(1);
1883 // Expected spread for a flat distribution
1884 expspread=0;
1885 if (span>0) expspread=(0.5*pow(hprojmin,2)+0.5*pow(hprojmax,2)+pow(median,2)-median*(hprojmin+hprojmax))/span;
1886 mediant=times.GetMedian(1);
1887 meant=times.GetMean(1);
1888 sigmat=times.GetSigma(1);
1889 spreadt=times.GetSpread(1);
1890
1891 term1=0;
1892 if (span>0) term1=2.*spread/span;
1893
1894 term2=0;
1895 if (spanl>0) term2=2.*spreadl/spanl;
1896
1897 term3=0;
1898 if (spread>0) term3=fabs(spread-expspread)/spread;
1899
1900 term4=0;
1901 if (spreadl>0) term4=fabs(spreadl-expspreadl)/spreadl;
1902
1903 term5=0;
1904 if (spreadt>0) term5=fabs(mediant)/spreadt;
1905
1906 qtc=nax*(term1+term2)-term3-term4-term5;
1907 if (fabs(median)>span/2.) qtc=0; // Require projected hits on both sides of r0
1908
1909 fit.SetSignal(qtc,"QTC");
1910 fit.SetSignal(nas,"Nstrings");
1911 fit.SetSignal(spanl,"SpanL");
1912 fit.SetSignal(medianl,"MedianL");
1913 fit.SetSignal(meanl,"MeanL");
1914 fit.SetSignal(sigmal,"SigmaL");
1915 fit.SetSignal(spreadl,"SpreadL");
1916 fit.SetSignal(expspreadl,"ExpSpreadL");
1917 fit.SetSignal(span,"Span");
1918 fit.SetSignal(median,"Median");
1919 fit.SetSignal(mean,"Mean");
1920 fit.SetSignal(sigma,"Sigma");
1921 fit.SetSignal(spread,"Spread");
1922 fit.SetSignal(expspread,"ExpSpread");
1923 fit.SetSignal(mediant,"MedianT");
1924 fit.SetSignal(meant,"MeanT");
1925 fit.SetSignal(sigmat,"SigmaT");
1926 fit.SetSignal(spreadt,"SpreadT");
1927 fit.SetSignal(term1,"term1");
1928 fit.SetSignal(term2,"term2");
1929 fit.SetSignal(term3,"term3");
1930 fit.SetSignal(term4,"term4");
1931 fit.SetSignal(term5,"term5");
1932 te->SetFitDetails(fit);
1933 if (qtc>qmax) qmax=qtc;
1934 }
1935}
1936
1937void IceDwalkx::SelectQvalue(TObjArray& tes,Int_t astype,Float_t qmax)
1938{
1944
1945 Int_t nte=tes.GetEntries();
1946 Int_t nah=0;
1947 Int_t nas=0;
1948 Float_t nax=0;
1949 Float_t qtc=0;
1950 Nc3Vector p;
1951 for (Int_t jtc=0; jtc<nte; jtc++)
1952 {
1953 NcTrack* te=(NcTrack*)tes.At(jtc);
1954 if (!te) continue;
1955 NcSignal* sx1=(NcSignal*)te->GetFitDetails();
1956 qtc=-1;
1957 nah=te->GetNsignals();
1958 nas=0;
1959 if (sx1)
1960 {
1961 qtc=sx1->GetSignal("QTC");
1962 nas=int(sx1->GetSignal("Nstrings"));
1963 }
1964 nax=0;
1965 if (astype==1) nax=nah;
1966 if (astype==2) nax=nas;
1967 if (astype==3) nax=nah*nas;
1968
1969 if (nax<=0 || qtc<0.8*qmax)
1970 {
1971 tes.RemoveAt(jtc);
1972 delete te;
1973 }
1974 else // Set Q value as momentum to provide a weight for jet clustering
1975 {
1976 if (qtc>0)
1977 {
1978 p=te->Get3Momentum();
1979 p*=qtc;
1980 te->Set3Momentum(p);
1981 }
1982 }
1983 }
1984 tes.Compress();
1985}
1986
1987void IceDwalkx::ClusterTracks(TObjArray& tes,TObjArray& jets,Float_t tangmax,Int_t tinvol,Float_t tdistmax,Int_t astype,Float_t qmax)
1988{
2000
2001 Int_t nte=tes.GetEntries();
2002 Float_t ang=0;
2003 NcSample pos;
2004 NcSample time;
2005 Float_t vec[3],err[3];
2006 NcPosition r0;
2007 Float_t t0,dist,dist2;
2008 Int_t nah=0; // Number of associated hits
2009 Int_t nas=0; // Number of associated strings
2010 Float_t nax=0,naxmax=0; // Associated hits and/or strings value for the jets
2011 Float_t qtc;
2012 for (Int_t jtc1=0; jtc1<nte; jtc1++)
2013 {
2014 NcTrack* te=(NcTrack*)tes.At(jtc1);
2015 if (!te) continue;
2016 NcPosition* x1=te->GetReferencePoint();
2017 if (!x1) continue;
2018 NcTimestamp* ts1=x1->GetTimestamp();
2019 if (!ts1) continue;
2020 NcJet* jx=new NcJet();
2021 jx->AddTrack(te);
2022 pos.Reset();
2023 time.Reset();
2024 x1->GetPosition(vec,"car");
2025 pos.Enter(vec[0],vec[1],vec[2]);
2026 t0=fEvt->GetDifference(ts1,"ns");
2027 time.Enter(t0);
2028 for (Int_t jtc2=0; jtc2<nte; jtc2++)
2029 {
2030 if (jtc2==jtc1) continue;
2031 NcTrack* te2=(NcTrack*)tes.At(jtc2);
2032 if (!te2) continue;
2033 ang=te->GetOpeningAngle(*te2,"deg");
2034 if (ang<=tangmax)
2035 {
2036 NcPosition* x2=te2->GetReferencePoint();
2037 if (!x2) continue;
2038 NcTimestamp* ts2=x2->GetTimestamp();
2039 if (!ts2) continue;
2040 if (!tinvol)
2041 {
2042 dist=te->GetDistance(te2);
2043 }
2044 else
2045 {
2046 dist=te->GetDistance(x2);
2047 dist2=te2->GetDistance(x1);
2048 if (dist2<dist) dist=dist2;
2049 }
2050 if (dist<=tdistmax)
2051 {
2052 x2->GetPosition(vec,"car");
2053 pos.Enter(vec[0],vec[1],vec[2]);
2054 t0=fEvt->GetDifference(ts2,"ns");
2055 time.Enter(t0);
2056 jx->AddTrack(te2);
2057 }
2058 }
2059 }
2060
2061 // Set the reference point data for this jet
2062 for (Int_t j=1; j<=3; j++)
2063 {
2064 vec[j-1]=pos.GetMean(j);
2065 err[j-1]=pos.GetSigma(j);
2066 }
2067 r0.SetPosition(vec,"car");
2068 r0.SetPositionErrors(err,"car");
2070 NcTimestamp* jt0=r0.GetTimestamp();
2071 t0=time.GetMean(1);
2072 jt0->Add(0,0,(int)t0);
2073 jx->SetReferencePoint(r0);
2074
2075 // Store this jet for further processing if ntracks>1
2076 if (jx->GetNtracks() > 1 || tangmax<=0)
2077 {
2078 jets.Add(jx);
2079 nah=jx->GetNsignals();
2080 nas=fEvt->GetNstrings(*jx,"IceGOM");
2081 nax=0;
2082 if (astype==1) nax=nah;
2083 if (astype==2) nax=nas;
2084 if (astype==3) nax=nah*nas;
2085 if (nax>naxmax) naxmax=nax;
2086 }
2087 else // Only keep single-track jets which have qtc=qmax
2088 {
2089 NcSignal* sx1=(NcSignal*)te->GetFitDetails();
2090 qtc=-1;
2091 if (sx1) qtc=sx1->GetSignal("QTC");
2092 if (qtc>=(qmax-1.e-10))
2093 {
2094 jets.Add(jx);
2095 nah=jx->GetNsignals();
2096 nas=fEvt->GetNstrings(*jx,"IceGOM");
2097 nax=0;
2098 if (astype==1) nax=nah;
2099 if (astype==2) nax=nas;
2100 if (astype==3) nax=nah*nas;
2101 if (nax>naxmax) naxmax=nax;
2102 }
2103 else
2104 {
2105 delete jx;
2106 }
2107 }
2108 }
2109
2110 Int_t njets=jets.GetEntries();
2111 if (!njets) return;
2112
2113 // The sum of 0.15*(nax-naxmax) and average qtc value per track for each jet
2114 // will be stored as the jet energy to enable sorting on this value lateron
2115 Float_t sortval=0;
2116 Int_t ntk=0;
2117 for (Int_t ijet=0; ijet<njets; ijet++)
2118 {
2119 NcJet* jx=(NcJet*)jets.At(ijet);
2120 if (!jx) continue;
2121 nah=jx->GetNsignals();
2122 nas=fEvt->GetNstrings(*jx,"IceGOM");
2123 nax=0;
2124 if (astype==1) nax=nah;
2125 if (astype==2) nax=nas;
2126 if (astype==3) nax=nah*nas;
2127 ntk=jx->GetNtracks();
2128 sortval=0.15*(nax-naxmax);
2129 if (ntk) sortval+=jx->GetMomentum()/float(ntk);
2130 jx->SetScalar(sortval);
2131 }
2132}
2133
2134void IceDwalkx::MergeJets(TObjArray& jets2,Float_t jangmax,Float_t jdistmax,Int_t jinvol,Int_t jiterate,Int_t astype)
2135{
2147
2148 Int_t njets=jets2.GetEntries();
2149 NcJet* jx1=0;
2150 NcJet* jx2=0;
2151 Int_t merged=1;
2152 Int_t ntk;
2153 Int_t nah=0;
2154 Int_t nas=0;
2155 Float_t nax=0,naxmax=0;
2156 Float_t ang,dist,dist2,t0;
2157 NcSample pos;
2158 NcSample time;
2159 NcPosition r0;
2160 Float_t vec[3],err[3];
2161 Float_t sortval;
2162 if (jangmax>=0)
2163 {
2164 while (merged)
2165 {
2166 merged=0;
2167 naxmax=0;
2168 for (Int_t jet1=0; jet1<njets; jet1++)
2169 {
2170 jx1=(NcJet*)jets2.At(jet1);
2171 if (!jx1) continue;
2172 NcPosition* x1=jx1->GetReferencePoint();
2173 if (!x1) continue;
2174 NcTimestamp* ts1=x1->GetTimestamp();
2175 if (!ts1) continue;
2176 pos.Reset();
2177 time.Reset();
2178 x1->GetPosition(vec,"car");
2179 pos.Enter(vec[0],vec[1],vec[2]);
2180 t0=fEvt->GetDifference(ts1,"ns");
2181 time.Enter(t0);
2182 for (Int_t jet2=0; jet2<njets; jet2++)
2183 {
2184 jx2=(NcJet*)jets2.At(jet2);
2185 if (!jx2 || jet2==jet1) continue;
2186 NcPosition* x2=jx2->GetReferencePoint();
2187 if (!x2) continue;
2188 NcTimestamp* ts2=x2->GetTimestamp();
2189 if (!ts2) continue;
2190 ang=jx1->GetOpeningAngle(*jx2,"deg");
2191 if (ang<=jangmax)
2192 {
2193 if (!jinvol)
2194 {
2195 dist=jx1->GetDistance(jx2);
2196 }
2197 else
2198 {
2199 dist=jx1->GetDistance(x2);
2200 dist2=jx2->GetDistance(x1);
2201 if (dist2<dist) dist=dist2;
2202 }
2203 if (dist<=jdistmax)
2204 {
2205 x2->GetPosition(vec,"car");
2206 pos.Enter(vec[0],vec[1],vec[2]);
2207 t0=fEvt->GetDifference(ts2,"ns");
2208 time.Enter(t0);
2209 for (Int_t jtk=1; jtk<=jx2->GetNtracks(); jtk++)
2210 {
2211 NcTrack* te=jx2->GetTrack(jtk);
2212 if (!te) continue;
2213 jx1->AddTrack(te);
2214 }
2215 jets2.RemoveAt(jet2);
2216 if (jiterate) merged=1;
2217 }
2218 }
2219 } // End of jet2 loop
2220
2221 // Set the reference point data for this jet
2222 for (Int_t k=1; k<=3; k++)
2223 {
2224 vec[k-1]=pos.GetMean(k);
2225 err[k-1]=pos.GetSigma(k);
2226 }
2227 r0.SetPosition(vec,"car");
2228 r0.SetPositionErrors(err,"car");
2230 NcTimestamp* jt0=r0.GetTimestamp();
2231 t0=time.GetMean(1);
2232 jt0->Add(0,0,(int)t0);
2233 jx1->SetReferencePoint(r0);
2234
2235 nah=jx1->GetNsignals();
2236 nas=fEvt->GetNstrings(*jx1,"IceGOM");
2237 nax=0;
2238 if (astype==1) nax=nah;
2239 if (astype==2) nax=nas;
2240 if (astype==3) nax=nah*nas;
2241 if (nax>naxmax) naxmax=nax;
2242 } // End of jet1 loop
2243
2244 jets2.Compress();
2245
2246 // The sum of 0.15*(nax-naxmax) and average qtc value per track for each jet
2247 // will be stored as the jet energy to enable sorting on this value
2248 for (Int_t jjet=0; jjet<njets; jjet++)
2249 {
2250 NcJet* jx=(NcJet*)jets2.At(jjet);
2251 if (!jx) continue;
2252 nah=jx->GetNsignals();
2253 nas=fEvt->GetNstrings(*jx,"IceGOM");
2254 nax=0;
2255 if (astype==1) nax=nah;
2256 if (astype==2) nax=nas;
2257 if (astype==3) nax=nah*nas;
2258 ntk=jx->GetNtracks();
2259 sortval=0.15*float(nax-naxmax);
2260 if (ntk) sortval+=jx->GetMomentum()/float(ntk);
2261 jx->SetScalar(sortval);
2262 }
2263
2264 // Order the jets w.r.t. decreasing quality value
2265 TObjArray* ordered=fEvt->SortJets(-2,&jets2);
2266 njets=ordered->GetEntries();
2267 jets2.Clear();
2268 for (Int_t icopy=0; icopy<njets; icopy++)
2269 {
2270 jets2.Add(ordered->At(icopy));
2271 }
2272 } // End of iterative while loop
2273 }
2274}
2275
2276void IceDwalkx::StoreTracks(TObjArray& jets2,Float_t jangmax,TString name,TString title)
2277{
2292
2293 Int_t njets=jets2.GetEntries();
2294 NcTrack t;
2295 t.SetNameTitle(name.Data(),title.Data());
2296 t.SetCharge(fCharge);
2297 Nc3Vector p;
2298 for (Int_t jet=0; jet<njets; jet++)
2299 {
2300 NcJet* jx=(NcJet*)jets2.At(jet);
2301 if (!jx) continue;
2302 NcPosition* ref=jx->GetReferencePoint();
2303 if (!ref) continue;
2304 fEvt->AddTrack(t);
2305 NcTrack* trk=fEvt->GetTrack(fEvt->GetNtracks());
2306 if (!trk) continue;
2307 trk->SetId(fEvt->GetNtracks(1)+1);
2308 p=jx->Get3Momentum();
2309 p/=p.GetNorm();
2310 trk->Set3Momentum(p);
2311 trk->SetReferencePoint(*ref);
2312 NcTimestamp* tt0=ref->GetTimestamp();
2313 if (tt0) trk->SetTimestamp(*tt0);
2314 for (Int_t jt=1; jt<=jx->GetNtracks(); jt++)
2315 {
2316 NcTrack* tx=jx->GetTrack(jt);
2317 if (!tx) continue;
2318 for (Int_t is=1; is<=tx->GetNsignals(); is++)
2319 {
2320 NcSignal* sx1=tx->GetSignal(is);
2321 if (sx1) sx1->AddTrack(*trk);
2322 }
2323 }
2324
2325 // Only take the jet with the highest quality number
2326 // (i.e. the first jet in the list) when the user had selected
2327 // this reconstruction mode.
2328 if (jangmax<0) break;
2329 }
2330}
2331
ClassImp(IceDwalkx)
TTask derived class to perform (improved) direct walk reconstruction.
Definition IceDwalkx.h:16
Int_t fDtmargI
Definition IceDwalkx.h:40
Int_t fJinvolDC
Definition IceDwalkx.h:74
Int_t fJinvolA
Definition IceDwalkx.h:71
Float_t fTdistmaxI
Definition IceDwalkx.h:52
Int_t fTinvolA
Definition IceDwalkx.h:55
Int_t fConditional
Definition IceDwalkx.h:87
Int_t fJinvolI
Definition IceDwalkx.h:72
Int_t fJiterateIC
Definition IceDwalkx.h:65
Float_t fJdistmaxIC
Definition IceDwalkx.h:69
Float_t fDminA
Definition IceDwalkx.h:35
virtual ~IceDwalkx()
virtual void Amanda()
Float_t fJdistmaxA
Definition IceDwalkx.h:67
Float_t fJdistmaxDC
Definition IceDwalkx.h:70
void SetTangmax(Float_t ang, TString s)
Int_t fAsTypeI
Definition IceDwalkx.h:80
void SetVgroupUsage(Int_t flag, TString s)
void SetJdistmax(Float_t d, TString s, Int_t invol=1)
void SetAsType(Int_t flag, TString s)
virtual Int_t InIce()
Int_t fDtmargIC
Definition IceDwalkx.h:41
Float_t fLambdaI
Definition IceDwalkx.h:84
Float_t fTangmaxDC
Definition IceDwalkx.h:50
virtual Int_t IceCube()
Float_t fJdistmaxI
Definition IceDwalkx.h:68
virtual void Exec(Option_t *opt)
Int_t fDtmargDC
Definition IceDwalkx.h:42
Float_t fLambdaA
Definition IceDwalkx.h:83
Int_t fJiterateI
Definition IceDwalkx.h:64
Float_t fMaxdhitA
Definition IceDwalkx.h:43
Float_t fTdistmaxDC
Definition IceDwalkx.h:54
virtual void ClusterTracks(TObjArray &tes, TObjArray &jets, Float_t tangmax, Int_t tinvol, Float_t tdistmax, Int_t astype, Float_t qmax)
Int_t fTinvolDC
Definition IceDwalkx.h:58
void SetConditionalReco(Int_t flag)
Float_t fJangmaxA
Definition IceDwalkx.h:59
IceEvent * fEvt
Definition IceDwalkx.h:34
Int_t fJiterateA
Definition IceDwalkx.h:63
Float_t fDminIC
Definition IceDwalkx.h:37
Float_t fTangmaxIC
Definition IceDwalkx.h:49
Float_t fTangmaxI
Definition IceDwalkx.h:48
Float_t fDminDC
Definition IceDwalkx.h:38
virtual void SelectQvalue(TObjArray &tes, Int_t astype, Float_t qmax)
Int_t fJiterateDC
Definition IceDwalkx.h:66
void SetDtmarg(Int_t dt, TString s)
Float_t fTdistmaxIC
Definition IceDwalkx.h:53
void SetDmin(Float_t d, TString s)
Float_t fJangmaxIC
Definition IceDwalkx.h:61
virtual Int_t DeepCore()
Int_t fVgroupDC
Definition IceDwalkx.h:78
Float_t fMaxdhitI
Definition IceDwalkx.h:44
void SetJangmax(Float_t ang, TString s, Int_t iter=1)
virtual void StoreTracks(TObjArray &jets, Float_t jangmax, TString name, TString title)
Int_t fTinvolI
Definition IceDwalkx.h:56
Float_t fLambdaDC
Definition IceDwalkx.h:86
Int_t fAsTypeA
Definition IceDwalkx.h:79
Float_t fTangmaxA
Definition IceDwalkx.h:47
Float_t fJangmaxDC
Definition IceDwalkx.h:62
Int_t fVgroupIC
Definition IceDwalkx.h:77
Int_t fVgroupA
Definition IceDwalkx.h:75
Int_t fJinvolIC
Definition IceDwalkx.h:73
Int_t fTinvolIC
Definition IceDwalkx.h:57
Int_t fDtmargA
Definition IceDwalkx.h:39
Float_t fMaxdhitDC
Definition IceDwalkx.h:46
Float_t fMaxdhitIC
Definition IceDwalkx.h:45
Float_t fDminI
Definition IceDwalkx.h:36
Int_t fAsTypeIC
Definition IceDwalkx.h:81
Float_t fLambdaIC
Definition IceDwalkx.h:85
Int_t fVgroupI
Definition IceDwalkx.h:76
IceDwalkx(const char *name="IceDwalkx", const char *title="Direct walk reconstruction")
Float_t fJangmaxI
Definition IceDwalkx.h:60
void SetScatteringLength(Float_t lambda, TString s)
void SetTdistmax(Float_t d, TString s, Int_t invol=1)
Int_t fAsTypeDC
Definition IceDwalkx.h:82
void SetMaxDhit(Float_t d, TString s)
Float_t fTdistmaxA
Definition IceDwalkx.h:51
virtual void AssociateHits(TObjArray &tes, TObjArray &hits, Int_t vgroup, Float_t maxdhit, Int_t astype, Float_t &qmax, Float_t lambda)
virtual void MergeJets(TObjArray &jets, Float_t jangmax, Float_t jdistmax, Int_t jinvol, Int_t jiterate, Int_t astype)
Handling of IceCube event data.
Definition IceEvent.h:20
Signal (Hit) handling of a generic IceCube Optical Module (GOM).
Definition IceGOM.h:12
IceLinefit(const char *name="IceLinefit", const char *title="Linefit reconstruction")
Int_t fMaxmodA
Definition IceRecoBase.h:48
Int_t fMinmodDC
Definition IceRecoBase.h:55
Int_t fMaxmodIC
Definition IceRecoBase.h:50
Int_t fMaxhitsDC
Definition IceRecoBase.h:59
Int_t fMinmodI
Definition IceRecoBase.h:53
Int_t fMaxmodI
Definition IceRecoBase.h:49
Int_t fMaxhitsIC
Definition IceRecoBase.h:58
TString fTrackname
Definition IceRecoBase.h:96
Float_t fCharge
Definition IceRecoBase.h:97
Int_t fMaxmodDC
Definition IceRecoBase.h:51
Int_t fMinmodIC
Definition IceRecoBase.h:54
Int_t fMaxhitsA
Definition IceRecoBase.h:56
Int_t fMaxhitsI
Definition IceRecoBase.h:57
Int_t fMinmodA
Definition IceRecoBase.h:52
Handling of 3-vectors in various reference frames.
Definition Nc3Vector.h:15
Double_t Dot(Nc3Vector &q)
Double_t GetNorm()
void SetScalar(Double_t v0, Double_t dv0=0)
virtual Double_t GetOpeningAngle(Nc4Vector &q, TString u="rad")
void AddNamedSlot(TString s)
Int_t GetDeadValue(Int_t j=1) const
Signal (Hit) handling of a generic device.
Definition NcDevice.h:14
Int_t GetNhits() const
Definition NcDevice.cxx:437
NcSignal * GetHit(Int_t j) const
Definition NcDevice.cxx:489
TObjArray * SortHits(TString name, Int_t mode=-1, TObjArray *hits=0, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
Definition NcDevice.cxx:984
Creation and investigation of a jet of particle tracks.
Definition NcJet.h:18
void SetReferencePoint(NcPosition &p)
Definition NcJet.cxx:1481
NcPosition * GetReferencePoint()
Definition NcJet.cxx:1501
Int_t GetNtracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
Definition NcJet.cxx:564
NcTrack * GetTrack(Int_t i) const
Definition NcJet.cxx:751
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
Definition NcJet.cxx:1703
Double_t GetMomentum(Float_t scale=-1)
Definition NcJet.cxx:659
Int_t GetNsignals(TString classname="TObject", Int_t par=0) const
Definition NcJet.cxx:1839
Nc3Vector Get3Momentum(Float_t scale=-1) const
Definition NcJet.cxx:684
void AddTrack(NcTrack &t)
Definition NcJet.cxx:313
Base class for top level job in a task based procedure.
Definition NcJob.h:18
TObject * GetObject(const char *classname) const
Definition NcJob.cxx:456
Handling of positions (with timestamps) in various reference frames.
Definition NcPosition.h:18
void GetPosition(Double_t *r, TString f, TString u="rad", Float_t s=-1) const
void SetPositionErrors(Double_t *e, TString f, TString u="rad")
void SetPosition(Double_t *r, TString f, TString u="rad")
NcTimestamp * GetTimestamp()
void SetTimestamp(NcTimestamp &t)
Sampling and statistics tools for various multi-dimensional data samples.
Definition NcSample.h:28
Double_t GetMinimum(Int_t i) const
Double_t GetSigma(Int_t i, Int_t model=0) const
Double_t GetMedian(Int_t i)
void Reset()
Definition NcSample.cxx:255
void Enter(Double_t x)
Definition NcSample.cxx:357
Double_t GetMean(Int_t i) const
void SetStoreMode(Int_t mode=1, Int_t nmax=0, Int_t i=0)
Double_t GetMaximum(Int_t i) const
Double_t GetSpread(Int_t i, Int_t model=0, Double_t vref=0)
Generic handling of (extrapolated) detector signals.
Definition NcSignal.h:23
virtual void SetSignal(Double_t sig, Int_t j=1)
Definition NcSignal.cxx:516
NcDevice * GetDevice() const
virtual Float_t GetSignal(Int_t j=1, Int_t mode=0) const
Definition NcSignal.cxx:651
void AddTrack(NcTrack &t, Int_t mode=1)
Handling of timestamps for (astro)particle physics research.
Definition NcTimestamp.h:20
void Add(Int_t d, Int_t s, Int_t ns, Int_t ps=0)
Handling of the attributes of a reconstructed particle track.
Definition NcTrack.h:19
void SetCharge(Float_t q)
Definition NcTrack.cxx:444
void SetReferencePoint(NcPosition &p)
Definition NcTrack.cxx:1469
NcSignal * GetSignal(Int_t j) const
Definition NcTrack.cxx:1017
Int_t GetNsignals() const
Definition NcTrack.cxx:970
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
Definition NcTrack.cxx:2011
void AddSignal(NcSignal &s, Int_t mode=0)
Definition NcTrack.cxx:886
void Set3Momentum(Nc3Vector &p)
Definition NcTrack.cxx:401
void SetFitDetails(TObject *obj)
Definition NcTrack.cxx:1922
NcPosition * GetReferencePoint()
Definition NcTrack.cxx:1485
Nc3Vector Get3Momentum(Float_t scale=-1) const
Definition NcTrack.cxx:652
TObject * GetFitDetails()
Definition NcTrack.cxx:1962
void SetId(Int_t id)
Definition NcTrack.cxx:1772
void SetTimestamp(NcTimestamp &t)
Definition NcTrack.cxx:1973