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 Member Functions | Private Attributes
DTCertificationSummary Class Reference

#include <DTCertificationSummary.h>

Inheritance diagram for DTCertificationSummary:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 DTCertificationSummary (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~DTCertificationSummary ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &setup)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &setup)
 

Private Attributes

std::map< int, MonitorElement * > certFractions
 
MonitorElementcertMap
 
DQMStoretheDbe
 
MonitorElementtotalCertFraction
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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

No description available.

Date:
2010/01/22 15:32:04
Revision:
1.4
Author
G. Cerminara - INFN Torino

Definition at line 20 of file DTCertificationSummary.h.

Constructor & Destructor Documentation

DTCertificationSummary::DTCertificationSummary ( const edm::ParameterSet pset)

Constructor.

Definition at line 27 of file DTCertificationSummary.cc.

27 {}
DTCertificationSummary::~DTCertificationSummary ( )
virtual

Destructor.

Definition at line 32 of file DTCertificationSummary.cc.

32 {}

Member Function Documentation

void DTCertificationSummary::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 135 of file DTCertificationSummary.cc.

135 {}
void DTCertificationSummary::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 36 of file DTCertificationSummary.cc.

References cppFunctionSkipper::operator, and hcal_dqm_sourceclient-file_cfg::streams.

36  {
37  // get the DQMStore
39 
40  // book the ME
41  theDbe->setCurrentFolder("DT/EventInfo");
42  // global fraction
43  totalCertFraction = theDbe->bookFloat("CertificationSummary");
45 
46  // certification map
47  certMap = theDbe->book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
48  certMap->setAxisTitle("sector",1);
49  certMap->setAxisTitle("wheel",2);
50 
51  theDbe->setCurrentFolder("DT/EventInfo/CertificationContents");
52  // Wheel "fractions" -> will be 0 or 1
53  for(int wheel = -2; wheel != 3; ++wheel) {
54  stringstream streams;
55  streams << "DT_Wheel" << wheel;
56  certFractions[wheel] = theDbe->bookFloat(streams.str());
57  certFractions[wheel]->Fill(-1);
58  }
59 
60  //
61 
62 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:659
void Fill(long long x)
MonitorElement * totalCertFraction
std::map< int, MonitorElement * > certFractions
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void DTCertificationSummary::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file DTCertificationSummary.cc.

66  {
67 }
void DTCertificationSummary::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 72 of file DTCertificationSummary.cc.

72  {
73 }
void DTCertificationSummary::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 131 of file DTCertificationSummary.cc.

131 {}
void DTCertificationSummary::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file DTCertificationSummary.cc.

78  {
79 }
void DTCertificationSummary::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 83 of file DTCertificationSummary.cc.

References MonitorElement::getBinContent(), min, pileupDistInMC::total, and histoStyle::weight.

83  {
84  // get the relevant summary histos
85  MonitorElement* effSummary = theDbe->get("DT/05-ChamberEff/EfficiencyGlbSummary");
86  MonitorElement* resSummary = theDbe->get("DT/02-Segments/ResidualsGlbSummary");
87  MonitorElement* segQualSummary = theDbe->get("DT/02-Segments/segmentSummary");
88 
89  // check that all needed histos are there
90  if(effSummary == 0 || resSummary == 0 || segQualSummary == 0) {
91  LogWarning("DQM|DTMonitorClient|DTCertificationSummary") << "*** Warning: not all needed summaries are present!" << endl;
92  return;
93  }
94 
95  // reset the MEs
97  certFractions[-2]->Fill(0.);
98  certFractions[-1]->Fill(0.);
99  certFractions[-0]->Fill(0.);
100  certFractions[1]->Fill(0.);
101  certFractions[2]->Fill(0.);
102  certMap->Reset();
103 
104  // loop over all sectors and wheels
105  for(int wheel = -2; wheel != 3; ++wheel) {
106  for(int sector = 1; sector != 13; ++sector) {
107  double eff = effSummary->getBinContent(sector, wheel+3);
108  double res = resSummary->getBinContent(sector, wheel+3);
109  double segQual = segQualSummary->getBinContent(sector, wheel+3);
110 
111  double total = 0;
112  if(segQual != 0) {
113  total = min(res,eff);
114  } else {
115  total = eff;
116  }
117 
118  certMap->Fill(sector,wheel,total);
119  // can use variable weight depending on the sector
120  double weight = 1./12.;
121  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight*total);
122  double totalWeight = 1./60.;
124  }
125  }
126 
127 }
#define min(a, b)
Definition: mlp_lapack.h:161
void Fill(long long x)
MonitorElement * totalCertFraction
double getFloatValue(void) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
std::map< int, MonitorElement * > certFractions
double getBinContent(int binx) const
get content of bin (1-D)
int weight
Definition: histoStyle.py:50
void Reset(void)
reset ME (ie. contents, errors, etc)

Member Data Documentation

std::map<int, MonitorElement*> DTCertificationSummary::certFractions
private

Definition at line 45 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::certMap
private

Definition at line 44 of file DTCertificationSummary.h.

DQMStore* DTCertificationSummary::theDbe
private

Definition at line 41 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::totalCertFraction
private

Definition at line 43 of file DTCertificationSummary.h.