24 #include "canvas/Persistency/Common/FindManyP.h" 25 #include "art_root_io/TFileService.h" 32 #include "nug4/ParticleNavigation/ParticleList.h" 73 #include "TPaveStats.h" 106 bool moduleMatcher(
int module1,
int module2);
107 double signedPointToLineDistance(
double firstPoint1,
double firstPoint2,
double secondPoint1,
double secondPoint2,
double trackPoint1,
double trackPoint2);
108 double signed3dDistance(
double firstPoint1,
double firstPoint2,
double firstPoint3,
double secondPoint1,
double secondPoint2,
double secondPoint3, TVector3 trackPos);
110 void endJob()
override;
111 void createPNG(TH1D * histo);
112 double setAngle(
double angle);
151 double X_F, X_B, Y_F, Y_B,
Z_F, Z_B;
152 double trackX1, trackX2, trackY1, trackY2, trackZ1,
trackZ2;
165 double trkPosX, trkPosY,
trkPosZ, displXZ, displYZ;
169 double trkhitx, trkhity,
trkhitz, trkhitt0, crtt0, trkdqdx;
276 EDAnalyzer(p), fCRTLabel(p.
get <
art::InputTag > (
"CRTLabel")), fCTBLabel(p.
get<
art::InputTag>(
"CTBLabel")) {
277 consumes < std::vector < CRT::Trigger >> (
fCRTLabel);
278 consumes < std::vector < art::Assns < sim::AuxDetSimChannel, CRT::Trigger >>> (
fCRTLabel);
287 double numerator = (secondPoint2-firstPoint2)*trackPoint1 - (secondPoint1-firstPoint1) * trackPoint2 + secondPoint1*firstPoint2 - firstPoint1*secondPoint2;
288 double denominator = sqrt( (secondPoint2-firstPoint2)*(secondPoint2-firstPoint2) + (secondPoint1-firstPoint1)*(secondPoint1-firstPoint1) );
290 return numerator/denominator;
295 double denominator = sqrt( (secondPoint2-firstPoint2)*(secondPoint2-firstPoint2) + (secondPoint1-firstPoint1)*(secondPoint1-firstPoint1)+ (secondPoint3-firstPoint3)*(secondPoint3-firstPoint3));
297 double X1=point.X()-firstPoint1;
298 double Y1=point.Y()-firstPoint2;
299 double Z1=point.Z()-firstPoint3;
301 double X2=point.X()-secondPoint1;
302 double Y2=point.Y()-secondPoint2;
303 double Z2=point.Z()-secondPoint3;
305 double numerator=(X1*Y2-Y1*X2)-(X1*Z2-X2*Z1)+(Y1*Z2-Z1*Y2);
307 return numerator/denominator;
318 if ((module1 == 6 && (module2 == 10 || module2 == 11)) || (module1 == 14 && (module2 == 10 || module2 == 11)) || (module1 == 19 && (module2 == 26 || module2 == 27)) || (module1 == 31 && (module2 == 26 || module2 == 27)) || (module1 == 7 && (module2 == 12 || module2 == 13)) || (module1 == 15 && (module2 == 12 || module2 == 13)) || (module1 == 18 && (module2 == 24 || module2 == 25)) || (module1 == 30 && (module2 == 24 || module2 == 25)) || (module1 == 1 && (module2 == 4 || module2 == 5)) || (module1 == 9 && (module2 == 4 || module2 == 5)) || (module1 == 16 && (module2 == 20 || module2 == 21)) || (module1 == 28 && (module2 == 20 || module2 == 21)) || (module1 == 0 && (module2 == 2 || module2 == 3)) || (module1 == 8 && (module2 == 2 || module2 == 3)) || (module1 == 17 && (module2 == 22 || module2 == 23)) || (module1 == 29 && (module2 == 22 || module2 == 23)))
return 1;
326 TCanvas *
c =
new TCanvas;
329 TImage *
img = TImage::Create();
331 img -> WriteImage((
std::string(histo -> GetName()) +
".png").c_str());
339 angle += 3.14159265359;
341 angle *= 180.00 / 3.14159265359;
368 timeStamp=timingHandle->at(0).GetTimeStamp();
373 auto const* SCE = lar::providerFrom<spacecharge::SpaceChargeService>();
382 if(timeStamp.GetFlags()!= 13)
return;}
398 cout <<
"Getting triggers" <<
endl;
399 const auto & triggers =
event.getValidHandle < std::vector < CRT::Trigger >> (
fCRTLabel);
401 art::FindManyP < sim::AuxDetSimChannel > trigToSim(triggers, event,
fCRTLabel);
409 std::unordered_map < size_t, double > prevTimes;
411 cout <<
"Looking for hits in Triggers" <<
endl;
414 for (
const auto &
trigger: * triggers) {
415 const auto & hits =
trigger.Hits();
416 for (
const auto &
hit: hits) {
437 const auto & trigGeo = geom -> AuxDet(
trigger.Channel());
438 const auto & csens = trigGeo.SensitiveVolume(
hit.Channel());
439 const auto center = csens.GetCenter();
448 cout <<
"Hits compiled for event: " <<
nEvents <<
endl;
449 cout <<
"Number of Hits above Threshold: " << hitID <<
endl;
452 for (
unsigned int f_test = 0; f_test <
tempHits_F.size(); f_test++) {
454 const auto & trigGeo = geom -> AuxDet(
tempHits_F[
f].module);
455 const auto & trigGeo2 = geom -> AuxDet(
tempHits_F[f_test].module);
458 const auto hit1Center = hit1Geo.GetCenter();
460 const auto & hit2Geo = trigGeo2.SensitiveVolume(
tempHits_F[f_test].channel);
461 const auto hit2Center = hit2Geo.GetCenter();
466 double hitX = hit1Center.X();
471 double hitYPrelim=hit2Center.Y();
479 double hitY=hitYPrelim;
480 double hitZ = (hit1Center.Z() + hit2Center.Z()) / 2.
f;
501 for (
unsigned int f_test = 0; f_test <
tempHits_B.size(); f_test++) {
504 const auto & trigGeo = geom -> AuxDet(
tempHits_B[
f].module);
505 const auto & trigGeo2 = geom -> AuxDet(
tempHits_B[f_test].module);
507 const auto hit1Center = hit1Geo.GetCenter();
509 const auto & hit2Geo = trigGeo2.SensitiveVolume(
tempHits_B[f_test].channel);
510 const auto hit2Center = hit2Geo.GetCenter();
515 double hitX = hit1Center.X();
523 double hitYPrelim = hit2Center.Y();
529 double hitY=hitYPrelim;
532 double hitZ = (hit1Center.Z() + hit2Center.Z()) / 2.
f;
556 vector < art::Ptr < recob::Track > > trackList;
557 auto trackListHandle =
event.getHandle < vector < recob::Track > >(
fTrackModuleLabel);
558 if (trackListHandle) {
562 vector<art::Ptr<recob::PFParticle> > pfplist;
563 auto PFPListHandle =
event.getHandle< std::vector<recob::PFParticle> >(
"pandora");
566 if (pfplist.size()<1)
return;
567 art::FindManyP<anab::T0> trk_t0_assn_v(PFPListHandle, event ,
"pandora");
568 art::FindManyP<recob::PFParticle> pfp_trk_assn(trackListHandle,event,
"pandoraTrack");
570 art::FindManyP<recob::Hit> trackHits(trackListHandle, event,
"pandoraTrack");
571 int nTracksReco = trackList.size();
573 std::vector<art::Ptr<recob::Hit>> hitlist;
574 auto hitListHandle =
event.getHandle< std::vector<recob::Hit> >(
"hitpdune");
577 art::FindManyP < recob::Hit > hitsFromTrack(trackListHandle, event,
fTrackModuleLabel);
582 art::FindManyP<anab::Calorimetry> fmcal(trackListHandle, event,
"pandoracalo");
585 for (
int iRecoTrack = 0; iRecoTrack < nTracksReco; ++iRecoTrack) {
586 if (pfplist.size()<1)
break;
587 std::vector< art::Ptr<recob::Hit> > allHits = hitsFromTrack.at(iRecoTrack);
592 std::vector<art::Ptr<recob::PFParticle>> pfps=pfp_trk_assn.at(iRecoTrack);
593 if(!pfps.size())
continue;
594 std::vector<art::Ptr<anab::T0>> t0s=trk_t0_assn_v.at(pfps[0].
key());
606 double trackStartPositionZ_noSCE = trackList[iRecoTrack]->Vertex().Z();
607 double trackEndPositionZ_noSCE = trackList[iRecoTrack] ->
End().Z();
609 double trackStartPositionX_notCorrected = trackList[iRecoTrack]->Vertex().X();
610 double trackStartPositionY_noSCE = trackList[iRecoTrack]->Vertex().Y();
613 double trackEndPositionX_notCorrected = trackList[iRecoTrack] ->
End().X();
614 double trackEndPositionY_noSCE = trackList[iRecoTrack] ->
End().Y();
618 if (trackStartPositionZ_noSCE>trackEndPositionZ_noSCE){
619 trackEndPositionZ_noSCE = trackList[iRecoTrack]->Vertex().Z();
620 trackStartPositionZ_noSCE = trackList[iRecoTrack] ->
End().Z();
621 trackEndPositionX_notCorrected = trackList[iRecoTrack]->Vertex().X();
622 trackEndPositionY_noSCE = trackList[iRecoTrack]->Vertex().Y();
625 trackStartPositionX_notCorrected=trackList[iRecoTrack] ->
End().X();
626 trackStartPositionY_noSCE = trackList[iRecoTrack] ->
End().Y();
637 if ((trackEndPositionZ_noSCE > 660 && trackStartPositionZ_noSCE < 50) || (trackStartPositionZ_noSCE > 660 && trackEndPositionZ_noSCE < 50)) {
640 double min_delta = DBL_MAX;
641 double best_XF = DBL_MAX;
642 double best_YF = DBL_MAX;
643 double best_ZF = DBL_MAX;
644 double best_XB = DBL_MAX;
645 double best_YB = DBL_MAX;
646 double best_ZB = DBL_MAX;
647 double best_dotProductCos = DBL_MAX;
648 double best_deltaXF = DBL_MAX;
649 double best_deltaYF = DBL_MAX;
650 double best_deltaXB = DBL_MAX;
651 double best_deltaYB = DBL_MAX;
652 double best_T=DBL_MAX;
653 int bestHitIndex_F=0;
654 int bestHitIndex_B=0;
683 double trackStartPositionX_noSCE=trackStartPositionX_notCorrected;
684 double trackEndPositionX_noSCE=trackEndPositionX_notCorrected;
689 double ticksOffset=0;
691 if (!
fMCCSwitch) ticksOffset = (t0+RDOffset)/25.
f+detProp.GetXTicksOffset(allHits[firstHit]->WireID().Plane, allHits[firstHit]->WireID().TPC, allHits[firstHit]->WireID().Cryostat);
693 else if (
fMCCSwitch) ticksOffset = (t0/500.f)+detProp.GetXTicksOffset(allHits[firstHit]->WireID().Plane, allHits[firstHit]->WireID().TPC, allHits[firstHit]->WireID().Cryostat);
695 xOffset=detProp.ConvertTicksToX(ticksOffset,allHits[firstHit]->
WireID().
Plane, allHits[firstHit]->
WireID().
TPC, allHits[firstHit]->
WireID().Cryostat);
698 trackStartPositionX_noSCE=trackStartPositionX_notCorrected-xOffset;
699 trackEndPositionX_noSCE=trackEndPositionX_notCorrected-xOffset;
703 double trackStartPositionX=trackStartPositionX_noSCE;
704 double trackStartPositionY=trackStartPositionY_noSCE;
705 double trackStartPositionZ=trackStartPositionZ_noSCE;
707 double trackEndPositionX=trackEndPositionX_noSCE;
708 double trackEndPositionY=trackEndPositionY_noSCE;
709 double trackEndPositionZ=trackEndPositionZ_noSCE;
713 trackStartPositionX -= posOffsets_F.X();
714 trackStartPositionY += posOffsets_F.Y();
715 trackStartPositionZ += posOffsets_F.Z();
717 trackEndPositionX -= posOffsets_B.X();
718 trackEndPositionY += posOffsets_B.Y();
719 trackEndPositionZ += posOffsets_B.Z();
728 TVector3 trackStart(trackStartPositionX, trackStartPositionY, trackStartPositionZ);
729 TVector3 trackEnd(trackEndPositionX, trackEndPositionY, trackEndPositionZ);
730 TVector3 v1(X1,Y1,Z1);
731 TVector3 v2(X2, Y2, Z2);
733 TVector3 v4(trackStartPositionX,
735 trackStartPositionZ);
736 TVector3 v5(trackEndPositionX,
739 TVector3 trackVector = (v5-v4).Unit();
740 TVector3 hitVector=(v2-v1).Unit();
745 double predictedHitPositionY1 = (v1.Z()-v5.Z())/(v4.Z()-v5.Z())*(v4.Y()-v5.Y())+v5.Y();
746 double predictedHitPositionY2 = (v2.Z()-v5.Z())/(v4.Z()-v5.Z())*(v4.Y()-v5.Y())+v5.Y();
748 double predictedHitPositionX1 = (v1.Z()-v5.Z())/(v4.Z()-v5.Z())*(v4.X()-v5.X())+v5.X();
749 double predictedHitPositionX2 = (v2.Z()-v5.Z())/(v4.Z()-v5.Z())*(v4.X()-v5.X())+v5.X();
751 double dotProductCos=trackVector*hitVector;
753 double deltaX1 = (predictedHitPositionX1-X1);
754 double deltaX2 = (predictedHitPositionX2-X2);
756 double deltaY1 = (predictedHitPositionY1-Y1);
758 double deltaY2 = (predictedHitPositionY2-Y2);
773 best_dotProductCos = dotProductCos;
775 best_deltaXF = deltaX1;
776 best_deltaYF = deltaY1;
777 best_deltaXB = deltaX2;
778 best_deltaYB = deltaY2;
793 X_F=best_XF;
Y_F=best_YF;
Z_F=best_ZF;
X_B=best_XB;
Y_B=best_YB;
Z_B=best_ZB;
int f=bestHitIndex_F;
int b=bestHitIndex_B;
800 double trackStartPositionX_noSCE=trackStartPositionX_notCorrected;
801 double trackEndPositionX_noSCE=trackEndPositionX_notCorrected;
804 double ticksOffset=0;
807 ticksOffset=t0/500.f+detProp.GetXTicksOffset(allHits[firstHit]->
WireID().
Plane, allHits[firstHit]->
WireID().
TPC, allHits[firstHit]->
WireID().Cryostat);
809 xOffset=detProp.ConvertTicksToX(ticksOffset,allHits[firstHit]->
WireID().
Plane, allHits[firstHit]->
WireID().
TPC, allHits[firstHit]->
WireID().Cryostat);
811 trackStartPositionX_noSCE=trackStartPositionX_notCorrected-xOffset;
812 trackEndPositionX_noSCE=trackEndPositionX_notCorrected-xOffset;
816 double trackStartPositionX=trackStartPositionX_noSCE;
817 double trackStartPositionY=trackStartPositionY_noSCE;
818 double trackStartPositionZ=trackStartPositionZ_noSCE;
820 double trackEndPositionX=trackEndPositionX_noSCE;
821 double trackEndPositionY=trackEndPositionY_noSCE;
822 double trackEndPositionZ=trackEndPositionZ_noSCE;
825 TVector3 trackStart(trackStartPositionX, trackStartPositionY, trackStartPositionZ);
826 TVector3 trackEnd(trackEndPositionX, trackEndPositionY, trackEndPositionZ);
830 tPair.
recoId = iRecoTrack;
859 tPair.
endTPC=allHits[0]->WireID().TPC;
883 vector < tracksPair > allUniqueTracksPair;
890 cout<<
"Number of reco and CRT pairs: "<<allUniqueTracksPair.size()<<
endl;
892 if (allUniqueTracksPair.size() > 0) {
893 for (
unsigned int u = 0; u < allUniqueTracksPair.size(); u++) {
894 trackID = allUniqueTracksPair[u].recoId;
899 deltaX_F=allUniqueTracksPair[u].deltaX_F;
900 deltaX_B=allUniqueTracksPair[u].deltaX_B;
901 deltaY_F=allUniqueTracksPair[u].deltaY_F;
902 deltaY_B=allUniqueTracksPair[u].deltaY_B;
903 dotCos=allUniqueTracksPair[u].dotProductCos;
904 trackX1=allUniqueTracksPair[u].trackStartPosition.X();
905 trackY1=allUniqueTracksPair[u].trackStartPosition.Y();
906 trackZ1=allUniqueTracksPair[u].trackStartPosition.Z();
908 trackX2=allUniqueTracksPair[u].trackEndPosition.X();
909 trackY2=allUniqueTracksPair[u].trackEndPosition.Y();
910 trackZ2=allUniqueTracksPair[u].trackEndPosition.Z();
912 moduleX_F=allUniqueTracksPair[u].moduleX1;
913 moduleX_B=allUniqueTracksPair[u].moduleX2;
914 moduleY_F=allUniqueTracksPair[u].moduleY1;
915 moduleY_B=allUniqueTracksPair[u].moduleY2;
917 adcX_F=allUniqueTracksPair[u].adcX1;
918 adcY_F=allUniqueTracksPair[u].adcY1;
919 adcX_B=allUniqueTracksPair[u].adcX2;
920 adcY_B=allUniqueTracksPair[u].adcY2;
922 stripX_F=allUniqueTracksPair[u].stripX1;
923 stripX_B=allUniqueTracksPair[u].stripX2;
924 stripY_F=allUniqueTracksPair[u].stripY1;
925 stripY_B=allUniqueTracksPair[u].stripY2;
927 X_F=allUniqueTracksPair[u].X1;
928 Y_F=allUniqueTracksPair[u].Y1;
929 Z_F=allUniqueTracksPair[u].Z1;
931 X_B=allUniqueTracksPair[u].X2;
932 Y_B=allUniqueTracksPair[u].Y2;
933 Z_B=allUniqueTracksPair[u].Z2;
935 endTPC=allUniqueTracksPair[u].endTPC;
938 mccT0=allUniqueTracksPair[u].mccT0;
941 CRT_TOF=allUniqueTracksPair[u].timeDiff;
960 const size_t lastPoint=trackList[iRecoTrack]->NumberTrajectoryPoints();
961 for (
size_t trackpoint = 0; trackpoint < lastPoint; ++trackpoint) {
962 double trackPosX=trackList[iRecoTrack] -> LocationAtPoint(trackpoint).X()-
measuredXOffset;
963 double trackPosY=trackList[iRecoTrack] -> LocationAtPoint(trackpoint).Y();
964 double trackPosZ=trackList[iRecoTrack] -> LocationAtPoint(trackpoint).Z();
966 if (trackPosY==-999)
continue;
967 if (trackPosX==-999)
continue;
968 TVector3 trackPos(trackPosX, trackPosY, trackPosZ);
993 std::vector<art::Ptr<anab::Calorimetry>> calos=fmcal.at(iRecoTrack);
995 for(
size_t ical = 0; ical<calos.size(); ++ical){
996 if (calos[ical]->
PlaneID().Plane!=2)
continue;
998 const size_t NHits=calos[ical]->dEdx().size();
999 for(
size_t iHit = 0; iHit < NHits; ++iHit){
1001 const auto& TrkPos = (calos[ical] -> XYZ()[iHit]);
1003 trkdqdx=(calos[ical]->dQdx()[iHit]);
1004 size_t tpIndex=(calos[ical]->TpIndices()[iHit]);
1005 if (hitlist[tpIndex]->Multiplicity()>1)
continue;
1006 trkhitt0=hitlist[tpIndex]->PeakTime()*500.f;
1008 crtt0=allUniqueTracksPair[u].t0;
1012 WireID=hitlist[tpIndex]->WireID().Wire;
1013 TPCID=hitlist[tpIndex]->WireID().TPC;
1014 sumADC=hitlist[tpIndex]->SummedADC();
1015 sigmaHit=hitlist[tpIndex]->SigmaIntegral();
1016 rangeTime=hitlist[tpIndex]->EndTick()-hitlist[tpIndex]->StartTick();
1036 fCRTTree = fileServiceHandle->make<TTree>(
"Displacement",
"track by track info");
1037 fMCCMuon= fileServiceHandle->make<TTree>(
"MCCTruths",
"event by event info");
1039 fTrackInfo= fileServiceHandle->make<TTree>(
"TrackInfo",
"track by track info");
1040 fCRTdQTree=fileServiceHandle->make<TTree>(
"CRTdQ",
"track by track info");
1047 fMCCMuon->Branch(
"nEvents", &
nEvents,
"nEvents/I");
1048 fMCCMuon->Branch(
"mccCRTStartX",&
mccCRTStartX,
"mccCRTStartX/D");
1049 fMCCMuon->Branch(
"mccCRTStartY",&
mccCRTStartY,
"mccCRTStartY/D");
1050 fMCCMuon->Branch(
"mccCRTStartZ",&
mccCRTStartZ,
"mccCRTStartZ/D");
1051 fMCCMuon->Branch(
"mccCRTEndX",&
mccCRTEndX,
"mccCRTEndX/D");
1052 fMCCMuon->Branch(
"mccCRTEndY",&
mccCRTEndY,
"mccCRTEndY/D");
1053 fMCCMuon->Branch(
"mccCRTEndZ",&
mccCRTEndZ,
"mccCRTEndZ/D");
1054 fMCCMuon->Branch(
"truthEnergy", &
truthEnergy,
"truthEnergy/D");
1055 fMCCMuon->Branch(
"hRun", &
run,
"run/I");
1056 fMCCMuon->Branch(
"hSubRun", &
subRun,
"subRun/I");
1057 fMCCMuon->Branch(
"hmccTrackId", &
mccTrackId,
"mccTrackId/I");
1058 fMCCMuon->Branch(
"hcandidateCRT", &
candidateCRT,
"candidateCRT/I");
1059 fMCCMuon->Branch(
"hmccT0", &
mccT0,
"mccT0/D");
1062 fCRTdQTree->Branch(
"trkhitx",&
trkhitx,
"trkhitx/D");
1063 fCRTdQTree->Branch(
"trkhity",&
trkhity,
"trkhity/D");
1064 fCRTdQTree->Branch(
"trkhitz",&
trkhitz,
"trkhitz/D");
1065 fCRTdQTree->Branch(
"trkdqdx",&
trkdqdx,
"trkdqdx/D");
1066 fCRTdQTree->Branch(
"trkhitt0",&
trkhitt0,
"trkhitt0/D");
1067 fCRTdQTree->Branch(
"trkhitIntegral",&
trkhitIntegral,
"trkhitIntegral/I");
1068 fCRTdQTree->Branch(
"crtt0",&
crtt0,
"crtt0/D");
1069 fCRTdQTree->Branch(
"hX_F", &
X_F,
"X_F/D");
1070 fCRTdQTree->Branch(
"hX_B", &
X_B,
"X_B/D");
1071 fCRTdQTree->Branch(
"hY_F", &
Y_F,
"Y_F/D");
1072 fCRTdQTree->Branch(
"hY_B", &
Y_B,
"Y_B/D");
1073 fCRTdQTree->Branch(
"hZ_F", &
Z_F,
"Z_F/D");
1074 fCRTdQTree->Branch(
"hZ_B", &
Z_B,
"Z_B/D");
1076 fCRTdQTree->Branch(
"hTPCID", &
TPCID,
"TPCID/I");
1077 fCRTdQTree->Branch(
"hWireID", &
WireID,
"WireID/I");
1078 fCRTdQTree->Branch(
"hsumADC",&
sumADC,
"sumADC/I");
1079 fCRTdQTree->Branch(
"hrangeTime",&
rangeTime,
"rangeTime/I");
1080 fCRTdQTree->Branch(
"hsigmaHit",&
sigmaHit,
"sigmaHit/D");
1143 fTrackInfo->Branch(
"nEvents", &
nEvents,
"nEvents/I");
1144 fTrackInfo->Branch(
"hdotCos", &
dotCos,
"dotCos/D");
1147 fTrackInfo->Branch(
"htrkPosX", &
trkPosX,
"trkPosX/D");
1148 fTrackInfo->Branch(
"htrkPosY", &
trkPosY,
"trkPosY/D");
1149 fTrackInfo->Branch(
"htrkPosZ", &
trkPosZ,
"trkPosZ/D");
1150 fTrackInfo->Branch(
"hdisplXZ", &
displXZ,
"displXZ/D");
1151 fTrackInfo->Branch(
"hdisplYZ", &
displYZ,
"displYZ/D");
1152 fTrackInfo->Branch(
"hmeasuredXOffset", &
measuredXOffset,
"measuredXOffset/D");
1154 fTrackInfo->Branch(
"hX_F", &
X_F,
"X_F/D");
1155 fTrackInfo->Branch(
"hX_B", &
X_B,
"X_B/D");
1156 fTrackInfo->Branch(
"hY_F", &
Y_F,
"Y_F/D");
1157 fTrackInfo->Branch(
"hY_B", &
Y_B,
"Y_B/D");
1158 fTrackInfo->Branch(
"hZ_F", &
Z_F,
"Z_F/D");
1159 fTrackInfo->Branch(
"hZ_B", &
Z_B,
"Z_B/D");
def analyze(root, level, gtrees, gbranches, doprint)
void analyze(art::Event const &e) override
code to link reconstructed objects back to the MC truth information
double averageSignedDistanceYZ
double signedPointToLineDistance(double firstPoint1, double firstPoint2, double secondPoint1, double secondPoint2, double trackPoint1, double trackPoint2)
TVector3 trackEndPosition
double averageSignedDistanceXZ
double averageSignedDistance
std::string fTrackModuleLabel
bool moduleMatcher(int module1, int module2)
geo::TPCID PositionToTPCID(geo::Point_t const &point) const
Returns the ID of the TPC at specified location.
int fModuletoModuleTimingCut
art framework interface to geometry description
bool operator()(const tracksPair &tracksPair2)
#define DEFINE_ART_MODULE(klass)
bool operator()(const tracksPair &pair1, const tracksPair &pair2)
T get(std::string const &key) const
TVector3 trackStartPosition
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
void Draw(const char *plot, const char *title)
Detector simulation of raw signals on wires.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
std::vector< tempHits > tempHits_F
Declaration of signal hit object.
std::vector< recoHits > primaryHits_B
double signed3dDistance(double firstPoint1, double firstPoint2, double firstPoint3, double secondPoint1, double secondPoint2, double secondPoint3, TVector3 trackPos)
std::vector< tracksPair > allTracksPair
removePairIndex(const tracksPair &tracksPair0)
Provides recob::Track data product.
std::vector< tempHits > tempHits_B
const tracksPair tracksPair1
constexpr auto const & deepestIndex() const
Returns the value of the deepest ID available (TPC's).
detail::Node< FrameID, bool > PlaneID
int fFronttoBackTimingCut
IDparameter< geo::TPCID > TPCID
Member type of validated geo::TPCID parameter.
void createPNG(TH1D *histo)
auto const & get(AssnsNode< L, R, D > const &r)
TwoCRTMatching(fhicl::ParameterSet const &p)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
recob::tracking::Plane Plane
double setAngle(double angle)
std::vector< recoHits > primaryHits_F
QTextStream & endl(QTextStream &s)
Event finding and building.