CMS 3D CMS Logo

RCTMonitor.cc
Go to the documentation of this file.
4 #include <iostream>
5 
7  // set Token(-s)
8  m_rctSourceToken_ = consumes<L1CaloEmCollection>(iConfig.getUntrackedParameter<edm::InputTag>("rctSource"));
9 }
10 
12 
14  // Book RCT histograms
15  iBooker.setCurrentFolder("RCT");
16 
18  iBooker.book2D("RctIsoEmRankEtaPhi", "ISO EM RANK", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
20  iBooker.book2D("RctIsoEmOccEtaPhi", "ISO EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
21  m_rctIsoEmRank1 = iBooker.book1D("RctIsoEmRank", "ISO EM RANK", R6BINS, R6MIN, R6MAX);
23  iBooker.book2D("RctIsoEmRankEtaPhi10", "ISO EM RANK", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
25  iBooker.book2D("RctIsoEmOccEtaPhi10", "ISO EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
26  m_rctIsoEmRank10 = iBooker.book1D("RctIsoEmRank10", "ISO EM RANK", R6BINS, R6MIN, R6MAX);
27 
29  iBooker.book2D("RctNonIsoEmRankEtaPhi", "NON-ISO EM RANK", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
31  iBooker.book2D("RctNonIsoEmOccEtaPhi", "NON-ISO EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
32  m_rctNonIsoEmRank1 = iBooker.book1D("RctNonIsoEmRank", "NON-ISO EM RANK", R6BINS, R6MIN, R6MAX);
34  iBooker.book2D("RctNonIsoEmRankEtaPhi10", "NON-ISO EM RANK", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
36  "RctNonIsoEmOccEtaPhi10", "NON-ISO EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
37  m_rctNonIsoEmRank10 = iBooker.book1D("RctNonIsoEmRank10", "NON-ISO EM RANK", R6BINS, R6MIN, R6MAX);
38 
40  iBooker.book2D("RctRelaxedEmRankEtaPhi", "RELAXED EM RANK", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
42  iBooker.book2D("RctRelaxedEmOccEtaPhi", "RELAXED EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
43  m_rctRelaxedEmRank1 = iBooker.book1D("RctRelaxedEmRank", "RELAXED EM RANK", R6BINS, R6MIN, R6MAX);
45  iBooker.book2D("RctRelaxedEmRankEtaPhi", "RELAXED EM RANK", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
47  "RctRelaxedEmOccEtaPhi10", "RELAXED EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
48  m_rctRelaxedEmRank10 = iBooker.book1D("RctRelaxedEmRank", "RELAXED EM RANK", R6BINS, R6MIN, R6MAX);
49 
51  iBooker.book2D("RctRegionsEtEtaPhi", "REGION E_{T}", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
53  iBooker.book2D("RctRegionsOccEtaPhi", "REGION OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
55  iBooker.book2D("RctTauVetoEtaPhi", "TAU VETO OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
56  m_rctRegionEt = iBooker.book1D("RctRegionEt", "REGION E_{T}", R10BINS, R10MIN, R10MAX);
57 }
58 
60  // Fill histograms
61  FillRCT(iEvent, iSetup);
62 }
63 
64 float DynamicScale(int EtaStamp) {
65  // This function weights bin elements according to spatial extent of
66  // calorimeter tower.
67  if (EtaStamp >= 6 && EtaStamp <= 15) {
68  return ScaleINNER;
69  } else if (EtaStamp == 5 || EtaStamp == 16) {
70  return ScaleIN;
71  } else if (EtaStamp == 4 || EtaStamp == 17) {
72  return ScaleOUT;
73  } else {
74  return 0.000000;
75  }
76 }
77 
79  // Get the RCT digis
81 
82  iEvent.getByToken(m_rctSourceToken_, em);
83 
84  // Isolated and non-isolated EM with cut at >1 GeV
85  for (L1CaloEmCollection::const_iterator iem = em->begin(); iem != em->end(); iem++) {
86  if (iem->rank() > 1.) { // applies the 1 GeV cut
87  if (iem->isolated()) { // looks for isolated EM candidates only
88  m_rctIsoEmRank1->Fill(iem->rank());
89  // std::cout << "Just to show what is there " << iem->rank() <<
90  // std::endl ;
91  m_rctIsoEmRankEtaPhi1->Fill(iem->regionId().iphi(), iem->regionId().ieta(), iem->rank());
93  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
94  m_rctRelaxedEmRankEtaPhi1->Fill(iem->regionId().iphi(), iem->regionId().ieta(), iem->rank());
96  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
97  m_rctRelaxedEmRank1->Fill(iem->rank());
98  } else { // instructions for Non-isolated EM candidates
99  m_rctNonIsoEmRank1->Fill(iem->rank());
100  m_rctNonIsoEmRankEtaPhi1->Fill(iem->regionId().iphi(), iem->regionId().ieta(), iem->rank());
102  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
103  m_rctRelaxedEmRankEtaPhi1->Fill(iem->regionId().iphi(), iem->regionId().ieta(), iem->rank());
105  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
106  m_rctRelaxedEmRank1->Fill(iem->rank());
107  }
108  }
109  if (iem->rank() > 10.) { // applies the 10 GeV cut
110  if (iem->isolated()) { // looks for isolated EM candidates only
112  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
114  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
115  } else { // instructions for Non-isolated EM candidates
117  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
119  iem->regionId().iphi(), iem->regionId().ieta(), DynamicScale(iem->regionId().ieta()));
120  }
121  }
122  }
123 }
124 
125 // define this as a plug-in
T getUntrackedParameter(std::string const &, T const &) const
static const float ETAMIN
Definition: RCTMonitor.h:111
edm::EDGetTokenT< L1CaloEmCollection > m_rctSourceToken_
Definition: RCTMonitor.h:152
MonitorElement * m_rctIsoEmRankEtaPhi10
Definition: RCTMonitor.h:90
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * m_rctNonIsoEmOccEtaPhi1
Definition: RCTMonitor.h:97
static const float R6MIN
Definition: RCTMonitor.h:120
MonitorElement * m_rctNonIsoEmOccEtaPhi10
Definition: RCTMonitor.h:98
~RCTMonitor() override
Definition: RCTMonitor.cc:11
static const float R6MAX
Definition: RCTMonitor.h:121
static const float R10MAX
Definition: RCTMonitor.h:124
void Fill(long long x)
MonitorElement * m_rctRelaxedEmRank1
Definition: RCTMonitor.h:103
MonitorElement * m_rctRelaxedEmRankEtaPhi1
Definition: RCTMonitor.h:95
MonitorElement * m_rctNonIsoEmRank10
Definition: RCTMonitor.h:106
MonitorElement * m_rctNonIsoEmRankEtaPhi10
Definition: RCTMonitor.h:94
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MonitorElement * m_rctIsoEmRankEtaPhi1
Definition: RCTMonitor.h:89
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * m_rctNonIsoEmRank1
Definition: RCTMonitor.h:105
MonitorElement * m_rctRelaxedEmOccEtaPhi10
Definition: RCTMonitor.h:100
const float ScaleINNER
static const unsigned int R10BINS
Definition: RCTMonitor.h:122
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: RCTMonitor.cc:59
static const float PHIMAX
Definition: RCTMonitor.h:115
MonitorElement * m_rctRelaxedEmRankEtaPhi10
Definition: RCTMonitor.h:96
static const unsigned int R6BINS
Definition: RCTMonitor.h:119
MonitorElement * m_rctTauVetoEtaPhi
Definition: RCTMonitor.h:86
static const float R10MIN
Definition: RCTMonitor.h:123
MonitorElement * m_rctRegionsEtEtaPhi
Definition: RCTMonitor.h:84
MonitorElement * m_rctNonIsoEmRankEtaPhi1
Definition: RCTMonitor.h:93
static const float ETAMAX
Definition: RCTMonitor.h:112
static const unsigned int PHIBINS
Definition: RCTMonitor.h:113
const float ScaleOUT
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
static const unsigned int ETABINS
Definition: RCTMonitor.h:110
MonitorElement * m_rctRegionsOccEtaPhi
Definition: RCTMonitor.h:85
MonitorElement * m_rctIsoEmRank1
Definition: RCTMonitor.h:101
MonitorElement * m_rctRegionEt
Definition: RCTMonitor.h:87
static const float PHIMIN
Definition: RCTMonitor.h:114
MonitorElement * m_rctRelaxedEmRank10
Definition: RCTMonitor.h:104
MonitorElement * m_rctIsoEmOccEtaPhi1
Definition: RCTMonitor.h:91
MonitorElement * m_rctIsoEmRank10
Definition: RCTMonitor.h:102
MonitorElement * m_rctIsoEmOccEtaPhi10
Definition: RCTMonitor.h:92
void FillRCT(const edm::Event &, const edm::EventSetup &)
Definition: RCTMonitor.cc:78
RCTMonitor(const edm::ParameterSet &)
Definition: RCTMonitor.cc:6
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: RCTMonitor.cc:13
MonitorElement * m_rctRelaxedEmOccEtaPhi1
Definition: RCTMonitor.h:99
Definition: Run.h:45
float DynamicScale(int EtaStamp)
Definition: RCTMonitor.cc:64
const float ScaleIN