CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
DQMHcalIsoTrackPostProcessor Class Reference
Inheritance diagram for DQMHcalIsoTrackPostProcessor:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
 DQMHcalIsoTrackPostProcessor (const edm::ParameterSet &pset)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 ~DQMHcalIsoTrackPostProcessor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

std::string outputRootFileName_
 
bool saveToFile_
 
std::string subDir_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 16 of file DQMHcalIsoTrackPostProcessor.cc.

Constructor & Destructor Documentation

DQMHcalIsoTrackPostProcessor::DQMHcalIsoTrackPostProcessor ( const edm::ParameterSet pset)
DQMHcalIsoTrackPostProcessor::~DQMHcalIsoTrackPostProcessor ( )
inline

Definition at line 19 of file DQMHcalIsoTrackPostProcessor.cc.

19 {};

Member Function Documentation

void DQMHcalIsoTrackPostProcessor::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
inlineoverridevirtual

Implements edm::EDAnalyzer.

Definition at line 21 of file DQMHcalIsoTrackPostProcessor.cc.

21 {};
void DQMHcalIsoTrackPostProcessor::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 45 of file DQMHcalIsoTrackPostProcessor.cc.

References DQMStore::book1D(), DQMStore::cd(), gather_cfg::cout, DQMStore::dirExists(), DQMStore::get(), getTH1F(), MonitorElement::getTH1F(), cppFunctionSkipper::operator, outputRootFileName_, DQMStore::pwd(), DQMStore::save(), saveToFile_, and subDir_.

46 {
47 
48  DQMStore* dqm;
49  dqm = 0;
50  dqm = edm::Service<DQMStore>().operator->();
51 
52  if ( ! dqm ) {
53  edm::LogInfo("DQMHcalIsoTrackPostProcessor") << "Cannot create DQMStore instance\n";
54  return;
55  }
56 
57  std::cout<<"endjob"<<std::endl;
58  if(dqm->dirExists(subDir_)) dqm->cd(subDir_);
59  else {
60  edm::LogWarning("DQMHcalIsoTrackPostProcessor") << "cannot find directory: " << subDir_ << " , skipping";
61  return;
62  }
63 
64  MonitorElement* hPurityEta=dqm->book1D("hPurityEta","Purity of sample vs eta",16,-2,2);
65  MonitorElement* hPurityPhi=dqm->book1D("hPurityPhi","Purity of sample vs phi",16,-3.2,3.2);
66 
67  MonitorElement* hSumOffEta=dqm->book1D("hSumOffEta","hSumOffEta",16,-2,2);
68  MonitorElement* hSumOffPhi=dqm->book1D("hSumOffPhi","hSumOffPhi",16,-3.2,3.2);
69 
70  MonitorElement* hSumL3Eta=dqm->book1D("hSumL3Eta","hSumL3Eta",16,-2,2);
71  MonitorElement* hSumL3Phi=dqm->book1D("hSumL3Phi","hSumL3Phi",16,-3.2,3.2);
72 
73  hSumOffEta->getTH1F()->Add(dqm->get(dqm->pwd() + "/hOffEtaFP")->getTH1F(),1);
74  hSumOffPhi->getTH1F()->Add(dqm->get(dqm->pwd() + "/hOffPhiFP")->getTH1F(),1);
75 
76  hSumL3Eta->getTH1F()->Add(dqm->get(dqm->pwd() + "/hl3eta")->getTH1F(),1);
77  hSumL3Phi->getTH1F()->Add(dqm->get(dqm->pwd() + "/hl3phi")->getTH1F(),1);
78 
79 
80  hSumOffEta->getTH1F()->TH1F::Sumw2();
81  hSumOffPhi->getTH1F()->TH1F::Sumw2();
82  hSumL3Eta->getTH1F()->TH1F::Sumw2();
83  hSumL3Phi->getTH1F()->TH1F::Sumw2();
84 
85  hPurityEta->getTH1F()->Divide(hSumOffEta->getTH1F(),hSumL3Eta->getTH1F(),1,1);
86  hPurityPhi->getTH1F()->Divide(hSumOffPhi->getTH1F(),hSumL3Phi->getTH1F(),1,1);
87 
88  if (saveToFile_) dqm->save(outputRootFileName_);
89 }
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
TH1F * getTH1F(void) const
tuple cout
Definition: gather_cfg.py:121
void DQMHcalIsoTrackPostProcessor::endRun ( edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 41 of file DQMHcalIsoTrackPostProcessor.cc.

42 {
43 }

Member Data Documentation

std::string DQMHcalIsoTrackPostProcessor::outputRootFileName_
private

Definition at line 29 of file DQMHcalIsoTrackPostProcessor.cc.

Referenced by DQMHcalIsoTrackPostProcessor(), and endJob().

bool DQMHcalIsoTrackPostProcessor::saveToFile_
private

Definition at line 28 of file DQMHcalIsoTrackPostProcessor.cc.

Referenced by DQMHcalIsoTrackPostProcessor(), and endJob().

std::string DQMHcalIsoTrackPostProcessor::subDir_
private

Definition at line 27 of file DQMHcalIsoTrackPostProcessor.cc.

Referenced by DQMHcalIsoTrackPostProcessor(), and endJob().