769 NcJob* parent=(
NcJob*)(gROOT->GetListOfTasks()->FindObject(name.Data()));
780 if (seldev->
GetSignal(
"Select") < 0.1)
return;
785 params.SetNameTitle(ClassName(),
"Reco parameters");
931 fEvt->AddDevice(params);
955 TObjArray* aoms=
fEvt->GetDevices(
"IceAOM");
957 Int_t naoms=aoms->GetEntries();
962 for (Int_t iom=0; iom<naoms; iom++)
969 if (ngood<fMinmodA || ngood>
fMaxmodA)
return;
971 const Float_t c=0.299792458;
997 for (Int_t i1=0; i1<naoms; i1++)
1000 if (!omx1)
continue;
1009 for (Int_t j1=1; j1<=omx1->
GetNhits(); j1++)
1029 if (i1==(naoms-1))
break;
1031 nh1=hits1.GetEntries();
1034 for (Int_t i2=i1+1; i2<naoms; i2++)
1037 if (!omx2)
continue;
1043 if (dist<=
fDminA)
continue;
1051 for (Int_t j2=1; j2<=omx2->
GetNhits(); j2++)
1068 nh2=hits2.GetEntries();
1078 for (Int_t ih1=0; ih1<nh1; ih1++)
1082 for (Int_t ih2=0; ih2<nh2; ih2++)
1091 if (fabs(dt)>=dtmax)
continue;
1098 tsx->
Add(0,0,(
int)t0);
1113 Int_t nte=tes.GetEntries();
1121 Int_t njets=jets.GetEntries();
1125 ordered=
fEvt->SortJets(-2,&jets);
1126 TObjArray jets2(*ordered);
1133 if (name==
"") name=ClassName();
1135 TString title=ClassName();
1136 title+=
" Amanda track";
1156 TObjArray* idoms=
fEvt->GetDevices(
"IceIDOM");
1157 if (!idoms)
return 0;
1158 Int_t nidoms=idoms->GetEntries();
1159 if (!nidoms)
return 0;
1163 for (Int_t idom=0; idom<nidoms; idom++)
1170 if (ngood<fMinmodI || ngood>
fMaxmodI)
return 0;
1172 const Float_t c=0.299792458;
1189 Float_t t1,t2,dt,t0;
1198 for (Int_t i1=0; i1<nidoms; i1++)
1201 if (!omx1)
continue;
1210 for (Int_t j1=1; j1<=omx1->
GetNhits(); j1++)
1231 if (i1==(nidoms-1))
break;
1233 nh1=hits1.GetEntries();
1236 for (Int_t i2=i1+1; i2<nidoms; i2++)
1239 if (!omx2)
continue;
1245 if (dist<=
fDminI)
continue;
1253 for (Int_t j2=1; j2<=omx2->
GetNhits(); j2++)
1271 nh2=hits2.GetEntries();
1281 for (Int_t ih1=0; ih1<nh1; ih1++)
1285 for (Int_t ih2=0; ih2<nh2; ih2++)
1294 if (fabs(dt)>=dtmax)
continue;
1301 tsx->
Add(0,0,(
int)t0);
1316 Int_t nte=tes.GetEntries();
1324 Int_t njets=jets.GetEntries();
1325 if (!njets)
return 0;
1328 ordered=
fEvt->SortJets(-2,&jets);
1329 TObjArray jets2(*ordered);
1336 if (name==
"") name=ClassName();
1338 TString title=ClassName();
1339 title+=
" InIce track";
1361 TObjArray* idoms=
fEvt->GetDevices(
"IceICDOM");
1362 if (!idoms)
return 0;
1363 Int_t nidoms=idoms->GetEntries();
1364 if (!nidoms)
return 0;
1368 for (Int_t idom=0; idom<nidoms; idom++)
1375 if (ngood<fMinmodIC || ngood>
fMaxmodIC)
return 0;
1377 const Float_t c=0.299792458;
1394 Float_t t1,t2,dt,t0;
1403 for (Int_t i1=0; i1<nidoms; i1++)
1406 if (!omx1)
continue;
1415 for (Int_t j1=1; j1<=omx1->
GetNhits(); j1++)
1436 if (i1==(nidoms-1))
break;
1438 nh1=hits1.GetEntries();
1441 for (Int_t i2=i1+1; i2<nidoms; i2++)
1444 if (!omx2)
continue;
1458 for (Int_t j2=1; j2<=omx2->
GetNhits(); j2++)
1476 nh2=hits2.GetEntries();
1486 for (Int_t ih1=0; ih1<nh1; ih1++)
1490 for (Int_t ih2=0; ih2<nh2; ih2++)
1499 if (fabs(dt)>=dtmax)
continue;
1506 tsx->
Add(0,0,(
int)t0);
1521 Int_t nte=tes.GetEntries();
1529 Int_t njets=jets.GetEntries();
1530 if (!njets)
return 0;
1533 ordered=
fEvt->SortJets(-2,&jets);
1534 TObjArray jets2(*ordered);
1541 if (name==
"") name=ClassName();
1543 TString title=ClassName();
1544 title+=
" standard IceCube track";
1566 TObjArray* idoms=
fEvt->GetDevices(
"IceDCDOM");
1567 if (!idoms)
return 0;
1568 Int_t nidoms=idoms->GetEntries();
1569 if (!nidoms)
return 0;
1573 for (Int_t idom=0; idom<nidoms; idom++)
1580 if (ngood<fMinmodDC || ngood>
fMaxmodDC)
return 0;
1582 const Float_t c=0.299792458;
1599 Float_t t1,t2,dt,t0;
1608 for (Int_t i1=0; i1<nidoms; i1++)
1611 if (!omx1)
continue;
1620 for (Int_t j1=1; j1<=omx1->
GetNhits(); j1++)
1641 if (i1==(nidoms-1))
break;
1643 nh1=hits1.GetEntries();
1646 for (Int_t i2=i1+1; i2<nidoms; i2++)
1649 if (!omx2)
continue;
1663 for (Int_t j2=1; j2<=omx2->
GetNhits(); j2++)
1681 nh2=hits2.GetEntries();
1691 for (Int_t ih1=0; ih1<nh1; ih1++)
1695 for (Int_t ih2=0; ih2<nh2; ih2++)
1704 if (fabs(dt)>=dtmax)
continue;
1711 tsx->
Add(0,0,(
int)t0);
1726 Int_t nte=tes.GetEntries();
1734 Int_t njets=jets.GetEntries();
1735 if (!njets)
return 0;
1738 ordered=
fEvt->SortJets(-2,&jets);
1739 TObjArray jets2(*ordered);
1746 if (name==
"") name=ClassName();
1748 TString title=ClassName();
1749 title+=
" DeepCore track";
1763 const Float_t pi=acos(-1.);
1764 const Float_t c=0.299792458;
1765 const Float_t npice=1.31768387;
1766 const Float_t ngice=1.35075806;
1767 const Float_t thetac=acos(1./npice);
1771 if (vgroup) alphac=atan((1.-npice/ngice)/sqrt(npice*npice-1.));
1773 Int_t nte=tes.GetEntries();
1774 Int_t nh=hits.GetEntries();
1781 Float_t dist,t0,tgeo,tres;
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;
1821 for (Int_t jte=0; jte<nte; jte++)
1827 t0=
fEvt->GetDifference(tt0,
"ns");
1832 for (Int_t jh=0; jh<nh; jh++)
1842 dist=hproj+d/tan(pi/2.-thetac-alphac);
1849 if (tres<-30 || tres>300 || d>maxdhit*lambda)
continue;
1853 levers.
Enter(fabs(hproj));
1854 hprojs.
Enter(hproj);
1861 nas=
fEvt->GetNstrings(*te,
"IceGOM");
1863 if (astype==1) nax=nah;
1864 if (astype==2) nax=nas;
1865 if (astype==3) nax=nah*nas;
1875 if (spanl>0) expspreadl=(0.5*pow(lmin,2)+0.5*pow(lmax,2)+pow(medianl,2)-medianl*(lmin+lmax))/spanl;
1878 span=hprojmax-hprojmin;
1885 if (span>0) expspread=(0.5*pow(hprojmin,2)+0.5*pow(hprojmax,2)+pow(median,2)-median*(hprojmin+hprojmax))/span;
1892 if (span>0) term1=2.*spread/span;
1895 if (spanl>0) term2=2.*spreadl/spanl;
1898 if (spread>0) term3=fabs(spread-expspread)/spread;
1901 if (spreadl>0) term4=fabs(spreadl-expspreadl)/spreadl;
1904 if (spreadt>0) term5=fabs(mediant)/spreadt;
1906 qtc=nax*(term1+term2)-term3-term4-term5;
1907 if (fabs(median)>span/2.) qtc=0;
1933 if (qtc>qmax) qmax=qtc;
1945 Int_t nte=tes.GetEntries();
1951 for (Int_t jtc=0; jtc<nte; jtc++)
1965 if (astype==1) nax=nah;
1966 if (astype==2) nax=nas;
1967 if (astype==3) nax=nah*nas;
1969 if (nax<=0 || qtc<0.8*qmax)
2001 Int_t nte=tes.GetEntries();
2005 Float_t vec[3],err[3];
2007 Float_t t0,dist,dist2;
2010 Float_t nax=0,naxmax=0;
2012 for (Int_t jtc1=0; jtc1<nte; jtc1++)
2025 pos.
Enter(vec[0],vec[1],vec[2]);
2026 t0=
fEvt->GetDifference(ts1,
"ns");
2028 for (Int_t jtc2=0; jtc2<nte; jtc2++)
2030 if (jtc2==jtc1)
continue;
2048 if (dist2<dist) dist=dist2;
2053 pos.
Enter(vec[0],vec[1],vec[2]);
2054 t0=
fEvt->GetDifference(ts2,
"ns");
2062 for (Int_t j=1; j<=3; j++)
2072 jt0->
Add(0,0,(
int)t0);
2080 nas=
fEvt->GetNstrings(*jx,
"IceGOM");
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;
2092 if (qtc>=(qmax-1.e-10))
2096 nas=
fEvt->GetNstrings(*jx,
"IceGOM");
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;
2110 Int_t njets=jets.GetEntries();
2117 for (Int_t ijet=0; ijet<njets; ijet++)
2122 nas=
fEvt->GetNstrings(*jx,
"IceGOM");
2124 if (astype==1) nax=nah;
2125 if (astype==2) nax=nas;
2126 if (astype==3) nax=nah*nas;
2128 sortval=0.15*(nax-naxmax);
2134void IceDwalkx::MergeJets(TObjArray& jets2,Float_t jangmax,Float_t jdistmax,Int_t jinvol,Int_t jiterate,Int_t astype)
2148 Int_t njets=jets2.GetEntries();
2155 Float_t nax=0,naxmax=0;
2156 Float_t ang,dist,dist2,t0;
2160 Float_t vec[3],err[3];
2168 for (Int_t jet1=0; jet1<njets; jet1++)
2170 jx1=(
NcJet*)jets2.At(jet1);
2179 pos.
Enter(vec[0],vec[1],vec[2]);
2180 t0=
fEvt->GetDifference(ts1,
"ns");
2182 for (Int_t jet2=0; jet2<njets; jet2++)
2184 jx2=(
NcJet*)jets2.At(jet2);
2185 if (!jx2 || jet2==jet1)
continue;
2201 if (dist2<dist) dist=dist2;
2206 pos.
Enter(vec[0],vec[1],vec[2]);
2207 t0=
fEvt->GetDifference(ts2,
"ns");
2209 for (Int_t jtk=1; jtk<=jx2->
GetNtracks(); jtk++)
2215 jets2.RemoveAt(jet2);
2216 if (jiterate) merged=1;
2222 for (Int_t k=1; k<=3; k++)
2232 jt0->
Add(0,0,(
int)t0);
2236 nas=
fEvt->GetNstrings(*jx1,
"IceGOM");
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;
2248 for (Int_t jjet=0; jjet<njets; jjet++)
2253 nas=
fEvt->GetNstrings(*jx,
"IceGOM");
2255 if (astype==1) nax=nah;
2256 if (astype==2) nax=nas;
2257 if (astype==3) nax=nah*nas;
2259 sortval=0.15*float(nax-naxmax);
2265 TObjArray* ordered=
fEvt->SortJets(-2,&jets2);
2266 njets=ordered->GetEntries();
2268 for (Int_t icopy=0; icopy<njets; icopy++)
2270 jets2.Add(ordered->At(icopy));
2293 Int_t njets=jets2.GetEntries();
2295 t.SetNameTitle(name.Data(),title.Data());
2298 for (Int_t jet=0; jet<njets; jet++)
2328 if (jangmax<0)
break;
TTask derived class to perform (improved) direct walk reconstruction.
void SetTangmax(Float_t ang, TString s)
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 void Exec(Option_t *opt)
virtual void ClusterTracks(TObjArray &tes, TObjArray &jets, Float_t tangmax, Int_t tinvol, Float_t tdistmax, Int_t astype, Float_t qmax)
void SetConditionalReco(Int_t flag)
virtual void SelectQvalue(TObjArray &tes, Int_t astype, Float_t qmax)
void SetDtmarg(Int_t dt, TString s)
void SetDmin(Float_t d, TString s)
void SetJangmax(Float_t ang, TString s, Int_t iter=1)
virtual void StoreTracks(TObjArray &jets, Float_t jangmax, TString name, TString title)
IceDwalkx(const char *name="IceDwalkx", const char *title="Direct walk reconstruction")
void SetScatteringLength(Float_t lambda, TString s)
void SetTdistmax(Float_t d, TString s, Int_t invol=1)
void SetMaxDhit(Float_t d, TString s)
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.
Signal (Hit) handling of a generic IceCube Optical Module (GOM).
IceLinefit(const char *name="IceLinefit", const char *title="Linefit reconstruction")
Handling of 3-vectors in various reference frames.
Double_t Dot(Nc3Vector &q)
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.
NcSignal * GetHit(Int_t j) const
TObjArray * SortHits(TString name, Int_t mode=-1, TObjArray *hits=0, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
Creation and investigation of a jet of particle tracks.
void SetReferencePoint(NcPosition &p)
NcPosition * GetReferencePoint()
Int_t GetNtracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
NcTrack * GetTrack(Int_t i) const
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
Double_t GetMomentum(Float_t scale=-1)
Int_t GetNsignals(TString classname="TObject", Int_t par=0) const
Nc3Vector Get3Momentum(Float_t scale=-1) const
void AddTrack(NcTrack &t)
Base class for top level job in a task based procedure.
TObject * GetObject(const char *classname) const
Handling of positions (with timestamps) in various reference frames.
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.
Double_t GetMinimum(Int_t i) const
Double_t GetSigma(Int_t i, Int_t model=0) const
Double_t GetMedian(Int_t i)
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.
virtual void SetSignal(Double_t sig, Int_t j=1)
NcDevice * GetDevice() const
virtual Float_t GetSignal(Int_t j=1, Int_t mode=0) const
void AddTrack(NcTrack &t, Int_t mode=1)
Handling of timestamps for (astro)particle physics research.
void Add(Int_t d, Int_t s, Int_t ns, Int_t ps=0)
Handling of the attributes of a reconstructed particle track.
void SetCharge(Float_t q)
void SetReferencePoint(NcPosition &p)
NcSignal * GetSignal(Int_t j) const
Int_t GetNsignals() const
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
void AddSignal(NcSignal &s, Int_t mode=0)
void Set3Momentum(Nc3Vector &p)
void SetFitDetails(TObject *obj)
NcPosition * GetReferencePoint()
Nc3Vector Get3Momentum(Float_t scale=-1) const
TObject * GetFitDetails()
void SetTimestamp(NcTimestamp &t)