All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
pid::PIDAAnalyzer Class Reference
Inheritance diagram for pid::PIDAAnalyzer:

Public Member Functions

 PIDAAnalyzer (fhicl::ParameterSet const &p)
 
 PIDAAnalyzer (PIDAAnalyzer const &)=delete
 
 PIDAAnalyzer (PIDAAnalyzer &&)=delete
 
PIDAAnalyzeroperator= (PIDAAnalyzer const &)=delete
 
PIDAAnalyzeroperator= (PIDAAnalyzer &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob () override
 

Private Attributes

std::string fCaloModuleLabel
 
PIDAAlg fPIDAAlg
 

Detailed Description

Definition at line 28 of file PIDAAnalyzer_module.cc.

Constructor & Destructor Documentation

pid::PIDAAnalyzer::PIDAAnalyzer ( fhicl::ParameterSet const &  p)
explicit

Definition at line 52 of file PIDAAnalyzer_module.cc.

53  :
54  EDAnalyzer(p),
55  fCaloModuleLabel(p.get<std::string>("CaloModuleLabel")),
56  fPIDAAlg(p.get<fhicl::ParameterSet>("PIDAAlg"))
57 {}
pdgs p
Definition: selectors.fcl:22
std::string fCaloModuleLabel
pid::PIDAAnalyzer::PIDAAnalyzer ( PIDAAnalyzer const &  )
delete
pid::PIDAAnalyzer::PIDAAnalyzer ( PIDAAnalyzer &&  )
delete

Member Function Documentation

void pid::PIDAAnalyzer::analyze ( art::Event const &  e)
override

Definition at line 75 of file PIDAAnalyzer_module.cc.

76 {
77  art::Handle< std::vector<anab::Calorimetry> > caloHandle;
78  e.getByLabel(fCaloModuleLabel,caloHandle);
79  std::vector<anab::Calorimetry> const& caloVector(*caloHandle);
80 
81  for(size_t i_calo=0; i_calo<caloVector.size(); i_calo++){
82  fPIDAAlg.FillPIDATree(e.run(),e.event(),i_calo,caloVector[i_calo]);
83  }
84 
85 }
void FillPIDATree(unsigned int, unsigned int, unsigned int, anab::Calorimetry const &)
Definition: PIDAAlg.cxx:176
std::string fCaloModuleLabel
do i e
void pid::PIDAAnalyzer::beginJob ( )
override

Definition at line 59 of file PIDAAnalyzer_module.cc.

59  {
60  art::ServiceHandle<art::TFileService const> tfs;
61 
62  std::vector<TH1F*> kde_hists;
63  for(size_t i_b=0; i_b<fPIDAAlg.getNKDEBandwidths(); i_b++){
64  std::stringstream hname;
65  hname << "hkde_" << i_b;
66  kde_hists.push_back(tfs->make<TH1F>(hname.str().c_str(),"PIDA KDE Distribution",100,0,30));
67  }
68 
69  fPIDAAlg.SetPIDATree(tfs->make<TTree>("pida","PIDAPropertiesTree"),
70  tfs->make<TH1F>("hvals","PIDA Distribution",100,0,30),
71  kde_hists);
72 
73 }
void SetPIDATree(TTree *, TH1F *, std::vector< TH1F * >)
Definition: PIDAAlg.cxx:57
size_t getNKDEBandwidths()
Definition: PIDAAlg.h:62
art::ServiceHandle< art::TFileService > tfs
PIDAAnalyzer& pid::PIDAAnalyzer::operator= ( PIDAAnalyzer const &  )
delete
PIDAAnalyzer& pid::PIDAAnalyzer::operator= ( PIDAAnalyzer &&  )
delete

Member Data Documentation

std::string pid::PIDAAnalyzer::fCaloModuleLabel
private

Definition at line 46 of file PIDAAnalyzer_module.cc.

PIDAAlg pid::PIDAAnalyzer::fPIDAAlg
private

Definition at line 47 of file PIDAAnalyzer_module.cc.


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