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
RCTMonitor::m_rctNonIsoEmRankEtaPhi1
MonitorElement * m_rctNonIsoEmRankEtaPhi1
Definition: RCTMonitor.h:92
RCTMonitor::m_rctRelaxedEmOccEtaPhi1
MonitorElement * m_rctRelaxedEmOccEtaPhi1
Definition: RCTMonitor.h:98
somedefinitions.h
RCTMonitor::m_rctRelaxedEmRank1
MonitorElement * m_rctRelaxedEmRank1
Definition: RCTMonitor.h:102
RCTMonitor::~RCTMonitor
~RCTMonitor() override
Definition: RCTMonitor.cc:11
ScaleOUT
const float ScaleOUT
Definition: somedefinitions.h:41
RCTMonitor::PHIMIN
static const float PHIMIN
Definition: RCTMonitor.h:113
edm::Run
Definition: Run.h:45
RCTMonitor::R6MAX
static const float R6MAX
Definition: RCTMonitor.h:120
RCTMonitor::R10BINS
static const unsigned int R10BINS
Definition: RCTMonitor.h:121
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
RCTMonitor::m_rctIsoEmOccEtaPhi10
MonitorElement * m_rctIsoEmOccEtaPhi10
Definition: RCTMonitor.h:91
RCTMonitor::FillRCT
void FillRCT(const edm::Event &, const edm::EventSetup &)
Definition: RCTMonitor.cc:78
DQMStore.h
RCTMonitor::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: RCTMonitor.cc:13
RCTMonitor.h
RCTMonitor::PHIBINS
static const unsigned int PHIBINS
Definition: RCTMonitor.h:112
ScaleINNER
const float ScaleINNER
Definition: somedefinitions.h:40
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RCTMonitor::PHIMAX
static const float PHIMAX
Definition: RCTMonitor.h:114
RCTMonitor::m_rctIsoEmRank10
MonitorElement * m_rctIsoEmRank10
Definition: RCTMonitor.h:101
edm::Handle
Definition: AssociativeIterator.h:50
RCTMonitor::R6BINS
static const unsigned int R6BINS
Definition: RCTMonitor.h:118
RCTMonitor::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: RCTMonitor.cc:59
ScaleIN
const float ScaleIN
Definition: somedefinitions.h:42
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
RCTMonitor::R10MIN
static const float R10MIN
Definition: RCTMonitor.h:122
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
RCTMonitor::ETABINS
static const unsigned int ETABINS
Definition: RCTMonitor.h:109
RCTMonitor
Definition: RCTMonitor.h:73
RCTMonitor::m_rctRegionsOccEtaPhi
MonitorElement * m_rctRegionsOccEtaPhi
Definition: RCTMonitor.h:84
RCTMonitor::R6MIN
static const float R6MIN
Definition: RCTMonitor.h:119
RCTMonitor::ETAMAX
static const float ETAMAX
Definition: RCTMonitor.h:111
RCTMonitor::m_rctSourceToken_
edm::EDGetTokenT< L1CaloEmCollection > m_rctSourceToken_
Definition: RCTMonitor.h:151
RCTMonitor::m_rctRelaxedEmRank10
MonitorElement * m_rctRelaxedEmRank10
Definition: RCTMonitor.h:103
edm::ParameterSet
Definition: ParameterSet.h:47
RCTMonitor::RCTMonitor
RCTMonitor(const edm::ParameterSet &)
Definition: RCTMonitor.cc:6
RCTMonitor::m_rctIsoEmOccEtaPhi1
MonitorElement * m_rctIsoEmOccEtaPhi1
Definition: RCTMonitor.h:90
iEvent
int iEvent
Definition: GenABIO.cc:224
RCTMonitor::m_rctNonIsoEmRank1
MonitorElement * m_rctNonIsoEmRank1
Definition: RCTMonitor.h:104
edm::EventSetup
Definition: EventSetup.h:58
RCTMonitor::m_rctNonIsoEmRankEtaPhi10
MonitorElement * m_rctNonIsoEmRankEtaPhi10
Definition: RCTMonitor.h:93
RCTMonitor::m_rctIsoEmRankEtaPhi10
MonitorElement * m_rctIsoEmRankEtaPhi10
Definition: RCTMonitor.h:89
RCTMonitor::m_rctTauVetoEtaPhi
MonitorElement * m_rctTauVetoEtaPhi
Definition: RCTMonitor.h:85
RCTMonitor::m_rctNonIsoEmRank10
MonitorElement * m_rctNonIsoEmRank10
Definition: RCTMonitor.h:105
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
RCTMonitor::m_rctNonIsoEmOccEtaPhi1
MonitorElement * m_rctNonIsoEmOccEtaPhi1
Definition: RCTMonitor.h:96
RCTMonitor::m_rctNonIsoEmOccEtaPhi10
MonitorElement * m_rctNonIsoEmOccEtaPhi10
Definition: RCTMonitor.h:97
RCTMonitor::m_rctRelaxedEmRankEtaPhi10
MonitorElement * m_rctRelaxedEmRankEtaPhi10
Definition: RCTMonitor.h:95
RCTMonitor::m_rctRelaxedEmRankEtaPhi1
MonitorElement * m_rctRelaxedEmRankEtaPhi1
Definition: RCTMonitor.h:94
dqm::implementation::IBooker
Definition: DQMStore.h:43
RCTMonitor::ETAMIN
static const float ETAMIN
Definition: RCTMonitor.h:110
RCTMonitor::m_rctRegionsEtEtaPhi
MonitorElement * m_rctRegionsEtEtaPhi
Definition: RCTMonitor.h:83
RCTMonitor::m_rctRegionEt
MonitorElement * m_rctRegionEt
Definition: RCTMonitor.h:86
edm::Event
Definition: Event.h:73
RCTMonitor::m_rctRelaxedEmOccEtaPhi10
MonitorElement * m_rctRelaxedEmOccEtaPhi10
Definition: RCTMonitor.h:99
RCTMonitor::R10MAX
static const float R10MAX
Definition: RCTMonitor.h:123
edm::InputTag
Definition: InputTag.h:15
DynamicScale
float DynamicScale(int EtaStamp)
Definition: RCTMonitor.cc:64
RCTMonitor::m_rctIsoEmRankEtaPhi1
MonitorElement * m_rctIsoEmRankEtaPhi1
Definition: RCTMonitor.h:88
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
RCTMonitor::m_rctIsoEmRank1
MonitorElement * m_rctIsoEmRank1
Definition: RCTMonitor.h:100