LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
trkf::TrackAna Class Reference
Inheritance diagram for trkf::TrackAna:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Classes

struct  MCHists
 
struct  RecoHists
 

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 TrackAna (fhicl::ParameterSet const &pset)
 
virtual ~TrackAna ()
 
void analyze (const art::Event &evt)
 
void anaStitch (const art::Event &evt)
 
void endJob ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > consumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > consumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > mayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > mayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

template<typename T >
std::vector< size_t > fsort_indexes (const std::vector< T > &v)
 

Private Attributes

std::string fTrackModuleLabel
 
std::string fMCTrackModuleLabel
 
std::string fSpacepointModuleLabel
 
std::string fStitchModuleLabel
 
std::string fTrkSpptAssocModuleLabel
 
std::string fHitSpptAssocModuleLabel
 
std::string fHitModuleLabel
 
int fDump
 
double fMinMCKE
 
double fMinMCLen
 
double fMatchColinearity
 
double fMatchDisp
 
double fWMatchDisp
 
double fMatchLength
 
bool fIgnoreSign
 
bool fStitchedAnalysis
 
std::string fOrigin
 
bool fCheckOrigin
 
simb::Origin_t fOriginValue
 
int fPrintLevel
 
std::map< int, MCHistsfMCHistMap
 
std::map< int, RecoHistsfRecoHistMap
 
int fNumEvent
 

Detailed Description

Definition at line 281 of file TrackAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

trkf::TrackAna::TrackAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 780 of file TrackAna_module.cc.

References fCheckOrigin, fDump, fHitModuleLabel, fHitSpptAssocModuleLabel, fMCTrackModuleLabel, fMinMCKE, fMinMCLen, fOrigin, fOriginValue, fStitchModuleLabel, fTrackModuleLabel, fTrkSpptAssocModuleLabel, simb::kBeamNeutrino, simb::kCosmicRay, simb::kSingleParticle, simb::kSuperNovaNeutrino, and simb::kUnknown.

786  : EDAnalyzer(pset)
787  , fTrackModuleLabel(pset.get<std::string>("TrackModuleLabel"))
788  , fMCTrackModuleLabel(pset.get<std::string>("MCTrackModuleLabel"))
789  , fSpacepointModuleLabel(pset.get<std::string>("SpacepointModuleLabel"))
790  , fStitchModuleLabel(pset.get<std::string>("StitchModuleLabel"))
791  , fTrkSpptAssocModuleLabel(pset.get<std::string>("TrkSpptAssocModuleLabel"))
792  , fHitSpptAssocModuleLabel(pset.get<std::string>("HitSpptAssocModuleLabel"))
793  , fHitModuleLabel(pset.get<std::string>("HitModuleLabel"))
794  , fDump(pset.get<int>("Dump"))
795  , fMinMCKE(pset.get<double>("MinMCKE"))
796  , fMinMCLen(pset.get<double>("MinMCLen"))
797  , fMatchColinearity(pset.get<double>("MatchColinearity"))
798  , fMatchDisp(pset.get<double>("MatchDisp"))
799  , fWMatchDisp(pset.get<double>("WMatchDisp"))
800  , fMatchLength(pset.get<double>("MatchLength"))
801  , fIgnoreSign(pset.get<bool>("IgnoreSign"))
802  , fStitchedAnalysis(pset.get<bool>("StitchedAnalysis",false))
803  , fOrigin(pset.get<std::string>("MCTrackOrigin", "Any"))
804  , fPrintLevel(pset.get<int>("PrintLevel",0))
805  , fNumEvent(0)
806  {
807 
808  // Decide whether to check MCTrack origin
809  fCheckOrigin = false;
811  if(fOrigin.find("Beam") != std::string::npos) {
812  fCheckOrigin = true;
814  } else if(fOrigin.find("Cosmic") != std::string::npos) {
815  fCheckOrigin = true;
817  } else if(fOrigin.find("Super") != std::string::npos) {
818  fCheckOrigin = true;
820  } else if(fOrigin.find("Single") != std::string::npos) {
821  fCheckOrigin = true;
823  }
824 
825  // Report.
826 
827  mf::LogInfo("TrackAna")
828  << "TrackAna configured with the following parameters:\n"
829  << " TrackModuleLabel = " << fTrackModuleLabel << "\n"
830  << " MCTrackModuleLabel = " << fMCTrackModuleLabel << "\n"
831  << " StitchModuleLabel = " << fStitchModuleLabel << "\n"
832  << " TrkSpptAssocModuleLabel = " << fTrkSpptAssocModuleLabel << "\n"
833  << " HitSpptAssocModuleLabel = " << fHitSpptAssocModuleLabel << "\n"
834  << " HitModuleLabel = " << fHitModuleLabel << "\n"
835  << " Dump = " << fDump << "\n"
836  << " MinMCKE = " << fMinMCKE << "\n"
837  << " MinMCLen = " << fMinMCLen
838  << " Origin = " << fOrigin<<" Origin value "<<fOriginValue;
839  }
std::string fHitSpptAssocModuleLabel
std::string fTrkSpptAssocModuleLabel
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::string fSpacepointModuleLabel
std::string fStitchModuleLabel
single particles thrown at the detector
Definition: MCTruth.h:24
std::string fMCTrackModuleLabel
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
simb::Origin_t fOriginValue
std::string fOrigin
Supernova neutrinos.
Definition: MCTruth.h:23
std::string fTrackModuleLabel
std::string fHitModuleLabel
Cosmic rays.
Definition: MCTruth.h:22
Beam neutrinos.
Definition: MCTruth.h:21
trkf::TrackAna::~TrackAna ( )
virtual

Definition at line 841 of file TrackAna_module.cc.

845  {}

Member Function Documentation

void trkf::TrackAna::analyze ( const art::Event evt)

Definition at line 847 of file TrackAna_module.cc.

References anaStitch(), detinfo::DetectorProperties::ConvertXToTicks(), dir, detinfo::DetectorProperties::DriftVelocity(), e, sim::MCStep::E(), simb::MCParticle::E(), recob::Track::End(), recob::Track::EndCovariance(), recob::Track::EndDirection(), recob::Track::EndMomentum(), art::Event::event(), fCheckOrigin, fDump, trkf::TrackAna::MCHists::fHcosth, trkf::TrackAna::MCHists::fHdl, trkf::TrackAna::MCHists::fHdp, trkf::TrackAna::MCHists::fHdpc, trkf::TrackAna::MCHists::fHdudwpull, trkf::TrackAna::MCHists::fHduvcosth, trkf::TrackAna::MCHists::fHdvdwpull, trkf::TrackAna::RecoHists::fHendd, trkf::TrackAna::MCHists::fHenddx, trkf::TrackAna::MCHists::fHenddy, trkf::TrackAna::MCHists::fHenddz, trkf::TrackAna::RecoHists::fHendx, trkf::TrackAna::RecoHists::fHendy, trkf::TrackAna::RecoHists::fHendz, trkf::TrackAna::MCHists::fHgendx, trkf::TrackAna::MCHists::fHgendy, trkf::TrackAna::MCHists::fHgendz, trkf::TrackAna::MCHists::fHgke, trkf::TrackAna::MCHists::fHgkel, trkf::TrackAna::MCHists::fHglen, trkf::TrackAna::MCHists::fHglens, trkf::TrackAna::MCHists::fHgmom, trkf::TrackAna::MCHists::fHgmoml, trkf::TrackAna::MCHists::fHgphi, trkf::TrackAna::MCHists::fHgstartx, trkf::TrackAna::MCHists::fHgstarty, trkf::TrackAna::MCHists::fHgstartz, trkf::TrackAna::MCHists::fHgtheta, trkf::TrackAna::MCHists::fHgtheta_xz, trkf::TrackAna::MCHists::fHgtheta_yz, trkf::TrackAna::MCHists::fHHitEff, trkf::TrackAna::MCHists::fHHitPurity, fHitModuleLabel, trkf::TrackAna::RecoHists::fHlen, trkf::TrackAna::RecoHists::fHlens, trkf::TrackAna::MCHists::fHlvsl, trkf::TrackAna::MCHists::fHmcdudw, trkf::TrackAna::MCHists::fHmcdvdw, trkf::TrackAna::MCHists::fHmcu, trkf::TrackAna::MCHists::fHmcv, trkf::TrackAna::MCHists::fHmcw, trkf::TrackAna::RecoHists::fHmom, trkf::TrackAna::RecoHists::fHmoml, trkf::TrackAna::RecoHists::fHphi, trkf::TrackAna::MCHists::fHppull, trkf::TrackAna::MCHists::fHppullc, trkf::TrackAna::MCHists::fHpvsp, trkf::TrackAna::MCHists::fHpvspc, trkf::TrackAna::RecoHists::fHstartd, trkf::TrackAna::MCHists::fHstartdx, trkf::TrackAna::MCHists::fHstartdy, trkf::TrackAna::MCHists::fHstartdz, trkf::TrackAna::RecoHists::fHstartx, trkf::TrackAna::RecoHists::fHstarty, trkf::TrackAna::RecoHists::fHstartz, trkf::TrackAna::RecoHists::fHtheta, trkf::TrackAna::RecoHists::fHtheta_xz, trkf::TrackAna::RecoHists::fHtheta_yz, trkf::TrackAna::MCHists::fHupull, trkf::TrackAna::MCHists::fHvpull, fIgnoreSign, fMatchColinearity, fMatchDisp, fMatchLength, fMCHistMap, fMCTrackModuleLabel, fMinMCKE, fMinMCLen, fNumEvent, fOriginValue, fPrintLevel, fRecoHistMap, fStitchedAnalysis, fStitchModuleLabel, fTrackModuleLabel, fWMatchDisp, art::FindManyP< ProdB, Data >::get(), art::DataViewImpl::getByLabel(), recob::Track::GlobalToLocalRotationAtPoint(), recob::Track::HasMomentum(), recob::Track::ID(), art::Event::isRealData(), art::Handle< T >::isValid(), geo::k3D, simb::kCosmicRay, simb::MCParticle::Mass(), sim::MCStep::Momentum(), geo::GeometryCore::NearestWire(), geo::GeometryCore::Nplanes(), recob::Track::NumberTrajectoryPoints(), sim::MCTrack::Origin(), sim::MCTrack::PdgCode(), art::Event::run(), sim::MCTrack::Start(), sim::MCStep::T(), sim::MCTrack::TrackID(), cheat::ParticleInventoryService::TrackIdToParticle_P(), recob::Track::Vertex(), recob::Track::VertexCovariance(), recob::Track::VertexDirection(), recob::Track::VertexMomentum(), and w.

853  {
854  const detinfo::DetectorProperties* detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
858 
859 
860  ++fNumEvent;
861 
862  // Optional dump stream.
863 
864  std::unique_ptr<mf::LogInfo> pdump;
865  if(fDump > 0) {
866  --fDump;
867  pdump = std::unique_ptr<mf::LogInfo>(new mf::LogInfo("TrackAna"));
868  }
869 
870  // Make sure histograms are booked.
871 
872  bool mc = !evt.isRealData();
873 
874  // Get MCTracks.
875 
877  evt.getByLabel(fMCTrackModuleLabel, mctrackh);
878  // pair of MCTrack and index of matched reco track
879  std::vector<std::pair<const sim::MCTrack*, int>> selected_mctracks;
880 
881  if(mc && mctrackh.isValid()) {
882 
883  selected_mctracks.reserve(mctrackh->size());
884 
885  // Dump MCTracks.
886 
887  if(pdump) {
888  *pdump << "MC Tracks\n"
889  << " Id pdg x y z dx dy dz p\n"
890  << "-------------------------------------------------------------------------------------------\n";
891  }
892 
893  // Loop over mc tracks, and fill histograms that depend only
894  // on mc information. Also, fill a secondary list of mc tracks
895  // that pass various selection criteria.
896 
897  for(std::vector<sim::MCTrack>::const_iterator imctrk = mctrackh->begin();
898  imctrk != mctrackh->end(); ++imctrk) {
899  const sim::MCTrack& mctrk = *imctrk;
900  int pdg = mctrk.PdgCode();
901  if(fIgnoreSign)
902  pdg = std::abs(pdg);
903 
904  // Ignore everything except stable charged nonshowering particles.
905 
906  int apdg = std::abs(pdg);
907  if(apdg == 13 || // Muon
908  apdg == 211 || // Charged pion
909  apdg == 321 || // Charged kaon
910  apdg == 2212) { // (Anti)proton
911 
912  // check MC track origin?
913  if(fCheckOrigin && mctrk.Origin() != fOriginValue) continue;
914 
915  // Apply minimum energy cut.
916 
917  if(mctrk.Start().E() >= mctrk.Start().Momentum().Mag() + 1000.*fMinMCKE) {
918 
919  // Calculate the x offset due to nonzero mc particle time.
920 
921  double mctime = mctrk.Start().T(); // nsec
922  double mcdx = mctime * 1.e-3 * detprop->DriftVelocity(); // cm
923 
924  // Calculate the length of this mc particle inside the fiducial volume.
925 
926  TVector3 mcstart;
927  TVector3 mcend;
928  TVector3 mcstartmom;
929  TVector3 mcendmom;
930  double plen = length(mctrk, mcdx, mcstart, mcend, mcstartmom, mcendmom);
931 
932  // Apply minimum fiducial length cut. Always reject particles that have
933  // zero length in the tpc regardless of the configured cut.
934 
935  if(plen > 0. && plen > fMinMCLen) {
936 
937  // This is a good mc particle (capable of making a track).
938 
939  selected_mctracks.push_back(std::make_pair(&mctrk, -1));
940 
941  // Dump MC particle information here.
942 
943  if(pdump) {
944  double pstart = mcstartmom.Mag();
945  double pend = mcendmom.Mag();
946  *pdump << "\nOffset"
947  << std::setw(3) << mctrk.TrackID()
948  << std::setw(6) << mctrk.PdgCode()
949  << " "
950  << std::fixed << std::setprecision(2)
951  << std::setw(10) << mcdx
952  << "\nStart "
953  << std::setw(3) << mctrk.TrackID()
954  << std::setw(6) << mctrk.PdgCode()
955  << " "
956  << std::fixed << std::setprecision(2)
957  << std::setw(10) << mcstart[0]
958  << std::setw(10) << mcstart[1]
959  << std::setw(10) << mcstart[2];
960  if(pstart > 0.) {
961  *pdump << " "
962  << std::fixed << std::setprecision(3)
963  << std::setw(10) << mcstartmom[0]/pstart
964  << std::setw(10) << mcstartmom[1]/pstart
965  << std::setw(10) << mcstartmom[2]/pstart;
966  }
967  else
968  *pdump << std::setw(32) << " ";
969  *pdump << std::setw(12) << std::fixed << std::setprecision(3) << pstart;
970  *pdump << "\nEnd "
971  << std::setw(3) << mctrk.TrackID()
972  << std::setw(6) << mctrk.PdgCode()
973  << " "
974  << std::fixed << std::setprecision(2)
975  << std::setw(10) << mcend[0]
976  << std::setw(10) << mcend[1]
977  << std::setw(10) << mcend[2];
978  if(pend > 0.01) {
979  *pdump << " "
980  << std::fixed << std::setprecision(3)
981  << std::setw(10) << mcendmom[0]/pend
982  << std::setw(10) << mcendmom[1]/pend
983  << std::setw(10) << mcendmom[2]/pend;
984  }
985  else
986  *pdump << std::setw(32)<< " ";
987  *pdump << std::setw(12) << std::fixed << std::setprecision(3) << pend
988  << "\nLength: " << plen << "\n";
989  }
990 
991  // Fill histograms.
992 
993  if(fMCHistMap.count(pdg) == 0) {
994  std::ostringstream ostr;
995  ostr << "MC" << (fIgnoreSign ? "All" : (pdg > 0 ? "Pos" : "Neg")) << std::abs(pdg);
996  fMCHistMap[pdg] = MCHists(ostr.str());
997  }
998  const MCHists& mchists = fMCHistMap[pdg];
999 
1000  double mctheta_xz = std::atan2(mcstartmom.X(), mcstartmom.Z());
1001  double mctheta_yz = std::atan2(mcstartmom.Y(), mcstartmom.Z());
1002  double mcmom = mcstartmom.Mag();
1003  double mcmass = 0.001 * mctrk.Start().Momentum().Mag();
1004  double mcke = mcmom*mcmom / (std::sqrt(mcmom*mcmom + mcmass*mcmass) + mcmass);
1005 
1006  mchists.fHmcstartx->Fill(mcstart.X());
1007  mchists.fHmcstarty->Fill(mcstart.Y());
1008  mchists.fHmcstartz->Fill(mcstart.Z());
1009  mchists.fHmcendx->Fill(mcend.X());
1010  mchists.fHmcendy->Fill(mcend.Y());
1011  mchists.fHmcendz->Fill(mcend.Z());
1012  mchists.fHmctheta->Fill(mcstartmom.Theta());
1013  mchists.fHmcphi->Fill(mcstartmom.Phi());
1014  mchists.fHmctheta_xz->Fill(mctheta_xz);
1015  mchists.fHmctheta_yz->Fill(mctheta_yz);
1016  mchists.fHmcmom->Fill(mcmom);
1017  mchists.fHmcmoml->Fill(mcmom);
1018  mchists.fHmcke->Fill(mcke);
1019  mchists.fHmckel->Fill(mcke);
1020  mchists.fHmclen->Fill(plen);
1021  mchists.fHmclens->Fill(plen);
1022  }
1023  }
1024  }
1025  }
1026  } //mc
1027 
1028 
1029  // Get tracks and spacepoints and hits
1033 
1034  evt.getByLabel(fTrackModuleLabel, trackh);
1035  evt.getByLabel(fStitchModuleLabel,trackvh);
1036  evt.getByLabel(fHitModuleLabel, hith);
1037 
1038  // Extract all hits into a vector of art::Ptrs (the format used by back tracker).
1039 
1040  std::vector<art::Ptr<recob::Hit> > allhits;
1041  if(hith.isValid()) {
1042  allhits.reserve(hith->size());
1043  for(unsigned int i=0; i<hith->size(); ++i) {
1044  allhits.emplace_back(hith, i);
1045  }
1046  }
1047 
1048  // Construct FindManyP object to be used for finding track-hit associations.
1049 
1050  art::FindManyP<recob::Hit> tkhit_find(trackh, evt, fTrackModuleLabel);
1051 
1052  // This new top part of TrackAna between two long lines of ************s
1053  // is particular to analyzing Stitched Tracks.
1054  // *******************************************************************//
1055 
1056  if (trackvh.isValid() && fStitchedAnalysis)
1057  {
1058  mf::LogDebug("TrackAna")
1059  << "TrackAna read " << trackvh->size()
1060  << " vectors of Stitched PtrVectorsof tracks.";
1061  anaStitch(evt);
1062  }
1063 
1064  if(trackh.isValid()) {
1065 
1066  if(pdump) {
1067  *pdump << "\nReconstructed Tracks\n"
1068  << " Id MCid x y z dx dy dz p\n"
1069  << "-------------------------------------------------------------------------------------------\n";
1070  }
1071 
1072  // Loop over tracks.
1073 
1074  int ntrack = trackh->size();
1075  for(int i = 0; i < ntrack; ++i) {
1076  art::Ptr<recob::Track> ptrack(trackh, i);
1077  const recob::Track& track = *ptrack;
1078 
1079  // Extract hits associated with this track.
1080 
1081  std::vector<art::Ptr<recob::Hit> > trackhits;
1082  tkhit_find.get(i, trackhits);
1083 
1084  // Calculate the x offset due to nonzero reconstructed time.
1085 
1086  //double recotime = track.Time() * detprop->SamplingRate(); // nsec
1087 // double recotime = 0.;
1088 // double trackdx = recotime * 1.e-3 * detprop->DriftVelocity(); // cm
1089  double trackdx = 0;
1090 
1091  // Fill histograms involving reco tracks only.
1092 
1093  int ntraj = track.NumberTrajectoryPoints();
1094  if(ntraj > 0) {
1095  TVector3 pos = track.Vertex();
1096  TVector3 dir = track.VertexDirection();
1097  TVector3 end = track.End();
1098  pos[0] += trackdx;
1099  end[0] += trackdx;
1100 
1101  double dpos = bdist(pos);
1102  double dend = bdist(end);
1103  double tlen = length(track);
1104  double theta_xz = std::atan2(dir.X(), dir.Z());
1105  double theta_yz = std::atan2(dir.Y(), dir.Z());
1106 
1107  if(fRecoHistMap.count(0) == 0)
1108  fRecoHistMap[0] = RecoHists("Reco");
1109  const RecoHists& rhists = fRecoHistMap[0];
1110 
1111  rhists.fHstartx->Fill(pos.X());
1112  rhists.fHstarty->Fill(pos.Y());
1113  rhists.fHstartz->Fill(pos.Z());
1114  rhists.fHstartd->Fill(dpos);
1115  rhists.fHendx->Fill(end.X());
1116  rhists.fHendy->Fill(end.Y());
1117  rhists.fHendz->Fill(end.Z());
1118  rhists.fHendd->Fill(dend);
1119  rhists.fHtheta->Fill(dir.Theta());
1120  rhists.fHphi->Fill(dir.Phi());
1121  rhists.fHtheta_xz->Fill(theta_xz);
1122  rhists.fHtheta_yz->Fill(theta_yz);
1123 
1124  double mom = 0.;
1125  if(track.HasMomentum())
1126  mom = track.VertexMomentum();
1127  rhists.fHmom->Fill(mom);
1128  rhists.fHmoml->Fill(mom);
1129  rhists.fHlen->Fill(tlen);
1130  rhists.fHlens->Fill(tlen);
1131 
1132  // Id of matching mc particle.
1133 
1134  int mcid = -1;
1135 
1136  // Loop over direction.
1137 
1138  for(int swap=0; swap<2; ++swap) {
1139 
1140  // Analyze reversed tracks only if start momentum = end momentum.
1141 
1142  if(swap != 0 && track.HasMomentum() &&
1143  std::abs(track.VertexMomentum() - track.EndMomentum()) > 1.e-3)
1144  continue;
1145 
1146  // Calculate the global-to-local rotation matrix.
1147 
1148  TMatrixD rot(3,3);
1149  int start_point = (swap == 0 ? 0 : ntraj-1);
1150  track.GlobalToLocalRotationAtPoint(start_point, rot);
1151 
1152  // Update track data for reversed case.
1153 
1154  if(swap != 0) {
1155  rot(1, 0) = -rot(1, 0);
1156  rot(2, 0) = -rot(2, 0);
1157  rot(1, 1) = -rot(1, 1);
1158  rot(2, 1) = -rot(2, 1);
1159  rot(1, 2) = -rot(1, 2);
1160  rot(2, 2) = -rot(2, 2);
1161 
1162  pos = track.End();
1163  dir = -track.EndDirection();
1164  end = track.Vertex();
1165  pos[0] += trackdx;
1166  end[0] += trackdx;
1167 
1168  dpos = bdist(pos);
1169  dend = bdist(end);
1170  theta_xz = std::atan2(dir.X(), dir.Z());
1171  theta_yz = std::atan2(dir.Y(), dir.Z());
1172 
1173  if(track.HasMomentum()) mom = track.EndMomentum();
1174  }
1175 
1176  // Get covariance matrix.
1177 
1178  const TMatrixD& cov = (swap == 0 ? track.VertexCovariance() : track.EndCovariance());
1179 
1180  // Loop over track-like mc particles.
1181 
1182  for(unsigned int imc = 0; imc < selected_mctracks.size(); ++imc) {
1183  const sim::MCTrack& mctrk = *selected_mctracks[imc].first;
1184  int pdg = mctrk.PdgCode();
1185  if(fIgnoreSign) pdg = std::abs(pdg);
1186  auto iMCHistMap = fMCHistMap.find(pdg);
1187  if (iMCHistMap == fMCHistMap.end())
1188  throw cet::exception("TrackAna") << "no particle with ID=" << pdg << "\n";
1189  const MCHists& mchists = iMCHistMap->second;
1190 
1191  // Calculate the x offset due to nonzero mc particle time.
1192 
1193  double mctime = mctrk.Start().T(); // nsec
1194  double mcdx = mctime * 1.e-3 * detprop->DriftVelocity(); // cm
1195 
1196  // Calculate the points where this mc particle enters and leaves the
1197  // fiducial volume, and the length in the fiducial volume.
1198 
1199  TVector3 mcstart;
1200  TVector3 mcend;
1201  TVector3 mcstartmom;
1202  TVector3 mcendmom;
1203  double plen = length(mctrk, mcdx, mcstart, mcend, mcstartmom, mcendmom);
1204 
1205  // Get the displacement of this mc particle in the global coordinate system.
1206 
1207  TVector3 mcpos = mcstart - pos;
1208 
1209  // Rotate the momentum and position to the
1210  // track-local coordinate system.
1211 
1212  TVector3 mcmoml = rot * mcstartmom;
1213  TVector3 mcposl = rot * mcpos;
1214 
1215  double colinearity = mcmoml.Z() / mcmoml.Mag();
1216 
1217  double u = mcposl.X();
1218  double v = mcposl.Y();
1219  double w = mcposl.Z();
1220 
1221  double pu = mcmoml.X();
1222  double pv = mcmoml.Y();
1223  double pw = mcmoml.Z();
1224 
1225  double dudw = pu / pw;
1226  double dvdw = pv / pw;
1227 
1228  double u0 = u - w * dudw;
1229  double v0 = v - w * dvdw;
1230  double uv0 = std::sqrt(u0*u0 + v0*v0);
1231 
1232  mchists.fHduvcosth->Fill(colinearity, uv0);
1233 
1234  if(std::abs(uv0) < fMatchDisp) {
1235 
1236  // Fill slope matching histograms.
1237 
1238  mchists.fHmcdudw->Fill(dudw);
1239  mchists.fHmcdvdw->Fill(dvdw);
1240  mchists.fHdudwpull->Fill(dudw / std::sqrt(cov(2,2)));
1241  mchists.fHdvdwpull->Fill(dvdw / std::sqrt(cov(3,3)));
1242  }
1243  mchists.fHcosth->Fill(colinearity);
1244  if(colinearity > fMatchColinearity) {
1245 
1246  // Fill displacement matching histograms.
1247 
1248  mchists.fHmcu->Fill(u0);
1249  mchists.fHmcv->Fill(v0);
1250  mchists.fHmcw->Fill(w);
1251  mchists.fHupull->Fill(u0 / std::sqrt(cov(0,0)));
1252  mchists.fHvpull->Fill(v0 / std::sqrt(cov(1,1)));
1253 
1254  if(std::abs(uv0) < fMatchDisp) {
1255 
1256  // Fill matching histograms.
1257 
1258  double mctheta_xz = std::atan2(mcstartmom.X(), mcstartmom.Z());
1259  double mctheta_yz = std::atan2(mcstartmom.Y(), mcstartmom.Z());
1260  double mcmom = mcstartmom.Mag();
1261  double mcmass = 0.001 * mctrk.Start().Momentum().Mag();
1262  double mcke = mcmom*mcmom / (std::sqrt(mcmom*mcmom + mcmass*mcmass) + mcmass);
1263 
1264  mchists.fHstartdx->Fill(pos.X() - mcstart.X());
1265  mchists.fHstartdy->Fill(pos.Y() - mcstart.Y());
1266  mchists.fHstartdz->Fill(pos.Z() - mcstart.Z());
1267  mchists.fHenddx->Fill(end.X() - mcend.X());
1268  mchists.fHenddy->Fill(end.Y() - mcend.Y());
1269  mchists.fHenddz->Fill(end.Z() - mcend.Z());
1270  mchists.fHlvsl->Fill(plen, tlen);
1271  mchists.fHdl->Fill(tlen - plen);
1272  mchists.fHpvsp->Fill(mcmom, mom);
1273  double dp = mom - mcmom;
1274  mchists.fHdp->Fill(dp);
1275  mchists.fHppull->Fill(dp / std::sqrt(cov(4,4)));
1276  if(std::abs(dpos) >= 5. && std::abs(dend) >= 5.) {
1277  mchists.fHpvspc->Fill(mcmom, mom);
1278  mchists.fHdpc->Fill(dp);
1279  mchists.fHppullc->Fill(dp / std::sqrt(cov(4,4)));
1280  }
1281 
1282  // Count this track as well-reconstructed if it is matched to an
1283  // mc particle (which it is if get here), and if in addition the
1284  // starting position (w) matches and the reconstructed track length
1285  // is more than 0.5 of the mc particle trajectory length.
1286 
1287  bool good = std::abs(w) <= fWMatchDisp &&
1288  tlen > fMatchLength * plen;
1289  if(good) {
1290  mcid = mctrk.TrackID();
1291 
1292  // Calculate and fill hit efficiency and purity.
1293 
1294  std::set<int> tkidset;
1295  tkidset.insert(mcid);
1296  double hiteff =
1297  bt_serv->HitCollectionEfficiency(tkidset, trackhits, allhits, geo::k3D);
1298  double hitpurity = bt_serv->HitCollectionPurity(tkidset, trackhits);
1299  mchists.fHHitEff->Fill(hiteff);
1300  mchists.fHHitPurity->Fill(hitpurity);
1301 
1302  // Fill efficiency numerator histograms.
1303 
1304  mchists.fHgstartx->Fill(mcstart.X());
1305  mchists.fHgstarty->Fill(mcstart.Y());
1306  mchists.fHgstartz->Fill(mcstart.Z());
1307  mchists.fHgendx->Fill(mcend.X());
1308  mchists.fHgendy->Fill(mcend.Y());
1309  mchists.fHgendz->Fill(mcend.Z());
1310  mchists.fHgtheta->Fill(mcstartmom.Theta());
1311  mchists.fHgphi->Fill(mcstartmom.Phi());
1312  mchists.fHgtheta_xz->Fill(mctheta_xz);
1313  mchists.fHgtheta_yz->Fill(mctheta_yz);
1314  mchists.fHgmom->Fill(mcmom);
1315  mchists.fHgmoml->Fill(mcmom);
1316  mchists.fHgke->Fill(mcke);
1317  mchists.fHgkel->Fill(mcke);
1318  mchists.fHglen->Fill(plen);
1319  mchists.fHglens->Fill(plen);
1320 
1321  // set the match flag
1322  selected_mctracks[imc].second = i;
1323 
1324  if(fPrintLevel > 0) {
1325  const simb::MCParticle* ptkl = pi_serv->TrackIdToParticle_P(mcid);
1326  float KE = ptkl->E() - ptkl->Mass();
1327  std::string KEUnits = " GeV";
1328  if(mctrk.Origin() != simb::kCosmicRay) {
1329  // MeV for low energy particles
1330  KE *= 1000;
1331  KEUnits = " MeV";
1332  }
1333  mf::LogVerbatim("TrackAna")
1334  <<evt.run()<<"."<<evt.event()
1335  <<" Match MCTkID "<<std::setw(6)<<mctrk.TrackID()
1336  <<" Origin "<<mctrk.Origin()
1337  <<" PDG"<<std::setw(5)<<mctrk.PdgCode()
1338  <<" KE"<<std::setw(4)<<(int)KE<<KEUnits
1339  <<" RecoTrkID "<<track.ID()
1340  <<" hitEff "<<std::setprecision(2)<<hiteff<<" hitPur "<<hitpurity;
1341  int sWire, sTick, eWire, eTick;
1342  // this won't work for DUNE
1343  for(unsigned short ipl = 0; ipl < geom->Nplanes(); ++ipl) {
1344  sWire = geom->NearestWire(mcstart, ipl, 0, 0);
1345  sTick = detprop->ConvertXToTicks(mcstart[0], ipl, 0, 0);
1346  eWire = geom->NearestWire(mcend, ipl, 0, 0);
1347  eTick = detprop->ConvertXToTicks(mcend[0], ipl, 0, 0);
1348  mf::LogVerbatim("TrackAna")<<" Wire:Tick in Pln "<<ipl<<" W:T "<<sWire<<":"<<sTick<<" - "<<eWire<<":"<<eTick;
1349  } // ipl
1350  } // fPrintLevel == 2
1351  } // good
1352  }
1353  }
1354  }
1355  }
1356 
1357  // Dump track information here.
1358 
1359  if(pdump) {
1360  TVector3 pos = track.Vertex();
1361  TVector3 dir = track.VertexDirection();
1362  TVector3 end = track.End();
1363  pos[0] += trackdx;
1364  end[0] += trackdx;
1365  TVector3 enddir = track.EndDirection();
1366  double pstart = track.VertexMomentum();
1367  double pend = track.EndMomentum();
1368  *pdump << "\nOffset"
1369  << std::setw(3) << track.ID()
1370  << std::setw(6) << mcid
1371  << " "
1372  << std::fixed << std::setprecision(2)
1373  << std::setw(10) << trackdx
1374  << "\nStart "
1375  << std::setw(3) << track.ID()
1376  << std::setw(6) << mcid
1377  << " "
1378  << std::fixed << std::setprecision(2)
1379  << std::setw(10) << pos[0]
1380  << std::setw(10) << pos[1]
1381  << std::setw(10) << pos[2];
1382  if(pstart > 0.) {
1383  *pdump << " "
1384  << std::fixed << std::setprecision(3)
1385  << std::setw(10) << dir[0]
1386  << std::setw(10) << dir[1]
1387  << std::setw(10) << dir[2];
1388  }
1389  else
1390  *pdump << std::setw(32) << " ";
1391  *pdump << std::setw(12) << std::fixed << std::setprecision(3) << pstart;
1392  *pdump << "\nEnd "
1393  << std::setw(3) << track.ID()
1394  << std::setw(6) << mcid
1395  << " "
1396  << std::fixed << std::setprecision(2)
1397  << std::setw(10) << end[0]
1398  << std::setw(10) << end[1]
1399  << std::setw(10) << end[2];
1400  if(pend > 0.01) {
1401  *pdump << " "
1402  << std::fixed << std::setprecision(3)
1403  << std::setw(10) << enddir[0]
1404  << std::setw(10) << enddir[1]
1405  << std::setw(10) << enddir[2];
1406  }
1407  else
1408  *pdump << std::setw(32)<< " ";
1409  *pdump << std::setw(12) << std::fixed << std::setprecision(3) << pend
1410  << "\nLength: " << tlen << "\n";
1411  }
1412  }
1413  }
1414  } // i
1415 
1416  // print out un-matched MC tracks
1417  if(fPrintLevel > 0) {
1418  for(unsigned int imc = 0; imc < selected_mctracks.size(); ++imc) {
1419  if(selected_mctracks[imc].second >= 0) continue;
1420  const sim::MCTrack& mctrk = *selected_mctracks[imc].first;
1421  const simb::MCParticle* ptkl = pi_serv->TrackIdToParticle_P(mctrk.TrackID());
1422  float KE = ptkl->E() - ptkl->Mass();
1423  std::string KEUnits = " GeV";
1424  if(mctrk.Origin() != simb::kCosmicRay) {
1425  // MeV for low energy particles
1426  KE *= 1000;
1427  KEUnits = " MeV";
1428  }
1429  // find the start/end wire:time in each plane
1430  TVector3 mcstart, mcend, mcstartmom, mcendmom;
1431  double mcdx = mctrk.Start().T() * 1.e-3 * detprop->DriftVelocity(); // cm
1432  double plen = length(mctrk, mcdx, mcstart, mcend, mcstartmom, mcendmom);
1433  mf::LogVerbatim("TrackAna")<<evt.run()<<"."<<evt.event()
1434  <<" NoMat MCTkID "<<std::setw(6)<<mctrk.TrackID()
1435  <<" Origin "<<mctrk.Origin()
1436  <<" PDG"<<std::setw(5)<<mctrk.PdgCode()
1437  <<" KE"<<std::setw(4)<<(int)KE<<KEUnits
1438  <<" Length "<<std::fixed<<std::setprecision(1)<<plen<<" cm";
1439  if(fPrintLevel > 1) {
1440  int sWire, sTick, eWire, eTick;
1441  // this won't work for DUNE
1442  for(unsigned short ipl = 0; ipl < geom->Nplanes(); ++ipl) {
1443  sWire = geom->NearestWire(mcstart, ipl, 0, 0);
1444  sTick = detprop->ConvertXToTicks(mcstart[0], ipl, 0, 0);
1445  eWire = geom->NearestWire(mcend, ipl, 0, 0);
1446  eTick = detprop->ConvertXToTicks(mcend[0], ipl, 0, 0);
1447  mf::LogVerbatim("TrackAna")<<" Wire:Tick in Pln "<<ipl
1448  <<" W:T "<<sWire<<":"<<sTick<<" - "<<eWire<<":"<<eTick;
1449  } // ipl
1450  } // fPrintLevel > 1
1451  } // imc
1452  } // fPrintLevel > 0
1453 
1454  }
double E(const int i=0) const
Definition: MCParticle.h:237
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
const simb::MCParticle * TrackIdToParticle_P(int const &id)
simb::Origin_t Origin() const
Definition: MCTrack.h:40
double EndMomentum() const
Definition: Track.h:151
double VertexMomentum() const
Definition: Track.h:149
TVector3 VertexDirection() const
Covariance matrices are either set or not.
Definition: Track.h:247
TMatrixD EndCovariance() const
Covariance matrices are either set or not.
Definition: Track.cxx:142
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
double Mass() const
Definition: MCParticle.h:243
bool HasMomentum() const
Definition: Track.h:147
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:109
std::string fStitchModuleLabel
double T() const
Definition: MCStep.h:45
bool isRealData() const
Definition: Event.h:83
void anaStitch(const art::Event &evt)
std::map< int, MCHists > fMCHistMap
virtual double ConvertXToTicks(double X, int p, int t, int c) const =0
3-dimensional objects, potentially hits, clusters, prongs, etc.
Definition: geo_types.h:82
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
Definition: Track.h:197
bool isValid() const
Definition: Handle.h:190
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
intermediate_table::const_iterator const_iterator
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
std::string fMCTrackModuleLabel
EventNumber_t event() const
Definition: Event.h:67
int PdgCode() const
Definition: MCTrack.h:41
const TLorentzVector & Momentum() const
Definition: MCStep.h:38
simb::Origin_t fOriginValue
int ID() const
Definition: Track.h:205
TDirectory * dir
Definition: macro.C:5
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
std::map< int, RecoHists > fRecoHistMap
TVector3 Vertex() const
Covariance matrices are either set or not.
Definition: Track.h:245
TMatrixD VertexCovariance() const
Covariance matrices are either set or not.
Definition: Track.cxx:131
double E() const
Definition: MCStep.h:49
TVector3 EndDirection() const
Covariance matrices are either set or not.
Definition: Track.h:248
void swap(lar::deep_const_fwd_iterator_nested< CITER, INNERCONTEXTRACT > &a, lar::deep_const_fwd_iterator_nested< CITER, INNERCONTEXTRACT > &b)
const MCStep & Start() const
Definition: MCTrack.h:44
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
std::string fTrackModuleLabel
unsigned int TrackID() const
Definition: MCTrack.h:42
Float_t e
Definition: plot.C:34
RunNumber_t run() const
Definition: Event.h:77
Float_t track
Definition: plot.C:34
TVector3 End() const
Covariance matrices are either set or not.
Definition: Track.h:246
Float_t w
Definition: plot.C:23
std::string fHitModuleLabel
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:51
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
Cosmic rays.
Definition: MCTruth.h:22
void trkf::TrackAna::anaStitch ( const art::Event evt)

art::FindManyP<recob::Hit> fh(sppth, evt, fHitSpptAssocModuleLabel);

Definition at line 1456 of file TrackAna_module.cc.

References detinfo::DetectorProperties::DriftVelocity(), simb::MCParticle::E(), trkf::TrackAna::RecoHists::fHHitChg, trkf::TrackAna::RecoHists::fHHitPdg, trkf::TrackAna::RecoHists::fHHitTrkId, trkf::TrackAna::RecoHists::fHHitWidth, fHitSpptAssocModuleLabel, trkf::TrackAna::RecoHists::fModeFrac, trkf::TrackAna::RecoHists::fNTrkIdTrks, trkf::TrackAna::RecoHists::fNTrkIdTrks2, trkf::TrackAna::RecoHists::fNTrkIdTrks3, fRecoHistMap, fsort_indexes(), fSpacepointModuleLabel, fStitchModuleLabel, fTrackModuleLabel, fTrkSpptAssocModuleLabel, art::DataViewImpl::getByLabel(), cheat::BackTrackerService::HitToTrackIDEs(), art::Event::isRealData(), art::Handle< T >::isValid(), geo::kCollection, simb::MCParticle::Mass(), max, n, sim::NoParticleId, simb::MCParticle::PdgCode(), art::PtrVector< T >::size(), simb::MCParticle::T(), cheat::ParticleInventoryService::TrackIdToParticle_P(), and x.

Referenced by analyze().

1457  {
1458 
1462  const detinfo::DetectorProperties* detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
1463 
1464  std::map<int, std::map<int, art::PtrVector<recob::Hit>> > hitmap; // trkID, otrk, hitvec
1465  std::map<int, int > KEmap; // length traveled in det [cm]?, trkID want to sort by KE
1466  bool mc = !evt.isRealData();
1470 
1471  evt.getByLabel(fTrackModuleLabel, trackh);
1472  evt.getByLabel(fSpacepointModuleLabel, sppth);
1473  evt.getByLabel(fStitchModuleLabel,trackvh);
1474  int ntv(trackvh->size());
1475 
1476  std::vector < art::PtrVector<recob::Track> >::const_iterator cti = trackvh->begin();
1478 
1479  if(trackh.isValid()) {
1481  int nsppts_assnwhole = fswhole.size();
1482  std::cout << "TrackAna: Number of clumps of Spacepoints from Assn for all Tracks: " << nsppts_assnwhole << std::endl;
1483  }
1484 
1485  if(fRecoHistMap.count(0) == 0)
1486  {
1487  fRecoHistMap[0] = RecoHists("Reco");
1488  std::cout << "\n" << "\t\t TrkAna: Fresh fRecoHistMap[0] ******* \n" << std::endl;
1489  }
1490  const RecoHists& rhistsStitched = fRecoHistMap[0];
1491 
1492  std::vector < std::vector <unsigned int> > NtrkIdsAll;
1493  std::vector < double > ntvsorted;
1494  hitmap.clear();
1495  KEmap.clear();
1496 
1497  // Look at the components of the stitched tracks. Grab their sppts/hits from Assns.
1498  for (int o = 0; o < ntv; ++o) // o for outer
1499  {
1500 
1501  const art::PtrVector<recob::Track> pvtrack(*(cti++));
1502  // auto it = pvtrack.begin();
1503  int ntrack = pvtrack.size();
1504  // if (ntrack>1) std::cout << "\t\t TrkAna: New Stitched Track ******* " << std::endl;
1505  std::vector< std::vector <unsigned int> > NtrkId_Hit; // hit IDs in inner tracks
1506  std::vector<unsigned int> vecMode;
1508 
1509  for(int i = 0; i < ntrack; ++i) {
1510 
1511  //const art::Ptr<recob::Track> ptrack(*(it++));
1512  // const recob::Track& track = *ptrack;
1513  // auto pcoll { ptrack };
1514  // art::FindManyP<recob::SpacePoint> fs( ptrack, evt, fTrkSpptAssocModuleLabel);
1515  // From gdb> ptype fs, the vector of Ptr<SpacePoint>s it appears is grabbed after fs.at(0)
1516  bool assns(true);
1517  try {
1518  // Got Spacepoints from this Track; now get Hits from those Spacepoints.
1519  // int nsppts = ptrack->NumberTrajectoryPoints();
1520 
1521  int nsppts_assn = fs.at(i).size();
1522  // if (ntrack>1) std::cout << "\t\tTrackAna: Number of Spacepoints from Track.NumTrajPts(): " << nsppts << std::endl;
1523  // if (ntrack>1) std::cout << "\t\tTrackAna: Number of Spacepoints from Assns for this Track: " << nsppts_assn << std::endl;
1524 
1525  const auto& sppt = fs.at(i);//.at(0);
1526  // since we're in a try and worried about failure, we won't pull the following
1527  // FindManyP out of the loop.
1529 
1530  // Importantly, loop on all sppts, though they don't all contribute to the track.
1531  // As opposed to looping on the trajectory pts, which is a lower number.
1532  // Also, important, in job in whch this runs I set TrackKal3DSPS parameter MaxPass=1,
1533  // cuz I don't want merely the sparse set of sppts as follows from the uncontained
1534  // MS-measurement in 2nd pass.
1535  std::vector <unsigned int> vecNtrkIds;
1536  for(int is = 0; is < nsppts_assn; ++is) {
1537  int nhits = fh.at(is).size(); // should be 2 or 3: number of planes.
1538  for(int ih = 0; ih < nhits; ++ih) {
1539  const auto& hit = fh.at(is).at(ih); // Our vector is after the .at(is) this time.
1540  if (hit->SignalType()!=geo::kCollection) continue;
1541  rhistsStitched.fHHitChg->Fill(hit->Integral());
1542  rhistsStitched.fHHitWidth->Fill(2. * hit->RMS());
1543  if (mc)
1544  {
1545  std::vector<sim::TrackIDE> tids = bt_serv->HitToTrackIDEs(hit);
1546  // more here.
1547  // Loop over track ids.
1548  bool justOne(true); // Only take first trk that contributed to this hit
1549  // std::cout << "\t\t TrkAna: TrkId tids.size() ******* " << tids.size() <<std::endl;
1550  for(std::vector<sim::TrackIDE>::const_iterator itid = tids.begin();itid != tids.end(); ++itid) {
1551  int trackID = std::abs(itid->trackID);
1552  hitmap[trackID][o].push_back(hit);
1553 
1554  if (justOne) { vecNtrkIds.push_back(trackID); justOne=false; }
1555  // Add hit to PtrVector corresponding to this track id.
1556  rhistsStitched.fHHitTrkId->Fill(trackID);
1557  const simb::MCParticle* part = pi_serv->TrackIdToParticle_P(trackID);
1558  if (!part) break;
1559 
1560  rhistsStitched.fHHitPdg->Fill(part->PdgCode());
1561  // This really needs to be indexed as KE deposited in volTPC, not just KE. EC, 24-July-2014.
1562 
1563  TVector3 mcstart;
1564  TVector3 mcend;
1565  TVector3 mcstartmom;
1566  TVector3 mcendmom;
1567  double mctime = part->T(); // nsec
1568  double mcdx = mctime * 1.e-3 * detprop->DriftVelocity(); // cm
1569 
1570  double plen = length(*part, mcdx, mcstart, mcend, mcstartmom, mcendmom);
1571 
1572  KEmap[(int)(1e6*plen)] = trackID; // multiple assignment but always the same, so fine.
1573  // std::cout << "\t\t TrkAna: TrkId trackID, KE [MeV] ******* " << trackID << ", " << (int)(1e3*(part->E()-part->Mass())) <<std::endl;
1574  }
1575 
1576  } // mc
1577  } // hits
1578 
1579  } // spacepoints
1580 
1581  if (mc)
1582  {
1583  NtrkId_Hit.push_back(vecNtrkIds);
1584  // Find the trkID mode for this i^th track
1585  unsigned int ii(1);
1586  int max(-12), n(1), ind(0);
1587  std::sort(vecNtrkIds.begin(),vecNtrkIds.end());
1588  std::vector<unsigned int> strkIds(vecNtrkIds);
1589  while ( ii < vecNtrkIds.size() )
1590  {
1591  if (strkIds.at(ii) != strkIds.at(ii-1))
1592  {
1593  n=1;
1594  }
1595  else
1596  {
1597  n++;
1598  }
1599  if (n>max) { max = n; ind = ii;}
1600  ii++;
1601  }
1602  // std::cout << "\t\t TrkAna: TrkId ind for this track is ******* " << ind <<std::endl;
1603  unsigned int mode(sim::NoParticleId);
1604  if (strkIds.begin()!=strkIds.end())
1605  mode = strkIds.at(ind);
1606  vecMode.push_back(mode);
1607 
1608  // if (ntrack>1) std::cout << "\t\t TrkAna: TrkId mode for this component track is ******* " << mode <<std::endl;
1609  if (strkIds.size()!=0)
1610  rhistsStitched.fModeFrac->Fill((double)max/(double)strkIds.size());
1611  else
1612  rhistsStitched.fModeFrac->Fill(-1.0);
1613  } // mc
1614 
1615  } // end try
1616  catch (cet::exception& x) {
1617  assns = false;
1618  }
1619  if (!assns) throw cet::exception("TrackAna") << "Bad Associations. \n";
1620 
1621  } // i
1622 
1623  if (mc)
1624  {
1625  // one vector per o trk, for all modes of stitched i trks
1626  NtrkIdsAll.push_back(vecMode);
1627 
1628  std::unique(NtrkIdsAll.back().begin(),NtrkIdsAll.back().end());
1629  double sum(0.0);
1630  for (auto const val : NtrkIdsAll.back())
1631  {
1632  // rhistsStitched.fNTrkIdTrks3->Fill(o,val%100,hitmap[val][o].size());
1633  sum += hitmap[val][o].size();
1634  }
1635  ntvsorted.push_back(sum);
1636 
1637  }
1638 
1639  //
1640  } // o
1641 
1642  int vtmp(0);
1643  // get KEmap indices by most energetic first, least last.
1644  for (auto it = KEmap.rbegin(); it!=KEmap.rend(); ++it)
1645  {
1646  // int tval = it->second; // grab trkIDs in order, since they're sorted by KE
1647  // int ke = it->first; // grab trkIDs in order, since they're sorted by KE
1648  // const simb::MCParticle* part = bt_serv->TrackIDToParticle(tval);
1649 
1650  // std::cout << "TrackAnaStitch: KEmap cntr vtmp, Length ke, tval, pdg : " << vtmp << ", " << ke <<", " << tval <<", " << part->PdgCode() << ", " << std::endl;
1651 
1652  vtmp++;
1653  }
1654 
1655  // get o trk indices by their hits. Most populous track first, least last.
1656  for (auto const o : fsort_indexes(ntvsorted))
1657  {
1658  int v(0);
1659  // get KEmap indices by longest trajectory first, least last.
1660  for (auto it = KEmap.rbegin(); it!=KEmap.rend(); ++it)
1661  {
1662  int val = it->second; // grab trkIDs in order, since they're sorted by KE
1663  // const simb::MCParticle* part = pi_serv->TrackIDToParticle(val);
1664  // std::cout << "TrackAnaStitch: trk o, KEmap cntr v, KE val, pdg hitmap[val][o].size(): " << o <<", " << v << ", " << val <<", " << part->PdgCode() << ", " << hitmap[val][o].size() << std::endl;
1665  rhistsStitched.fNTrkIdTrks3->Fill(o,v,hitmap[val][o].size());
1666  v++;
1667  }
1668 
1669  }
1670 
1671  // In how many o tracks did each trkId appear? Histo it. Would like it to be precisely 1.
1672  // Histo it vs. particle KE.
1673  flattener flat(NtrkIdsAll);
1674  std::vector <unsigned int> &v = flat;
1675  // auto const it ( std::unique(v.begin(),v.end()) ); // never use this it, perhaps.
1676  for (auto const val : v)
1677  {
1678  if (val != (unsigned int)sim::NoParticleId)
1679  {
1680  const simb::MCParticle* part = pi_serv->TrackIdToParticle_P( val );
1681  double T(part->E() - 0.001*part->Mass());
1682  rhistsStitched.fNTrkIdTrks->Fill(std::count(v.begin(),v.end(),val));
1683  rhistsStitched.fNTrkIdTrks2->Fill(std::count(v.begin(),v.end(),val),T);
1684  }
1685  else
1686  {
1687  rhistsStitched.fNTrkIdTrks2->Fill(-1.0,0.0);
1688  }
1689  }
1690 
1691  }
Float_t x
Definition: compare.C:6
double E(const int i=0) const
Definition: MCParticle.h:237
const simb::MCParticle * TrackIdToParticle_P(int const &id)
int PdgCode() const
Definition: MCParticle.h:216
std::vector< size_t > fsort_indexes(const std::vector< T > &v)
std::string fHitSpptAssocModuleLabel
std::string fTrkSpptAssocModuleLabel
const std::vector< sim::TrackIDE > HitToTrackIDEs(recob::Hit const &hit)
std::string fSpacepointModuleLabel
double Mass() const
Definition: MCParticle.h:243
std::string fStitchModuleLabel
bool isRealData() const
Definition: Event.h:83
bool isValid() const
Definition: Handle.h:190
Int_t max
Definition: plot.C:27
intermediate_table::const_iterator const_iterator
static const int NoParticleId
Definition: sim.h:28
TString part[npart]
Definition: Style.C:32
double T(const int i=0) const
Definition: MCParticle.h:228
Detector simulation of raw signals on wires.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
std::map< int, RecoHists > fRecoHistMap
Char_t n[5]
std::string fTrackModuleLabel
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
Signal from collection planes.
Definition: geo_types.h:93
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

Referenced by art::EDAnalyzer::doEvent(), and art::OutputModule::doWriteEvent().

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 147 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

148 {
149  if (!moduleContext_)
150  return ProductToken<T>::invalid();
151 
152  consumables_[BT].emplace_back(ConsumableType::Product,
153  TypeID{typeid(T)},
154  it.label(),
155  it.instance(),
156  it.process());
157  return ProductToken<T>{it};
158 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 162 of file Consumer.h.

163 {
164  if (!moduleContext_)
165  return;
166 
167  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
168 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 172 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

173 {
174  if (!moduleContext_)
175  return ViewToken<T>::invalid();
176 
177  consumables_[BT].emplace_back(ConsumableType::ViewElement,
178  TypeID{typeid(T)},
179  it.label(),
180  it.instance(),
181  it.process());
182  return ViewToken<T>{it};
183 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 32 of file EngineCreator.cc.

References art::EngineCreator::rng().

34 {
35  return rng()->createEngine(
36  placeholder_schedule_id(), seed, kind_of_engine_to_make);
37 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 40 of file EngineCreator.cc.

References art::EngineCreator::rng().

43 {
44  return rng()->createEngine(
45  placeholder_schedule_id(), seed, kind_of_engine_to_make, engine_label);
46 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
CurrentProcessingContext const * art::EDAnalyzer::currentContext ( ) const
protectedinherited

Definition at line 114 of file EDAnalyzer.cc.

References art::EDAnalyzer::current_context_.

Referenced by art::EDAnalyzer::workerType().

115  {
116  return current_context_.get();
117  }
CPC_exempt_ptr current_context_
Definition: EDAnalyzer.h:179
void trkf::TrackAna::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 1693 of file TrackAna_module.cc.

References trkf::TrackAna::MCHists::fHeendx, trkf::TrackAna::MCHists::fHeendy, trkf::TrackAna::MCHists::fHeendz, trkf::TrackAna::MCHists::fHeke, trkf::TrackAna::MCHists::fHekel, trkf::TrackAna::MCHists::fHelen, trkf::TrackAna::MCHists::fHelens, trkf::TrackAna::MCHists::fHemom, trkf::TrackAna::MCHists::fHemoml, trkf::TrackAna::MCHists::fHephi, trkf::TrackAna::MCHists::fHestartx, trkf::TrackAna::MCHists::fHestarty, trkf::TrackAna::MCHists::fHestartz, trkf::TrackAna::MCHists::fHetheta, trkf::TrackAna::MCHists::fHetheta_xz, trkf::TrackAna::MCHists::fHetheta_yz, trkf::TrackAna::MCHists::fHgendx, trkf::TrackAna::MCHists::fHgendy, trkf::TrackAna::MCHists::fHgendz, trkf::TrackAna::MCHists::fHgke, trkf::TrackAna::MCHists::fHgkel, trkf::TrackAna::MCHists::fHglen, trkf::TrackAna::MCHists::fHglens, trkf::TrackAna::MCHists::fHgmom, trkf::TrackAna::MCHists::fHgmoml, trkf::TrackAna::MCHists::fHgphi, trkf::TrackAna::MCHists::fHgstartx, trkf::TrackAna::MCHists::fHgstarty, trkf::TrackAna::MCHists::fHgstartz, trkf::TrackAna::MCHists::fHgtheta, trkf::TrackAna::MCHists::fHgtheta_xz, trkf::TrackAna::MCHists::fHgtheta_yz, trkf::TrackAna::MCHists::fHmcendx, trkf::TrackAna::MCHists::fHmcendy, trkf::TrackAna::MCHists::fHmcendz, trkf::TrackAna::MCHists::fHmcke, trkf::TrackAna::MCHists::fHmckel, trkf::TrackAna::MCHists::fHmclen, trkf::TrackAna::MCHists::fHmclens, trkf::TrackAna::MCHists::fHmcmom, trkf::TrackAna::MCHists::fHmcmoml, trkf::TrackAna::MCHists::fHmcphi, trkf::TrackAna::MCHists::fHmcstartx, trkf::TrackAna::MCHists::fHmcstarty, trkf::TrackAna::MCHists::fHmcstartz, trkf::TrackAna::MCHists::fHmctheta, trkf::TrackAna::MCHists::fHmctheta_xz, trkf::TrackAna::MCHists::fHmctheta_yz, fMCHistMap, and fNumEvent.

1697  {
1698  // Print summary.
1699 
1700  mf::LogInfo("TrackAna")
1701  << "TrackAna statistics:\n"
1702  << " Number of events = " << fNumEvent;
1703 
1704  // Fill efficiency histograms.
1705 
1707  i != fMCHistMap.end(); ++i) {
1708  const MCHists& mchists = i->second;
1709  effcalc(mchists.fHgstartx, mchists.fHmcstartx, mchists.fHestartx);
1710  effcalc(mchists.fHgstarty, mchists.fHmcstarty, mchists.fHestarty);
1711  effcalc(mchists.fHgstartz, mchists.fHmcstartz, mchists.fHestartz);
1712  effcalc(mchists.fHgendx, mchists.fHmcendx, mchists.fHeendx);
1713  effcalc(mchists.fHgendy, mchists.fHmcendy, mchists.fHeendy);
1714  effcalc(mchists.fHgendz, mchists.fHmcendz, mchists.fHeendz);
1715  effcalc(mchists.fHgtheta, mchists.fHmctheta, mchists.fHetheta);
1716  effcalc(mchists.fHgphi, mchists.fHmcphi, mchists.fHephi);
1717  effcalc(mchists.fHgtheta_xz, mchists.fHmctheta_xz, mchists.fHetheta_xz);
1718  effcalc(mchists.fHgtheta_yz, mchists.fHmctheta_yz, mchists.fHetheta_yz);
1719  effcalc(mchists.fHgmom, mchists.fHmcmom, mchists.fHemom);
1720  effcalc(mchists.fHgmoml, mchists.fHmcmoml, mchists.fHemoml);
1721  effcalc(mchists.fHgke, mchists.fHmcke, mchists.fHeke);
1722  effcalc(mchists.fHgkel, mchists.fHmckel, mchists.fHekel);
1723  effcalc(mchists.fHglen, mchists.fHmclen, mchists.fHelen);
1724  effcalc(mchists.fHglens, mchists.fHmclens, mchists.fHelens);
1725  }
1726  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::map< int, MCHists > fMCHistMap
intermediate_table::const_iterator const_iterator
template<typename T >
std::vector< size_t > trkf::TrackAna::fsort_indexes ( const std::vector< T > &  v)
private

Definition at line 1730 of file TrackAna_module.cc.

Referenced by anaStitch().

1730  {
1731  // initialize original index locations
1732  std::vector<size_t> idx(v.size());
1733  for (size_t i = 0; i != idx.size(); ++i) idx[i] = i;
1734  // sort indexes based on comparing values in v
1735  std::sort(idx.begin(), idx.end(),
1736  [&v](size_t i1, size_t i2) {return v[i1] > v[i2];}); // Want most occupied trks first. was <, EC, 21-July.
1737  return idx;
1738  }
EngineCreator::seed_t EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited

Definition at line 49 of file EngineCreator.cc.

References fhicl::ParameterSet::get().

Referenced by art::MixFilter< T >::initEngine_().

52 {
53  auto const& explicit_seeds = pset.get<std::vector<int>>(key, {});
54  return explicit_seeds.empty() ? implicit_seed : explicit_seeds.front();
55 }
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

Referenced by art::OutputModule::doWriteEvent().

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:34
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 190 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

191 {
192  if (!moduleContext_)
193  return ProductToken<T>::invalid();
194 
195  consumables_[BT].emplace_back(ConsumableType::Product,
196  TypeID{typeid(T)},
197  it.label(),
198  it.instance(),
199  it.process());
200  return ProductToken<T>{it};
201 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 205 of file Consumer.h.

206 {
207  if (!moduleContext_)
208  return;
209 
210  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
211 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 215 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

216 {
217  if (!moduleContext_)
218  return ViewToken<T>::invalid();
219 
220  consumables_[BT].emplace_back(ConsumableType::ViewElement,
221  TypeID{typeid(T)},
222  it.label(),
223  it.instance(),
224  it.process());
225  return ViewToken<T>{it};
226 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited

Definition at line 89 of file Consumer.cc.

References fhicl::ParameterSet::get_if_present().

Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().

90 {
91  if (!moduleContext_)
92  return;
93 
94  pset.get_if_present("errorOnMissingConsumes", requireConsumes_);
95  for (auto& consumablesPerBranch : consumables_) {
96  cet::sort_all(consumablesPerBranch);
97  }
98 }
bool requireConsumes_
Definition: Consumer.h:137
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

Referenced by art::RootOutputFile::writeOne().

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Definition at line 125 of file Consumer.cc.

Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().

126 {
127  if (!moduleContext_)
128  return;
129 
130  // If none of the branches have missing consumes statements, exit early.
131  if (std::all_of(cbegin(missingConsumes_),
132  cend(missingConsumes_),
133  [](auto const& perBranch) { return perBranch.empty(); }))
134  return;
135 
136  constexpr cet::HorizontalRule rule{60};
137  mf::LogPrint log{"MTdiagnostics"};
138  log << '\n'
139  << rule('=') << '\n'
140  << "The following consumes (or mayConsume) statements are missing from\n"
141  << module_context(moduleDescription_) << '\n'
142  << rule('-') << '\n';
143 
144  cet::for_all_with_index(
145  missingConsumes_, [&log](std::size_t const i, auto const& perBranch) {
146  for (auto const& pi : perBranch) {
147  log << " "
148  << assemble_consumes_statement(static_cast<BranchType>(i), pi)
149  << '\n';
150  }
151  });
152  log << rule('=');
153 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Definition at line 101 of file Consumer.cc.

References art::errors::ProductRegistrationFailure.

103 {
104  // Early exits if consumes tracking has been disabled or if the
105  // consumed product is an allowed consumable.
106  if (!moduleContext_)
107  return;
108 
109  if (cet::binary_search_all(consumables_[bt], pi))
110  return;
111 
112  if (requireConsumes_) {
114  "Consumer: an error occurred during validation of a "
115  "retrieved product\n\n")
116  << "The following consumes (or mayConsume) statement is missing from\n"
117  << module_context(moduleDescription_) << ":\n\n"
118  << " " << assemble_consumes_statement(bt, pi) << "\n\n";
119  }
120 
121  missingConsumes_[bt].insert(pi);
122 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
bool requireConsumes_
Definition: Consumer.h:137
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

bool trkf::TrackAna::fCheckOrigin
private

Definition at line 465 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

int trkf::TrackAna::fDump
private

Definition at line 454 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

std::string trkf::TrackAna::fHitModuleLabel
private

Definition at line 452 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

std::string trkf::TrackAna::fHitSpptAssocModuleLabel
private

Definition at line 451 of file TrackAna_module.cc.

Referenced by anaStitch(), and TrackAna().

bool trkf::TrackAna::fIgnoreSign
private

Definition at line 461 of file TrackAna_module.cc.

Referenced by analyze().

double trkf::TrackAna::fMatchColinearity
private

Definition at line 457 of file TrackAna_module.cc.

Referenced by analyze().

double trkf::TrackAna::fMatchDisp
private

Definition at line 458 of file TrackAna_module.cc.

Referenced by analyze().

double trkf::TrackAna::fMatchLength
private

Definition at line 460 of file TrackAna_module.cc.

Referenced by analyze().

std::map<int, MCHists> trkf::TrackAna::fMCHistMap
private

Definition at line 471 of file TrackAna_module.cc.

Referenced by analyze(), and endJob().

std::string trkf::TrackAna::fMCTrackModuleLabel
private

Definition at line 447 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

double trkf::TrackAna::fMinMCKE
private

Definition at line 455 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

double trkf::TrackAna::fMinMCLen
private

Definition at line 456 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

int trkf::TrackAna::fNumEvent
private

Definition at line 476 of file TrackAna_module.cc.

Referenced by analyze(), and endJob().

std::string trkf::TrackAna::fOrigin
private

Definition at line 464 of file TrackAna_module.cc.

Referenced by TrackAna().

simb::Origin_t trkf::TrackAna::fOriginValue
private

Definition at line 466 of file TrackAna_module.cc.

Referenced by analyze(), and TrackAna().

int trkf::TrackAna::fPrintLevel
private

Definition at line 467 of file TrackAna_module.cc.

Referenced by analyze().

std::map<int, RecoHists> trkf::TrackAna::fRecoHistMap
private

Definition at line 472 of file TrackAna_module.cc.

Referenced by analyze(), and anaStitch().

std::string trkf::TrackAna::fSpacepointModuleLabel
private

Definition at line 448 of file TrackAna_module.cc.

Referenced by anaStitch().

bool trkf::TrackAna::fStitchedAnalysis
private

Definition at line 462 of file TrackAna_module.cc.

Referenced by analyze().

std::string trkf::TrackAna::fStitchModuleLabel
private

Definition at line 449 of file TrackAna_module.cc.

Referenced by analyze(), anaStitch(), and TrackAna().

std::string trkf::TrackAna::fTrackModuleLabel
private

Definition at line 446 of file TrackAna_module.cc.

Referenced by analyze(), anaStitch(), and TrackAna().

std::string trkf::TrackAna::fTrkSpptAssocModuleLabel
private

Definition at line 450 of file TrackAna_module.cc.

Referenced by anaStitch(), and TrackAna().

double trkf::TrackAna::fWMatchDisp
private

Definition at line 459 of file TrackAna_module.cc.

Referenced by analyze().


The documentation for this class was generated from the following file: