All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
ana::SBNOsc::CaloPrinter Class Reference

Electron neutrino event selection. More...

Inheritance diagram for ana::SBNOsc::CaloPrinter:
core::SelectionBase core::ProcessorBase

Public Member Functions

 CaloPrinter ()
 
void Initialize (fhicl::ParameterSet *config=NULL)
 
void Finalize ()
 
bool ProcessEvent (const gallery::Event &ev, const std::vector< event::Interaction > &truth, std::vector< event::RecoInteraction > &reco)
 
- Public Member Functions inherited from core::SelectionBase
 SelectionBase ()
 
virtual ~SelectionBase ()
 
- Public Member Functions inherited from core::ProcessorBase
 ProcessorBase ()
 
virtual ~ProcessorBase ()
 
virtual void FillTree ()
 
virtual void FillRecoTree ()
 
virtual void EventCleanup ()
 
template<class T >
TBranch * AddBranch (std::string name, T *obj)
 
template<class T >
TBranch * AddRecoBranch (std::string name, T *obj)
 

Protected Attributes

std::string fTag
 
TH1D * z
 
unsigned event_ind
 
- Protected Attributes inherited from core::ProcessorBase
unsigned long fEventIndex
 An incrementing index. More...
 
Experiment fExperimentID
 Experiment identifier. More...
 
ProviderManagerfProviderManager
 Interface for provider access. More...
 
std::string fOutputFilename
 The output filename. More...
 
std::string fProviderConfig
 A custom provider config fcl file. More...
 
std::vector< geo::BoxBoundedGeofActiveVolumes
 List of active volumes in configured detector. More...
 
bool fWriteTree
 Enable writing of the main tree. More...
 
TFile * fOutputFile
 The output ROOT file. More...
 
TTree * fTree
 The output ROOT tree. More...
 
event::EventfEvent
 The standard output event data structure. More...
 
bool fWriteRecoTree
 Enable writing of the reco tree. More...
 
TTree * fRecoTree
 The output reco ROOT tree. More...
 
event::RecoEventfRecoEvent
 The standard output reco event data structure. More...
 
TTree * fSubRunTree
 Subrun output tree. More...
 
SubRunfSubRun
 Standard output subrun structure. More...
 
TTree * fFileMetaTree
 File metadata output tree. More...
 
FileMetafFileMeta
 standard output file metadata structure More...
 
TParameter< int > * fExperimentParameter
 Saves value of experiment enum. More...
 
std::set< std::pair< int, int > > fSubRunCache
 Cache stored subruns. More...
 
art::InputTag fTruthTag
 art tag for MCTruth information More...
 
art::InputTag fFluxTag
 art tag for MCFlux information More...
 
std::vector< art::InputTag > fWeightTags
 art tag(s) for MCEventWeight information More...
 
art::InputTag fMCTrackTag
 art tag for MCTrack More...
 
art::InputTag fMCShowerTag
 art tag for MCShower More...
 
art::InputTag fMCParticleTag
 art tag for MCParticle More...
 
std::string fGeneratorProcess
 process_name of process used to run genie. Used to extract subrun/POT information More...
 

Additional Inherited Members

- Public Attributes inherited from core::ProcessorBase
std::vector
< event::RecoInteraction > * 
fReco
 Reco interaction list. More...
 
- Protected Member Functions inherited from core::ProcessorBase
virtual void Initialize (char *config=NULL)
 
virtual void Setup (char *config=NULL)
 
virtual void Setup (fhicl::ParameterSet *config=NULL)
 
virtual void Teardown ()
 
void BuildEventTree (gallery::Event &ev)
 
void SetupServices (gallery::Event &ev)
 
void UpdateSubRuns (gallery::Event &ev)
 
void UpdateFileMeta (gallery::Event &ev)
 

Detailed Description

Electron neutrino event selection.

Definition at line 31 of file CaloPrinter.cc.

Constructor & Destructor Documentation

ana::SBNOsc::CaloPrinter::CaloPrinter ( )
inline

Constructor.

Definition at line 34 of file CaloPrinter.cc.

34 {}

Member Function Documentation

void ana::SBNOsc::CaloPrinter::Finalize ( )
inlinevirtual

Finalize and write objects to the output file.

Implements core::ProcessorBase.

Definition at line 48 of file CaloPrinter.cc.

48  {
49  fOutputFile->cd();
50  z->Write();
51  }
TFile * fOutputFile
The output ROOT file.
void ana::SBNOsc::CaloPrinter::Initialize ( fhicl::ParameterSet *  config = NULL)
inlinevirtual

Initialization.

Parameters
configA configuration, as a FHiCL ParameterSet object

Implements core::ProcessorBase.

Definition at line 41 of file CaloPrinter.cc.

41  {
42  fTag = config ? config->get<std::string>("Tag", "pandoraCalo") : "pandoraCalo";
43  event_ind = 0;
44  z = new TH1D("calo point z", "calo point z", 1000, -1000, 1000);
45  }
bool ana::SBNOsc::CaloPrinter::ProcessEvent ( const gallery::Event &  ev,
const std::vector< event::Interaction > &  truth,
std::vector< event::RecoInteraction > &  reco 
)
inlinevirtual

Process one event.

Parameters
evA single event, as a gallery::Event
Reconstructedinteractions
Returns
True to keep event

Implements core::ProcessorBase.

Definition at line 60 of file CaloPrinter.cc.

60  {
61  const std::vector<anab::Calorimetry> calos = *ev.getValidHandle<std::vector<anab::Calorimetry>>(fTag);
62  std::cout << "New Event!\n";
63  for (const anab::Calorimetry& calo: calos) {
64  std::cout << "New Calo!\n";
65  for (recob::tracking::Point_t xyz: calo.XYZ()) {
66  std::cout << xyz.X() << " " << xyz.Y() << " " << xyz.Z() << std::endl;
67  if (xyz.Z() < -100.) std::cout << "Low!\n";
68  z->Fill(xyz.Z());
69  }
70  }
71  return false;
72  }
process_name can override from command line with o or output calo
Definition: pid.fcl:40
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
Definition: TrackingTypes.h:26
BEGIN_PROLOG could also be cout

Member Data Documentation

unsigned ana::SBNOsc::CaloPrinter::event_ind
protected

Definition at line 77 of file CaloPrinter.cc.

std::string ana::SBNOsc::CaloPrinter::fTag
protected

Definition at line 75 of file CaloPrinter.cc.

TH1D* ana::SBNOsc::CaloPrinter::z
protected

Definition at line 76 of file CaloPrinter.cc.


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