27 #include "canvas/Persistency/Common/FindManyP.h" 29 #include "art_root_io/TFileService.h" 32 #include "cetlib_except/exception.h" 55 double bdist(
const TVector3&
pos,
unsigned int tpc = 0,
unsigned int = 0)
62 if(tpc==2 || tpc==3 || tpc==4 || tpc==5)
80 double d1 =
abs(pos.X());
93 else if (tpc==2||tpc==3 || tpc==4 || tpc==5)
98 else if (tpc==6 || tpc==7)
101 d6 = geom->
DetLength(tpc) +103.0- pos.Z();
116 if(result<0) result=0;
132 TVector3& start, TVector3&
end, TVector3& startmom, TVector3& endmom,
133 unsigned int = 0,
unsigned int = 0)
144 for(
int i = 0; i <
n; ++i) {
145 TVector3 pos = part.
Position(i).Vect();
151 double const tmpArray[]={pos.X(),pos.Y(),pos.Z()};
167 result += disp.Mag();
182 void effcalc(
const TH1* hnum,
const TH1* hden, TH1* heff)
184 int nbins = hnum->GetNbinsX();
185 if (nbins != hden->GetNbinsX())
186 throw cet::exception(
"TrackAnaCT") <<
"effcalc[" __FILE__
"]: incompatible histograms (I)\n";
187 if (nbins != heff->GetNbinsX())
188 throw cet::exception(
"TrackAnaCT") <<
"effcalc[" __FILE__
"]: incompatible histograms (II)\n";
192 for(
int ibin = 0; ibin <= nbins+1; ++ibin) {
193 double num = hnum->GetBinContent(ibin);
194 double den = hden->GetBinContent(ibin);
196 heff->SetBinContent(ibin, 0.);
197 heff->SetBinError(ibin, 0.);
200 double eff = num / den;
205 double err = std::sqrt(eff * (1.-eff) / den);
206 heff->SetBinContent(ibin, eff);
207 heff->SetBinError(ibin, err);
211 heff->SetMinimum(0.);
212 heff->SetMaximum(1.05);
213 heff->SetMarkerStyle(20);
217 class flattener :
public std::vector<unsigned int> {
232 for(
auto const& vec :
input)
233 length += vec.size();
236 for(
auto const& vec : input)
237 for(
auto const&
value : vec)
394 template <
typename T> std::vector<size_t> fsort_indexes(
const std::vector<T> &v) ;
471 art::TFileDirectory topdir = tfs->mkdir(
"trkana",
"TrackAnaCT histograms");
472 art::TFileDirectory
dir = topdir.mkdir(subdir);
476 fHstartx = dir.make<TH1F>(
"xstart",
"X Start Position",
478 fHstarty = dir.make<TH1F>(
"ystart",
"Y Start Position",
480 fHstartz = dir.make<TH1F>(
"zstart",
"Z Start Position",
482 fHstartd = dir.make<TH1F>(
"dstart",
"Start Position Distance to Boundary",
484 fHendx = dir.make<TH1F>(
"xend",
"X End Position",
486 fHendy = dir.make<TH1F>(
"yend",
"Y End Position",
488 fHendz = dir.make<TH1F>(
"zend",
"Z End Position",
490 fHendd = dir.make<TH1F>(
"dend",
"End Position Distance to Boundary",
492 fHtheta = dir.make<TH1F>(
"theta",
"Theta", 100, 0., 3.142);
493 fHphi = dir.make<TH1F>(
"phi",
"Phi", 100, -3.142, 3.142);
494 fHtheta_xz = dir.make<TH1F>(
"theta_xz",
"Theta_xz", 100, -3.142, 3.142);
495 fHtheta_yz = dir.make<TH1F>(
"theta_yz",
"Theta_yz", 100, -3.142, 3.142);
496 fHmom = dir.make<TH1F>(
"mom",
"Momentum", 100, 0., 10.);
497 fHlen = dir.make<TH1F>(
"len",
"Track Length", 100, 0., 3.0 * geom->
Cryostat(0).
Length());
498 fHHitChg = dir.make<TH1F>(
"hchg",
"Hit Charge (ADC counts)", 100, 0., 4000.);
499 fHHitWidth = dir.make<TH1F>(
"hwid",
"Hit Width (ticks)", 40, 0., 20.);
500 fHHitPdg = dir.make<TH1F>(
"hpdg",
"Hit Pdg code",5001, -2500.5, +2500.5);
501 fHHitTrkId = dir.make<TH1F>(
"htrkid",
"Hit Track ID", 401, -200.5, +200.5);
502 fModeFrac = dir.make<TH1F>(
"hmodefrac",
"quasi-Purity: Fraction of component tracks with the Track mode value", 20, 0.01, 1.01);
503 fNTrkIdTrks = dir.make<TH1F>(
"hntrkids",
"quasi-Efficiency: Number of stitched tracks in which TrkId appears", 20, 0., +10.0);
504 fNTrkIdTrks2 = dir.make<TH2F>(
"hntrkids2",
"Number of stitched tracks in which TrkId appears vs KE [GeV]", 20, 0., +10.0, 20, 0.0, 1.5);
505 fNTrkIdTrks3 = dir.make<TH2F>(
"hntrkids3",
"MC Track vs Reco Track, wtd by nhits on Collection Plane", 10, -0.5, 9.5, 10, -0.5, 9.5);
506 fNTrkIdTrks3->GetXaxis()->SetTitle(
"Sorted-by-Descending-CPlane-Hits outer Track Number");
507 fNTrkIdTrks3->GetYaxis()->SetTitle(
"Sorted-by-Descending-True-Length G4Track");
513 TrackAnaCT::MCHists::MCHists() :
596 art::TFileDirectory topdir = tfs->mkdir(
"trkana",
"TrackAnaCT histograms");
597 art::TFileDirectory
dir = topdir.mkdir(subdir);
601 fHduvcosth = dir.make<TH2F>(
"duvcosth",
"Delta(uv) vs. Colinearity",
602 100, 0.95, 1., 100, 0., 1.);
603 fHcosth = dir.make<TH1F>(
"colin",
"Colinearity", 100, 0.95, 1.);
604 fHmcu = dir.make<TH1F>(
"mcu",
"MC Truth U", 100, -5., 5.);
605 fHmcv = dir.make<TH1F>(
"mcv",
"MC Truth V", 100, -5., 5.);
606 fHmcw = dir.make<TH1F>(
"mcw",
"MC Truth W", 100, -20., 20.);
607 fHupull = dir.make<TH1F>(
"dupull",
"U Pull", 100, -20., 20.);
608 fHvpull = dir.make<TH1F>(
"dvpull",
"V Pull", 100, -20., 20.);
609 fHmcdudw = dir.make<TH1F>(
"mcdudw",
"MC Truth U Slope", 100, -0.2, 0.2);
610 fHmcdvdw = dir.make<TH1F>(
"mcdvdw",
"MV Truth V Slope", 100, -0.2, 0.2);
611 fHdudwpull = dir.make<TH1F>(
"dudwpull",
"U Slope Pull", 100, -10., 10.);
612 fHdvdwpull = dir.make<TH1F>(
"dvdwpull",
"V Slope Pull", 100, -10., 10.);
613 fHstartdx = dir.make<TH1F>(
"startdx",
"Start Delta x", 100, -10., 10.);
614 fHstartdy = dir.make<TH1F>(
"startdy",
"Start Delta y", 100, -10., 10.);
615 fHstartdz = dir.make<TH1F>(
"startdz",
"Start Delta z", 100, -10., 10.);
616 fHenddx = dir.make<TH1F>(
"enddx",
"End Delta x", 100, -10., 10.);
617 fHenddy = dir.make<TH1F>(
"enddy",
"End Delta y", 100, -10., 10.);
618 fHenddz = dir.make<TH1F>(
"enddz",
"End Delta z", 100, -10., 10.);
619 fHlvsl = dir.make<TH2F>(
"lvsl",
"Reco Length vs. MC Truth Length",
621 fHdl = dir.make<TH1F>(
"dl",
"Track Length Minus MC Particle Length", 100, -50., 50.);
622 fHpvsp = dir.make<TH2F>(
"pvsp",
"Reco Momentum vs. MC Truth Momentum",
623 100, 0., 5., 100, 0., 5.);
624 fHpvspc = dir.make<TH2F>(
"pvspc",
"Reco Momentum vs. MC Truth Momentum (Contained Tracks)",
625 100, 0., 5., 100, 0., 5.);
626 fHdp = dir.make<TH1F>(
"dp",
"Reco-MC Momentum Difference", 100, -5., 5.);
627 fHdpc = dir.make<TH1F>(
"dpc",
"Reco-MC Momentum Difference (Contained Tracks)",
629 fHppull = dir.make<TH1F>(
"ppull",
"Momentum Pull", 100, -10., 10.);
630 fHppullc = dir.make<TH1F>(
"ppullc",
"Momentum Pull (Contained Tracks)", 100, -10., 10.);
632 fHmcstartx = dir.make<TH1F>(
"mcxstart",
"MC X Start Position",
634 fHmcstarty = dir.make<TH1F>(
"mcystart",
"MC Y Start Position",
636 fHmcstartz = dir.make<TH1F>(
"mczstart",
"MC Z Start Position",
638 fHmcendx = dir.make<TH1F>(
"mcxend",
"MC X End Position",
640 fHmcendy = dir.make<TH1F>(
"mcyend",
"MC Y End Position",
642 fHmcendz = dir.make<TH1F>(
"mczend",
"MC Z End Position",
644 fHmctheta = dir.make<TH1F>(
"mctheta",
"MC Theta", 20, 0., 3.142);
645 fHmcphi = dir.make<TH1F>(
"mcphi",
"MC Phi", 10, -3.142, 3.142);
646 fHmctheta_xz = dir.make<TH1F>(
"mctheta_xz",
"MC Theta_xz", 40, -3.142, 3.142);
647 fHmctheta_yz = dir.make<TH1F>(
"mctheta_yz",
"MC Theta_yz", 40, -3.142, 3.142);
648 fHmcmom = dir.make<TH1F>(
"mcmom",
"MC Momentum", 10, 0., 10.);
651 fHgstartx = dir.make<TH1F>(
"gxstart",
"Good X Start Position",
653 fHgstarty = dir.make<TH1F>(
"gystart",
"Good Y Start Position",
655 fHgstartz = dir.make<TH1F>(
"gzstart",
"Good Z Start Position",
657 fHgendx = dir.make<TH1F>(
"gxend",
"Good X End Position",
659 fHgendy = dir.make<TH1F>(
"gyend",
"Good Y End Position",
661 fHgendz = dir.make<TH1F>(
"gzend",
"Good Z End Position",
663 fHgtheta = dir.make<TH1F>(
"gtheta",
"Good Theta", 20, 0., 3.142);
664 fHgphi = dir.make<TH1F>(
"gphi",
"Good Phi", 10, -3.142, 3.142);
665 fHgtheta_xz = dir.make<TH1F>(
"gtheta_xz",
"Good Theta_xz", 40, -3.142, 3.142);
666 fHgtheta_yz = dir.make<TH1F>(
"gtheta_yz",
"Good Theta_yz", 40, -3.142, 3.142);
667 fHgmom = dir.make<TH1F>(
"gmom",
"Good Momentum", 10, 0., 10.);
668 fHglen = dir.make<TH1F>(
"glen",
"Good Particle Length", 10, 0., 1.1 * geom->
Cryostat(0).
Length());
670 fHestartx = dir.make<TH1F>(
"exstart",
"Efficiency vs. X Start Position",
672 fHestarty = dir.make<TH1F>(
"eystart",
"Efficiency vs. Y Start Position",
674 fHestartz = dir.make<TH1F>(
"ezstart",
"Efficiency vs. Z Start Position",
676 fHeendx = dir.make<TH1F>(
"exend",
"Efficiency vs. X End Position",
678 fHeendy = dir.make<TH1F>(
"eyend",
"Efficiency vs. Y End Position",
680 fHeendz = dir.make<TH1F>(
"ezend",
"Efficiency vs. Z End Position",
682 fHetheta = dir.make<TH1F>(
"etheta",
"Efficiency vs. Theta", 20, 0., 3.142);
683 fHephi = dir.make<TH1F>(
"ephi",
"Efficiency vs. Phi", 10, -3.142, 3.142);
684 fHetheta_xz = dir.make<TH1F>(
"etheta_xz",
"Efficiency vs. Theta_xz", 40, -3.142, 3.142);
685 fHetheta_yz = dir.make<TH1F>(
"etheta_yz",
"Efficiency vs. Theta_yz", 40, -3.142, 3.142);
686 fHemom = dir.make<TH1F>(
"emom",
"Efficiency vs. Momentum", 10, 0., 10.);
687 fHelen = dir.make<TH1F>(
"elen",
"Efficiency vs. Particle Length",
717 if(geom->
DetectorName().find(
"dune") == std::string::npos)
718 throw cet::exception(
"TrackAnaCT") <<
"TrackAnaCT should only be used with DUNE " 719 <<
"geometries, the name for this detector, " 726 <<
"TrackAnaCT configured with the following parameters:\n" 731 <<
" Dump = " <<
fDump <<
"\n" 732 <<
" MinMCKE = " <<
fMinMCKE <<
"\n" 756 std::unique_ptr<mf::LogInfo> pdump;
759 pdump = std::unique_ptr<mf::LogInfo>(
new mf::LogInfo(
"TrackAnaCT"));
771 std::vector<const simb::MCParticle*> plist2;
776 sim::ParticleList
const& plist = pi_serv->
ParticleList();
777 plist2.reserve(plist.size());
781 *pdump <<
"MC Particles\n" 782 <<
" Id pdg x y z dx dy dz p\n" 783 <<
"-------------------------------------------------------------------------------------------\n";
791 ipart != plist.end(); ++ipart) {
813 double mctime = part->
T();
822 double plen = length(detProp, *part, mcdx, mcstart, mcend, mcstartmom, mcendmom);
831 plist2.push_back(part);
836 double pstart = mcstartmom.Mag();
837 double pend = mcendmom.Mag();
857 <<
std::setw(10) << mcstartmom[2]/pstart;
885 std::ostringstream ostr;
891 double mctheta_xz = std::atan2(mcstartmom.X(), mcstartmom.Z());
892 double mctheta_yz = std::atan2(mcstartmom.Y(), mcstartmom.Z());
894 mchists.fHmcstartx->Fill(mcstart.X());
895 mchists.fHmcstarty->Fill(mcstart.Y());
896 mchists.fHmcstartz->Fill(mcstart.Z());
897 mchists.fHmcendx->Fill(mcend.X());
898 mchists.fHmcendy->Fill(mcend.Y());
899 mchists.fHmcendz->Fill(mcend.Z());
900 mchists.fHmctheta->Fill(mcstartmom.Theta());
901 mchists.fHmcphi->Fill(mcstartmom.Phi());
902 mchists.fHmctheta_xz->Fill(mctheta_xz);
903 mchists.fHmctheta_yz->Fill(mctheta_yz);
904 mchists.fHmcmom->Fill(mcstartmom.Mag());
905 mchists.fHmclen->Fill(plen);
925 <<
"TrackAnaCT read " << trackvh->size()
926 <<
" vectors of Stitched PtrVectorsof tracks.";
930 if(trackh.isValid()) {
933 *pdump <<
"\nReconstructed Tracks\n" 934 <<
" Id MCid x y z dx dy dz p\n" 935 <<
"-------------------------------------------------------------------------------------------\n";
941 int ntrack = trackh->size();
942 for(
int i = 0; i < ntrack; ++i) {
956 auto hit = fh.at(0).at(0);
958 int hit_tpc=tmpWireid.
TPC;
980 double recotime = 0.;
987 TVector3 pos = track.
Vertex<TVector3>();
989 TVector3 end = track.
End<TVector3>();
993 double dpos = bdist(pos,hit_tpc);
994 double dend = bdist(end,hit_tpc);
995 double tlen = length(track);
996 double theta_xz = std::atan2(dir.X(), dir.Z());
997 double theta_yz = std::atan2(dir.Y(), dir.Z());
1007 rhists.
fHendx->Fill(end.X());
1008 rhists.
fHendy->Fill(end.Y());
1009 rhists.
fHendz->Fill(end.Z());
1010 rhists.
fHendd->Fill(dend);
1011 rhists.
fHtheta->Fill(dir.Theta());
1012 rhists.
fHphi->Fill(dir.Phi());
1019 rhists.
fHmom->Fill(mom);
1020 rhists.
fHlen->Fill(tlen);
1038 int start_point = (
swap == 0 ? 0 : ntraj-1);
1044 rot(1, 0) = -rot(1, 0);
1045 rot(2, 0) = -rot(2, 0);
1046 rot(1, 1) = -rot(1, 1);
1047 rot(2, 1) = -rot(2, 1);
1048 rot(1, 2) = -rot(1, 2);
1049 rot(2, 2) = -rot(2, 2);
1051 pos = track.
End<TVector3>();
1053 end = track.
Vertex<TVector3>();
1057 dpos = bdist(pos,hit_tpc);
1058 dend = bdist(end,hit_tpc);
1059 theta_xz = std::atan2(dir.X(), dir.Z());
1060 theta_yz = std::atan2(dir.Y(), dir.Z());
1072 for(
auto ipart = plist2.begin(); ipart != plist2.end(); ++ipart) {
1080 throw cet::exception(
"SeedAna") <<
"no particle with ID=" << pdg <<
"\n";
1081 const MCHists& mchists = iMCHistMap->second;
1085 double mctime = part->
T();
1093 TVector3 mcstartmom;
1095 double plen = length(detProp, *part, mcdx, mcstart, mcend, mcstartmom, mcendmom);
1099 TVector3 mcpos = mcstart -
pos;
1104 TVector3 mcmoml = rot * mcstartmom;
1105 TVector3 mcposl = rot * mcpos;
1107 double colinearity = mcmoml.Z() / mcmoml.Mag();
1109 double u = mcposl.X();
1110 double v = mcposl.Y();
1111 double w = mcposl.Z();
1113 double pu = mcmoml.X();
1114 double pv = mcmoml.Y();
1115 double pw = mcmoml.Z();
1117 double dudw = pu / pw;
1118 double dvdw = pv / pw;
1120 double u0 = u - w * dudw;
1121 double v0 = v - w * dvdw;
1122 double uv0 = std::sqrt(u0*u0 + v0*v0);
1134 mchists.
fHcosth->Fill(colinearity);
1139 mchists.
fHmcu->Fill(u0);
1140 mchists.
fHmcv->Fill(v0);
1141 mchists.
fHmcw->Fill(w);
1149 double mctheta_xz = std::atan2(mcstartmom.X(), mcstartmom.Z());
1150 double mctheta_yz = std::atan2(mcstartmom.Y(), mcstartmom.Z());
1152 mchists.
fHstartdx->Fill(pos.X() - mcstart.X());
1153 mchists.
fHstartdy->Fill(pos.Y() - mcstart.Y());
1154 mchists.
fHstartdz->Fill(pos.Z() - mcstart.Z());
1155 mchists.
fHenddx->Fill(end.X() - mcend.X());
1156 mchists.
fHenddy->Fill(end.Y() - mcend.Y());
1157 mchists.
fHenddz->Fill(end.Z() - mcend.Z());
1158 mchists.
fHlvsl->Fill(plen, tlen);
1159 mchists.
fHdl->Fill(tlen - plen);
1160 mchists.
fHpvsp->Fill(mcstartmom.Mag(), mom);
1161 double dp = mom - mcstartmom.Mag();
1162 mchists.
fHdp->Fill(dp);
1165 mchists.
fHpvspc->Fill(mcstartmom.Mag(), mom);
1166 mchists.
fHdpc->Fill(dp);
1182 mchists.
fHgendx->Fill(mcend.X());
1183 mchists.
fHgendy->Fill(mcend.Y());
1184 mchists.
fHgendz->Fill(mcend.Z());
1185 mchists.
fHgtheta->Fill(mcstartmom.Theta());
1186 mchists.
fHgphi->Fill(mcstartmom.Phi());
1189 mchists.
fHgmom->Fill(mcstartmom.Mag());
1190 mchists.
fHglen->Fill(plen);
1200 TVector3 pos = track.
Vertex<TVector3>();
1202 TVector3 end = track.
End<TVector3>();
1208 *pdump <<
"\nOffset" 1266 std::map<int, std::map<int, art::PtrVector<recob::Hit>> > hitmap;
1267 std::map<int, int > KEmap;
1274 int ntv(trackvh->size());
1276 std::vector < art::PtrVector<recob::Track> >
::const_iterator cti = trackvh->begin();
1279 if(trackh.isValid()) {
1281 int nsppts_assnwhole = fswhole.size();
1282 std::cout <<
"TrackAnaCT: Number of clumps of Spacepoints from Assn for all Tracks: " << nsppts_assnwhole <<
std::endl;
1288 std::cout <<
"\n" <<
"\t\t TrkAna: Fresh fRecoHistMap[0] ******* \n" <<
std::endl;
1292 std::vector < std::vector <unsigned int> > NtrkIdsAll;
1293 std::vector < double > ntvsorted;
1298 for (
int o = 0; o < ntv; ++o)
1302 auto it = pvtrack.
begin();
1303 int ntrack = pvtrack.
size();
1305 std::vector< std::vector <unsigned int> > NtrkId_Hit;
1306 std::vector<unsigned int> vecMode;
1308 for(
int i = 0; i < ntrack; ++i) {
1312 auto pcoll={ ptrack };
1320 int nsppts_assn = fs.at(0).size();
1324 auto sppt = fs.at(0);
1331 std::vector <unsigned int> vecNtrkIds;
1332 for(
int is = 0; is < nsppts_assn; ++is) {
1333 int nhits = fh.at(is).size();
1334 for(
int ih = 0;
ih < nhits; ++
ih) {
1335 auto hit = fh.at(is).at(
ih);
1347 int trackID =
std::abs(itid->trackID);
1348 hitmap[trackID][o].push_back(
hit);
1350 if (justOne) { vecNtrkIds.push_back(trackID); justOne=
false; }
1359 TVector3 mcstartmom;
1361 double mctime = part->
T();
1364 double plen = length(detProp, *part, mcdx, mcstart, mcend, mcstartmom, mcendmom);
1366 KEmap[(
int)(1e6*plen)] = trackID;
1377 NtrkId_Hit.push_back(vecNtrkIds);
1380 int max(-12),
n(1), ind(0);
1381 std::sort(vecNtrkIds.begin(),vecNtrkIds.end());
1382 std::vector<unsigned int> strkIds(vecNtrkIds);
1383 while ( ii < vecNtrkIds.size() )
1385 if (strkIds.at(ii) != strkIds.at(ii-1))
1393 if (n>
max) {
max =
n; ind = ii;}
1398 if (strkIds.begin()!=strkIds.end())
1399 mode = strkIds.at(ind);
1400 vecMode.push_back(mode);
1403 if (strkIds.size()!=0)
1404 rhistsStitched.
fModeFrac->Fill((
double)
max/(
double)strkIds.size());
1413 if (!assns)
throw cet::exception(
"TrackAnaCT") <<
"Bad Associations. \n";
1420 NtrkIdsAll.push_back(vecMode);
1422 std::unique(NtrkIdsAll.back().begin(),NtrkIdsAll.back().end());
1424 for (
auto const val : NtrkIdsAll.back())
1427 sum += hitmap[
val][o].size();
1429 ntvsorted.push_back(sum);
1438 for (
auto it = KEmap.rbegin(); it!=KEmap.rend(); ++it)
1454 for (
auto it = KEmap.rbegin(); it!=KEmap.rend(); ++it)
1456 int val = it->second;
1467 flattener
flat(NtrkIdsAll);
1468 std::vector <unsigned int> &v =
flat;
1470 for (
auto const val : v)
1475 double T(part->
E() - 0.001*part->
Mass());
1495 <<
"TrackAnaCT statistics:\n" 1502 const MCHists& mchists = i->second;
1519 template <
typename T>
1522 std::vector<size_t> idx(v.size());
1523 for (
size_t i = 0; i != idx.size(); ++i) idx[i] = i;
1525 std::sort(idx.begin(), idx.end(),
1526 [&v](
size_t i1,
size_t i2) {
return v[i1] > v[i2];});
def analyze(root, level, gtrees, gbranches, doprint)
double E(const int i=0) const
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
unsigned int NumberTrajectoryPoints() const
const TLorentzVector & Position(const int i=0) const
double EndMomentum() const
double VertexMomentum() const
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
void anaStitch(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::Event &evt)
Encapsulate the construction of a single cyostat.
void analyze(const art::Event &evt)
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Handle< PROD > getHandle(SelectorBase const &) const
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
const simb::MCParticle * TrackIdToParticle_P(int id) const
bool isValid
Whether this ID points to a valid element.
static constexpr double fs
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Vector_t VertexDirection() const
CryostatID_t Cryostat
Index of cryostat.
unsigned int ReadOutWindowSize() const
EDAnalyzer(fhicl::ParameterSet const &pset)
tick ticks
Alias for common language habits.
Q_EXPORT QTSManip setprecision(int p)
art framework interface to geometry description
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< size_t > fsort_indexes(const std::vector< T > &v)
std::string fStitchModuleLabel
fInnerVessel push_back(Point(-578.400000, 0.000000, 0.000000))
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
double Length(size_t p=0) const
Access to various track properties.
#define DEFINE_ART_MODULE(klass)
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
void swap(Handle< T > &a, Handle< T > &b)
static const int NoParticleId
double HalfWidth() const
Half width of the cryostat [cm].
Point_t const & Vertex() const
double T(const int i=0) const
double ConvertXToTicks(double X, int p, int t, int c) const
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
static int max(int a, int b)
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
The data type to uniquely identify a TPC.
std::string fHitSpptAssocModuleLabel
std::string fTrackModuleLabel
void err(const char *fmt,...)
Detector simulation of raw signals on wires.
Q_EXPORT QTSManip setw(int w)
bool Convert(const vector< std::string > &input, std::vector< T > &v)
const sim::ParticleList & ParticleList() const
double HalfHeight() const
Half height of the cryostat [cm].
Declaration of signal hit object.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
TrackAnaCT(fhicl::ParameterSet const &pset)
Contains all timing reference information for the detector.
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
Vector_t EndDirection() const
const TLorentzVector & Momentum(const int i=0) const
std::string fTrkSpptAssocModuleLabel
Provides recob::Track data product.
std::string fSpacepointModuleLabel
std::map< int, MCHists > fMCHistMap
Point_t const & End() const
vector< vector< double > > clear
Tools and modules for checking out the basics of the Monte Carlo.
auto const & get(AssnsNode< L, R, D > const &r)
TPCID_t TPC
Index of the TPC within its cryostat.
std::map< int, RecoHists > fRecoHistMap
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
cet::coded_exception< error, detail::translate > exception
double Length() const
Length of the cryostat [cm].
QTextStream & endl(QTextStream &s)
Signal from collection planes.