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
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 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
 
- 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

No description available.

Author
G. Cerminara - INFN Torino

Definition at line 18 of file DTCertificationSummary.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file DTCertificationSummary.cc.

25 {}
DTCertificationSummary::~DTCertificationSummary ( )
virtual

Destructor.

Definition at line 30 of file DTCertificationSummary.cc.

30 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 133 of file DTCertificationSummary.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 34 of file DTCertificationSummary.cc.

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

34  {
35  // get the DQMStore
37 
38  // book the ME
39  theDbe->setCurrentFolder("DT/EventInfo");
40  // global fraction
41  totalCertFraction = theDbe->bookFloat("CertificationSummary");
43 
44  // certification map
45  certMap = theDbe->book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
46  certMap->setAxisTitle("sector",1);
47  certMap->setAxisTitle("wheel",2);
48 
49  theDbe->setCurrentFolder("DT/EventInfo/CertificationContents");
50  // Wheel "fractions" -> will be 0 or 1
51  for(int wheel = -2; wheel != 3; ++wheel) {
52  stringstream streams;
53  streams << "DT_Wheel" << wheel;
54  certFractions[wheel] = theDbe->bookFloat(streams.str());
55  certFractions[wheel]->Fill(-1);
56  }
57 
58  //
59 
60 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
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:1082
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:667
void DTCertificationSummary::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file DTCertificationSummary.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 70 of file DTCertificationSummary.cc.

70  {
71 }
void DTCertificationSummary::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 129 of file DTCertificationSummary.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file DTCertificationSummary.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 81 of file DTCertificationSummary.cc.

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

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

MonitorElement* DTCertificationSummary::certMap
private

Definition at line 42 of file DTCertificationSummary.h.

DQMStore* DTCertificationSummary::theDbe
private

Definition at line 39 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::totalCertFraction
private

Definition at line 41 of file DTCertificationSummary.h.