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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 Xbeam (fhicl::ParameterSet const &pset)
 
virtual ~Xbeam ()
 
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

double fTotalPOT
 
int fTotalSpill
 

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 fSliceLabel
 
std::string fMCFluxLabel
 label for slices More...
 
std::string fCellHitLabel
 label for generator information More...
 
TProfile * slEff_Etrue
 label for cell hits More...
 
TTree * _otree
 
float nu_Vx
 
float nu_Vy
 
float nu_Vz
 
float nu_truePt
 
float nu_trueE
 
float nu_trueTheta
 
int nu_ccnc
 
int nu_PDG
 
int nu_origPDG
 
int nu_orig_parentPDG
 
int nu_mode
 
bool nu_isQE
 
int nu_intType
 
int nu_hitNucl
 
float nu_HadX
 
float nu_HadY
 
float nu_HadW
 
float nu_qsqr
 
float nu_OscWt
 
int meson_PDG
 
float meson_Px
 
float meson_Py
 
float meson_Pz
 
int lep_PDG
 
float lep_Px
 
float lep_Py
 
float lep_Pz
 
float lep_E
 
int Nslices
 
int hasSlice
 

Detailed Description

Definition at line 72 of file Xbeam_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::Xbeam::Xbeam ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 139 of file Xbeam_module.cc.

References reconfigure().

140  : EDAnalyzer(pset)
141  {
142  mf::LogInfo("Xbeam")<<__PRETTY_FUNCTION__<<"\n";
143  reconfigure(pset);
144  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
void reconfigure(const fhicl::ParameterSet &p)
ncs::Xbeam::~Xbeam ( )
virtual

Definition at line 147 of file Xbeam_module.cc.

148  {
149  }

Member Function Documentation

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

Definition at line 234 of file Xbeam_module.cc.

References _otree, simb::MCNeutrino::CCNC(), om::cout, simb::MCParticle::E(), allTimeWatchdog::endl, fCellHitLabel, flux, fMCFluxLabel, simb::MCFlux::fntype, simb::MCFlux::fptype, fSliceLabel, simb::MCFlux::ftptype, simb::MCFlux::ftpx, simb::MCFlux::ftpy, simb::MCFlux::ftpz, geom(), art::DataViewImpl::getByLabel(), simb::MCTruth::GetNeutrino(), make_syst_table_plots::h, hasSlice, simb::MCNeutrino::HitNuc(), simb::MCNeutrino::InteractionType(), rb::Cluster::IsNoise(), simb::kCCQE, simb::kQE, lep_E, lep_PDG, lep_Px, lep_Py, lep_Pz, simb::MCNeutrino::Lepton(), meson_PDG, meson_Px, meson_Py, meson_Pz, simb::MCNeutrino::Mode(), Nslices, simb::MCNeutrino::Nu(), nu_ccnc, nu_HadW, nu_HadX, nu_HadY, nu_hitNucl, nu_intType, nu_isQE, nu_mode, nu_orig_parentPDG, nu_origPDG, nu_OscWt, nu_PDG, nu_qsqr, nu_trueE, nu_truePt, nu_trueTheta, nu_Vx, nu_Vy, nu_Vz, simb::MCParticle::PdgCode(), simb::MCNeutrino::Pt(), art::PtrVector< T >::push_back(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), simb::MCNeutrino::QSqr(), slEff_Etrue, cheat::BackTracker::SliceToNeutrinoInteractions(), simb::MCNeutrino::Theta(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), simb::MCParticle::Vz(), simb::MCNeutrino::W(), simb::MCNeutrino::X(), and simb::MCNeutrino::Y().

235  {
236  nu_Vx = -999.;
237  nu_Vy = -999.;
238  nu_Vz = -999.;
239  nu_truePt = -1.;
240  nu_trueE = -1.;
241  nu_trueTheta = -1.;
242 
243  nu_ccnc=-1;
244  nu_PDG=-1;
245  nu_origPDG=-1;
247  nu_mode=-1;
248  nu_isQE=false;
249  nu_intType=-1;
250  nu_hitNucl=-1;
251 
252  nu_HadX=-1.;
253  nu_HadY=-1.;
254  nu_HadW=-1.;
255  nu_qsqr=-1.;
256  nu_OscWt=-1.;
257 
258  meson_PDG=-1;
259  meson_Px=-1.;
260  meson_Py=-1.;
261  meson_Pz=-1.;
262 
263  lep_PDG=-1;
264  lep_Px=-1.;
265  lep_Py=-1.;
266  lep_Pz=-1.;
267  lep_E=-1.;
268 
269  Nslices=-1;
270  hasSlice=-1;
271 
274  //////////////
275  //Truth info//
276  //////////////
278  evt.getByLabel(fMCFluxLabel,mclist);
280  evt.getByLabel(fMCFluxLabel, fllist);
281  //# of interactions
282  //std::cout<<"# of interactions: "<<mclist->size()<<std::endl;
283  if( mclist->size()!=1 ){
284  std::cout<<"ABNORMAL! "<<mclist->size()<<" interactions."<<std::endl;
285  return;
286  }
287 
288  art::Ptr<simb::MCTruth> mctruth(mclist,0);
289  const simb::MCNeutrino& nu = mctruth->GetNeutrino();
290 
291  nu_trueE = nu.Nu().E();
292  nu_PDG = nu.Nu().PdgCode();
293  nu_Vx=nu.Nu().Vx();
294  nu_Vy=nu.Nu().Vy();
295  nu_Vz=nu.Nu().Vz();
296 
297  nu_truePt = nu.Pt();
298  nu_trueTheta = nu.Theta();
299  nu_ccnc = nu.CCNC();
300  nu_mode = nu.Mode();
301  nu_isQE = nu.InteractionType() == simb::kQE ||
304  nu_hitNucl = nu.HitNuc();
305  nu_HadX = nu.X();
306  nu_HadY = nu.Y();
307  nu_HadW = nu.W();
308  nu_qsqr = nu.QSqr();
309 
310  lep_PDG = nu.Lepton().PdgCode();
311  lep_Px = nu.Lepton().Px();
312  lep_Py = nu.Lepton().Py();
313  lep_Pz = nu.Lepton().Pz();
314  lep_E = nu.Lepton().E();
315 
316 
317  art::Ptr<simb::MCFlux> flux(fllist,0);
318 
319  nu_origPDG = flux->fntype;
320  nu_orig_parentPDG = flux->fptype;
321  meson_PDG = flux->ftptype;
322  meson_Px = flux->ftpx;
323  meson_Py = flux->ftpy;
324  meson_Pz = flux->ftpz;
325 
326  //std::cout<<i_intx<<" "<<nu.CCNC()<<" "<<flux->fntype<<" "<<nu.Nu().PdgCode()<<std::endl;
327  //std::cout<<flux->fntype<<" "<<flux->fptype<<" "<<flux->ftptype<<std::endl;
328  //std::cout<<"meson is "<<flux->ftptype<<std::endl;
329  //CC nue only
330  if( nu.CCNC() != 0 ) return;
331  if( nu.Nu().PdgCode() != 12 ) return;
332  if( flux->fntype != 12 ) return;
333 
334  ////////////////////////
335  //get reco slicer info//
336  ////////////////////////
338  evt.getByLabel(fSliceLabel, slices);
339  //get all hits info
341  evt.getByLabel(fCellHitLabel, chits);
342 
343  bool matchSlice=false;
344 
345  for(unsigned int sliceIdx = 0; sliceIdx < slices->size(); ++sliceIdx){
346 
347  const rb::Cluster& slice = (*slices)[sliceIdx];
348  if(slice.IsNoise()) continue;
351  for(size_t h = 0; h < chits->size(); ++h)
352  allhits.push_back(art::Ptr<rb::CellHit>(chits, h));
353  const art::Ptr<rb::Cluster> allslice(slices,sliceIdx);
354  std::vector<cheat::NeutrinoEffPur> iacts = bt->SliceToNeutrinoInteractions(allslice, allhits);
355 
356  if( iacts.empty() ){
357  std::cout<<"no matching between slice and nu interactions!"<<std::endl;
358  return;
359  }
360  art::Ptr<simb::MCTruth>& truth = iacts[0].neutrinoInt;
362  pv.push_back(truth);
364  std::vector< art::Ptr<simb::MCFlux> > fluxs = fmf.at(0);
366  if(fluxs.size() == 1){
367  flux = *fluxs[0];
368  }
369  else{
370  std::cout<<"There is no assoicated neutrino intereaction !"<<std::endl;
371  }
372  const simb::MCNeutrino& nu = truth->GetNeutrino();
373  if( flux.fntype==12 && nu.Nu().PdgCode()==12 && nu.CCNC()==0 ) matchSlice=true;
374  }
375  if( matchSlice ) hasSlice=1;
376  else hasSlice=0;
377 
378  slEff_Etrue->Fill(nu.Nu().E(),matchSlice?1:0);
379 
380  _otree->Fill();
381 
382  return;
383  }//end analyze
double E(const int i=0) const
Definition: MCParticle.h:232
std::string fCellHitLabel
label for generator information
Definition: Xbeam_module.cc:93
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
double QSqr() const
Definition: MCNeutrino.h:157
double Theta() const
angle between incoming and outgoing leptons, in radians
Definition: MCNeutrino.cxx:63
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:76
double Py(const int i=0) const
Definition: MCParticle.h:230
float nu_trueE
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...
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
double Pt() const
transverse momentum of interaction, in GeV/c
Definition: MCNeutrino.cxx:74
double Px(const int i=0) const
Definition: MCParticle.h:229
std::string fMCFluxLabel
label for slices
Definition: Xbeam_module.cc:92
int HitNuc() const
Definition: MCNeutrino.h:152
A collection of associated CellHits.
Definition: Cluster.h:47
std::string fSliceLabel
Definition: Xbeam_module.cc:91
charged current quasi-elastic
Definition: MCNeutrino.h:96
int nu_orig_parentPDG
float nu_trueTheta
Loaders::FluxType flux
float meson_Py
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 X() const
Definition: MCNeutrino.h:155
float nu_OscWt
float meson_Pz
OStream cout
Definition: OStream.cxx:6
double Vx(const int i=0) const
Definition: MCParticle.h:220
TTree * _otree
Definition: Xbeam_module.cc:97
TProfile * slEff_Etrue
label for cell hits
Definition: Xbeam_module.cc:95
int fntype
Definition: MCFlux.h:51
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
float meson_Px
void geom(int which=0)
Definition: geom.C:163
double Pz(const int i=0) const
Definition: MCParticle.h:231
float nu_truePt
double Vz(const int i=0) const
Definition: MCParticle.h:222
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
Event generator information.
Definition: MCNeutrino.h:18
int Mode() const
Definition: MCNeutrino.h:149
double Vy(const int i=0) const
Definition: MCParticle.h:221
void ncs::Xbeam::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 160 of file Xbeam_module.cc.

References _otree, fTotalPOT, fTotalSpill, hasSlice, lep_E, lep_PDG, lep_Px, lep_Py, lep_Pz, art::TFileDirectory::make(), meson_PDG, meson_Px, meson_Py, meson_Pz, Nslices, nu_ccnc, nu_HadW, nu_HadX, nu_HadY, nu_hitNucl, nu_intType, nu_isQE, nu_mode, nu_orig_parentPDG, nu_origPDG, nu_OscWt, nu_PDG, nu_qsqr, nu_trueE, nu_truePt, nu_trueTheta, nu_Vx, nu_Vy, nu_Vz, and slEff_Etrue.

161  {
163 
164  fTotalPOT=0.;
165  fTotalSpill=0;
166 
167  //histo
168  slEff_Etrue=tfs->make<TProfile>("slEff_Etrue","",20,0.,10.,0,1.2);
169 
170  //personal tuples
171  _otree = tfs->make<TTree>("Xbeam","Xbeam particle");
172 
173  _otree->Branch("nu_Vx",&nu_Vx,"nu_Vx/F");
174  _otree->Branch("nu_Vy",&nu_Vy,"nu_Vy/F");
175  _otree->Branch("nu_Vz",&nu_Vz,"nu_Vz/F");
176  _otree->Branch("nu_truePt",&nu_truePt,"nu_truePt/F");
177  _otree->Branch("nu_trueE",&nu_trueE,"nu_trueE/F");
178  _otree->Branch("nu_trueTheta",&nu_trueTheta,"nu_trueTheta/F");
179  _otree->Branch("nu_ccnc",&nu_ccnc,"nu_ccnc/I");
180  _otree->Branch("nu_PDG",&nu_PDG,"nu_PDG/I");
181  _otree->Branch("nu_orig_parentPDG",&nu_orig_parentPDG,"nu_orig_parentPDG/I");
182  _otree->Branch("nu_origPDG",&nu_origPDG,"nu_origPDG/I");
183  _otree->Branch("nu_mode",&nu_mode,"nu_mode/I");
184  _otree->Branch("nu_isQE",&nu_isQE,"nu_isQE/B");
185  _otree->Branch("nu_intType",&nu_intType,"nu_intType/I");
186  _otree->Branch("nu_hitNucl",&nu_hitNucl,"nu_hitNucl/I");
187  _otree->Branch("nu_HadX",&nu_HadX,"nu_HadX/F");
188  _otree->Branch("nu_HadY",&nu_HadY,"nu_HadY/F");
189  _otree->Branch("nu_HadW",&nu_HadW,"nu_HadW/F");
190  _otree->Branch("nu_qsqr",&nu_qsqr,"nu_qsqr/F");
191  _otree->Branch("nu_OscWt",&nu_OscWt,"nu_OscWt/F");
192  _otree->Branch("meson_PDG",&meson_PDG,"meson_PDG/I");
193  _otree->Branch("meson_Px",&meson_Px,"meson_Px/F");
194  _otree->Branch("meson_Py",&meson_Py,"meson_Py/F");
195  _otree->Branch("meson_Pz",&meson_Pz,"meson_Pz/F");
196  _otree->Branch("lep_PDG",&lep_PDG,"lep_PDG/I");
197  _otree->Branch("lep_Px",&lep_Px,"lep_Px/F");
198  _otree->Branch("lep_Py",&lep_Py,"lep_Py/F");
199  _otree->Branch("lep_Pz",&lep_Pz,"lep_Pz/F");
200  _otree->Branch("lep_E",&lep_E,"lep_E/F");
201 
202  _otree->Branch("hasSlice",&hasSlice,"hasSlice/I");
203  _otree->Branch("Nslices",&Nslices,"Nslices/I");
204 
205  }
float nu_trueE
int nu_orig_parentPDG
float nu_trueTheta
float meson_Py
float nu_OscWt
float meson_Pz
T * make(ARGS...args) const
TTree * _otree
Definition: Xbeam_module.cc:97
TProfile * slEff_Etrue
label for cell hits
Definition: Xbeam_module.cc:95
float meson_Px
float nu_truePt
double fTotalPOT
Definition: Xbeam_module.cc:82
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::Xbeam::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 385 of file Xbeam_module.cc.

References ncs::DEFINE_ART_MODULE().

386  {
387  }
void ncs::Xbeam::endSubRun ( const art::SubRun sr)

Definition at line 208 of file Xbeam_module.cc.

References om::cout, allTimeWatchdog::endl, art::Handle< T >::failedToGet(), fMCFluxLabel, fTotalPOT, fTotalSpill, art::DataViewImpl::getByLabel(), sumdata::POTSum::goodspills, pot, art::SubRun::subRun(), and sumdata::POTSum::totgoodpot.

209  {
211  sr.getByLabel(fMCFluxLabel, pot);
212 
213 
214  if( !pot.failedToGet() ){
215  fTotalPOT += pot->totgoodpot;
216  fTotalSpill += pot->goodspills;
217 
218  std::cout << "POT in subrun " << sr.subRun()
219  << " = " << pot->totgoodpot <<" with "<<fTotalSpill<<" spills"<< std::endl;
220  }
221  }
SubRunNumber_t subRun() const
Definition: SubRun.h:44
std::string fMCFluxLabel
label for slices
Definition: Xbeam_module.cc:92
#define pot
OStream cout
Definition: OStream.cxx:6
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
int goodspills
Definition: POTSum.h:31
double fTotalPOT
Definition: Xbeam_module.cc:82
double totgoodpot
normalized by 10^12 POT
Definition: POTSum.h:28
bool failedToGet() const
Definition: Handle.h:196
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::Xbeam::MakeRecoHit ( art::Ptr< rb::CellHit > const &  chit,
double const &  w 
)
private

Definition at line 224 of file Xbeam_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::Xbeam::reconfigure ( const fhicl::ParameterSet p)

Definition at line 152 of file Xbeam_module.cc.

References fCellHitLabel, fMCFluxLabel, fSliceLabel, fhicl::ParameterSet::get(), and string.

Referenced by Xbeam().

153  {
154  fSliceLabel = pset.get< std::string >("SliceLabel");
155  fMCFluxLabel = pset.get< std::string >("MCFluxLabel");
156  fCellHitLabel = pset.get< std::string >("CellHitLabel");
157  }
std::string fCellHitLabel
label for generator information
Definition: Xbeam_module.cc:93
std::string fMCFluxLabel
label for slices
Definition: Xbeam_module.cc:92
std::string fSliceLabel
Definition: Xbeam_module.cc:91
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::Xbeam::_otree
private

Definition at line 97 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

std::string ncs::Xbeam::fCellHitLabel
private

label for generator information

Definition at line 93 of file Xbeam_module.cc.

Referenced by analyze(), and reconfigure().

std::string ncs::Xbeam::fMCFluxLabel
private

label for slices

Definition at line 92 of file Xbeam_module.cc.

Referenced by analyze(), endSubRun(), and reconfigure().

std::string ncs::Xbeam::fSliceLabel
private

Definition at line 91 of file Xbeam_module.cc.

Referenced by analyze(), and reconfigure().

double ncs::Xbeam::fTotalPOT

Definition at line 82 of file Xbeam_module.cc.

Referenced by beginJob(), and endSubRun().

int ncs::Xbeam::fTotalSpill

Definition at line 83 of file Xbeam_module.cc.

Referenced by beginJob(), and endSubRun().

int ncs::Xbeam::hasSlice
private

Definition at line 131 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::lep_E
private

Definition at line 127 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::lep_PDG
private

Definition at line 123 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::lep_Px
private

Definition at line 124 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::lep_Py
private

Definition at line 125 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::lep_Pz
private

Definition at line 126 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::meson_PDG
private

Definition at line 119 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::meson_Px
private

Definition at line 120 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::meson_Py
private

Definition at line 121 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::meson_Pz
private

Definition at line 122 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::Nslices
private

Definition at line 130 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_ccnc
private

Definition at line 106 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_HadW
private

Definition at line 116 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_HadX
private

Definition at line 114 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_HadY
private

Definition at line 115 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_hitNucl
private

Definition at line 113 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_intType
private

Definition at line 112 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

bool ncs::Xbeam::nu_isQE
private

Definition at line 111 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_mode
private

Definition at line 110 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_orig_parentPDG
private

Definition at line 109 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_origPDG
private

Definition at line 108 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_OscWt
private

Definition at line 118 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

int ncs::Xbeam::nu_PDG
private

Definition at line 107 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_qsqr
private

Definition at line 117 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_trueE
private

Definition at line 104 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_truePt
private

Definition at line 103 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_trueTheta
private

Definition at line 105 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_Vx
private

Definition at line 100 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_Vy
private

Definition at line 101 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

float ncs::Xbeam::nu_Vz
private

Definition at line 102 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().

TProfile* ncs::Xbeam::slEff_Etrue
private

label for cell hits

Definition at line 95 of file Xbeam_module.cc.

Referenced by analyze(), and beginJob().


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