Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
earms::ElasticArmsValidate Class Reference
Inheritance diagram for earms::ElasticArmsValidate:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 ElasticArmsValidate (fhicl::ParameterSet const &pset)
 
 ~ElasticArmsValidate ()
 
void analyze (const art::Event &evt)
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob ()
 
void ClearVectors ()
 
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 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 Attributes

std::string fSliceLabel
 MC information. More...
 
std::string fCellHitLabel
 label for the process that made the cell hits More...
 
std::string fVertexLabel
 label for the process that made the vertices More...
 
int fCompMCNeutrino
 don't know what this one does... :( More...
 
std::string fCAFLabel
 label for the process that made the standard records More...
 
bool fApplyCAFCuts
 should we apply the CAF-level cuts? More...
 
int fCutType
 what cuts to apply (see CAFCutter.h) More...
 
recovalid::CAFCutter fCAFCutter
 the CAFCutter helper class More...
 
TTree * fOutTree
 
int run
 
int subrun
 
int event
 
float rVx
 
float rVy
 
float rVz
 
TH1F * fHistoRVX
 
TH1F * fHistoRVY
 
TH1F * fHistoRVZ
 
TH1F * fHistoDVX
 
TH1F * fHistoDVY
 
TH1F * fHistoDVZ
 
TH1F * fHistoDVT
 
float Vx
 
float Vy
 
float Vz
 
float NuEff
 
float NuPur
 
float NuEVSl
 
float NuEVTot
 
int NuPdg
 
int ccnc
 
int mode
 
float NuE
 
float Ex
 
float Ey
 
float Ez
 

Detailed Description

Definition at line 56 of file ElasticArmsValidate_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

earms::ElasticArmsValidate::ElasticArmsValidate ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 129 of file ElasticArmsValidate_module.cc.

References reconfigure().

130  : EDAnalyzer(pset)
131  {
132  this->reconfigure(pset);
133  }
void reconfigure(const fhicl::ParameterSet &pset)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
earms::ElasticArmsValidate::~ElasticArmsValidate ( )

Definition at line 136 of file ElasticArmsValidate_module.cc.

137  {
138  //======================================================================
139  // Clean up any memory allocated by your module
140  //======================================================================
141  }

Member Function Documentation

void earms::ElasticArmsValidate::analyze ( const art::Event evt)

Then check Y

if the primary never entered the detector, set the coordinates to -5*10^9

If the particle entered and did not exit, set the exit position to stop

Definition at line 208 of file ElasticArmsValidate_module.cc.

References cheat::BackTracker::allMCTruth(), simb::MCNeutrino::CCNC(), ccnc, ClearVectors(), om::cout, geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), dir, allTimeWatchdog::endl, Ex, exit(), Ey, Ez, stan::math::fabs(), art::Handle< T >::failedToGet(), fApplyCAFCuts, fCAFCutter, fCAFLabel, fCompMCNeutrino, fCutType, fHistoDVT, fHistoDVX, fHistoDVY, fHistoDVZ, fHistoRVX, fHistoRVY, fHistoRVZ, fOutTree, fSliceLabel, fVertexLabel, geom(), art::DataViewImpl::getByLabel(), simb::MCTruth::GetNeutrino(), MECModelEnuComparisons::i, cheat::BackTracker::MCTruthToParticles(), simb::MCNeutrino::Mode(), mode, simb::MCParticle::Momentum(), simb::MCTruth::NeutrinoSet(), simb::MCNeutrino::Nu(), NuE, NuEff, NuEVSl, NuEVTot, NuPdg, NuPur, recovalid::CAFCutter::passCuts(), simb::MCParticle::PdgCode(), simb::MCTrajectory::Position(), geo::ProjectToBoxEdge(), gen_flatrecord::pt, art::PtrVector< T >::push_back(), util::pythag(), rVx, rVy, rVz, art::PtrVector< T >::size(), simb::MCTrajectory::size(), cheat::BackTracker::SlicesToMCTruthsTable(), cheat::BackTracker::SliceToOrderedNuIdsByEff(), Unit(), registry_explorer::v, Vect(), Vx, simb::MCParticle::Vx(), Vy, simb::MCParticle::Vy(), Vz, and simb::MCParticle::Vz().

209  {
212 
214  evt.getByLabel(fSliceLabel, sHandle);
215  if(sHandle.failedToGet()){
216  std::cout<<"No slices found, skipping event" << std::endl;
217  }
219  for(unsigned int i=0; i<sHandle->size(); ++i){
220  slices.push_back(art::Ptr<rb::Cluster>(sHandle, i));
221  }
222 
223  // Get the FMP for the Standard Records
224  art::FindManyP<caf::StandardRecord> recordFMP(slices, evt, fCAFLabel);
225 
226  //get associations between slices and vertices
227  art::FindManyP<rb::Vertex> fmVert(sHandle, evt, fVertexLabel);
228 
229  //if these are events with neutrino information to compare too, get it
230  std::vector<int> bestNuId;
231  std::vector<cheat::NeutrinoWithIndex> nus;
232  std::vector<std::vector<cheat::NeutrinoEffPur>> sEffPur;
233  if(fCompMCNeutrino == 1){
234  nus = bt->allMCTruth();
235  //std::cout<<allNus.size()<<std::endl;
236  sEffPur = bt->SlicesToMCTruthsTable(slices);
237  //std::cout<<"Done matching"<<std::endl;
238 
239  bestNuId = bt->SliceToOrderedNuIdsByEff(nus, sEffPur);
240  }
241 
242 
243  //loop over slices
244  for( unsigned int i=0; i<slices.size(); ++i){
245  this->ClearVectors();
246 
247  // Apply the CAF-level cuts
248  bool pass = true;
249  if( fApplyCAFCuts ) {
250  // get record associated with the slice
251  std::vector< art::Ptr<caf::StandardRecord> > records = recordFMP.at(i);
252  if (records.size() > 0 && recordFMP.isValid()) {
253  pass = fCAFCutter.passCuts(fCutType, records[0].get());
254  }
255  else { pass = false; }
256  }
257 
258  if(!pass) continue;
259 
260 
261 
262  //skip noise slice
263  if (slices[i]->IsNoise()) continue;
264  //if we are comparing to truth, make sure there is a neutrino with this slice
265  //make sure there is a vertex associated with this slice
266  if(!(fmVert.isValid())) continue;
267 
268  std::vector<art::Ptr<rb::Vertex>> v = fmVert.at(i);
269  //continue if there is no vertex or more then 1 vertex
270  if (v.size() != 1) continue;
271 
272 
273  //get reco vertex position
274  rVx = v[0]->GetX();
275  rVy = v[0]->GetY();
276  rVz = v[0]->GetZ();
277  //fill position histograms
278  fHistoRVX->Fill(rVx);
279  fHistoRVY->Fill(rVy);
280  fHistoRVZ->Fill(rVz);
281 
282  //if we do not want to compare to truth, dump into to tree and move to next slice
283  if(fCompMCNeutrino != 1){
284  fOutTree->Fill();
285  continue;
286  }
287  else if (bestNuId[i] == -1){
288  fOutTree->Fill();
289  continue;
290  }
291 
292  //now access true neutrino info for further validation
293  art::Ptr<simb::MCTruth> nuTru = sEffPur[i][bestNuId[i]].neutrinoInt;
294 
295  NuEff = sEffPur[i][0].efficiency;
296  NuPur = sEffPur[i][0].purity;
297  NuEVSl = sEffPur[i][0].energySlice;
298  NuEVTot = sEffPur[i][0].energyTotal;
299 
300  //if we have a neutrino in this mc truth, proceed
301  if (nuTru->NeutrinoSet()){
302  NuPdg = nuTru->GetNeutrino().Nu().PdgCode();
303  ccnc = nuTru->GetNeutrino().CCNC();
304  mode = nuTru->GetNeutrino().Mode();
305  NuE = nuTru->GetNeutrino().Nu().Momentum().E();
306 
307  //now get vertex info and make comparisons
308  Vx = nuTru->GetNeutrino().Nu().Vx();
309  Vy = nuTru->GetNeutrino().Nu().Vy();
310  Vz = nuTru->GetNeutrino().Nu().Vz();
311  fHistoDVX->Fill(Vx-rVx);
312  fHistoDVY->Fill(Vy-rVy);
313  fHistoDVZ->Fill(Vz-rVz);
314  float distdiff = util::pythag(Vx-rVx,Vy-rVy,Vz-rVz);
315  fHistoDVT->Fill(distdiff);
316  }
317  else {
318  TVector3 enter;
319  TVector3 exit;
320  TVector3 stop;
321  //if this is a cosmic ray then we need to find the start and end points inside the detector
322  std::vector<const sim::Particle*> particles = bt->MCTruthToParticles(nuTru);
323  const simb::MCTrajectory& traj = particles[0]->Trajectory();
324 
325 
326  bool entered = 0;
327  bool exited = 0;
328 
329  for(size_t pt = 0; pt < traj.size(); ++pt)
330  {
331  TVector3 point = traj.Position(pt).Vect();
332 
333  // Check to see if trajectory point is in the detector
334  bool inDet = fabs(point.X()) <= geom->DetHalfWidth() // Check X inside detector
335  && fabs(point.Y()) <= geom->DetHalfHeight() /// Then check Y
336  && point.Z() >= 0 && point.Z() <= geom->DetLength(); // then check Z
337 
338  if(inDet && !entered)
339  {
340  // then we just entered the detector
341  entered = true;
342 
343  if(pt > 0)
344  {
345  // Put xyz from last point into an array for geo function call
346  TVector3 lastPoint = traj.Position(pt - 1).Vect();
347  double pointArray[3] = {point.X(), point.Y(), point.Z()};
348 
349  // Put xyz from direction vector into an array.
350  TVector3 dir = (lastPoint - point).Unit();
351  double dirArray[3] = {dir.X(), dir.Y(), dir.Z()};
352 
353  double enterArray[3] = {0,0,0};
354 
355  geo::ProjectToBoxEdge(pointArray, dirArray,
356  - geom->DetHalfWidth() , geom->DetHalfWidth(),
357  - geom->DetHalfHeight() , geom->DetHalfHeight(),
358  0 , geom->DetLength(),
359  enterArray);
360 
361  enter.SetXYZ(enterArray[0], enterArray[1], enterArray[2]);
362 
363  }
364  else
365  {// if this is the case, we started inside the detector.
366  enter = point;
367  }
368  }
369 
370  if(!inDet && entered && !exited){
371  // then we just exited the detector
372  exited= true;
373 
374  // Put xyz from last point into an array for geo function call
375  TVector3 lastPoint = traj.Position(pt - 1).Vect();
376  double lastPointArray[3] = {lastPoint.X(), lastPoint.Y(), lastPoint.Z()};
377 
378  // Put xyz from direction vector into an array.
379  TVector3 dir = (point - lastPoint).Unit();
380  double dirArray[3] = {dir.X(), dir.Y(), dir.Z()};
381 
382  double exitArray[3] = {0,0,0};
383 
384  geo::ProjectToBoxEdge(lastPointArray, dirArray,
385  - geom->DetHalfWidth() , geom->DetHalfWidth(),
386  - geom->DetHalfHeight() , geom->DetHalfHeight(),
387  0 , geom->DetLength(),
388  exitArray);
389 
390  exit.SetXYZ(exitArray[0], exitArray[1], exitArray[2]);
391 
392  }
393 
394 
395  }
396  stop = traj.Position(traj.size() - 1).Vect();
397 
398  // make sure the particle actually entered the detector
399  if(!entered){
400  /// if the primary never entered the detector, set the coordinates to -5*10^9
401 
402  enter.SetXYZ(-5e9, -5e9, -5e9);
403  exit.SetXYZ(-5e9, -5e9, -5e9);
404 
405  }
406 
407  /// If the particle entered and did not exit, set the exit position to stop
408  if(entered && !exited){
409  exit = stop;
410  }
411 
412  Vx = enter.X();
413  Vy = enter.Y();
414  Vz = enter.Z();
415  Ex = exit.X();
416  Ey = exit.Y();
417  Ez = exit.Z();
418 
419  fHistoDVX->Fill(Vx-rVx);
420  fHistoDVY->Fill(Vy-rVy);
421  fHistoDVZ->Fill(Vz-rVz);
422  float distdiff = util::pythag(Vx-rVx,Vy-rVy,Vz-rVz);
423  fHistoDVT->Fill(distdiff);
424 
425  //fHistoDEX->Fill(Ex-rVx);
426  //fHistoDEY->Fill(Ey-rVy);
427  //fHistoDEZ->Fill(Ez-rVz);
428  //float distdiff2 = util::pythag(Ex-rVx,Ey-rVy,Ez-rVz);
429  //fHistoDET->Fill(distdiff2);
430 
431 
432  }
433 
434  //fill tree
435  fOutTree->Fill();
436  }//end loop over slices
437 
438 
439 
440  }
std::string fSliceLabel
MC information.
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:76
bool fApplyCAFCuts
should we apply the CAF-level cuts?
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
std::vector< int > SliceToOrderedNuIdsByEff(const std::vector< cheat::NeutrinoWithIndex > &nusWithIdx, const std::vector< std::vector< cheat::NeutrinoEffPur >> &slTruthTable) const
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
std::vector< NeutrinoWithIndex > allMCTruth() const
double DetLength() const
std::vector< std::vector< cheat::NeutrinoEffPur > > SlicesToMCTruthsTable(const std::vector< const rb::Cluster * > &sliceList) const
Given ALL the slices in an event, including the noise slice, returns a vector of vector of structures...
recovalid::CAFCutter fCAFCutter
the CAFCutter helper class
bool passCuts(int cut, const caf::StandardRecord *sr)
Definition: CAFCutter.cxx:37
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
std::string fCAFLabel
label for the process that made the standard records
double DetHalfHeight() const
TVector3 Unit() const
const TLorentzVector & Position(const size_type) const
The accessor methods described above.
size_type size() const
Definition: PtrVector.h:308
OStream cout
Definition: OStream.cxx:6
int fCutType
what cuts to apply (see CAFCutter.h)
double Vx(const int i=0) const
Definition: MCParticle.h:220
std::string fVertexLabel
label for the process that made the vertices
double DetHalfWidth() const
size_type size() const
Definition: MCTrajectory.h:165
TDirectory * dir
Definition: macro.C:5
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
double pythag(double x, double y)
2D Euclidean distance
Definition: MathUtil.h:29
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:219
void geom(int which=0)
Definition: geom.C:163
exit(0)
double Vz(const int i=0) const
Definition: MCParticle.h:222
void ProjectToBoxEdge(const double xyz[], const double dxyz[], double xlo, double xhi, double ylo, double yhi, double zlo, double zhi, double xyzout[])
Project along a direction from a particular starting point to the edge of a box.
Definition: Geo.cxx:38
bool NeutrinoSet() const
Definition: MCTruth.h:77
int Mode() const
Definition: MCNeutrino.h:149
int fCompMCNeutrino
don&#39;t know what this one does... :(
double Vy(const int i=0) const
Definition: MCParticle.h:221
bool failedToGet() const
Definition: Handle.h:196
TVector3 Vect() const
std::vector< const sim::Particle * > MCTruthToParticles(art::Ptr< simb::MCTruth > const &mct) const
void earms::ElasticArmsValidate::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 158 of file ElasticArmsValidate_module.cc.

References ccnc, event, Ex, Ey, Ez, fHistoDVT, fHistoDVX, fHistoDVY, fHistoDVZ, fHistoRVX, fHistoRVY, fHistoRVZ, fOutTree, art::TFileDirectory::make(), mode, NuE, NuEff, NuEVSl, NuEVTot, NuPdg, NuPur, rVx, rVy, rVz, subrun, Vx, Vy, and Vz.

159  {
160 
162 
163  // define the tree
164  fOutTree = tfs->make<TTree>("ElasticArmsValidate","Elastic Arms Validation");
165 
166  //store event summary information
167  fOutTree->Branch("run", &run, "run/I");
168  fOutTree->Branch("subrun", &subrun, "subrun/I");
169  fOutTree->Branch("event", &event, "event/I");
170 
171  //store vertex info
172  fOutTree->Branch("rVx", &rVx);
173  fOutTree->Branch("rVy", &rVy);
174  fOutTree->Branch("rVz", &rVz);
175 
176  //vertex histograms
177  fHistoRVX = tfs->make<TH1F>("VertexRecoX","Reconstructed X vertex coordinate;vertex x (cm)",160,-800.0,800.0);
178  fHistoRVY = tfs->make<TH1F>("VertexRecoY","Reconstructed Y vertex coordinate;vertex y (cm)",160,-800.0,800.0);
179  fHistoRVZ = tfs->make<TH1F>("VertexRecoZ","Reconstructed Z vertex coordinate;vertex z (cm)",320,0.0,6400.0);
180  fHistoDVX = tfs->make<TH1F>("VertexDeltaX","Vertex True X - Reco X;True Vertex X - Reco Vertex X (cm)",201,-100.5,100.5);
181  fHistoDVY = tfs->make<TH1F>("VertexDeltaY","Vertex True Y - Reco Y;True Vertex Y - Reco Vertex Y (cm)",201,-100.5,100.5);
182  fHistoDVZ = tfs->make<TH1F>("VertexDeltaZ","Vertex True Z - Reco Z;True Vertex Z - Reco Vertex Z (cm)",201,-100.5,100.5);
183  fHistoDVT = tfs->make<TH1F>("VertexDelta3D","Distance from Reco to True vertex;|True Vertex - Reco Vertex| (cm)",150,0.0,300.0);
184  //fHistoDEX = tfs->make<TH1F>("fHistoDEX","Endpoint True X - Reco X;(cm)",201,-100.5,100.5);
185  //fHistoDEY = tfs->make<TH1F>("fHistoDEY","Endpoint True Y - Reco Y;(cm)",201,-100.5,100.5);
186  //fHistoDEZ = tfs->make<TH1F>("fHistoDEZ","Endpoint True Z - Reco Z;(cm)",201,-100.5,100.5);
187  //fHistoDET = tfs->make<TH1F>("fHistoDET","Distance from Reco to Endpoint;(cm)",150,0.0,300.0);
188 
189  //store neutrino info
190  fOutTree->Branch("Vx", &Vx);//neutrino position info
191  fOutTree->Branch("Vy", &Vy);
192  fOutTree->Branch("Vz", &Vz);
193  fOutTree->Branch("Ex", &Ex);
194  fOutTree->Branch("Ey", &Ey);
195  fOutTree->Branch("Ez", &Ez);
196  fOutTree->Branch("NuEff", &NuEff);//info on quality of neutrino in slice
197  fOutTree->Branch("NuPur", &NuPur);
198  fOutTree->Branch("NuEVSl", &NuEVSl);
199  fOutTree->Branch("NuEVTot", &NuEVTot);
200  fOutTree->Branch("NuPdg", &NuPdg);
201  fOutTree->Branch("ccnc", &ccnc);
202  fOutTree->Branch("mode", &mode);
203  fOutTree->Branch("NuE", &NuE);
204 
205  }
Definition: run.py:1
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_
void earms::ElasticArmsValidate::ClearVectors ( )
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
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
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 earms::ElasticArmsValidate::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 144 of file ElasticArmsValidate_module.cc.

References fApplyCAFCuts, fCAFLabel, fCellHitLabel, fCompMCNeutrino, fCutType, fSliceLabel, fVertexLabel, fhicl::ParameterSet::get(), and string.

Referenced by ElasticArmsValidate().

145  {
146 
147  fSliceLabel = pset.get< std::string >("SliceLabel");
148  fCellHitLabel = pset.get< std::string >("CellHitLabel");
149  fVertexLabel = pset.get< std::string >("VertexLabel");
150  fCompMCNeutrino = pset.get< int >("CompMCNeutrino");
151 
152  fCAFLabel = pset.get< std::string >("CAFLabel");
153  fApplyCAFCuts = pset.get< bool > ("ApplyCAFCuts");
154  fCutType = pset.get< int > ("CutType");
155  }
std::string fSliceLabel
MC information.
bool fApplyCAFCuts
should we apply the CAF-level cuts?
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fCAFLabel
label for the process that made the standard records
std::string fCellHitLabel
label for the process that made the cell hits
int fCutType
what cuts to apply (see CAFCutter.h)
std::string fVertexLabel
label for the process that made the vertices
int fCompMCNeutrino
don&#39;t know what this one does... :(
enum BeamMode string
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().

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

int earms::ElasticArmsValidate::ccnc
private

Definition at line 115 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

int earms::ElasticArmsValidate::event
private

Definition at line 84 of file ElasticArmsValidate_module.cc.

Referenced by beginJob().

float earms::ElasticArmsValidate::Ex
private

Definition at line 120 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

float earms::ElasticArmsValidate::Ey
private

Definition at line 121 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

float earms::ElasticArmsValidate::Ez
private

Definition at line 122 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

bool earms::ElasticArmsValidate::fApplyCAFCuts
private

should we apply the CAF-level cuts?

Definition at line 75 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and reconfigure().

recovalid::CAFCutter earms::ElasticArmsValidate::fCAFCutter
private

the CAFCutter helper class

Definition at line 78 of file ElasticArmsValidate_module.cc.

Referenced by analyze().

std::string earms::ElasticArmsValidate::fCAFLabel
private

label for the process that made the standard records

Definition at line 74 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and reconfigure().

std::string earms::ElasticArmsValidate::fCellHitLabel
private

label for the process that made the cell hits

Definition at line 70 of file ElasticArmsValidate_module.cc.

Referenced by reconfigure().

int earms::ElasticArmsValidate::fCompMCNeutrino
private

don't know what this one does... :(

Definition at line 72 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and reconfigure().

int earms::ElasticArmsValidate::fCutType
private

what cuts to apply (see CAFCutter.h)

Definition at line 76 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and reconfigure().

TH1F* earms::ElasticArmsValidate::fHistoDVT
private

Definition at line 98 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* earms::ElasticArmsValidate::fHistoDVX
private

Definition at line 95 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* earms::ElasticArmsValidate::fHistoDVY
private

Definition at line 96 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* earms::ElasticArmsValidate::fHistoDVZ
private

Definition at line 97 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* earms::ElasticArmsValidate::fHistoRVX
private

Definition at line 92 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* earms::ElasticArmsValidate::fHistoRVY
private

Definition at line 93 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TH1F* earms::ElasticArmsValidate::fHistoRVZ
private

Definition at line 94 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

TTree* earms::ElasticArmsValidate::fOutTree
private

Definition at line 80 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

std::string earms::ElasticArmsValidate::fSliceLabel
private

MC information.

label for the process that made the slices

Definition at line 69 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and reconfigure().

std::string earms::ElasticArmsValidate::fVertexLabel
private

label for the process that made the vertices

Definition at line 71 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and reconfigure().

int earms::ElasticArmsValidate::mode
private
float earms::ElasticArmsValidate::NuE
private

Definition at line 117 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

float earms::ElasticArmsValidate::NuEff
private

Definition at line 110 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

float earms::ElasticArmsValidate::NuEVSl
private

Definition at line 112 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

float earms::ElasticArmsValidate::NuEVTot
private

Definition at line 113 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

int earms::ElasticArmsValidate::NuPdg
private

Definition at line 114 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

float earms::ElasticArmsValidate::NuPur
private

Definition at line 111 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

int earms::ElasticArmsValidate::run
private
float earms::ElasticArmsValidate::rVx
private

Definition at line 87 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

float earms::ElasticArmsValidate::rVy
private

Definition at line 88 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

float earms::ElasticArmsValidate::rVz
private

Definition at line 89 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), and beginJob().

int earms::ElasticArmsValidate::subrun
private

Definition at line 83 of file ElasticArmsValidate_module.cc.

Referenced by beginJob().

float earms::ElasticArmsValidate::Vx
private

Definition at line 107 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

float earms::ElasticArmsValidate::Vy
private

Definition at line 108 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().

float earms::ElasticArmsValidate::Vz
private

Definition at line 109 of file ElasticArmsValidate_module.cc.

Referenced by analyze(), beginJob(), and ClearVectors().


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