26 #include "art_root_io/TFileService.h" 27 #include "art_root_io/TFileDirectory.h" 55 #include "TTimeStamp.h" 56 #include "TLorentzVector.h" 58 #include "TEfficiency.h" 127 double Energy,
double EnergyDeposited,
double TPCLength,
130 double Energy,
double EnergyDeposited,
double TPCLength,
132 void EfficPlot_1D ( TH1D *AllHist, TH1D *MatchHist, TEfficiency *EfficHist );
133 void EfficPlot_2D ( TH2D *AllHist, TH2D *MatchHist, TEfficiency *EfficHist );
170 fTree = tfs->make<TTree>(
"TrackingTree",
"analysis tree");
187 MCAllEffic.
Length = tfs->make<TH1D>(
"Length_MCAll" ,
"All charged Monte Carlo particle track lengths;Length (cm);Efficiency", 50, 0, 500 );
188 MCAllEffic.
Energy = tfs->make<TH1D>(
"Energy_MCAll" ,
"All charged Monte Carlo particle energies;Energy (GeV);Efficiency" , 50, 0, 20 );
189 MCAllEffic.
Energy_Depos = tfs->make<TH1D>(
"Energy_Depos_MCAll",
"All charged Monte Carlo particle energy deposited;Energy Deposited (GeV);Efficiency",50, 0, 3.5 );
190 MCAllEffic.
Theta = tfs->make<TH1D>(
"Theta_MCAll" ,
"All charged Monte Carlo particle theta;Theta (rad);Efficiency", 50, 0, TMath::Pi() );
191 MCAllEffic.
Theta_XZ = tfs->make<TH1D>(
"Theta_XZ_MCAll" ,
"All charged Monte Carlo particle thetaXZ;ThetaxZ (rad);Efficiency",50, -TMath::Pi(), TMath::Pi() );
192 MCAllEffic.
Theta_YZ = tfs->make<TH1D>(
"Theta_YZ_MCAll" ,
"All charged Monte Carlo particle thetaYZ;ThetaYZ (rad);Efficiency",50, -TMath::Pi(), 0 );
193 MCAllEffic.
Phi = tfs->make<TH1D>(
"Phi_MCAll" ,
"All charged Monte Carlo particle phi;Phi (rad);Efficiency", 50, -TMath::Pi(), 0 );
194 MCAllEffic.
Eta_XY = tfs->make<TH1D>(
"Eta_XY_MCAll" ,
"All charged Monte Carlo particle etaXZ;EtaxY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
195 MCAllEffic.
Eta_ZY = tfs->make<TH1D>(
"Eta_ZY_MCAll" ,
"All charged Monte Carlo particle etaYZ;EtaZY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
196 MCAllEffic.
Phi_v_Theta = tfs->make<TH2D>(
"Phi_v_Theta_MCAll" ,
"All charged Monte Carlo phi versus theta;Theta (rad);Phi (rad)", 50, 0, TMath::Pi(), 50, -TMath::Pi(), 0);
198 MatchedAllEffic.
Length = tfs->make<TH1D>(
"Length_MatchAll" ,
"Matched all charged Monte Carlo particle track lengths;Length (cm);Efficiency",50, 0, 500 );
199 MatchedAllEffic.
Energy = tfs->make<TH1D>(
"Energy_MatchAll" ,
"Matched all charged Monte Carlo particle energies;Energy (GeV);Efficiency" ,50, 0, 20 );
200 MatchedAllEffic.
Energy_Depos = tfs->make<TH1D>(
"Energy_Depos_MatchAll",
"Matched all charged Monte Carlo particle energy deposited;Energy Deposited (GeV);Efficiency",50, 0, 3.5 );
201 MatchedAllEffic.
Theta = tfs->make<TH1D>(
"Theta_MatchAll" ,
"Matched all charged Monte Carlo particle theta;Theta (rad);Efficiency", 50, 0, TMath::Pi() );
202 MatchedAllEffic.
Theta_XZ = tfs->make<TH1D>(
"Theta_XZ_MatchAll" ,
"Matched all charged Monte Carlo particle thetaXZ;ThetaxZ (rad);Efficiency",50, -TMath::Pi(), TMath::Pi() );
203 MatchedAllEffic.
Theta_YZ = tfs->make<TH1D>(
"Theta_YZ_MatchAll" ,
"Matched all charged Monte Carlo particle thetaYZ;ThetaYZ (rad);Efficiency",50, -TMath::Pi(), 0 );
204 MatchedAllEffic.
Phi = tfs->make<TH1D>(
"Phi_MatchAll" ,
"Matched all charged Monte Carlo particle phi;Phi (rad);Efficiency", 50, -TMath::Pi(), 0 );
205 MatchedAllEffic.
Eta_XY = tfs->make<TH1D>(
"Eta_XY_MatchAll" ,
"Matched all charged Monte Carlo particle etaXZ;EtaxY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
206 MatchedAllEffic.
Eta_ZY = tfs->make<TH1D>(
"Eta_ZY_MatchAll" ,
"Matched all charged Monte Carlo particle etaYZ;EtaZY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
207 MatchedAllEffic.
Phi_v_Theta = tfs->make<TH2D>(
"Phi_v_Theta_MatchAll" ,
"Matched all charged Monte Carlo phi versus theta;Theta (rad);Phi (rad)", 50, 0, TMath::Pi(), 50, -TMath::Pi(), 0);
209 AllEfficiencies.
Effic_Length = tfs->make<TEfficiency>(
"Effic_Length_All" ,
"Efficiency vs Particle Length for all charged particles;Length (cm);Efficiency", 50, 0, 500 );
210 AllEfficiencies.
Effic_Energy = tfs->make<TEfficiency>(
"Effic_Energy_All" ,
"Efficiency vs Particle Energy for all charged particles;Energy (GeV);Efficiency", 50, 0, 20 );
211 AllEfficiencies.
Effic_Energy_Depos = tfs->make<TEfficiency>(
"Effic_Energy_Depos_All",
"Efficiency vs Particle Energy Deposited for all charged particles;Energy Deposited (GeV);Efficiency",50, 0, 3.5 );
212 AllEfficiencies.
Effic_Theta = tfs->make<TEfficiency>(
"Effic_Theta_All" ,
"Efficiency vs Particle Theta for all charged particles;Theta (rad);Efficiency", 50, 0, TMath::Pi() );
213 AllEfficiencies.
Effic_Theta_XZ = tfs->make<TEfficiency>(
"Effic_Theta_XZ_All" ,
"Efficiency vs Particle ThetaXZ for all charged particles;ThetaxZ (rad);Efficiency",50, -TMath::Pi(), TMath::Pi() );
214 AllEfficiencies.
Effic_Theta_YZ = tfs->make<TEfficiency>(
"Effic_Theta_YZ_All" ,
"Efficiency vs Particle ThetaYZ for all charged particles;ThetaYZ (rad);Efficiency",50, -TMath::Pi(), 0 );
215 AllEfficiencies.
Effic_Phi = tfs->make<TEfficiency>(
"Effic_Phi_All" ,
"Efficiency vs Particle Phi for all charged particles;Phi (rad);Efficiency", 50, -TMath::Pi(), 0 );
216 AllEfficiencies.
Effic_Eta_XY = tfs->make<TEfficiency>(
"Effic_Eta_XY_All" ,
"Efficiency vs Particle EtaXZ for all charged particles;EtaxY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
217 AllEfficiencies.
Effic_Eta_ZY = tfs->make<TEfficiency>(
"Effic_Eta_ZY_All" ,
"Efficiency vs Particle EtaYZ for all charged particles;EtaZY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
218 AllEfficiencies.
Effic_Phi_v_Theta = tfs->make<TEfficiency>(
"Effic_Phi_v_Theta_All" ,
"Efficiency of Phi versus theta for all charged particles;Theta (rad);Phi (rad)", 50, 0, TMath::Pi(), 50, -TMath::Pi(), 0);
221 MCProtonEffic.
Length = tfs->make<TH1D>(
"Length_MCProton" ,
"Proton charged Monte Carlo particle track lengths;Length (cm);Efficiency", 50, 0, 500 );
222 MCProtonEffic.
Energy = tfs->make<TH1D>(
"Energy_MCProton" ,
"Proton charged Monte Carlo particle energies;Energy (GeV);Efficiency" , 50, 0, 20 );
223 MCProtonEffic.
Energy_Depos = tfs->make<TH1D>(
"Energy_Depos_MCProton",
"Proton charged Monte Carlo particle energy deposited;Energy Deposited (GeV);Efficiency",50, 0, 3.5 );
224 MCProtonEffic.
Theta = tfs->make<TH1D>(
"Theta_MCProton" ,
"Proton charged Monte Carlo particle theta;Theta (rad);Efficiency", 50, 0, TMath::Pi() );
225 MCProtonEffic.
Theta_XZ = tfs->make<TH1D>(
"Theta_XZ_MCProton" ,
"Proton charged Monte Carlo particle thetaXZ;ThetaxZ (rad);Efficiency",50, -TMath::Pi(), TMath::Pi() );
226 MCProtonEffic.
Theta_YZ = tfs->make<TH1D>(
"Theta_YZ_MCProton" ,
"Proton charged Monte Carlo particle thetaYZ;ThetaYZ (rad);Efficiency",50, -TMath::Pi(), 0 );
227 MCProtonEffic.
Phi = tfs->make<TH1D>(
"Phi_MCProton" ,
"Proton charged Monte Carlo particle phi;Phi (rad);Efficiency", 50, -TMath::Pi(), 0 );
228 MCProtonEffic.
Eta_XY = tfs->make<TH1D>(
"Eta_XY_MCProton" ,
"Proton charged Monte Carlo particle etaXZ;EtaxY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
229 MCProtonEffic.
Eta_ZY = tfs->make<TH1D>(
"Eta_ZY_MCProton" ,
"Proton charged Monte Carlo particle etaYZ;EtaZY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
230 MCProtonEffic.
Phi_v_Theta = tfs->make<TH2D>(
"Phi_v_Theta_MCProton" ,
"Proton charged Monte Carlo phi versus theta;Theta (rad);Phi (rad)", 50, 0, TMath::Pi(), 50, -TMath::Pi(), 0);
232 MatchedProtonEffic.
Length = tfs->make<TH1D>(
"Length_MatchProton" ,
"Matched all charged Monte Carlo particle track lengths;Length (cm);Efficiency",50, 0, 500 );
233 MatchedProtonEffic.
Energy = tfs->make<TH1D>(
"Energy_MatchProton" ,
"Matched all charged Monte Carlo particle energies;Energy (GeV);Efficiency" ,50, 0, 20 );
234 MatchedProtonEffic.
Energy_Depos = tfs->make<TH1D>(
"Energy_Depos_MatchProton",
"Matched all charged Monte Carlo particle energy deposited;Energy Deposited (GeV);Efficiency",50, 0, 3.5 );
235 MatchedProtonEffic.
Theta = tfs->make<TH1D>(
"Theta_MatchProton" ,
"Matched all charged Monte Carlo particle theta;Theta (rad);Efficiency", 50, 0, TMath::Pi() );
236 MatchedProtonEffic.
Theta_XZ = tfs->make<TH1D>(
"Theta_XZ_MatchProton" ,
"Matched all charged Monte Carlo particle thetaXZ;ThetaxZ (rad);Efficiency",50, -TMath::Pi(), TMath::Pi() );
237 MatchedProtonEffic.
Theta_YZ = tfs->make<TH1D>(
"Theta_YZ_MatchProton" ,
"Matched all charged Monte Carlo particle thetaYZ;ThetaYZ (rad);Efficiency",50, -TMath::Pi(), 0 );
238 MatchedProtonEffic.
Phi = tfs->make<TH1D>(
"Phi_MatchProton" ,
"Matched all charged Monte Carlo particle phi;Phi (rad);Efficiency", 50, -TMath::Pi(), 0 );
239 MatchedProtonEffic.
Eta_XY = tfs->make<TH1D>(
"Eta_XY_MatchProton" ,
"Matched all charged Monte Carlo particle etaXZ;EtaxY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
240 MatchedProtonEffic.
Eta_ZY = tfs->make<TH1D>(
"Eta_ZY_MatchProton" ,
"Matched all charged Monte Carlo particle etaYZ;EtaZY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
241 MatchedProtonEffic.
Phi_v_Theta = tfs->make<TH2D>(
"Phi_v_Theta_MatchProton" ,
"Matched all charged Monte Carlo phi versus theta;Theta (rad);Phi (rad)", 50, 0, TMath::Pi(), 50, -TMath::Pi(), 0);
243 ProtonEfficiencies.
Effic_Length = tfs->make<TEfficiency>(
"Effic_Length_Proton" ,
"Efficiency vs Particle Length for all charged particles;Length (cm);Efficiency", 50, 0, 500 );
244 ProtonEfficiencies.
Effic_Energy = tfs->make<TEfficiency>(
"Effic_Energy_Proton" ,
"Efficiency vs Particle Energy for all charged particles;Energy (GeV);Efficiency", 50, 0, 20 );
245 ProtonEfficiencies.
Effic_Energy_Depos = tfs->make<TEfficiency>(
"Effic_Energy_Depos_Proton",
"Efficiency vs Particle Energy Deposited for all charged particles;Energy Deposited (GeV);Efficiency",50, 0, 3.5 );
246 ProtonEfficiencies.
Effic_Theta = tfs->make<TEfficiency>(
"Effic_Theta_Proton" ,
"Efficiency vs Particle Theta for all charged particles;Theta (rad);Efficiency", 50, 0, TMath::Pi() );
247 ProtonEfficiencies.
Effic_Theta_XZ = tfs->make<TEfficiency>(
"Effic_Theta_XZ_Proton" ,
"Efficiency vs Particle ThetaXZ for all charged particles;ThetaxZ (rad);Efficiency",50, -TMath::Pi(), TMath::Pi() );
248 ProtonEfficiencies.
Effic_Theta_YZ = tfs->make<TEfficiency>(
"Effic_Theta_YZ_Proton" ,
"Efficiency vs Particle ThetaYZ for all charged particles;ThetaYZ (rad);Efficiency",50, -TMath::Pi(), 0 );
249 ProtonEfficiencies.
Effic_Phi = tfs->make<TEfficiency>(
"Effic_Phi_Proton" ,
"Efficiency vs Particle Phi for all charged particles;Phi (rad);Efficiency", 50, -TMath::Pi(), 0 );
250 ProtonEfficiencies.
Effic_Eta_XY = tfs->make<TEfficiency>(
"Effic_Eta_XY_Proton" ,
"Efficiency vs Particle EtaXZ for all charged particles;EtaxY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
251 ProtonEfficiencies.
Effic_Eta_ZY = tfs->make<TEfficiency>(
"Effic_Eta_ZY_Proton" ,
"Efficiency vs Particle EtaYZ for all charged particles;EtaZY (rad);Efficiency", 50, -TMath::Pi(), TMath::Pi() );
252 ProtonEfficiencies.
Effic_Phi_v_Theta = tfs->make<TEfficiency>(
"Effic_Phi_v_Theta_Proton" ,
"Efficiency of Phi versus theta for all charged particles;Theta (rad);Phi (rad)", 50, 0, TMath::Pi(), 50, -TMath::Pi(), 0);
272 XDriftVelocity = detProp.DriftVelocity()*1
e-3;
273 WindowSize = detProp.NumberTimeSamples() * clockData.TPCClock().TickPeriod() * 1e3;
286 std::vector<art::Ptr<recob::Track> > tracklist;
287 auto trackListHandle = evt.
getHandle< std::vector<recob::Track> >(fTrackModuleLabel);
291 const sim::ParticleList& plist = pi_serv->ParticleList();
293 auto trackh = evt.
getHandle< std::vector<recob::Track> >(fTrackModuleLabel);
295 auto trackvh = evt.
getHandle< std::vector< art::PtrVector < recob::Track > > >(fTrackModuleLabel);
301 if ( trackListHandle.isValid() ) {
302 art::FindManyP<recob::Hit> fmht (trackListHandle, evt, fTrackModuleLabel);
303 art::FindMany<anab::T0> fmt0 (trackListHandle, evt, fMCTruthT0ModuleLabel);
304 art::FindMany<anab::T0> fmphot(trackListHandle, evt, fPhotonT0ModuleLabel);
305 int ntracks_reco=tracklist.size();
314 AllChargedTrack =
false;
318 if ( fabs(particle->
PdgCode() ) == 13 ) AllChargedTrack =
true;
319 else if ( particle->
PdgCode() == 2212 ) AllChargedTrack =
true;
325 if (!AllChargedTrack)
continue;
328 MCTruthInformation ( clockData, particle, MCEnergy, MCEnergyDeposited, MCTPCLength,
329 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi,
330 MCPdgCode, MCTrackId );
331 if ( MCTPCLength < 1. )
continue;
336 HistoFiller ( &MCAllEffic, MCEnergy, MCEnergyDeposited, MCTPCLength,
337 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi );
338 if ( MCPdgCode == 2212 ) {
339 HistoFiller ( &MCProtonEffic, MCEnergy, MCEnergyDeposited, MCTPCLength,
340 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi );
344 if ( MCMatched )
continue;
349 if ( fmt0.isValid() ) {
350 std::vector<const anab::T0*> T0s = fmt0.at(
Track);
351 for (
size_t t0size =0; t0size < T0s.size(); t0size++) {
352 MCTruthT0 = T0s[t0size]->Time();
354 MCTruthTrackID = T0s[t0size]->TriggerBits();
356 TickT0 = MCTruthTickT0;
358 if ( fmphot.isValid() ) {
359 std::vector<const anab::T0*> PhotT0 = fmphot.at(
Track);
360 for (
size_t T0it=0; T0it<PhotT0.size(); ++T0it) {
361 PhotonCounterT0 = PhotT0[T0it]->Time();
362 PhotonCounterTickT0 = PhotonCounterT0 /
sampling_rate(clockData);
363 PhotonCounterID = PhotT0[T0it]->TriggerBits();
370 if ( MCTrackId != MCTruthTrackID )
continue;
376 std::vector< art::Ptr<recob::Hit> > allHits = fmht.at(
Track);
377 double Hit_Size = allHits.size();
380 std::tie(trackStart, trackEnd) = tracklist[
Track]->Extent();
381 trackStart.SetX( trackStart.X() - detProp.ConvertTicksToX( TickT0, allHits[Hit_Size-1]->
WireID().
Plane, allHits[Hit_Size-1]->
WireID().
TPC, allHits[Hit_Size-1]->
WireID().Cryostat ));
382 trackEnd.SetX( trackEnd.X() - detProp.ConvertTicksToX( TickT0, allHits[0]->
WireID().
Plane, allHits[0]->
WireID().
TPC, allHits[0]->
WireID().Cryostat));
386 TrackLength = track.
Length();
390 TrackTheta_XZ = std::atan2(
dir.X(),
dir.Z());
391 TrackTheta_YZ = std::atan2(
dir.Y(),
dir.Z());
392 TrackEta_XY = std::atan2(
dir.X(),
dir.Y());
393 TrackEta_ZY = std::atan2(
dir.Z(),
dir.Y());
394 TrackTheta =
dir.Theta();
395 TrackPhi =
dir.Phi();
401 if ( TrackLength / MCTPCLength > 0.5 &&
402 TrackLength / MCTPCLength < 1.5 &&
407 MatchedTrackID = tracklist[
Track]->ID();
410 HistoFiller ( &MatchedAllEffic, MCEnergy, MCEnergyDeposited, MCTPCLength,
411 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi );
412 Make_Efficiencies ( &AllEfficiencies,
true,
413 MCEnergy, MCEnergyDeposited, MCTPCLength,
414 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi);
417 if ( MCPdgCode == 2212 ) {
418 HistoFiller ( &MatchedProtonEffic, MCEnergy, MCEnergyDeposited, MCTPCLength,
419 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi );
420 Make_Efficiencies ( &ProtonEfficiencies,
true,
421 MCEnergy, MCEnergyDeposited, MCTPCLength,
422 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi);
431 Make_Efficiencies ( &AllEfficiencies,
false,
432 MCEnergy, MCEnergyDeposited, MCTPCLength,
433 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi);
435 if ( MCPdgCode == 2212 ) {
436 Make_Efficiencies ( &ProtonEfficiencies,
false,
437 MCEnergy, MCEnergyDeposited, MCTPCLength,
438 MCTheta_XZ, MCTheta_YZ, MCEta_XY, MCEta_ZY, MCTheta, MCPhi);
449 const simb::MCParticle *particle,
double &Energy,
double &EnergyDeposited,
double &TPCLength,
450 double &Theta_XZ,
double &Theta_YZ,
double &Eta_XY,
double &Eta_ZY,
double &Theta,
double &Phi,
451 int &MCPdgCode,
int &MCTrackId ) {
454 std::vector<double> TPCLengthHits(numberTrajectoryPoints, 0);
455 bool BeenInVolume =
false;
456 int FirstHit=0, LastHit=0;
459 MCPdgCode = particle->
PdgCode();
460 MCTrackId = particle->
TrackId();
462 for(
unsigned int MCHit=0; MCHit < TPCLengthHits.size(); ++MCHit) {
463 const TLorentzVector& tmpPosition=particle->
Position(MCHit);
464 double const tmpPosArray[]={tmpPosition[0],tmpPosition[1],tmpPosition[2]};
466 if (MCHit!=0) TPCLengthHits[MCHit] =
pow (
pow( (particle->
Vx(MCHit-1)-particle->
Vx(MCHit)),2)
467 +
pow( (particle->
Vy(MCHit-1)-particle->
Vy(MCHit)),2)
468 +
pow( (particle->
Vz(MCHit-1)-particle->
Vz(MCHit)),2)
471 geo::TPCID tpcid = geom->FindTPCAtPosition(tmpPosArray);
477 double DriftTimeCorrection = fabs( tmpPosition[0] - XPlanePosition ) / XDriftVelocity;
478 double TimeAtPlane = particle->
T() + DriftTimeCorrection;
484 if ( !BeenInVolume ) {
496 Energy = particle->
E(FirstHit);
497 EnergyDeposited = particle->
E(FirstHit) - particle->
E(LastHit);
498 for (
int Hit = FirstHit+1;
Hit <= LastHit; ++
Hit ) {
499 TPCLength += TPCLengthHits[
Hit];
502 TLorentzVector& momentumStart = (TLorentzVector&)particle->
Momentum(FirstHit);
503 TVector3 mcstartmom = particle->
Momentum(FirstHit).Vect();
504 Theta_XZ = std::atan2(momentumStart.Px(), momentumStart.Pz());
505 Theta_YZ = std::atan2(momentumStart.Py(), momentumStart.Pz());
506 Eta_XY = std::atan2(momentumStart.Px(), momentumStart.Py());
507 Eta_ZY = std::atan2(momentumStart.Pz(), momentumStart.Py());
508 Theta = mcstartmom.Theta();
509 Phi = mcstartmom.Phi();
515 double Energy,
double EnergyDeposited,
double TPCLength,
516 double Theta_XZ,
double Theta_YZ,
double Eta_XY,
double Eta_ZY,
double Theta,
double Phi ) {
517 HistPtr->
Length -> Fill( TPCLength );
518 HistPtr->
Energy -> Fill( Energy );
520 HistPtr->
Theta -> Fill( Theta );
521 HistPtr->
Theta_XZ -> Fill( Theta_XZ );
522 HistPtr->
Theta_YZ -> Fill( Theta_YZ );
523 HistPtr->
Phi -> Fill( Phi );
525 HistPtr->
Eta_XY -> Fill( Eta_XY );
526 HistPtr->
Eta_ZY -> Fill( Eta_ZY );
531 double Energy,
double EnergyDeposited,
double TPCLength,
532 double Theta_XZ,
double Theta_YZ,
double Eta_XY,
double Eta_ZY,
double Theta,
double Phi ) {
533 AllHistPtr->
Effic_Length -> Fill ( matched, TPCLength );
536 AllHistPtr->
Effic_Theta -> Fill ( matched, Theta );
539 AllHistPtr->
Effic_Phi -> Fill ( matched, Phi );
double E(const int i=0) const
void analyze(art::Event const &e) override
struct TrackingEfficiency::TrackingEfficiency::EfficHists MCProtonEffic
double PhotonCounterTickT0
TEfficiency * Effic_Theta_YZ
unsigned int NumberTrajectoryPoints() const
const TLorentzVector & Position(const int i=0) const
art::ServiceHandle< cheat::ParticleInventoryService > pi_serv
struct TrackingEfficiency::TrackingEfficiency::EfficHists MatchedProtonEffic
Encapsulate the construction of a single cyostat.
std::string fPhotonT0ModuleLabel
Handle< PROD > getHandle(SelectorBase const &) const
TEfficiency * Effic_Energy_Depos
struct TrackingEfficiency::TrackingEfficiency::EfficHists MCAllEffic
struct TrackingEfficiency::TrackingEfficiency::EfficHists MatchedAllEffic
std::string fHitsModuleLabel
Geometry information for a single TPC.
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Vector_t VertexDirection() const
void MCTruthInformation(detinfo::DetectorClocksData const &clockData, const simb::MCParticle *particle, double &Energy, double &EnergyDeposited, double &TPCLength, double &Theta_XZ, double &Theta_YZ, double &Eta_XY, double &Eta_ZY, double &Theta, double &Phi, int &MCPdgCode, int &MCTrackId)
std::string fMCTruthT0ModuleLabel
void HistoFiller(struct TrackingEfficiency::TrackingEfficiency::EfficHists *HistPtr, double Energy, double EnergyDeposited, double TPCLength, double Theta_XZ, double Theta_YZ, double Eta_XY, double Eta_ZY, double Theta, double Phi)
Geometry information for a single cryostat.
EDAnalyzer(fhicl::ParameterSet const &pset)
struct TrackingEfficiency::TrackingEfficiency::TEfficiencies AllEfficiencies
art framework interface to geometry description
TEfficiency * Effic_Phi_v_Theta
void EfficPlot_2D(TH2D *AllHist, TH2D *MatchHist, TEfficiency *EfficHist)
TrackingEfficiency(fhicl::ParameterSet const &p)
double Length(size_t p=0) const
Access to various track properties.
void EfficPlot_1D(TH1D *AllHist, TH1D *MatchHist, TEfficiency *EfficHist)
#define DEFINE_ART_MODULE(klass)
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
virtual ~TrackingEfficiency()
TEfficiency * Effic_Length
double T(const int i=0) const
std::string fTrackModuleLabel
The data type to uniquely identify a TPC.
struct TrackingEfficiency::TrackingEfficiency::TEfficiencies ProtonEfficiencies
Encapsulate the geometry of a wire.
void Make_Efficiencies(struct TrackingEfficiency::TrackingEfficiency::TEfficiencies *AllHistPtr, bool matched, double Energy, double EnergyDeposited, double TPCLength, double Theta_XZ, double Theta_YZ, double Eta_XY, double Eta_ZY, double Theta, double Phi)
TEfficiency * Effic_Theta_XZ
TEfficiency * Effic_Theta
double Vx(const int i=0) const
Declaration of signal hit object.
art::ServiceHandle< geo::Geometry > geom
Encapsulate the construction of a single detector plane.
TEfficiency * Effic_Energy
Contains all timing reference information for the detector.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
const TLorentzVector & Momentum(const int i=0) const
tracking::Point_t Point_t
TEfficiency * Effic_Eta_ZY
Provides recob::Track data product.
void endRun(art::Run const &) override
double Vz(const int i=0) const
int trigger_offset(DetectorClocksData const &data)
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
auto const & get(AssnsNode< L, R, D > const &r)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
recob::tracking::Plane Plane
void beginRun(art::Run const &run) override
const double * PlaneLocation(unsigned int p) const
double Vy(const int i=0) const
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
TEfficiency * Effic_Eta_XY
Encapsulate the construction of a single detector plane.