Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
remid::ReMIdValidate Class Reference

A module to analyze remid objects produced by the RecoMuon module. More...

Inheritance diagram for remid::ReMIdValidate:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 ReMIdValidate (fhicl::ParameterSet const &pset)
 
virtual ~ReMIdValidate ()
 
void beginJob ()
 
void analyze (art::Event const &evt)
 
void endJob ()
 
std::string workerType () const
 
void doBeginJob ()
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
Handle< TriggerResults > getTriggerResults (Event const &e) const
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< TconsumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< TmayConsumeView (InputTag const &tag)
 

Static Public Member Functions

static bool SortByHits (const art::Ptr< rb::Track > &a, const art::Ptr< rb::Track > &b)
 

Protected Member Functions

detail::ProcessAndEventSelectors & processAndEventSelectors ()
 
ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Private Member Functions

bool IsContained (art::Ptr< rb::Track > track)
 Function to determine whether or not a track is contained. More...
 

Private Attributes

std::string fSliceLabel
 Where to find reconstructed slices. More...
 
std::string fTrackLabel
 Where to find recondtructed tracks. More...
 
std::string fPidLabel
 Where to find the pids. More...
 
TH1F * fpid
 Pid value of every track. More...
 
TH1F * fpidnc
 
TH1F * fpidcc
 
TH1F * fpidcccut
 
TH1F * fnscat
 
TH1F * fndedx
 
TH1F * fcosscat
 
TH1F * favgdedx
 
TH1F * fdedx
 
TH1F * fpidhigh
 
TH1F * fpidnchigh
 
TH1F * fpidcchigh
 
TH1F * fnscathigh
 
TH1F * fndedxhigh
 
TH1F * fcosscathigh
 
TH1F * favgdedxhigh
 
TH1F * fdedxhigh
 
TH1F * fpidmu
 
TH1F * fnscatmu
 
TH1F * fndedxmu
 
TH1F * fcosscatmu
 
TH1F * favgdedxmu
 
TH1F * fdedxmu
 
TH1F * fpidmucont
 
TH1F * fnscatmucont
 
TH1F * fndedxmucont
 
TH1F * fcosscatmucont
 
TH1F * favgdedxmucont
 
TH1F * fdedxmucont
 

Detailed Description

A module to analyze remid objects produced by the RecoMuon module.

Definition at line 31 of file ReMIdValidate_module.cc.

Member Typedef Documentation

Definition at line 25 of file EDAnalyzer.h.

using art::EDAnalyzer::WorkerType = WorkerT<EDAnalyzer>
inherited

Definition at line 24 of file EDAnalyzer.h.

Constructor & Destructor Documentation

remid::ReMIdValidate::ReMIdValidate ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 87 of file ReMIdValidate_module.cc.

References fPidLabel, fSliceLabel, fTrackLabel, fhicl::ParameterSet::get(), and string.

88  : EDAnalyzer(pset)
89  {
90  fSliceLabel = (pset.get< std::string >("SliceLabel"));
91  fTrackLabel = (pset.get< std::string >("TrackLabel"));
92  fPidLabel = (pset.get< std::string >("PidLabel" ));
93  }
std::string fTrackLabel
Where to find recondtructed tracks.
std::string fPidLabel
Where to find the pids.
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:27
std::string fSliceLabel
Where to find reconstructed slices.
enum BeamMode string
remid::ReMIdValidate::~ReMIdValidate ( )
virtual

Definition at line 97 of file ReMIdValidate_module.cc.

98  {
99  }

Member Function Documentation

void remid::ReMIdValidate::analyze ( art::Event const &  evt)
virtual

Implements art::EDAnalyzer.

Definition at line 139 of file ReMIdValidate_module.cc.

References remid::ReMId::AvgDedx(), simb::MCNeutrino::CCNC(), rb::Cluster::Cell(), remid::ReMId::CosScat(), remid::ReMId::Dedx(), nd_projection_maker::eff, favgdedx, favgdedxhigh, favgdedxmu, favgdedxmucont, fcosscat, fcosscathigh, fcosscatmu, fcosscatmucont, fdedx, fdedxhigh, fdedxmu, fdedxmucont, fndedx, fndedxhigh, fndedxmu, fndedxmucont, fnscat, fnscathigh, fnscatmu, fnscatmucont, fpid, fpidcc, fpidcccut, fpidcchigh, fpidhigh, fPidLabel, fpidmu, fpidmucont, fpidnc, fpidnchigh, fSliceLabel, fTrackLabel, art::DataViewImpl::getByLabel(), cheat::BackTracker::GetTrackIDList(), cheat::BackTracker::HitCollectionEfficiency(), MECModelEnuComparisons::i, IsContained(), it, simb::kNC, geo::kXorY, simb::MCNeutrino::Mode(), simb::MCParticle::Mother(), rb::Cluster::NCell(), remid::ReMId::NDedx(), remid::ReMId::NScatters(), simb::MCNeutrino::Nu(), part, simb::MCParticle::PdgCode(), art::PtrVector< T >::push_back(), art::PtrVector< T >::size(), cheat::BackTracker::SliceToNeutrinoInteractions(), cheat::BackTracker::TrackIDToParticle(), and rb::PID::Value().

140  {
141  // get the slices out of the event
143  evt.getByLabel(fSliceLabel,slicecol);
144 
145  // get the tracks out of the event
147  evt.getByLabel(fTrackLabel,trkcol);
148 
149  art::PtrVector<rb::Cluster> slicelist;
150  art::PtrVector<rb::CellHit> Allevthits; // PtrVector of all of the hits in the event
151 
152  for(unsigned int i = 0; i<slicecol->size();++i){
153  art::Ptr<rb::Cluster>slice(slicecol,i);
154  slicelist.push_back(slice);
155  for(unsigned int ihit = 0; ihit<slice->NCell();++ihit){
156  Allevthits.push_back(slice->Cell(ihit));
157  }
158  }
159 
160  // get assosciations between slices and tracks
161  art::FindManyP<rb::Track> fndmnytrk(slicecol,evt,fTrackLabel);
163 
164  // loop over all slices and find the most effiecient slice for a neutrino interaction
165  double bestEff = -1;
166  unsigned int mostEffSlice = 0; // Index of the most efficient neutrino slice
167  int intType = 6; // This is a index to keep track of what type of interaction this is
168  // get the neutrino interaction type and slice it came from
169  for(unsigned int iSlice = 0;iSlice<slicelist.size();++iSlice){
170  // get the neutrino interaction from this slice
171  std::vector<cheat::NeutrinoEffPur> nuint = bt->SliceToNeutrinoInteractions(slicelist[iSlice]->AllCells(),Allevthits);
172  if(nuint.size()>0 && nuint[0].efficiency>bestEff){
173  bestEff = nuint[0].efficiency;
174  mostEffSlice = iSlice;
175  // get the neutrino
176  const simb::MCNeutrino nu = nuint[0].neutrinoInt->GetNeutrino();
177  if(nu.CCNC() == simb::kNC){ intType = 5; }
178  else{
179  if(nu.Nu().PdgCode() == 12 || nu.Nu().PdgCode() == -12){ intType = 4; }
180  else if(nu.Mode() == 0){intType = 0;}
181  else if(nu.Mode() == 1){intType = 1;}
182  else if(nu.Mode() == 2){intType = 2;}
183  else if(nu.Mode() == 3){intType = 3;}
184  }
185  }
186  }
187 
188  // loop over the slices
189  for(unsigned int iSlice = 0; iSlice<slicelist.size(); ++iSlice){
190  if(intType <0){ continue; }
191  if(mostEffSlice != iSlice){ continue; }
192  // get all of the tracks associated to this slice
193  std::vector<art::Ptr<rb::Track> > tracks = fndmnytrk.at(iSlice);
194  if(tracks.size() == 0){ continue; }
196  double bestpid = -1.0;
197  int bestInd = -1;
198  // find the true primary muon track id if a CC interaction
199  std::set<int> muID;
200  if(intType < 4){
201  std::set<int> trackIDs = bt->GetTrackIDList();
202  for(std::set<int>::iterator it= trackIDs.begin(); it != trackIDs.end(); ++it){
203  // get the particle
204  const sim::Particle* part = bt->TrackIDToParticle(*it);
205  // check if this is the muon
206  // std::cout<<"On particle id: "<<*it<<" with pdg: "<<part->PdgCode()<<" and mother: "<<part->Mother()<<std::endl;
207  if((part->PdgCode() == 13 || part->PdgCode() == -13) && part->Mother() == 0){
208  muID.insert(*it);
209  break;
210  }
211  }
212  }
213  double bestmueff = -1.0;
214  int muInd = -1;
215  for(unsigned int itrack = 0; itrack < tracks.size(); ++itrack){
216  art::Ptr<remid::ReMId> pidobj = foids.at(itrack);
217  fpid->Fill(pidobj->Value());
218  if(intType < 4){
219  fpidcc->Fill(pidobj->Value());
220  // find if this track is the most efficiently reconstructed muon
221  double eff = bt->HitCollectionEfficiency(muID,tracks[itrack]->AllCells(),slicelist[iSlice]->AllCells(),geo::kXorY);
222  if(eff > bestmueff){
223  bestmueff = eff;
224  muInd = itrack;
225  }
226  }
227  else{ fpidnc->Fill(pidobj->Value());}
228  fnscat->Fill(pidobj->NScatters());
229  for(unsigned int i = 0; i<pidobj->NScatters(); ++i){
230  fcosscat->Fill(pidobj->CosScat(i));
231  }
232  favgdedx->Fill(pidobj->AvgDedx());
233  fndedx->Fill(pidobj->NDedx());
234  for(unsigned int i = 0; i<pidobj->NDedx(); ++i){
235  fdedx->Fill(pidobj->Dedx(i));
236  }
237  if(pidobj->Value() > bestpid){
238  bestInd = itrack;
239  bestpid = pidobj->Value();
240  }
241 
242  }
243 
244  // make plots for highest pid track
245  if(bestInd <0){ continue; }
246  art::Ptr<remid::ReMId> pidobj = foids.at(bestInd);
247  fpidhigh->Fill(pidobj->Value());
248  if(intType < 4){fpidcchigh->Fill(pidobj->Value()); }
249  else{ fpidnchigh->Fill(pidobj->Value()); }
250  fnscathigh->Fill(pidobj->NScatters());
251  for(unsigned int i = 0; i<pidobj->NScatters(); ++i){
252  fcosscathigh->Fill(pidobj->CosScat(i));
253  }
254  favgdedxhigh->Fill(pidobj->AvgDedx());
255  fndedxhigh->Fill(pidobj->NDedx());
256  for(unsigned int i = 0; i<pidobj->NDedx(); ++i){
257  fdedxhigh->Fill(pidobj->Dedx(i));
258  }
259 
260 
261  // make plots for true mu track by efficiency
262  if(intType >3){ continue; }
263  if(muInd < 0){continue; }
264  art::Ptr<remid::ReMId> mupidobj = foids.at(muInd);
265  fpidmu->Fill(mupidobj->Value());
266  fnscatmu->Fill(mupidobj->NScatters());
267  for(unsigned int i = 0; i<mupidobj->NScatters(); ++i){
268  fcosscatmu->Fill(mupidobj->CosScat(i));
269  }
270  favgdedxmu->Fill(mupidobj->AvgDedx());
271  fndedxmu->Fill(mupidobj->NDedx());
272  for(unsigned int i = 0; i<mupidobj->NDedx(); ++i){
273  fdedxmu->Fill(mupidobj->Dedx(i));
274  }
275 
276  if(IsContained(tracks[muInd])){
277  fpidmucont->Fill(mupidobj->Value());
278  fnscatmucont->Fill(mupidobj->NScatters());
279  for(unsigned int i = 0; i<mupidobj->NScatters(); ++i){
280  fcosscatmucont->Fill(mupidobj->CosScat(i));
281  }
282  favgdedxmucont->Fill(mupidobj->AvgDedx());
283  fndedxmucont->Fill(mupidobj->NDedx());
284  for(unsigned int i = 0; i<mupidobj->NDedx(); ++i){
285  fdedxmucont->Fill(mupidobj->Dedx(i));
286  }
287  }
288 
289  // make plots for contained qe sample
290  if(!IsContained(tracks[bestInd]) && !IsContained(tracks[0])){ continue; }
291  if(tracks[bestInd]->View() != geo::kXorY){ continue; }
292  if(intType != 0){continue; }
293  fpidcccut->Fill(pidobj->Value());
294 
295  } // end loop over slices
296 
297 
298  }
virtual geo::View_t View() const
kXorY for 3D clusters.
Definition: Cluster.h:99
double Dedx(unsigned int i) const
Definition: ReMId.cxx:126
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
unsigned int NScatters() const
Definition: ReMId.cxx:96
set< int >::iterator it
std::vector< NeutrinoEffPur > SliceToNeutrinoInteractions(const std::vector< const rb::CellHit * > &sliceHits, const std::vector< const rb::CellHit * > &allHits, bool sortPur=false) const
Given a collection of hits (often a slice), returns vector of structures of neutrino interactions...
X or Y views.
Definition: PlaneGeo.h:30
std::string fTrackLabel
Where to find recondtructed tracks.
int Mother() const
Definition: MCParticle.h:212
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
std::string fPidLabel
Where to find the pids.
double AvgDedx() const
Definition: ReMId.cxx:68
double Value() const
Definition: PID.h:22
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
double HitCollectionEfficiency(const std::set< int > &trackIDs, const std::vector< rb::WeightedHit > &whits, const std::vector< const rb::CellHit * > &allhits, const geo::View_t &view, std::map< int, double > *effMap=0, bool energyEff=false, double *desiredEnergy=0, double *totalEnergy=0, int *desiredHits=0, int *totalHits=0) const
Returns the fraction of all energy in an event from a specific set of Geant4 track IDs that are repre...
TString part[npart]
Definition: Style.C:32
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
int evt
double CosScat(unsigned int i) const
Definition: ReMId.cxx:114
size_type size() const
Definition: PtrVector.h:302
const sim::Particle * TrackIDToParticle(int const &id) const
Returns a pointer to the sim::Particle object corresponding to the given TrackID. ...
unsigned int NDedx() const
Definition: ReMId.cxx:102
TH1F * fpid
Pid value of every track.
std::string fSliceLabel
Where to find reconstructed slices.
const std::set< int > GetTrackIDList() const
Get all G4 track ids present in the event.
Definition: BackTracker.h:754
bool IsContained(art::Ptr< rb::Track > track)
Function to determine whether or not a track is contained.
Event generator information.
Definition: MCNeutrino.h:18
int Mode() const
Definition: MCNeutrino.h:149
void remid::ReMIdValidate::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 103 of file ReMIdValidate_module.cc.

References favgdedx, favgdedxhigh, favgdedxmu, favgdedxmucont, fcosscat, fcosscathigh, fcosscatmu, fcosscatmucont, fdedx, fdedxhigh, fdedxmu, fdedxmucont, fndedx, fndedxhigh, fndedxmu, fndedxmucont, fnscat, fnscathigh, fnscatmu, fnscatmucont, fpid, fpidcc, fpidcccut, fpidcchigh, fpidhigh, fpidmu, fpidmucont, fpidnc, and fpidnchigh.

104  {
106  fpid = tfs->make<TH1F>("fpid",";pid;NTracks",95,-0.1,1.1);
107  fpidnc = tfs->make<TH1F>("fpidnc",";pid;NTracks",95,-0.1,1.1);
108  fpidcc = tfs->make<TH1F>("fpidcc",";pid;NTracks",95,-0.1,1.1);
109  fpidcccut = tfs->make<TH1F>("fpidcccut",";pid;NTracks",95,-0.1,1.1);
110  fnscat = tfs->make<TH1F>("fnscat",";nscat;NTracks",301,-0.5,301);
111  fndedx = tfs->make<TH1F>("fndedx",";ndedx;NTracks",301,-0.5,301);
112  fcosscat = tfs->make<TH1F>("fcosscat",";cos #theta_{scat};",300,-1.1,1.1);
113  favgdedx = tfs->make<TH1F>("favgdedx",";average dE/dx (GeV/cm);NTracks",500,0.0,0.01);
114  fdedx = tfs->make<TH1F>("fdedx",";dE/dx (GeV/cm);",500,0.0,0.01);
115  fpidnchigh = tfs->make<TH1F>("fpidnchigh",";pid;NTracks",95,-0.1,1.1);
116  fpidcchigh = tfs->make<TH1F>("fpidcchigh",";pid;NTracks",95,-0.1,1.1);
117  fpidhigh = tfs->make<TH1F>("fpidhigh",";pid;NTracks",95,-0.1,1.1);
118  fnscathigh = tfs->make<TH1F>("fnscathigh",";nscat;NTracks",301,-0.5,301);
119  fndedxhigh = tfs->make<TH1F>("fndedxhigh",";ndedx;NTracks",301,-0.5,301);
120  fcosscathigh = tfs->make<TH1F>("fcosscathigh",";cos #theta_{scat};",300,-1.1,1.1);
121  favgdedxhigh = tfs->make<TH1F>("favgdedxhigh",";average dE/dx (GeV/cm);NTracks",500,0.0,0.01);
122  fdedxhigh = tfs->make<TH1F>("fdedxhigh",";dE/dx (GeV/cm);",500,0.0,0.01);
123  fpidmu = tfs->make<TH1F>("fpidmu",";pid;NTracks",95,-0.1,1.1);
124  fnscatmu = tfs->make<TH1F>("fnscatmu",";nscat;NTracks",301,-0.5,301);
125  fndedxmu = tfs->make<TH1F>("fndedxmu",";ndedx;NTracks",301,-0.5,301);
126  fcosscatmu = tfs->make<TH1F>("fcosscatmu",";cos #theta_{scat};",300,-1.1,1.1);
127  favgdedxmu = tfs->make<TH1F>("favgdedxmu",";average dE/dx (GeV/cm);NTracks",500,0.0,0.01);
128  fdedxmu = tfs->make<TH1F>("fdedxmu",";dE/dx (GeV/cm);",500,0.0,0.01);
129  fpidmucont = tfs->make<TH1F>("fpidmucont",";pid;NTracks",95,-0.1,1.1);
130  fnscatmucont = tfs->make<TH1F>("fnscatmucont",";nscat;NTracks",301,-0.5,301);
131  fndedxmucont = tfs->make<TH1F>("fndedxmucont",";ndedx;NTracks",301,-0.5,301);
132  fcosscatmucont = tfs->make<TH1F>("fcosscatmucont",";cos #theta_{scat};",300,-1.1,1.1);
133  favgdedxmucont = tfs->make<TH1F>("favgdedxmucont",";average dE/dx (GeV/cm);NTracks",500,0.0,0.01);
134  fdedxmucont = tfs->make<TH1F>("fdedxmucont",";dE/dx (GeV/cm);",500,0.0,0.01);
135  }
TH1F * fpid
Pid value of every track.
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 55 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumes(), T, and getGoodRuns4SAM::tag.

56  {
57  return collector_.consumes<T, BT>(tag);
58  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ProductToken< T > consumes(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ConsumesCollector& art::ModuleBase::consumesCollector ( )
protectedinherited
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 69 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesMany(), and T.

70  {
71  collector_.consumesMany<T, BT>();
72  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 62 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesView(), T, and getGoodRuns4SAM::tag.

63  {
64  return collector_.consumesView<T, BT>(tag);
65  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > consumesView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
void art::detail::Analyzer::doBeginJob ( )
inherited
bool art::detail::Analyzer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Analyzer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
void art::detail::Analyzer::doEndJob ( )
inherited
bool art::detail::Analyzer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Analyzer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Analyzer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited
void art::detail::Analyzer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited
void art::detail::Analyzer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited
void art::detail::Analyzer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited
void art::detail::Analyzer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited
void remid::ReMIdValidate::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 302 of file ReMIdValidate_module.cc.

303  {
304  }
void art::Observer::fillDescriptions ( ModuleDescription const &  )
inherited
std::array<std::vector<ProductInfo>, NumBranchTypes> const& art::ModuleBase::getConsumables ( ) const
inherited
Handle<TriggerResults> art::Observer::getTriggerResults ( Event const &  e) const
inherited
bool remid::ReMIdValidate::IsContained ( art::Ptr< rb::Track track)
private

Function to determine whether or not a track is contained.

Definition at line 315 of file ReMIdValidate_module.cc.

References DEFINE_ART_MODULE(), febshutoff_auto::start, rb::Prong::Start(), rb::Track::Stop(), xmax, make_mec_shifts_plots::xmin, ymax, ymin, and make_true_q0q3_plots::zmax.

Referenced by analyze().

316  {
317  double xmin,xmax,ymin,ymax,zmin,zmax;
318  // // define the boundaries of containment
319  // int concells = 3;
320  // art::ServiceHandle<geo::Geometry> geom;
321  // double detHalfWidth = geom->DetHalfWidth();
322  // double detHalfHeight = geom->DetHalfHeight();
323  // double detLength = geom->DetLength();
324  // // get the boundaries of the containment boundary
325  // const geo::PlaneGeo* pi = geom->Plane(concells-1);
326  // const geo::PlaneGeo* pf = geom->Plane(geom->NPlanes()-concells);
327  // // get zmin and zmax first
328  // const geo::CellGeo* ci = pi->Cell(concells-1);
329  // const geo::CellGeo* cl = pi->Cell(pi->Ncells()-1-concells);
330  // const geo::CellGeo* cf = pf->Cell(0);
331  // // double xyzf[3];
332  // double xyzi[3], xyzf[3], xyzl[3];
333  // ci->GetCenter(xyzi);
334  // cl->GetCenter(xyzl);
335  // cf->GetCenter(xyzf);
336  // std::cout<<"3 cell z center position: "<<xyzf[2]<<std::endl;
337  // double dzi = ci->HalfD();
338  // zmin = xyzi[2]+dzi;
339 
340  // double dzf = cf->HalfD();
341  // zmax = xyzf[2]-dzf;
342 
343  // if(pi->View() == geo::kX){
344  // xmin = xyzi[0]+ci->HalfW();
345  // xmax = xyzl[0]-cl->HalfW();
346  // int nextplane = geom->NextPlaneOtherView(concells-1);
347  // pi = geom->Plane(nextplane);
348  // ci = pi->Cell(concells-1);
349  // cl = pi->Cell(pi->Ncells()-1-concells);
350  // ci->GetCenter(xyzi);
351  // cl->GetCenter(xyzl);
352  // ymin = xyzi[1]+ci->HalfW();
353  // ymax = xyzl[1]-ci->HalfW();
354  // }
355  // else if(pi->View() == geo::kY){
356  // ymin = xyzi[1]+ci->HalfW();
357  // ymax = xyzl[1]-cl->HalfW();
358  // int nextplane = geom->NextPlaneOtherView(concells-1);
359  // pi = geom->Plane(nextplane);
360  // ci = pi->Cell(concells-1);
361  // cl = pi->Cell(pi->Ncells()-1-concells);
362  // ci->GetCenter(xyzi);
363  // cl->GetCenter(xyzl);
364  // xmin = xyzi[0]+ci->HalfW();
365  // xmax = xyzl[0]-ci->HalfW();
366  // }
367 
368  // contianement cuts for a 28 block far detector. Track ends must be 3 cells + 100 cm from detector edge
369  xmin = -750.213;
370  xmax = 750.213;
371  ymin = -750.213;
372  ymax = 750.213;
373  zmin = 19.9156;
374  zmax = 6201.02; // 30 blocks
375  zmax = 5945.29; // 28 blocks
376  // zmax = detLength-zmin;
377  TVector3 start = track->Start();
378  TVector3 stop = track->Stop();
379  if(start.X() > xmin+100.00 && start.X() < xmax-100.00 && start.Y() > ymin+100.00 && start.Y() < ymax-100.00 && start.Z() > zmin+100.00 && start.Z() < zmax-100.00 &&
380  stop.X() > xmin && stop.X() < xmax && stop.Y() > ymin && stop.Y() < ymax && stop.Z() > zmin && stop.Z() < zmax){ return true; }
381  else{ return false; }
382 
383  }
std::map< std::string, double > xmax
virtual TVector3 Start() const
Definition: Prong.h:73
Double_t ymax
Definition: plot.C:25
Double_t ymin
Definition: plot.C:24
TVector3 Stop() const
Position of the final trajectory point.
Definition: Track.cxx:186
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 76 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsume(), T, and getGoodRuns4SAM::tag.

77  {
78  return collector_.mayConsume<T, BT>(tag);
79  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 90 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeMany(), and T.

91  {
93  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 83 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeView(), T, and getGoodRuns4SAM::tag.

84  {
85  return collector_.mayConsumeView<T, BT>(tag);
86  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > mayConsumeView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ModuleDescription const& art::ModuleBase::moduleDescription ( ) const
inherited
detail::ProcessAndEventSelectors& art::Observer::processAndEventSelectors ( )
protectedinherited
std::string const& art::Observer::processName ( ) const
inherited
void art::Observer::registerProducts ( ProductDescriptions ,
ModuleDescription const &   
)
inherited
fhicl::ParameterSetID art::Observer::selectorConfig ( ) const
inherited
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  )
inherited
bool remid::ReMIdValidate::SortByHits ( const art::Ptr< rb::Track > &  a,
const art::Ptr< rb::Track > &  b 
)
static

Definition at line 308 of file ReMIdValidate_module.cc.

References rb::Cluster::NCell().

309  {
310  return a->NCell()>b->NCell();
311  }
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited
bool art::Observer::wantAllEvents ( ) const
inherited
bool art::Observer::wantEvent ( Event const &  e)
inherited
std::string art::EDAnalyzer::workerType ( ) const
inherited

Member Data Documentation

TH1F* remid::ReMIdValidate::favgdedx
private

Definition at line 54 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::favgdedxhigh
private

Definition at line 62 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::favgdedxmu
private

Definition at line 68 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::favgdedxmucont
private

Definition at line 74 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fcosscat
private

Definition at line 53 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fcosscathigh
private

Definition at line 61 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fcosscatmu
private

Definition at line 67 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fcosscatmucont
private

Definition at line 73 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fdedx
private

Definition at line 55 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fdedxhigh
private

Definition at line 63 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fdedxmu
private

Definition at line 69 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fdedxmucont
private

Definition at line 75 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fndedx
private

Definition at line 52 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fndedxhigh
private

Definition at line 60 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fndedxmu
private

Definition at line 66 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fndedxmucont
private

Definition at line 72 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fnscat
private

Definition at line 51 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fnscathigh
private

Definition at line 59 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fnscatmu
private

Definition at line 65 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fnscatmucont
private

Definition at line 71 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpid
private

Pid value of every track.

Definition at line 47 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidcc
private

Definition at line 49 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidcccut
private

Definition at line 50 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidcchigh
private

Definition at line 58 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidhigh
private

Definition at line 56 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

std::string remid::ReMIdValidate::fPidLabel
private

Where to find the pids.

Definition at line 45 of file ReMIdValidate_module.cc.

Referenced by analyze(), and ReMIdValidate().

TH1F* remid::ReMIdValidate::fpidmu
private

Definition at line 64 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidmucont
private

Definition at line 70 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidnc
private

Definition at line 48 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* remid::ReMIdValidate::fpidnchigh
private

Definition at line 57 of file ReMIdValidate_module.cc.

Referenced by analyze(), and beginJob().

std::string remid::ReMIdValidate::fSliceLabel
private

Where to find reconstructed slices.

Definition at line 43 of file ReMIdValidate_module.cc.

Referenced by analyze(), and ReMIdValidate().

std::string remid::ReMIdValidate::fTrackLabel
private

Where to find recondtructed tracks.

Definition at line 44 of file ReMIdValidate_module.cc.

Referenced by analyze(), and ReMIdValidate().


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