CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DTTriggerEfficiencyTest Class Reference

#include <DTTriggerEfficiencyTest.h>

Inheritance diagram for DTTriggerEfficiencyTest:
DTLocalTriggerBaseTest edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 DTTriggerEfficiencyTest (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DTTriggerEfficiencyTest ()
 Destructor. More...
 
- Public Member Functions inherited from DTLocalTriggerBaseTest
 DTLocalTriggerBaseTest ()
 Constructor. More...
 
virtual ~DTLocalTriggerBaseTest ()
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void beginJob ()
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void bookChambHistos (DTChamberId chambId, std::string htype, std::string folder="")
 Book the new MEs (for each chamber) More...
 
void bookHistos (std::string hTag, std::string folder)
 Book the new MEs (global) More...
 
void bookWheelHistos (int wheel, std::string hTag, std::string folder)
 Book the new MEs (for each wheel) More...
 
std::string getMEName (std::string histoTag, std::string folder, int wh)
 Get the ME name (by wheel) More...
 
void makeEfficiencyME (TH2F *numerator, TH2F *denominator, MonitorElement *result2DWh, MonitorElement *result1DWh, MonitorElement *result1D)
 Compute 1D/2D efficiency plots. More...
 
void makeEfficiencyME (TH2F *numerator, TH2F *denominator, MonitorElement *result2DWh)
 Compute 2D efficiency plots. More...
 
void runClientDiagnostic ()
 DQM Client Diagnostic. More...
 
- Protected Member Functions inherited from DTLocalTriggerBaseTest
void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 Perform begin lumiblock operations. More...
 
void bookCmsHistos (std::string hTag, std::string folder="", bool isGlb=false)
 Book the new MEs (CMS summary) More...
 
void bookSectorHistos (int wheel, int sector, std::string hTag, std::string folder="")
 Book the new MEs (for each sector) More...
 
void bookWheelHistos (int wheel, std::string hTag, std::string folder="")
 Book the new MEs (for each wheel) More...
 
std::string category ()
 Get message logger name. More...
 
void endJob ()
 EndJob. More...
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 Perform client diagnostic in online. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &context)
 Perform client diagnostic in offline. More...
 
std::string fullName (std::string htype)
 Create fullname from histo partial name. More...
 
template<class T >
TgetHisto (MonitorElement *me)
 Convert ME to Histogram fo type T. More...
 
std::string getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid)
 Get the ME name (by chamber) More...
 
std::string getMEName (std::string histoTag, std::string subfolder, int wh)
 Get the ME name (by wheel) More...
 
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms. More...
 
void setConfig (const edm::ParameterSet &ps, std::string name)
 Set configuration variables. More...
 
std::string & topFolder (bool isDCC)
 Get top folder name. More...
 
- 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)
 

Private Attributes

std::map< uint32_t, std::map
< std::string, MonitorElement * > > 
chambME
 
bool detailedPlots
 
std::map< int, std::map
< std::string, MonitorElement * > > 
EffDistrPerWh
 
std::map< std::string,
MonitorElement * > 
globalEffDistr
 
DTTrigGeomUtilstrigGeomUtils
 

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 Attributes inherited from DTLocalTriggerBaseTest
std::string baseFolderDCC
 
std::string baseFolderDDU
 
std::map< std::string,
MonitorElement * > 
cmsME
 
DQMStoredbe
 
std::string hwSource
 
std::vector< std::string > hwSources
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
unsigned int nLumiSegs
 
edm::ParameterSet parameters
 
int prescaleFactor
 
int run
 
bool runOnline
 
std::map< int, std::map
< std::string, MonitorElement * > > 
secME
 
std::string sourceFolder
 
std::string testName
 
std::string trigSource
 
std::vector< std::string > trigSources
 
std::map< int, std::map
< std::string, MonitorElement * > > 
whME
 

Detailed Description

Definition at line 20 of file DTTriggerEfficiencyTest.h.

Constructor & Destructor Documentation

DTTriggerEfficiencyTest::DTTriggerEfficiencyTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 37 of file DTTriggerEfficiencyTest.cc.

References edm::ParameterSet::getUntrackedParameter().

37  {
38 
39  setConfig(ps,"DTTriggerEfficiency");
40  baseFolderDCC = "DT/03-LocalTrigger-DCC/";
41  baseFolderDDU = "DT/04-LocalTrigger-DDU/";
42  detailedPlots = ps.getUntrackedParameter<bool>("detailedAnalysis",true);
43 
44 }
T getUntrackedParameter(std::string const &, T const &) const
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
DTTriggerEfficiencyTest::~DTTriggerEfficiencyTest ( )
virtual

Destructor.

Definition at line 47 of file DTTriggerEfficiencyTest.cc.

47  {
48 
49 }

Member Function Documentation

void DTTriggerEfficiencyTest::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 52 of file DTTriggerEfficiencyTest.cc.

References DTLocalTriggerBaseTest::beginJob().

52  {
53 
55 
56 }
void DTTriggerEfficiencyTest::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 59 of file DTTriggerEfficiencyTest.cc.

References DTLocalTriggerBaseTest::beginRun(), bookHistos(), and Parameters::parameters.

59  {
60 
63 
64  vector<string>::const_iterator iTr = trigSources.begin();
65  vector<string>::const_iterator trEnd = trigSources.end();
66  vector<string>::const_iterator iHw = hwSources.begin();
67  vector<string>::const_iterator hwEnd = hwSources.end();
68 
69 
70  //Booking
71  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
72  for (; iTr != trEnd; ++iTr){
73  trigSource = (*iTr);
74  for (; iHw != hwEnd; ++iHw){
75  hwSource = (*iHw);
76  // Loop over the TriggerUnits
77  bookHistos("TrigEffPhi","");
78  bookHistos("TrigEffCorrPhi","");
79  for (int wh=-2; wh<=2; ++wh){
80  if (detailedPlots) {
81  for (int sect=1; sect<=12; ++sect){
82  for (int stat=1; stat<=4; ++stat){
83  DTChamberId chId(wh,stat,sect);
84  bookChambHistos(chId,"TrigEffPosvsAnglePhi","Segment");
85  bookChambHistos(chId,"TrigEffPosvsAngleCorrPhi","Segment");
86  }
87  }
88  }
89  bookWheelHistos(wh,"TrigEffPhi","");
90  bookWheelHistos(wh,"TrigEffCorrPhi","");
91  }
92  }
93  }
94  }
95 
96 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > trigSources
void bookWheelHistos(int wheel, std::string hTag, std::string folder)
Book the new MEs (for each wheel)
void bookChambHistos(DTChamberId chambId, std::string htype, std::string folder="")
Book the new MEs (for each chamber)
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
void bookHistos(std::string hTag, std::string folder)
Book the new MEs (global)
edm::ESHandle< DTGeometry > muonGeom
std::vector< std::string > hwSources
void DTTriggerEfficiencyTest::bookChambHistos ( DTChamberId  chambId,
std::string  htype,
std::string  folder = "" 
)
protected

Book the new MEs (for each chamber)

Definition at line 313 of file DTTriggerEfficiencyTest.cc.

References python.rootplot.argparse::category, newFWLiteAna::fullName, LogTrace, edm::max(), edm::min(), pileupCalc::nbins, DetId::rawId(), DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, and DTChamberId::wheel().

313  {
314 
315  stringstream wheel; wheel << chambId.wheel();
316  stringstream station; station << chambId.station();
317  stringstream sector; sector << chambId.sector();
318 
319  string fullType = fullName(htype);
320  bool isDCC = hwSource=="DCC" ;
321  string HistoName = fullType + "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
322 
323  dbe->setCurrentFolder(topFolder(isDCC) +
324  "Wheel" + wheel.str() +
325  "/Sector" + sector.str() +
326  "/Station" + station.str() +
327  "/" + folder + "/");
328 
329  LogTrace(category()) << "[" << testName << "Test]: booking " + topFolder(isDCC) + "Wheel" << wheel.str()
330  <<"/Sector" << sector.str() << "/Station" << station.str() << "/" + folder + "/" << HistoName;
331 
332 
333  uint32_t indexChId = chambId.rawId();
334  float min, max;
335  int nbins;
336  trigGeomUtils->phiRange(chambId,min,max,nbins,20);
337  if (htype.find("TrigEffPosvsAnglePhi") == 0 ){
338  chambME[indexChId][fullType] = dbe->book2D(HistoName.c_str(),"Trigger efficiency (any qual.) position vs angle (Phi)",12,-30.,30.,nbins,min,max);
339  return;
340  }
341  if (htype.find("TrigEffPosvsAngleCorrPhi") == 0 ){
342  chambME[indexChId][fullType] = dbe->book2D(HistoName.c_str(),"Trigger efficiency (correlated) pos vs angle (Phi)",12,-30.,30.,nbins,min,max);
343  return;
344  }
345 
346 }
std::map< uint32_t, std::map< std::string, MonitorElement * > > chambME
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const T & max(const T &a, const T &b)
#define LogTrace(id)
std::string category()
Get message logger name.
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
std::string HistoName
int sector() const
Definition: DTChamberId.h:61
std::string & topFolder(bool isDCC)
Get top folder name.
int station() const
Return the station number.
Definition: DTChamberId.h:51
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:1000
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
std::string fullName(std::string htype)
Create fullname from histo partial name.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void DTTriggerEfficiencyTest::bookHistos ( std::string  hTag,
std::string  folder 
)
protected

Book the new MEs (global)

Definition at line 239 of file DTTriggerEfficiencyTest.cc.

References newFWLiteAna::fullName.

239  {
240 
241  string basedir;
242  bool isDCC = hwSource=="DCC" ;
243  basedir = topFolder(isDCC); //Book summary histo outside Task directory
244 
245  if (folder != "") {
246  basedir += folder +"/" ;
247  }
248  dbe->setCurrentFolder(basedir);
249 
250  string fullTag = fullName(hTag);
251  string hname = fullTag + "_All";
252 
253  globalEffDistr[fullTag] = dbe->book1D(hname.c_str(),hname.c_str(),51,0.,1.02);
254  globalEffDistr[fullTag] ->setAxisTitle("Trig Eff",1);
255 
256 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
std::map< std::string, MonitorElement * > globalEffDistr
std::string & topFolder(bool isDCC)
Get top folder name.
std::string fullName(std::string htype)
Create fullname from histo partial name.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void DTTriggerEfficiencyTest::bookWheelHistos ( int  wheel,
std::string  hTag,
std::string  folder 
)
protected

Book the new MEs (for each wheel)

Definition at line 258 of file DTTriggerEfficiencyTest.cc.

References python.rootplot.argparse::category, newFWLiteAna::fullName, LogTrace, MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

258  {
259 
260  stringstream wh; wh << wheel;
261  string basedir;
262  bool isDCC = hwSource=="DCC" ;
263  if (hTag.find("Summary") != string::npos) {
264  basedir = topFolder(isDCC); //Book summary histo outside wheel directories
265  } else {
266  basedir = topFolder(isDCC) + "Wheel" + wh.str() + "/" ;
267 
268  }
269  if (folder != "") {
270  basedir += folder +"/" ;
271  }
272  dbe->setCurrentFolder(basedir);
273 
274  string fullTag = fullName(hTag);
275  string hname = fullTag+ "_W" + wh.str();
276 
277  string hnameAll = fullTag+ "_All_W" + wh.str();
278 
279  LogTrace(category()) << "[" << testName << "Test]: booking "<< basedir << hname;
280 
281  (EffDistrPerWh[wheel])[fullTag] = dbe->book1D(hnameAll.c_str(),hnameAll.c_str(),51,0.,1.02);
282 
283  if (hTag.find("Phi")!= string::npos ||
284  hTag.find("Summary") != string::npos ){
285  MonitorElement* me = dbe->book2D(hname.c_str(),hname.c_str(),12,1,13,4,1,5);
286 
287  // setLabelPh(me);
288  me->setBinLabel(1,"MB1",2);
289  me->setBinLabel(2,"MB2",2);
290  me->setBinLabel(3,"MB3",2);
291  me->setBinLabel(4,"MB4",2);
292  me->setAxisTitle("Sector",1);
293 
294  whME[wheel][fullTag] = me;
295  return;
296  }
297 
298  if (hTag.find("Theta") != string::npos){
299  MonitorElement* me =dbe->book2D(hname.c_str(),hname.c_str(),12,1,13,3,1,4);
300 
301  // setLabelTh(me);
302  me->setBinLabel(1,"MB1",2);
303  me->setBinLabel(2,"MB2",2);
304  me->setBinLabel(3,"MB3",2);
305  me->setAxisTitle("Sector",1);
306 
307  whME[wheel][fullTag] = me;
308  return;
309  }
310 
311 }
std::map< int, std::map< std::string, MonitorElement * > > whME
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::map< int, std::map< std::string, MonitorElement * > > EffDistrPerWh
#define LogTrace(id)
std::string category()
Get message logger name.
std::string & topFolder(bool isDCC)
Get top folder name.
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:1000
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string fullName(std::string htype)
Create fullname from histo partial name.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
string DTTriggerEfficiencyTest::getMEName ( std::string  histoTag,
std::string  folder,
int  wh 
)
protected

Get the ME name (by wheel)

Definition at line 226 of file DTTriggerEfficiencyTest.cc.

References newFWLiteAna::fullName.

226  {
227 
228  stringstream wheel; wheel << wh;
229 
230  string folderName = topFolder(hwSource=="DCC") + folder + "/";
231 
232  string histoname = sourceFolder + folderName
233  + fullName(histoTag) + "_W" + wheel.str();
234 
235  return histoname;
236 
237 }
std::string & topFolder(bool isDCC)
Get top folder name.
std::string fullName(std::string htype)
Create fullname from histo partial name.
void DTTriggerEfficiencyTest::makeEfficiencyME ( TH2F *  numerator,
TH2F *  denominator,
MonitorElement result2DWh,
MonitorElement result1DWh,
MonitorElement result1D 
)
protected

Compute 1D/2D efficiency plots.

Definition at line 171 of file DTTriggerEfficiencyTest.cc.

References postValidation_cfi::efficiency, relativeConstraints::error, MonitorElement::Fill(), MonitorElement::getTH2F(), and mathSSE::sqrt().

171  {
172 
173  TH2F* efficiency = result2DWh->getTH2F();
174  efficiency->Divide(numerator,denominator,1,1,"");
175 
176  int nbinsx = efficiency->GetNbinsX();
177  int nbinsy = efficiency->GetNbinsY();
178  for (int binx=1; binx<=nbinsx; ++binx){
179  for (int biny=1; biny<=nbinsy; ++biny){
180  float error = 0;
181  float bineff = efficiency->GetBinContent(binx,biny);
182 
183  result1DWh->Fill(bineff);
184  result1D->Fill(bineff);
185 
186  if (denominator->GetBinContent(binx,biny)){
187  error = sqrt(bineff*(1-bineff)/denominator->GetBinContent(binx,biny));
188  }
189  else {
190  error = 1;
191  efficiency->SetBinContent(binx,biny,0.);
192  }
193 
194  efficiency->SetBinError(binx,biny,error);
195  }
196  }
197 
198 }
list numerator
Definition: cuy.py:483
void Fill(long long x)
list denominator
Definition: cuy.py:484
T sqrt(T t)
Definition: SSEVec.h:48
TH2F * getTH2F(void) const
void DTTriggerEfficiencyTest::makeEfficiencyME ( TH2F *  numerator,
TH2F *  denominator,
MonitorElement result2DWh 
)
protected

Compute 2D efficiency plots.

Definition at line 200 of file DTTriggerEfficiencyTest.cc.

References postValidation_cfi::efficiency, relativeConstraints::error, MonitorElement::getTH2F(), and mathSSE::sqrt().

200  {
201 
202  TH2F* efficiency = result2DWh->getTH2F();
203  efficiency->Divide(numerator,denominator,1,1,"");
204 
205  int nbinsx = efficiency->GetNbinsX();
206  int nbinsy = efficiency->GetNbinsY();
207  for (int binx=1; binx<=nbinsx; ++binx){
208  for (int biny=1; biny<=nbinsy; ++biny){
209  float error = 0;
210  float bineff = efficiency->GetBinContent(binx,biny);
211 
212  if (denominator->GetBinContent(binx,biny)){
213  error = sqrt(bineff*(1-bineff)/denominator->GetBinContent(binx,biny));
214  }
215  else {
216  error = 1;
217  efficiency->SetBinContent(binx,biny,0.);
218  }
219 
220  efficiency->SetBinError(binx,biny,error);
221  }
222  }
223 
224 }
list numerator
Definition: cuy.py:483
list denominator
Definition: cuy.py:484
T sqrt(T t)
Definition: SSEVec.h:48
TH2F * getTH2F(void) const
void DTTriggerEfficiencyTest::runClientDiagnostic ( )
protectedvirtual

DQM Client Diagnostic.

Implements DTLocalTriggerBaseTest.

Definition at line 99 of file DTTriggerEfficiencyTest.cc.

References bookHistos(), spr::find(), newFWLiteAna::fullName, DetId::rawId(), and edm::second().

99  {
100 
101  // Loop over Trig & Hw sources
102  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
103  trigSource = (*iTr);
104  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
105  hwSource = (*iHw);
106  // Loop over the TriggerUnits
107  if( globalEffDistr.find(fullName("TrigEffPhi")) == globalEffDistr.end() ){
108  bookHistos("TrigEffPhi","");
109  bookHistos("TrigEffCorrPhi","");
110  }
111  for (int wh=-2; wh<=2; ++wh){
112 
113  TH2F * TrigEffDenum = getHisto<TH2F>(dbe->get(getMEName("TrigEffDenum","Task",wh)));
114  TH2F * TrigEffNum = getHisto<TH2F>(dbe->get(getMEName("TrigEffNum","Task",wh)));
115  TH2F * TrigEffCorrNum = getHisto<TH2F>(dbe->get(getMEName("TrigEffCorrNum","Task",wh)));
116 
117  if (TrigEffDenum && TrigEffNum && TrigEffCorrNum && TrigEffDenum->GetEntries()>1) {
118 
119  if( whME[wh].find(fullName("TrigEffPhi")) == whME[wh].end() ){
120  bookWheelHistos(wh,"TrigEffPhi","");
121  bookWheelHistos(wh,"TrigEffCorrPhi","");
122  }
123 
124  MonitorElement* Eff1DAll_TrigEffPhi = (&globalEffDistr)->find(fullName("TrigEffPhi"))->second;
125  MonitorElement* Eff1DAll_TrigEffCorrPhi = (&globalEffDistr)->find(fullName("TrigEffCorrPhi"))->second;
126 
127  MonitorElement* Eff1DWh_TrigEffPhi = (&(EffDistrPerWh[wh]))->find(fullName("TrigEffPhi"))->second;
128  MonitorElement* Eff1DWh_TrigEffCorrPhi = (&(EffDistrPerWh[wh]))->find(fullName("TrigEffCorrPhi"))->second;
129 
130  MonitorElement* Eff2DWh_TrigEffPhi = (&(whME[wh]))->find(fullName("TrigEffPhi"))->second;
131  MonitorElement* Eff2DWh_TrigEffCorrPhi = (&(whME[wh]))->find(fullName("TrigEffCorrPhi"))->second;
132 
133  makeEfficiencyME(TrigEffNum,TrigEffDenum,Eff2DWh_TrigEffPhi,Eff1DWh_TrigEffPhi,Eff1DAll_TrigEffPhi);
134  makeEfficiencyME(TrigEffCorrNum,TrigEffDenum,Eff2DWh_TrigEffCorrPhi,Eff1DWh_TrigEffCorrPhi,Eff1DAll_TrigEffCorrPhi);
135 
136  }
137 
138  if (detailedPlots) {
139  for (int stat=1; stat<=4; ++stat){
140  for (int sect=1; sect<=12; ++sect){
141  DTChamberId chId(wh,stat,sect);
142  uint32_t indexCh = chId.rawId();
143 
144  // Perform Efficiency analysis (Phi+Segments 2D)
145  TH2F * TrackPosvsAngle = getHisto<TH2F>(dbe->get(getMEName("TrackPosvsAngle","Segment", chId)));
146  TH2F * TrackPosvsAngleAnyQual = getHisto<TH2F>(dbe->get(getMEName("TrackPosvsAngleAnyQual","Segment", chId)));
147  TH2F * TrackPosvsAngleCorr = getHisto<TH2F>(dbe->get(getMEName("TrackPosvsAngleCorr","Segment", chId)));
148 
149  if (TrackPosvsAngle && TrackPosvsAngleAnyQual && TrackPosvsAngleCorr && TrackPosvsAngle->GetEntries()>1) {
150 
151  if( chambME[indexCh].find(fullName("TrigEffAnglePhi")) == chambME[indexCh].end()){
152  bookChambHistos(chId,"TrigEffPosvsAnglePhi","Segment");
153  bookChambHistos(chId,"TrigEffPosvsAngleCorrPhi","Segment");
154  }
155 
156  std::map<std::string,MonitorElement*> *innerME = &(chambME[indexCh]);
157  makeEfficiencyME(TrackPosvsAngleAnyQual,TrackPosvsAngle,innerME->find(fullName("TrigEffPosvsAnglePhi"))->second);
158  makeEfficiencyME(TrackPosvsAngleCorr,TrackPosvsAngle,innerME->find(fullName("TrigEffPosvsAngleCorrPhi"))->second);
159 
160  }
161  }
162  }
163  }
164  }
165 
166  }
167  }
168 
169 }
void makeEfficiencyME(TH2F *numerator, TH2F *denominator, MonitorElement *result2DWh, MonitorElement *result1DWh, MonitorElement *result1D)
Compute 1D/2D efficiency plots.
std::vector< std::string > trigSources
void bookWheelHistos(int wheel, std::string hTag, std::string folder)
Book the new MEs (for each wheel)
std::map< int, std::map< std::string, MonitorElement * > > whME
void bookChambHistos(DTChamberId chambId, std::string htype, std::string folder="")
Book the new MEs (for each chamber)
std::map< int, std::map< std::string, MonitorElement * > > EffDistrPerWh
std::map< std::string, MonitorElement * > globalEffDistr
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::map< uint32_t, std::map< std::string, MonitorElement * > > chambME
void bookHistos(std::string hTag, std::string folder)
Book the new MEs (global)
U second(std::pair< T, U > const &p)
std::string getMEName(std::string histoTag, std::string folder, int wh)
Get the ME name (by wheel)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
std::vector< std::string > hwSources
std::string fullName(std::string htype)
Create fullname from histo partial name.

Member Data Documentation

std::map<uint32_t,std::map<std::string,MonitorElement*> > DTTriggerEfficiencyTest::chambME
private

Definition at line 65 of file DTTriggerEfficiencyTest.h.

bool DTTriggerEfficiencyTest::detailedPlots
private

Definition at line 67 of file DTTriggerEfficiencyTest.h.

std::map<int,std::map<std::string,MonitorElement*> > DTTriggerEfficiencyTest::EffDistrPerWh
private

Definition at line 64 of file DTTriggerEfficiencyTest.h.

std::map<std::string, MonitorElement*> DTTriggerEfficiencyTest::globalEffDistr
private

Definition at line 63 of file DTTriggerEfficiencyTest.h.

DTTrigGeomUtils* DTTriggerEfficiencyTest::trigGeomUtils
private

Definition at line 66 of file DTTriggerEfficiencyTest.h.