CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
monitor.cc
Go to the documentation of this file.
2 
3 
5 {
6  for (unsigned int i=0; i<5; ++i){
7  nevt[i] = 0;
8  }
9 }
10 
12 {
13  std::vector<EventMonitor::Entry>::iterator itr = counters.begin();
14  while (itr != counters.end() && itr->name != name) itr++;
15  EventMonitor::Entry* entry(0);
16  if ( itr == counters.end() ){
17  counters.push_back(Entry());
18  entry = &counters.back();
19  entry->name = name;
20  } else {
21  entry = &*itr;
22  }
23  entry->nevt[type]++;
24  entry->nevt[ALL]++;
25 }
26 
27 
29 {
30  //Constructor sets order of selections in the monitor.
31  //This ensures that the selections in the dqm histograms
32  //will always be in the same order.
33  std::vector<HypothesisType> hypType;
34  hypType.push_back(MM);
35  hypType.push_back(EE);
36  hypType.push_back(EM);
37  hypType.push_back(ME);
38 
39  for(unsigned int hypIdx = 0; hypIdx < hypType.size(); hypIdx++){
40 
41  monitor.count(hypType.at(hypIdx), "total events" , 0.0);
42  monitor.count(hypType.at(hypIdx), "baseline" , 0.0);
43  monitor.count(hypType.at(hypIdx), "opposite sign" , 0.0);
44  monitor.count(hypType.at(hypIdx), "full lepton selection" , 0.0);
45  monitor.count(hypType.at(hypIdx), "extra lepton veto" , 0.0);
46  monitor.count(hypType.at(hypIdx), "met > 20 GeV" , 0.0);
47  monitor.count(hypType.at(hypIdx), "mll > 12 GeV" , 0.0);
48  monitor.count(hypType.at(hypIdx), "|mll - mZ| > 15 GeV" , 0.0);
49  monitor.count(hypType.at(hypIdx), "minMET > 20 GeV" , 0.0);
50  monitor.count(hypType.at(hypIdx), "minMET > 40 GeV for ee/mm" , 0.0);
51  monitor.count(hypType.at(hypIdx), "dPhiDiLepJet < 165 dg for ee/mm" , 0.0);
52  monitor.count(hypType.at(hypIdx), "SoftMuons==0" , 0.0);
53  monitor.count(hypType.at(hypIdx), "top veto" , 0.0);
54  monitor.count(hypType.at(hypIdx), "ptll > 45 GeV" , 0.0);
55  monitor.count(hypType.at(hypIdx), "njets == 0" , 0.0);
56  monitor.count(hypType.at(hypIdx), "max(lep1.pt(),lep2.pt())>30" , 0.0);
57  monitor.count(hypType.at(hypIdx), "min(lep1.pt(),lep2.pt())>25" , 0.0);
58  monitor.count(hypType.at(hypIdx), "njets == 1" , 0.0);
59  monitor.count(hypType.at(hypIdx), "njets == 2 or 3" , 0.0);
60  monitor.count(hypType.at(hypIdx), "abs(jet1.eta())<4.7 && abs(jet2.eta())<4.7", 0.0);
61  monitor.count(hypType.at(hypIdx), "no central jets" , 0.0);
62 
63  }
64 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::string name
Definition: monitor.h:18
unsigned int nevt[5]
Definition: monitor.h:17
Definition: ME.h:11
EventMonitor()
Definition: monitor.cc:28
hypo_monitor monitor
Definition: monitor.h:28
int weight
Definition: histoStyle.py:50
void count(HypothesisType type, const char *name, double weight=1.0)
Definition: monitor.cc:11