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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 GenieTruth (fhicl::ParameterSet const &pset)
 
virtual ~GenieTruth ()
 
void beginJob ()
 
void analyze (const art::Event &evt)
 
void reconfigure (const fhicl::ParameterSet &p)
 
void endSubRun (const art::SubRun &sr)
 
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 cet::exempt_ptr< Consumernon_module_context ()
 

Public Attributes

TTree * _btree
 

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

const rb::RecoHit MakeRecoHit (art::Ptr< rb::CellHit > const &chit, double const &w)
 

Private Attributes

std::string fMCFluxLabel
 
std::string fweightLabel
 label for generator information More...
 
int printDecay
 genie weights More...
 
double spillPOT
 
TTree * _otree
 
float nu_Vx
 
float nu_Vy
 
float nu_Vz
 
float nu_truePx
 
float nu_truePy
 
float nu_truePz
 
float nu_trueE
 
int nu_ccnc
 
int nu_PDG
 
int nu_origPDG
 
int nu_orig_parentPDG
 
int nu_mode
 
int nu_intType
 
int nu_hitNucl
 
float nu_HadX
 
float nu_HadY
 
float nu_HadW
 
float nu_Q2
 
int lep_PDG
 
float lep_Px
 
float lep_Py
 
float lep_Pz
 
float lep_E
 
int Nparticles
 
int partPDG [100]
 
float partPx [100]
 
float partPy [100]
 
float partPz [100]
 
float partE [100]
 
int Nweights
 
float plus1sigma [68]
 
float plus2sigma [68]
 
float minus1sigma [68]
 
float minus2sigma [68]
 

Detailed Description

Definition at line 73 of file GenieTruth_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

ncs::GenieTruth::GenieTruth ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 149 of file GenieTruth_module.cc.

References reconfigure().

150  : EDAnalyzer(pset)
151  {
152  mf::LogInfo("GenieTruth")<<__PRETTY_FUNCTION__<<"\n";
153  reconfigure(pset);
154  }
void reconfigure(const fhicl::ParameterSet &p)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
ncs::GenieTruth::~GenieTruth ( )
virtual

Definition at line 157 of file GenieTruth_module.cc.

158  {
159  }

Member Function Documentation

void ncs::GenieTruth::analyze ( const art::Event evt)

Definition at line 234 of file GenieTruth_module.cc.

References _btree, _otree, simb::MCNeutrino::CCNC(), om::cout, simb::MCParticle::Daughter(), e, simb::MCParticle::E(), allTimeWatchdog::endl, energy, stan::math::fabs(), flux, fMCFluxLabel, simb::MCFlux::fntype, simb::MCFlux::fptype, fweightLabel, art::DataViewImpl::getByLabel(), simb::MCTruth::GetNeutrino(), simb::MCNeutrino::HitNuc(), MECModelEnuComparisons::i, simb::MCNeutrino::InteractionType(), calib::j, lep_E, lep_PDG, lep_Px, lep_Py, lep_Pz, simb::MCNeutrino::Lepton(), minus1sigma, minus2sigma, simb::MCNeutrino::Mode(), simb::MCParticle::Mother(), Nparticles, simb::MCNeutrino::Nu(), nu_ccnc, nu_HadW, nu_HadX, nu_HadY, nu_hitNucl, nu_intType, nu_mode, nu_orig_parentPDG, nu_origPDG, nu_PDG, nu_Q2, nu_trueE, nu_truePx, nu_truePy, nu_truePz, nu_Vx, nu_Vy, nu_Vz, simb::MCParticle::NumberDaughters(), Nweights, partE, sim::ParticleNavigator::Particle(), cheat::BackTracker::ParticleNavigator(), partPDG, partPx, partPy, partPz, simb::MCParticle::PdgCode(), plus1sigma, plus2sigma, printDecay, art::PtrVector< T >::push_back(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), simb::MCNeutrino::QSqr(), sim::ParticleNavigator::size(), sumdata::SpillData::spillpot, spillPOT, ss, simb::MCParticle::TrackId(), sim::ParticleNavigator::TrackId(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), simb::MCParticle::Vz(), simb::MCNeutrino::W(), simb::MCNeutrino::X(), and simb::MCNeutrino::Y().

235  {
236 
237  nu_Vx = -999.;
238  nu_Vy = -999.;
239  nu_Vz = -999.;
240  nu_trueE = -1.;
241  nu_truePx = -999.;
242  nu_truePy = -999.;
243  nu_truePz = -999.;
244 
245  nu_ccnc=-1;
246  nu_PDG=-1;
247  nu_origPDG=-1;
249  nu_mode=-1;
250  nu_intType=-1;
251  nu_hitNucl=-1;
252 
253  nu_HadX=-1.;
254  nu_HadY=-1.;
255  nu_HadW=-1.;
256  nu_Q2=-1.;
257 
258  lep_PDG=-1;
259  lep_Px=-1.;
260  lep_Py=-1.;
261  lep_Pz=-1.;
262  lep_E=-1.;
263 
264  Nparticles=0;
265  for( int i=0; i<100; ++i ){
266  partPDG[i]=-1;
267  partPx[i]=-999.;
268  partPy[i]=-999.;
269  partPz[i]=-999.;
270  partE[i]=-1.0;
271  }
272 
273  Nweights=0;
274  for( int i=0; i<68; ++i ){
275  plus1sigma[i]=1.;
276  plus2sigma[i]=1.;
277  minus1sigma[i]=1.;
278  minus2sigma[i]=1.;
279  }
280 
281  //art::ServiceHandle<calib::Calibrator> cal;
282  //art::ServiceHandle<geo::Geometry> geom;
284 
285  //beam intensity
287  evt.getByLabel(fMCFluxLabel, spillPot);
288  spillPOT=(spillPot->spillpot)/1.0e+12;
289 
290  _btree->Fill();//fill the tree for the spill-level info
291 
292  //////////////
293  //Truth info//
294  //////////////
296  evt.getByLabel(fMCFluxLabel,mclist);
298  evt.getByLabel(fMCFluxLabel, fllist);
299 
300  int Nneutrino=mclist->size();
301  //std::cout<<"# of nu interactions are "<<Nneutrino<<std::endl;
302 
303  if( Nneutrino>0 ){
304  for( int ii=0; ii<Nneutrino; ++ii ){
305 
306  art::Ptr<simb::MCTruth> mctruth(mclist,ii);
307  const simb::MCNeutrino& nu = mctruth->GetNeutrino();
308 
309  //remove the interactions outside the detector
310  if( fabs(nu.Nu().Vx())>200.0 ) continue;
311  if( fabs(nu.Nu().Vy())>200.0 ) continue;
312  if( nu.Nu().Vz()<0.0 ) continue;
313 
314  nu_trueE = nu.Nu().E();
315  nu_truePx = nu.Nu().Px();
316  nu_truePy = nu.Nu().Py();
317  nu_truePz = nu.Nu().Pz();
318 
319  nu_Vx=nu.Nu().Vx();
320  nu_Vy=nu.Nu().Vy();
321  nu_Vz=nu.Nu().Vz();
322 
323  nu_PDG = nu.Nu().PdgCode();
324  nu_ccnc = nu.CCNC();
325  nu_mode = nu.Mode();
327 
328  nu_hitNucl = nu.HitNuc();
329  nu_HadX = nu.X();
330  nu_HadY = nu.Y();
331  nu_HadW = nu.W();
332  nu_Q2 = nu.QSqr();
333 
334  lep_PDG = nu.Lepton().PdgCode();
335  lep_Px = nu.Lepton().Px();
336  lep_Py = nu.Lepton().Py();
337  lep_Pz = nu.Lepton().Pz();
338  lep_E = nu.Lepton().E();
339 
340  art::Ptr<simb::MCFlux> flux(fllist,ii);
341 
342  nu_origPDG = flux->fntype;
343  nu_orig_parentPDG = flux->fptype;
344 
345  //get genie cross section reweight table
347  pv.push_back(mctruth);
349 
350  const std::vector<art::Ptr<rwgt::GENIEReweightTable>> XSprods = gweights.at(0);
351  if( !XSprods.empty()){
352  const unsigned int N = XSprods[0]->NShifts();
353  if( N==68 ){
354  Nweights=N;
355  for(unsigned int ir = 0; ir < N; ++ir){
356  plus1sigma[ir]=XSprods[0]->Plus1Sigma(ir);
357  plus2sigma[ir]=XSprods[0]->Plus2Sigma(ir);
358  minus1sigma[ir]=XSprods[0]->Minus1Sigma(ir);
359  minus2sigma[ir]=XSprods[0]->Minus2Sigma(ir);
360  }
361  }//number of weights>0
362  }//having genie weights
363 
364  sim::ParticleNavigator const& pn = bt->ParticleNavigator();
365  int numberOfParticles = pn.size();
366 
367  std::vector<int> particlePDG;
368  std::vector<float> particlePx;
369  std::vector<float> particlePy;
370  std::vector<float> particlePz;
371  std::vector<float> particleE;
372  particlePDG.clear();
373  particlePx.clear();
374  particlePy.clear();
375  particlePz.clear();
376  //build a map for indexing and track ID
377  std::map<std::string,int> IndexMap;
378  IndexMap.clear();
379  for( int i=0; i<numberOfParticles; ++i ){
380  sim::Particle* particle = pn.Particle(i);
381  std::stringstream ss;//create a stringstream
382  ss << particle->TrackId();//add number to the stream
383  IndexMap[ss.str()] = i;
384 
385  double Dx=fabs(nu.Lepton().Vx()-particle->Vx());
386  double Dy=fabs(nu.Lepton().Vy()-particle->Vy());
387  double Dz=fabs(nu.Lepton().Vz()-particle->Vz());
388  if( particle->Mother()==0 && Dx<1.0E-6 && Dy<1.0E-6 && Dz<1.0E-6 ){
389  //std::cout<<particle->PdgCode()<<" "<<particle->E()<<" "<<particle->Mother()<<std::endl;
390  particlePDG.push_back(particle->PdgCode());
391  particleE.push_back(particle->E());
392  particlePx.push_back(particle->Px());
393  particlePy.push_back(particle->Py());
394  particlePz.push_back(particle->Pz());
395  }
396  }//end loop of particles
397 
398  int Npart=particlePDG.size();
399  if( Npart>100 ) Npart=100;
400  if( Npart>0 ){
401  Nparticles=Npart;
402  for( int i=0; i<Npart; ++i ){
403  partPDG[i]=particlePDG[i];
404  partE[i]=particleE[i];
405  partPx[i]=particlePx[i];
406  partPy[i]=particlePy[i];
407  partPz[i]=particlePz[i];
408  }//end loop of particlePDG
409  }//find the particles originating from the nu interaction vertex
410 
411  if( printDecay ){
412  std::cout<<"Incoming nu pdg is "<<flux->fntype<<std::endl;
413  std::cout<<"Outgoing nu pdg is "<<nu.Nu().PdgCode()<<std::endl;
414  std::cout<<"Interaction mode is "<<nu.Mode()<<std::endl;
415  std::cout<<"Is CCNC or not: "<<nu.CCNC()<<std::endl;
416  std::cout<<"# of particles = "<<numberOfParticles<<std::endl;
417  for( int i=0; i<numberOfParticles; ++i ){
418  sim::Particle* particle = pn.Particle(i);
419  int pdgid=particle->PdgCode();
420  double energy=particle->E();
421  int ndau=particle->NumberDaughters();
422  std::cout<<i<<" "<<pdgid<<" E="<<energy<<" ";
423 
424  //find mother
425  int MotherIndex=particle->Mother();
426  if( MotherIndex>0 ){
427  std::cout<<"mom idx: ";
428  std::stringstream ss;
429  ss << pn[MotherIndex]->TrackId();
430  std::map<std::string, int>::const_iterator mitr=IndexMap.find(ss.str());
431  if( mitr != IndexMap.end() )
432  std::cout<<mitr->second<<" ";
433  }//haveing moms
434 
435  //find daughter
436  if( ndau>0 ){
437  std::cout<<"dau idx: ";
438  for( int j=0; j<ndau; ++j ){
439  int dauID=particle->Daughter(j);
440  std::stringstream ss;
441  ss << pn[dauID]->TrackId();
442  std::map<std::string, int>::const_iterator mitr=IndexMap.find(ss.str());
443  if( mitr != IndexMap.end() )
444  std::cout<<mitr->second<<" ";
445  }//end loop of daughter particles
446  }//having daughters
447  std::cout<<"\n";
448  }//end loop of all particles
449  std::cout<<"=================================="<<std::endl;
450  }//end of printing decay chain
451 
452  _otree->Fill();
453  }//end loop of nu interactions
454  }//have neutrino interactions
455 
456  return;
457  }//end analyze
double E(const int i=0) const
Definition: MCParticle.h:232
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
double QSqr() const
Definition: MCNeutrino.h:157
double Py(const int i=0) const
Definition: MCParticle.h:230
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
std::string fMCFluxLabel
const sim::ParticleNavigator & ParticleNavigator() const
Get a reference to the ParticleNavigator.
Definition: BackTracker.h:744
size_type size() const
int Mother() const
Definition: MCParticle.h:212
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
double Px(const int i=0) const
Definition: MCParticle.h:229
Float_t ss
Definition: plot.C:24
int HitNuc() const
Definition: MCNeutrino.h:152
std::string fweightLabel
label for generator information
Loaders::FluxType flux
int NumberDaughters() const
Definition: MCParticle.h:216
int TrackId() const
Definition: MCParticle.h:209
int Daughter(const int i) const
Definition: MCParticle.cxx:112
const key_type & TrackId(const size_type) const
int InteractionType() const
Definition: MCNeutrino.h:150
const simb::MCParticle & Lepton() const
Definition: MCNeutrino.h:147
double W() const
Definition: MCNeutrino.h:154
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
double Y() const
Definition: MCNeutrino.h:156
double energy
Definition: plottest35.C:25
double X() const
Definition: MCNeutrino.h:155
const double j
Definition: BetheBloch.cxx:29
int printDecay
genie weights
OStream cout
Definition: OStream.cxx:6
double Vx(const int i=0) const
Definition: MCParticle.h:220
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
double Pz(const int i=0) const
Definition: MCParticle.h:231
double Vz(const int i=0) const
Definition: MCParticle.h:222
Float_t e
Definition: plot.C:35
Event generator information.
Definition: MCNeutrino.h:18
int Mode() const
Definition: MCNeutrino.h:149
double spillpot
POT for spill normalized by 10^12.
Definition: SpillData.h:26
double Vy(const int i=0) const
Definition: MCParticle.h:221
mapped_type Particle(const size_type) const
void ncs::GenieTruth::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 170 of file GenieTruth_module.cc.

References _btree, _otree, lep_E, lep_PDG, lep_Px, lep_Py, lep_Pz, art::TFileDirectory::make(), minus1sigma, minus2sigma, Nparticles, nu_ccnc, nu_HadW, nu_HadX, nu_HadY, nu_hitNucl, nu_intType, nu_mode, nu_orig_parentPDG, nu_origPDG, nu_PDG, nu_Q2, nu_trueE, nu_truePx, nu_truePy, nu_truePz, nu_Vx, nu_Vy, nu_Vz, Nweights, partE, partPDG, partPx, partPy, partPz, plus1sigma, plus2sigma, and spillPOT.

171  {
173 
174  //personal tuples
175  _otree = tfs->make<TTree>("GenieTruth","GenieTruth particle");
176 
177  _otree->Branch("nu_Vx",&nu_Vx,"nu_Vx/F");
178  _otree->Branch("nu_Vy",&nu_Vy,"nu_Vy/F");
179  _otree->Branch("nu_Vz",&nu_Vz,"nu_Vz/F");
180  _otree->Branch("nu_trueE",&nu_trueE,"nu_trueE/F");
181  _otree->Branch("nu_truePx",&nu_truePx,"nu_truePx/F");
182  _otree->Branch("nu_truePy",&nu_truePy,"nu_truePy/F");
183  _otree->Branch("nu_truePz",&nu_truePz,"nu_truePz/F");
184  _otree->Branch("nu_ccnc",&nu_ccnc,"nu_ccnc/I");
185  _otree->Branch("nu_PDG",&nu_PDG,"nu_PDG/I");
186  _otree->Branch("nu_orig_parentPDG",&nu_orig_parentPDG,"nu_orig_parentPDG/I");
187  _otree->Branch("nu_origPDG",&nu_origPDG,"nu_origPDG/I");
188  _otree->Branch("nu_mode",&nu_mode,"nu_mode/I");
189  _otree->Branch("nu_intType",&nu_intType,"nu_intType/I");
190  _otree->Branch("nu_hitNucl",&nu_hitNucl,"nu_hitNucl/I");
191  _otree->Branch("nu_HadX",&nu_HadX,"nu_HadX/F");
192  _otree->Branch("nu_HadY",&nu_HadY,"nu_HadY/F");
193  _otree->Branch("nu_HadW",&nu_HadW,"nu_HadW/F");
194  _otree->Branch("nu_Q2",&nu_Q2,"nu_Q2/F");
195  _otree->Branch("lep_PDG",&lep_PDG,"lep_PDG/I");
196  _otree->Branch("lep_Px",&lep_Px,"lep_Px/F");
197  _otree->Branch("lep_Py",&lep_Py,"lep_Py/F");
198  _otree->Branch("lep_Pz",&lep_Pz,"lep_Pz/F");
199  _otree->Branch("lep_E",&lep_E,"lep_E/F");
200 
201  _otree->Branch("Nparticles",&Nparticles,"Nparticles/I");
202  _otree->Branch("partPDG",&partPDG,"partPDG[Nparticles]/I");
203  _otree->Branch("partPx",&partPx,"partPx[Nparticles]/F");
204  _otree->Branch("partPy",&partPy,"partPy[Nparticles]/F");
205  _otree->Branch("partPz",&partPz,"partPz[Nparticles]/F");
206  _otree->Branch("partE",&partE,"partE[Nparticles]/F");
207 
208  _otree->Branch("Nweights",&Nweights,"Nweights/I");
209  _otree->Branch("plus1sigma",&plus1sigma,"plus1sigma[Nweights]/F");
210  _otree->Branch("plus2sigma",&plus2sigma,"plus2sigma[Nweights]/F");
211  _otree->Branch("minus1sigma",&minus1sigma,"minus1sigma[Nweights]/F");
212  _otree->Branch("minus2sigma",&minus2sigma,"minus2sigma[Nweights]/F");
213 
214  _btree=new TTree("spillInfo","spill level info");
215  _btree->Branch("spillPOT",&spillPOT,"spillPOT/D");
216  }
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 ncs::GenieTruth::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 459 of file GenieTruth_module.cc.

References ncs::DEFINE_ART_MODULE().

460  {
461  }
void ncs::GenieTruth::endSubRun ( const art::SubRun sr)

Definition at line 219 of file GenieTruth_module.cc.

220  {
221  }
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
const rb::RecoHit ncs::GenieTruth::MakeRecoHit ( art::Ptr< rb::CellHit > const &  chit,
double const &  w 
)
private

Definition at line 224 of file GenieTruth_module.cc.

References calib::Calibrator::MakeRecoHit().

226  {
228  const rb::RecoHit rhit(cal->MakeRecoHit(*chit, w));
229 
230  return rhit;
231  }
rb::RecoHit MakeRecoHit(rb::CellHit const &cellhit, double w)
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
Float_t w
Definition: plot.C:20
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 ncs::GenieTruth::reconfigure ( const fhicl::ParameterSet p)

Definition at line 162 of file GenieTruth_module.cc.

References fMCFluxLabel, fweightLabel, fhicl::ParameterSet::get(), printDecay, and string.

Referenced by GenieTruth().

163  {
164  fMCFluxLabel = pset.get< std::string >("MCFluxLabel");
165  fweightLabel = pset.get< std::string >("weightLabel");
166  printDecay = pset.get< int >("printdecay");
167  }
std::string fMCFluxLabel
std::string fweightLabel
label for generator information
int printDecay
genie weights
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

TTree* ncs::GenieTruth::_btree

Definition at line 83 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

TTree* ncs::GenieTruth::_otree
private

Definition at line 100 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

std::string ncs::GenieTruth::fMCFluxLabel
private

Definition at line 91 of file GenieTruth_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncs::GenieTruth::fweightLabel
private

label for generator information

Definition at line 92 of file GenieTruth_module.cc.

Referenced by analyze(), and reconfigure().

float ncs::GenieTruth::lep_E
private

Definition at line 126 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::lep_PDG
private

Definition at line 122 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::lep_Px
private

Definition at line 123 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::lep_Py
private

Definition at line 124 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::lep_Pz
private

Definition at line 125 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::minus1sigma[68]
private

Definition at line 140 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::minus2sigma[68]
private

Definition at line 141 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::Nparticles
private

Definition at line 129 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_ccnc
private

Definition at line 110 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_HadW
private

Definition at line 119 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_HadX
private

Definition at line 117 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_HadY
private

Definition at line 118 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_hitNucl
private

Definition at line 116 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_intType
private

Definition at line 115 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_mode
private

Definition at line 114 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_orig_parentPDG
private

Definition at line 113 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_origPDG
private

Definition at line 112 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::nu_PDG
private

Definition at line 111 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_Q2
private

Definition at line 120 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_trueE
private

Definition at line 109 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_truePx
private

Definition at line 106 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_truePy
private

Definition at line 107 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_truePz
private

Definition at line 108 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_Vx
private

Definition at line 103 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_Vy
private

Definition at line 104 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::nu_Vz
private

Definition at line 105 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::Nweights
private

Definition at line 137 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::partE[100]
private

Definition at line 134 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::partPDG[100]
private

Definition at line 130 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::partPx[100]
private

Definition at line 131 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::partPy[100]
private

Definition at line 132 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::partPz[100]
private

Definition at line 133 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::plus1sigma[68]
private

Definition at line 138 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

float ncs::GenieTruth::plus2sigma[68]
private

Definition at line 139 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().

int ncs::GenieTruth::printDecay
private

genie weights

Definition at line 95 of file GenieTruth_module.cc.

Referenced by analyze(), and reconfigure().

double ncs::GenieTruth::spillPOT
private

Definition at line 98 of file GenieTruth_module.cc.

Referenced by analyze(), and beginJob().


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