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::EventObserverBase art::Consumer art::EngineCreator

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
 
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< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (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< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (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< TmayConsumeView (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 bool SortByHits (const art::Ptr< rb::Track > &a, const art::Ptr< rb::Track > &b)
 
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

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 39 of file EDAnalyzer.h.

Definition at line 38 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(Table< Config > const &config)
Definition: EDAnalyzer.h:100
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:441
int evt
double CosScat(unsigned int i) const
Definition: ReMId.cxx:114
size_type size() const
Definition: PtrVector.h:308
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:750
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, fpidnchigh, and art::TFileDirectory::make().

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.
T * make(ARGS...args) const
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

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 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
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 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
void remid::ReMIdValidate::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 302 of file ReMIdValidate_module.cc.

303  {
304  }
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
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_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
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 = 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 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
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 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
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.

References string.

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

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

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

Referenced by art::RootOutput::endJob().

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::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

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

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
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

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: