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
DTLocalTriggerTest Class Reference

#include <DTLocalTriggerTest.h>

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

Public Member Functions

 DTLocalTriggerTest (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DTLocalTriggerTest ()
 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 fillGlobalSummary ()
 
void runClientDiagnostic ()
 Run client analysis. 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

int nMinEvts
 

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 18 of file DTLocalTriggerTest.h.

Constructor & Destructor Documentation

DTLocalTriggerTest::DTLocalTriggerTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 34 of file DTLocalTriggerTest.cc.

References edm::ParameterSet::getUntrackedParameter().

34  {
35 
36  setConfig(ps,"DTLocalTrigger");
37  baseFolderDCC = "DT/03-LocalTrigger-DCC/";
38  baseFolderDDU = "DT/04-LocalTrigger-DDU/";
39  nMinEvts = ps.getUntrackedParameter<int>("nEventsCert", 5000);
40 
41 }
T getUntrackedParameter(std::string const &, T const &) const
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
DTLocalTriggerTest::~DTLocalTriggerTest ( )
virtual

Destructor.

Definition at line 44 of file DTLocalTriggerTest.cc.

44  {
45 
46 }

Member Function Documentation

void DTLocalTriggerTest::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 48 of file DTLocalTriggerTest.cc.

References DTLocalTriggerBaseTest::beginJob(), and Parameters::parameters.

48  {
49 
51 
52 
53  vector<string>::const_iterator iTr = trigSources.begin();
54  vector<string>::const_iterator trEnd = trigSources.end();
55  vector<string>::const_iterator iHw = hwSources.begin();
56  vector<string>::const_iterator hwEnd = hwSources.end();
57 
58 
59  //Booking
60  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
61  for (; iTr != trEnd; ++iTr){
62  trigSource = (*iTr);
63  for (; iHw != hwEnd; ++iHw){
64  hwSource = (*iHw);
65  // Loop over the TriggerUnits
66  for (int wh=-2; wh<=2; ++wh){
67  if (hwSource=="COM") {
68  bookWheelHistos(wh,"MatchingPhi");
69  }
70  else {
71  for (int sect=1; sect<=12; ++sect){
72  bookSectorHistos(wh,sect,"BXDistribPhi");
73  bookSectorHistos(wh,sect,"QualDistribPhi");
74  }
75  bookWheelHistos(wh,"CorrectBXPhi");
76  bookWheelHistos(wh,"ResidualBXPhi");
77  bookWheelHistos(wh,"CorrFractionPhi");
78  bookWheelHistos(wh,"2ndFractionPhi");
79  bookWheelHistos(wh,"TriggerInclusivePhi");
80  bookWheelHistos(wh,"CorrectBXTheta");
81  if (hwSource=="DDU") {
82  bookWheelHistos(wh,"HFractionTheta");
83  }
84  }
85  }
86  }
87  }
88  }
89  // Summary test histo booking (only static)
90  for (iTr = trigSources.begin(); iTr != trEnd; ++iTr){
91  trigSource = (*iTr);
92  for (iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
93  hwSource = (*iHw);
94  // Loop over the TriggerUnits
95  for (int wh=-2; wh<=2; ++wh){
96  if (hwSource=="COM") {
97  bookWheelHistos(wh,"MatchingSummary","Summaries");
98  }
99  else {
100  bookWheelHistos(wh,"CorrFractionSummary","Summaries");
101  bookWheelHistos(wh,"2ndFractionSummary","Summaries");
102  }
103  }
104  if (hwSource=="COM") {
105  bookCmsHistos("MatchingSummary","Summaries");
106  }
107  else {
108  bookCmsHistos("CorrFractionSummary");
109  bookCmsHistos("2ndFractionSummary");
110  }
111  if (hwSource=="DCC") {
112  bookCmsHistos("TrigGlbSummary","",true);
113  }
114 
115  }
116  }
117 
118 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > trigSources
void bookCmsHistos(std::string hTag, std::string folder="", bool isGlb=false)
Book the new MEs (CMS summary)
void bookWheelHistos(int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
void bookSectorHistos(int wheel, int sector, std::string hTag, std::string folder="")
Book the new MEs (for each sector)
std::vector< std::string > hwSources
void DTLocalTriggerTest::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 121 of file DTLocalTriggerTest.cc.

References DTLocalTriggerBaseTest::beginRun().

121  {
122 
124 
125 }
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
void DTLocalTriggerTest::fillGlobalSummary ( )
protected

Definition at line 390 of file DTLocalTriggerTest.cc.

References python.rootplot.argparse::category, alignCSCRings::corr, newFWLiteAna::fullName, MonitorElement::getBinContent(), MonitorElement::getFloatValue(), LogTrace, lumiPlot::lut, edm::min(), and edm::second().

390  {
391 
392  float glbPerc[5] = { 1., 0.9, 0.6, 0.3, 0.01 };
393  trigSource = "";
394  hwSource = "DCC";
395 
396  int nSecReadout = 0;
397 
398  for (int wh=-2; wh<=2; ++wh) {
399  for (int sect=1; sect<=12; ++sect) {
400 
401  float maxErr = 8.;
402  int corr = cmsME.find(fullName("CorrFractionSummary"))->second->getBinContent(sect,wh+3);
403  int second = cmsME.find(fullName("2ndFractionSummary"))->second->getBinContent(sect,wh+3);
404  int lut=0;
405  MonitorElement * lutsME = dbe->get(topFolder(hwSource=="DCC") + "Summaries/TrigLutSummary");
406  if (lutsME) {
407  lut = lutsME->getBinContent(sect,wh+3);
408  maxErr+=4;
409  } else {
410  LogTrace(category()) << "[" << testName
411  << "Test]: DCC Lut test Summary histo not found." << endl;
412  }
413  (corr <5 || second<5) && nSecReadout++;
414  int errcode = ((corr<5 ? corr : 4) + (second<5 ? second : 4) + (lut<5 ? lut : 4) );
415  errcode = min(int((errcode/maxErr + 0.01)*5),5);
416  cmsME.find("TrigGlbSummary")->second->setBinContent(sect,wh+3,glbPerc[errcode]);
417 
418  }
419  }
420 
421  if (!nSecReadout)
422  cmsME.find("TrigGlbSummary")->second->Reset(); // white histo id DCC is not RO
423 
424  string nEvtsName = "DT/EventInfo/Counters/nProcessedEventsTrigger";
425  MonitorElement * meProcEvts = dbe->get(nEvtsName);
426 
427  if (meProcEvts) {
428  int nProcEvts = meProcEvts->getFloatValue();
429  cmsME.find("TrigGlbSummary")->second->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
430  } else {
431  cmsME.find("TrigGlbSummary")->second->setEntries(nMinEvts + 1);
432  LogVerbatim (category()) << "[" << testName
433  << "Test]: ME: " << nEvtsName << " not found!" << endl;
434  }
435 
436 }
U second(std::pair< T, U > const &p)
double getFloatValue(void) const
tuple lut
Definition: lumiPlot.py:244
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
#define LogTrace(id)
std::string category()
Get message logger name.
double getBinContent(int binx) const
get content of bin (1-D)
std::map< std::string, MonitorElement * > cmsME
std::string & topFolder(bool isDCC)
Get top folder name.
std::string fullName(std::string htype)
Create fullname from histo partial name.
void DTLocalTriggerTest::runClientDiagnostic ( )
protectedvirtual

Run client analysis.

Implements DTLocalTriggerBaseTest.

Definition at line 128 of file DTLocalTriggerTest.cc.

References end, python.tagInventory::entries, spr::find(), newFWLiteAna::fullName, and Parameters::parameters.

128  {
129 
130  // Loop over Trig & Hw sources
131  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
132  trigSource = (*iTr);
133  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
134  hwSource = (*iHw);
135  // Loop over the TriggerUnits
136  for (int stat=1; stat<=4; ++stat){
137  for (int wh=-2; wh<=2; ++wh){
138  for (int sect=1; sect<=12; ++sect){
139  DTChamberId chId(wh,stat,sect);
140  int sector_id = (wh+3)+(sect-1)*5;
141  // uint32_t indexCh = chId.rawId();
142 
143  if (hwSource=="COM") {
144  // Perform DCC-DDU matching test and generates summaries (Phi view)
145  TH2F * DDUvsDCC = getHisto<TH2F>(dbe->get(getMEName("QualDDUvsQualDCC","LocalTriggerPhi", chId)));
146  if (DDUvsDCC) {
147 
148  int matchSummary = 1;
149 
150  if (DDUvsDCC->GetEntries()>1) {
151 
152  double entries = DDUvsDCC->GetEntries();
153  double corrEntries = 0;
154  for (int ibin=2; ibin<=8; ++ibin) {
155  corrEntries += DDUvsDCC->GetBinContent(ibin,ibin);
156  }
157  double corrRatio = corrEntries/entries;
158 
159  if (corrRatio < parameters.getUntrackedParameter<double>("matchingFracError",.65)){
160  matchSummary = 2;
161  }
162  else if (corrRatio < parameters.getUntrackedParameter<double>("matchingFracWarning",.85)){
163  matchSummary = 3;
164  }
165  else {
166  matchSummary = 0;
167  }
168 
169  if( whME[wh].find(fullName("MatchingPhi")) == whME[wh].end() ){
170  bookWheelHistos(wh,"MatchingPhi");
171  }
172 
173  whME[wh].find(fullName("MatchingPhi"))->second->setBinContent(sect,stat,corrRatio);
174 
175  }
176 
177  whME[wh].find(fullName("MatchingSummary"))->second->setBinContent(sect,stat,matchSummary);
178 
179  }
180  }
181  else {
182  // Perform DCC/DDU common plot analysis (Phi ones)
183  TH2F * BXvsQual = getHisto<TH2F>(dbe->get(getMEName("BXvsQual","LocalTriggerPhi", chId)));
184  TH1F * BestQual = getHisto<TH1F>(dbe->get(getMEName("BestQual","LocalTriggerPhi", chId)));
185  TH2F * Flag1stvsQual = getHisto<TH2F>(dbe->get(getMEName("Flag1stvsQual","LocalTriggerPhi", chId)));
186  if (BXvsQual && Flag1stvsQual && BestQual) {
187 
188  int corrSummary = 1;
189  int secondSummary = 1;
190 
191  if (BestQual->GetEntries()>1) {
192 
193  TH1D* BXHH = BXvsQual->ProjectionY("",6,7,"");
194  TH1D* Flag1st = Flag1stvsQual->ProjectionY();
195  int BXOK_bin = BXHH->GetEntries()>=1 ? BXHH->GetMaximumBin() : 51;
196  double BXMean = BXHH->GetEntries()>=1 ? BXHH->GetMean() : 51;
197  double BX_OK = BXvsQual->GetYaxis()->GetBinCenter(BXOK_bin);
198  double trigsFlag2nd = Flag1st->GetBinContent(2);
199  double trigs = Flag1st->GetEntries();
200  double besttrigs = BestQual->GetEntries();
201  double besttrigsCorr = BestQual->Integral(5,7,"");
202  delete BXHH;
203  delete Flag1st;
204 
205  double corrFrac = besttrigsCorr/besttrigs;
206  double secondFrac = trigsFlag2nd/trigs;
207  if (corrFrac < parameters.getUntrackedParameter<double>("corrFracError",.5)){
208  corrSummary = 2;
209  }
210  else if (corrFrac < parameters.getUntrackedParameter<double>("corrFracWarning",.6)){
211  corrSummary = 3;
212  }
213  else {
214  corrSummary = 0;
215  }
216  if (secondFrac > parameters.getUntrackedParameter<double>("secondFracError",.2)){
217  secondSummary = 2;
218  }
219  else if (secondFrac > parameters.getUntrackedParameter<double>("secondFracWarning",.1)){
220  secondSummary = 3;
221  }
222  else {
223  secondSummary = 0;
224  }
225 
226  if( secME[sector_id].find(fullName("BXDistribPhi")) == secME[sector_id].end() ){
227  bookSectorHistos(wh,sect,"QualDistribPhi");
228  bookSectorHistos(wh,sect,"BXDistribPhi");
229  }
230 
231  TH1D* BXDistr = BXvsQual->ProjectionY();
232  TH1D* QualDistr = BXvsQual->ProjectionX();
233  std::map<std::string,MonitorElement*> *innerME = &(secME[sector_id]);
234 
235  int nbinsBX = BXDistr->GetNbinsX();
236  int firstBinCenter = static_cast<int>(BXDistr->GetBinCenter(1));
237  int lastBinCenter = static_cast<int>(BXDistr->GetBinCenter(nbinsBX));
238  int iMin = firstBinCenter>-4 ? firstBinCenter : -4;
239  int iMax = lastBinCenter<20 ? lastBinCenter : 20;
240  for (int ibin=iMin+5;ibin<=iMax+5; ++ibin) {
241  innerME->find(fullName("BXDistribPhi"))->second->setBinContent(ibin,stat,BXDistr->GetBinContent(ibin-5-firstBinCenter+1));
242  }
243  for (int ibin=1;ibin<=7;++ibin) {
244  innerME->find(fullName("QualDistribPhi"))->second->setBinContent(ibin,stat,QualDistr->GetBinContent(ibin));
245  }
246 
247  delete BXDistr;
248  delete QualDistr;
249 
250  if( whME[wh].find(fullName("CorrectBXPhi")) == whME[wh].end() ){
251  bookWheelHistos(wh,"ResidualBXPhi");
252  bookWheelHistos(wh,"CorrectBXPhi");
253  bookWheelHistos(wh,"CorrFractionPhi");
254  bookWheelHistos(wh,"2ndFractionPhi");
255  bookWheelHistos(wh,"TriggerInclusivePhi");
256  }
257 
258  innerME = &(whME[wh]);
259  innerME->find(fullName("CorrectBXPhi"))->second->setBinContent(sect,stat,BX_OK+0.00001);
260  innerME->find(fullName("ResidualBXPhi"))->second->setBinContent(sect,stat,round(25.*(BXMean-BX_OK))+0.00001);
261  innerME->find(fullName("CorrFractionPhi"))->second->setBinContent(sect,stat,corrFrac);
262  innerME->find(fullName("TriggerInclusivePhi"))->second->setBinContent(sect,stat,besttrigs);
263  innerME->find(fullName("2ndFractionPhi"))->second->setBinContent(sect,stat,secondFrac);
264 
265  }
266 
267  whME[wh].find(fullName("CorrFractionSummary"))->second->setBinContent(sect,stat,corrSummary);
268  whME[wh].find(fullName("2ndFractionSummary"))->second->setBinContent(sect,stat,secondSummary);
269 
270  }
271 
272  if (hwSource=="DDU") {
273  // Perform DDU plot analysis (Theta ones)
274  TH2F * ThetaBXvsQual = getHisto<TH2F>(dbe->get(getMEName("ThetaBXvsQual","LocalTriggerTheta", chId)));
275  TH1F * ThetaBestQual = getHisto<TH1F>(dbe->get(getMEName("ThetaBestQual","LocalTriggerTheta", chId)));
276 
277  // no theta triggers in stat 4!
278  if (ThetaBXvsQual && ThetaBestQual && stat<4 && ThetaBestQual->GetEntries()>1) {
279  TH1D* BXH = ThetaBXvsQual->ProjectionY("",4,4,"");
280  int BXOK_bin = BXH->GetEffectiveEntries()>=1 ? BXH->GetMaximumBin(): 10;
281  double BX_OK = ThetaBXvsQual->GetYaxis()->GetBinCenter(BXOK_bin);
282  double trigs = ThetaBestQual->GetEntries();
283  double trigsH = ThetaBestQual->GetBinContent(4);
284  delete BXH;
285 
286  // if( secME[sector_id].find(fullName("HFractionTheta")) == secME[sector_id].end() ){
287  // // bookSectorHistos(wh,sect,"CorrectBXTheta");
288  // bookSectorHistos(wh,sect,"HFractionTheta");
289  // }
290  //std::map<std::string,MonitorElement*> *innerME = &(secME.find(sector_id)->second);
291  // innerME->find(fullName("CorrectBXTheta"))->second->setBinContent(stat,BX_OK);
292  //innerME->find(fullName("HFractionTheta"))->second->setBinContent(stat,trigsH/trigs);
293 
294  if( whME[wh].find(fullName("HFractionTheta")) == whME[wh].end() ){
295  bookWheelHistos(wh,"CorrectBXTheta");
296  bookWheelHistos(wh,"HFractionTheta");
297  }
298  std::map<std::string,MonitorElement*> *innerME = &(whME.find(wh)->second);
299  innerME->find(fullName("CorrectBXTheta"))->second->setBinContent(sect,stat,BX_OK+0.00001);
300  innerME->find(fullName("HFractionTheta"))->second->setBinContent(sect,stat,trigsH/trigs);
301 
302  }
303  }
304  else if (hwSource=="DCC") {
305  // Perform DCC plot analysis (Theta ones)
306  TH2F * ThetaPosvsBX = getHisto<TH2F>(dbe->get(getMEName("PositionvsBX","LocalTriggerTheta", chId)));
307 
308  // no theta triggers in stat 4!
309  if (ThetaPosvsBX && stat<4 && ThetaPosvsBX->GetEntries()>1) {
310  TH1D* BX = ThetaPosvsBX->ProjectionX();
311  int BXOK_bin = BX->GetEffectiveEntries()>=1 ? BX->GetMaximumBin(): 10;
312  double BX_OK = ThetaPosvsBX->GetXaxis()->GetBinCenter(BXOK_bin);
313  delete BX;
314 
315  if( whME[wh].find(fullName("CorrectBXTheta")) == whME[wh].end() ){
316  bookWheelHistos(wh,"CorrectBXTheta");
317  }
318  std::map<std::string,MonitorElement*> *innerME = &(whME.find(wh)->second);
319  innerME->find(fullName("CorrectBXTheta"))->second->setBinContent(sect,stat,BX_OK+0.00001);
320 
321  }
322  }
323  }
324 
325  }
326  }
327  }
328  }
329  }
330 
331  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
332  trigSource = (*iTr);
333  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
334  hwSource = (*iHw);
335  for (int wh=-2; wh<=2; ++wh){
336  std::map<std::string,MonitorElement*> *innerME = &(whME[wh]);
337  if(hwSource=="COM") {
338  TH2F* matchWhSummary = getHisto<TH2F>(innerME->find(fullName("MatchingSummary"))->second);
339  for (int sect=1; sect<=12; ++sect){
340  int matchErr = 0;
341  int matchNoData = 0;
342  for (int stat=1; stat<=4; ++stat){
343  switch (static_cast<int>(matchWhSummary->GetBinContent(sect,stat))) {
344  case 1:
345  matchNoData++;
346  case 2:
347  matchErr++;
348  }
349  }
350  if (matchNoData == 4) matchErr = 5;
351  cmsME.find(fullName("MatchingSummary"))->second->setBinContent(sect,wh+3,matchErr);
352  }
353  }
354  else {
355  TH2F* corrWhSummary = getHisto<TH2F>(innerME->find(fullName("CorrFractionSummary"))->second);
356  TH2F* secondWhSummary = getHisto<TH2F>(innerME->find(fullName("2ndFractionSummary"))->second);
357  for (int sect=1; sect<=12; ++sect){
358  int corrErr = 0;
359  int secondErr = 0;
360  int corrNoData = 0;
361  int secondNoData = 0;
362  for (int stat=1; stat<=4; ++stat){
363  switch (static_cast<int>(corrWhSummary->GetBinContent(sect,stat))) {
364  case 1:
365  corrNoData++;
366  case 2:
367  corrErr++;
368  }
369  switch (static_cast<int>(secondWhSummary->GetBinContent(sect,stat))) {
370  case 1:
371  secondNoData++;
372  case 2:
373  secondErr++;
374  }
375  }
376  if (corrNoData == 4) corrErr = 5;
377  if (secondNoData == 4) secondErr = 5;
378  cmsME.find(fullName("CorrFractionSummary"))->second->setBinContent(sect,wh+3,corrErr);
379  cmsME.find(fullName("2ndFractionSummary"))->second->setBinContent(sect,wh+3,secondErr);
380  }
381  }
382  }
383  }
384  }
385 
387 
388 }
std::map< int, std::map< std::string, MonitorElement * > > secME
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > trigSources
std::map< int, std::map< std::string, MonitorElement * > > whME
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void bookWheelHistos(int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
void bookSectorHistos(int wheel, int sector, std::string hTag, std::string folder="")
Book the new MEs (for each sector)
#define end
Definition: vmac.h:37
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::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
std::map< std::string, MonitorElement * > cmsME
std::vector< std::string > hwSources
std::string fullName(std::string htype)
Create fullname from histo partial name.

Member Data Documentation

int DTLocalTriggerTest::nMinEvts
private

Definition at line 43 of file DTLocalTriggerTest.h.