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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 BPFEnergyAna (fhicl::ParameterSet const &pset)
 
 ~BPFEnergyAna ()
 
void analyze (const art::Event &evt)
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob ()
 
void resetVars ()
 
void setTruthVars (const std::vector< cheat::NeutrinoEffPur > &nuEP)
 
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

const art::ProductToken< std::vector< rb::Cluster > > fSlicerToken
 
std::string fEnergyLabel
 label for module that made the energy objects More...
 
bool fIsMC
 are you running over MC? More...
 
TTree * fBPFEnergyTree
 TTree with slice level info (for energy estimator training) More...
 
float fEreco1
 first reconstructed event energy More...
 
float fEres1
 first estimated event energy resolution More...
 
float fEreco2
 second reconstructed event energy More...
 
float fEres2
 second estimated event energy resolution More...
 
float fEreco3
 third reconstructed event energy More...
 
float fEres3
 third estimated event energy resolution More...
 
float fPmu
 reconstructed muon momentum from the track selected to be the muon More...
 
float fDirZmu
 track.dirZ() from the track selected to be the muon More...
 
float fN3Dprongs
 number of fuzzyk 3D prongs More...
 
float fE3Dprongs
 sum of hit energies in 3D prongs (excluding the "muon" prong) - this does NOT account for dead material More...
 
float fEremain
 sum of remaining slice energy not in 3D prongs - this does NOT account for dead material More...
 
float fSumPE
 sum of PE from all hits not on the muon track More...
 
float fEventID
 best BPF muon PID value for the event More...
 
float fE
 true energy More...
 
float fMinX
 minimum hit X value in the slice More...
 
float fMinY
 minimum hit Y value in the slice More...
 
float fMinZ
 minimum hit Z value in the slice More...
 
float fMaxX
 maximum hit X value in the slice More...
 
float fMaxY
 maximum hit Y value in the slice More...
 
float fMaxZ
 maximum hit Z value in the slice More...
 
int fNHitX
 number of X-view hits in the slice More...
 
int fNHitY
 number of Y-view hits in the slice More...
 
int fCCNC
 is this CC or NC (from truth) More...
 
int fIntType
 neutrino interaction type (from truth) More...
 
int fnuPDG
 PDG code for the best matched nu (from truth) More...
 

Detailed Description

Definition at line 46 of file BPFEnergyAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

bpfit::BPFEnergyAna::BPFEnergyAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 107 of file BPFEnergyAna_module.cc.

References reconfigure().

108  : EDAnalyzer(pset),
109  fSlicerToken(consumes<std::vector<rb::Cluster>>(pset.get<std::string>("SlicerLabel")))
110  {
111  this->reconfigure(pset);
112  }
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
void reconfigure(const fhicl::ParameterSet &pset)
const art::ProductToken< std::vector< rb::Cluster > > fSlicerToken
ProductToken< T > consumes(InputTag const &)
enum BeamMode string
bpfit::BPFEnergyAna::~BPFEnergyAna ( )

Definition at line 115 of file BPFEnergyAna_module.cc.

116  {
117  //======================================================================
118  // Clean up any memory allocated by your module... ...if you dare...
119  //======================================================================
120  }

Member Function Documentation

void bpfit::BPFEnergyAna::analyze ( const art::Event evt)

Definition at line 230 of file BPFEnergyAna_module.cc.

References DEFINE_ART_MODULE(), fBPFEnergyTree, fDirZmu, fE3Dprongs, fEnergyLabel, fEreco1, fEreco2, fEreco3, fEremain, fEres1, fEres2, fEres3, fEventID, fIsMC, fMaxX, fMaxY, fMaxZ, fMinX, fMinY, fMinZ, fN3Dprongs, fNHitX, fNHitY, fPmu, fSlicerToken, fSumPE, art::DataViewImpl::getByToken(), MECModelEnuComparisons::i, art::PtrVector< T >::push_back(), resetVars(), setTruthVars(), and cheat::BackTracker::SlicesToMCTruthsTable().

231  {
232 
233  // get the slices
235  evt.getByToken(fSlicerToken, slices);
236 
237  // create the FindMany object for getting the energy objects
238  art::FindManyP<bpfit::BPFEnergy> energyFMP(slices, evt, fEnergyLabel);
239 
240  // Make the required service handles...
242 
243  // Put the slices into a PtrVector and get the list neutrinos matched
244  // to each slice from backtracker.
245  art::PtrVector<rb::Cluster> ARTslices;
246  for(unsigned int i = 0; i < slices->size(); ++i) {
247  ARTslices.push_back(art::Ptr<rb::Cluster>(slices,i));
248  }
249  std::vector< std::vector< cheat::NeutrinoEffPur > > ALLnuEffPur;
250  if(fIsMC) {
251  ALLnuEffPur = BT->SlicesToMCTruthsTable(ARTslices);
252  }
253 
254 
255  // loop over all slices and get the fuzzyk 3D prongs
256  for(unsigned int islice = 0; islice < slices->size(); ++islice) {
257 
258  // As usual, skip the noise slice...
259  if((*slices)[islice].IsNoise()) continue;
260 
261  // NOTE: Currently, the fundamental object of analysis is the slice.
262  // If in the future we change things so that the fundamental object
263  // of analysis becomes the vertex, then we will have to get prongs
264  // associated with the vertex instead.
265 
266  // Reset all TTree variables.
267  this->resetVars();
268 
269  // Set slice level and truth variables for the TTrees.
270  fMinX = (*slices)[islice].MinX();
271  fMinY = (*slices)[islice].MinY();
272  fMinZ = (*slices)[islice].MinZ();
273  fMaxX = (*slices)[islice].MaxX();
274  fMaxY = (*slices)[islice].MaxY();
275  fMaxZ = (*slices)[islice].MaxZ();
276  fNHitX = (*slices)[islice].NXCell();
277  fNHitY = (*slices)[islice].NYCell();
278  if(fIsMC) {
279  this->setTruthVars(ALLnuEffPur[islice]);
280  }
281 
282  // get the energy object associated with this slice
283  std::vector< art::Ptr< bpfit::BPFEnergy > > energies;
284  if(energyFMP.isValid()) energies = energyFMP.at(islice);
285 
286  // There can be only one!!!
287  // Something went wrong if there is more than one energy object
288  // per slice.
289  if(energies.size() != 1) continue;
290 
291  // Set remaining branch values and fill the TTree.
292  fEreco1 = energies[0]->E1();
293  fEres1 = energies[0]->Eres1();
294  fEreco2 = energies[0]->E2();
295  fEres2 = energies[0]->Eres2();
296  fEreco3 = energies[0]->E3();
297  fEres3 = energies[0]->Eres3();
298  fPmu = energies[0]->PMuon();
299  fDirZmu = energies[0]->DirZMuon();
300  fN3Dprongs = energies[0]->N3DProngs();
301  fE3Dprongs = energies[0]->EFuzzyK3D();
302  fEremain = energies[0]->ERemain();
303  fSumPE = energies[0]->SumPE();
304  fEventID = energies[0]->EventID();
305 
306  fBPFEnergyTree->Fill();
307 
308  } // end loop over slices (islice)
309 
310  return;
311 
312  }
float fEreco2
second reconstructed event energy
float fMaxY
maximum hit Y value in the slice
float fE3Dprongs
sum of hit energies in 3D prongs (excluding the "muon" prong) - this does NOT account for dead materi...
float fN3Dprongs
number of fuzzyk 3D prongs
int fNHitX
number of X-view hits in the slice
float fEres3
third estimated event energy resolution
float fEreco3
third reconstructed event energy
float fEremain
sum of remaining slice energy not in 3D prongs - this does NOT account for dead material ...
float fEventID
best BPF muon PID value for the event
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...
std::string fEnergyLabel
label for module that made the energy objects
float fEres2
second estimated event energy resolution
bool fIsMC
are you running over MC?
float fSumPE
sum of PE from all hits not on the muon track
void setTruthVars(const std::vector< cheat::NeutrinoEffPur > &nuEP)
float fPmu
reconstructed muon momentum from the track selected to be the muon
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
float fMaxX
maximum hit X value in the slice
float fEres1
first estimated event energy resolution
float fMinX
minimum hit X value in the slice
float fMaxZ
maximum hit Z value in the slice
float fDirZmu
track.dirZ() from the track selected to be the muon
float fMinY
minimum hit Y value in the slice
float fEreco1
first reconstructed event energy
float fMinZ
minimum hit Z value in the slice
const art::ProductToken< std::vector< rb::Cluster > > fSlicerToken
TTree * fBPFEnergyTree
TTree with slice level info (for energy estimator training)
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
Definition: DataViewImpl.h:387
int fNHitY
number of Y-view hits in the slice
void bpfit::BPFEnergyAna::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 130 of file BPFEnergyAna_module.cc.

References fBPFEnergyTree, fCCNC, fDirZmu, fE, fE3Dprongs, fEreco1, fEreco2, fEreco3, fEremain, fEres1, fEres2, fEres3, fEventID, fIntType, fMaxX, fMaxY, fMaxZ, fMinX, fMinY, fMinZ, fN3Dprongs, fNHitX, fNHitY, fnuPDG, fPmu, fSumPE, and art::TFileDirectory::make().

131  {
133 
134  //
135  // Book the Energy TTree
136  //
137  fBPFEnergyTree = tfs->make<TTree>("BPFEnergyTree","Tree containing BPFEnergy object info");
138 
139  // attach the variables:
140  fBPFEnergyTree->Branch("Ereco1",&fEreco1,"Ereco1/F");
141  fBPFEnergyTree->Branch("Eres1",&fEres1,"Eres1/F");
142  fBPFEnergyTree->Branch("Ereco2",&fEreco2,"Ereco2/F");
143  fBPFEnergyTree->Branch("Eres2",&fEres2,"Eres2/F");
144  fBPFEnergyTree->Branch("Ereco3",&fEreco3,"Ereco3/F");
145  fBPFEnergyTree->Branch("Eres3",&fEres3,"Eres3/F");
146  fBPFEnergyTree->Branch("Pmu",&fPmu,"Pmu/F");
147  fBPFEnergyTree->Branch("DirZmu",&fDirZmu,"DirZmu/F");
148  fBPFEnergyTree->Branch("N3Dprongs",&fN3Dprongs,"N3Dprongs/F");
149  fBPFEnergyTree->Branch("E3Dprongs",&fE3Dprongs,"E3Dprongs/F");
150  fBPFEnergyTree->Branch("Eremain",&fEremain,"Eremain/F");
151  fBPFEnergyTree->Branch("SumPE",&fSumPE,"SumPE/F");
152  fBPFEnergyTree->Branch("EventID",&fEventID,"EventID/F");
153 
154  fBPFEnergyTree->Branch("E",&fE,"E/F");
155  fBPFEnergyTree->Branch("MinX",&fMinX,"MinX/F");
156  fBPFEnergyTree->Branch("MinY",&fMinY,"MinY/F");
157  fBPFEnergyTree->Branch("MinZ",&fMinZ,"MinZ/F");
158  fBPFEnergyTree->Branch("MaxX",&fMaxX,"MaxX/F");
159  fBPFEnergyTree->Branch("MaxY",&fMaxY,"MaxY/F");
160  fBPFEnergyTree->Branch("MaxZ",&fMaxZ,"MaxZ/F");
161  fBPFEnergyTree->Branch("NHitX",&fNHitX,"NHitX/I");
162  fBPFEnergyTree->Branch("NHitY",&fNHitY,"NHitY/I");
163  fBPFEnergyTree->Branch("CCNC",&fCCNC,"CCNC/I");
164  fBPFEnergyTree->Branch("IntType",&fIntType,"IntType/I");
165  fBPFEnergyTree->Branch("nuPDG",&fnuPDG,"nuPDG/I");
166 
167  }
float fEreco2
second reconstructed event energy
float fMaxY
maximum hit Y value in the slice
float fE3Dprongs
sum of hit energies in 3D prongs (excluding the "muon" prong) - this does NOT account for dead materi...
int fCCNC
is this CC or NC (from truth)
float fN3Dprongs
number of fuzzyk 3D prongs
int fNHitX
number of X-view hits in the slice
float fEres3
third estimated event energy resolution
float fEreco3
third reconstructed event energy
float fEremain
sum of remaining slice energy not in 3D prongs - this does NOT account for dead material ...
float fEventID
best BPF muon PID value for the event
float fEres2
second estimated event energy resolution
float fE
true energy
float fSumPE
sum of PE from all hits not on the muon track
float fPmu
reconstructed muon momentum from the track selected to be the muon
float fMaxX
maximum hit X value in the slice
float fEres1
first estimated event energy resolution
float fMinX
minimum hit X value in the slice
int fIntType
neutrino interaction type (from truth)
float fMaxZ
maximum hit Z value in the slice
float fDirZmu
track.dirZ() from the track selected to be the muon
float fMinY
minimum hit Y value in the slice
float fEreco1
first reconstructed event energy
T * make(ARGS...args) const
float fMinZ
minimum hit Z value in the slice
int fnuPDG
PDG code for the best matched nu (from truth)
TTree * fBPFEnergyTree
TTree with slice level info (for energy estimator training)
int fNHitY
number of Y-view hits in the slice
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
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 bpfit::BPFEnergyAna::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 123 of file BPFEnergyAna_module.cc.

References fEnergyLabel, fIsMC, fhicl::ParameterSet::get(), and string.

Referenced by BPFEnergyAna().

124  {
125  fEnergyLabel = pset.get<std::string>("EnergyLabel");
126  fIsMC = pset.get<bool> ("IsMC");
127  }
std::string fEnergyLabel
label for module that made the energy objects
bool fIsMC
are you running over MC?
T get(std::string const &key) const
Definition: ParameterSet.h:231
enum BeamMode string
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
void bpfit::BPFEnergyAna::resetVars ( )

Definition at line 170 of file BPFEnergyAna_module.cc.

References fCCNC, fDirZmu, fE, fE3Dprongs, fEreco1, fEreco2, fEreco3, fEremain, fEres1, fEres2, fEres3, fEventID, fIntType, fMaxX, fMaxY, fMaxZ, fMinX, fMinY, fMinZ, fN3Dprongs, fNHitX, fNHitY, fnuPDG, fPmu, and fSumPE.

Referenced by analyze().

171  {
172  fEreco1 = -5.0;
173  fEres1 = -5.0;
174  fEreco2 = -5.0;
175  fEres2 = -5.0;
176  fEreco3 = -5.0;
177  fEres3 = -5.0;
178  fPmu = -5.0;
179  fDirZmu = -5.0;
180  fN3Dprongs = -5.0;
181  fE3Dprongs = -5.0;
182  fEremain = -5.0;
183  fSumPE = -5.0;
184  fEventID = -5.0;
185 
186  fE = -5.0;
187  fMinX = 1.0e9;
188  fMinY = 1.0e9;
189  fMinZ = 1.0e9;
190  fMaxX = -1.0e9;
191  fMaxY = -1.0e9;
192  fMaxZ = -1.0e9;
193  fNHitX = -5;
194  fNHitY = -5;
195  fCCNC = -5;
196  fIntType = -5;
197  fnuPDG = 0;
198  }
float fEreco2
second reconstructed event energy
float fMaxY
maximum hit Y value in the slice
float fE3Dprongs
sum of hit energies in 3D prongs (excluding the "muon" prong) - this does NOT account for dead materi...
int fCCNC
is this CC or NC (from truth)
float fN3Dprongs
number of fuzzyk 3D prongs
int fNHitX
number of X-view hits in the slice
float fEres3
third estimated event energy resolution
float fEreco3
third reconstructed event energy
float fEremain
sum of remaining slice energy not in 3D prongs - this does NOT account for dead material ...
float fEventID
best BPF muon PID value for the event
float fEres2
second estimated event energy resolution
float fE
true energy
float fSumPE
sum of PE from all hits not on the muon track
float fPmu
reconstructed muon momentum from the track selected to be the muon
float fMaxX
maximum hit X value in the slice
float fEres1
first estimated event energy resolution
float fMinX
minimum hit X value in the slice
int fIntType
neutrino interaction type (from truth)
float fMaxZ
maximum hit Z value in the slice
float fDirZmu
track.dirZ() from the track selected to be the muon
float fMinY
minimum hit Y value in the slice
float fEreco1
first reconstructed event energy
float fMinZ
minimum hit Z value in the slice
int fnuPDG
PDG code for the best matched nu (from truth)
int fNHitY
number of Y-view hits in the slice
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 bpfit::BPFEnergyAna::setTruthVars ( const std::vector< cheat::NeutrinoEffPur > &  nuEP)

Definition at line 201 of file BPFEnergyAna_module.cc.

References simb::MCNeutrino::CCNC(), simb::MCParticle::E(), fCCNC, fE, fIntType, fnuPDG, MECModelEnuComparisons::i, simb::MCNeutrino::InteractionType(), cafExposure::match, simb::MCNeutrino::Nu(), simb::MCParticle::PdgCode(), and plotConfusion::purity().

Referenced by analyze().

202  {
203  //
204  // This function sets any variables for the TTree that come from truth.
205  // Currently, the most pure neutrino is assumed to be the best
206  // match.
207  //
208 
209  float mostPure = 0.0;
210  unsigned int match = 0;
211  for(unsigned int i = 0; i < nuEP.size(); ++i) {
212  if(nuEP[i].purity > mostPure && nuEP[i].neutrinoInt->NeutrinoSet()) {
213  mostPure = nuEP[i].purity;
214  match = i;
215  }
216  }
217 
218  if(mostPure > 0 && nuEP[match].neutrinoInt->NeutrinoSet()) {
219  simb::MCNeutrino nu = nuEP[match].neutrinoInt->GetNeutrino();
220  simb::MCParticle Nu = nu.Nu();
221  fE = Nu.E();
222  fCCNC = nu.CCNC();
223  fIntType = nu.InteractionType();
224  fnuPDG = Nu.PdgCode();
225  }
226 
227  }
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
int fCCNC
is this CC or NC (from truth)
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
float fE
true energy
int InteractionType() const
Definition: MCNeutrino.h:150
int fIntType
neutrino interaction type (from truth)
int fnuPDG
PDG code for the best matched nu (from truth)
Event generator information.
Definition: MCNeutrino.h:18
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* bpfit::BPFEnergyAna::fBPFEnergyTree
private

TTree with slice level info (for energy estimator training)

Definition at line 62 of file BPFEnergyAna_module.cc.

Referenced by analyze(), and beginJob().

int bpfit::BPFEnergyAna::fCCNC
private

is this CC or NC (from truth)

Definition at line 95 of file BPFEnergyAna_module.cc.

Referenced by beginJob(), resetVars(), and setTruthVars().

float bpfit::BPFEnergyAna::fDirZmu
private

track.dirZ() from the track selected to be the muon

Definition at line 78 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fE
private

true energy

Definition at line 86 of file BPFEnergyAna_module.cc.

Referenced by beginJob(), resetVars(), and setTruthVars().

float bpfit::BPFEnergyAna::fE3Dprongs
private

sum of hit energies in 3D prongs (excluding the "muon" prong) - this does NOT account for dead material

Definition at line 80 of file BPFEnergyAna_module.cc.

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

std::string bpfit::BPFEnergyAna::fEnergyLabel
private

label for module that made the energy objects

Definition at line 59 of file BPFEnergyAna_module.cc.

Referenced by analyze(), and reconfigure().

float bpfit::BPFEnergyAna::fEreco1
private

first reconstructed event energy

Definition at line 71 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEreco2
private

second reconstructed event energy

Definition at line 73 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEreco3
private

third reconstructed event energy

Definition at line 75 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEremain
private

sum of remaining slice energy not in 3D prongs - this does NOT account for dead material

Definition at line 81 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEres1
private

first estimated event energy resolution

Definition at line 72 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEres2
private

second estimated event energy resolution

Definition at line 74 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEres3
private

third estimated event energy resolution

Definition at line 76 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fEventID
private

best BPF muon PID value for the event

Definition at line 83 of file BPFEnergyAna_module.cc.

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

int bpfit::BPFEnergyAna::fIntType
private

neutrino interaction type (from truth)

Definition at line 96 of file BPFEnergyAna_module.cc.

Referenced by beginJob(), resetVars(), and setTruthVars().

bool bpfit::BPFEnergyAna::fIsMC
private

are you running over MC?

Definition at line 60 of file BPFEnergyAna_module.cc.

Referenced by analyze(), and reconfigure().

float bpfit::BPFEnergyAna::fMaxX
private

maximum hit X value in the slice

Definition at line 90 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fMaxY
private

maximum hit Y value in the slice

Definition at line 91 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fMaxZ
private

maximum hit Z value in the slice

Definition at line 92 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fMinX
private

minimum hit X value in the slice

Definition at line 87 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fMinY
private

minimum hit Y value in the slice

Definition at line 88 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fMinZ
private

minimum hit Z value in the slice

Definition at line 89 of file BPFEnergyAna_module.cc.

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

float bpfit::BPFEnergyAna::fN3Dprongs
private

number of fuzzyk 3D prongs

Definition at line 79 of file BPFEnergyAna_module.cc.

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

int bpfit::BPFEnergyAna::fNHitX
private

number of X-view hits in the slice

Definition at line 93 of file BPFEnergyAna_module.cc.

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

int bpfit::BPFEnergyAna::fNHitY
private

number of Y-view hits in the slice

Definition at line 94 of file BPFEnergyAna_module.cc.

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

int bpfit::BPFEnergyAna::fnuPDG
private

PDG code for the best matched nu (from truth)

Definition at line 97 of file BPFEnergyAna_module.cc.

Referenced by beginJob(), resetVars(), and setTruthVars().

float bpfit::BPFEnergyAna::fPmu
private

reconstructed muon momentum from the track selected to be the muon

Definition at line 77 of file BPFEnergyAna_module.cc.

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

const art::ProductToken<std::vector<rb::Cluster> > bpfit::BPFEnergyAna::fSlicerToken
private

Definition at line 58 of file BPFEnergyAna_module.cc.

Referenced by analyze().

float bpfit::BPFEnergyAna::fSumPE
private

sum of PE from all hits not on the muon track

Definition at line 82 of file BPFEnergyAna_module.cc.

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


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