37 emTree =
fs->make<TTree>(
"emTree",
"L1 RCT EM tree");
47 h_emRank =
fs->make<TH1F>(
"emRank",
"emRank", 64, 0., 64.);
49 h_emIeta =
fs->make<TH1F>(
"emIeta",
"emIeta", 22, 0., 22.);
50 h_emIphi =
fs->make<TH1F>(
"emIphi",
"emIphi", 18, 0., 18.);
51 h_emIso =
fs->make<TH1F>(
"emIso",
"emIso", 2, 0., 2.);
57 h_regionSum =
fs->make<TH1F>(
"regionSum",
"regionSum", 100, 0., 100.);
58 h_regionIeta =
fs->make<TH1F>(
"regionIeta",
"regionIeta", 22, 0., 22.);
59 h_regionIphi =
fs->make<TH1F>(
"regionIphi",
"regionIphi", 18, 0., 18.);
60 h_regionMip =
fs->make<TH1F>(
"regionMip",
"regionMipBit", 2, 0., 2.);
64 h_towerMip =
fs->make<TH1F>(
"towerMip",
"towerMipBit", 2, 0., 2.);
84 #ifdef THIS_IS_AN_EVENT_EXAMPLE 86 iEvent.getByLabel(
"example", pIn);
89 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE 91 iSetup.
get<SetupRecord>().
get(pSetup);
100 L1CaloEmCollection::const_iterator em;
101 L1CaloRegionCollection::const_iterator rgn;
129 for (em = rctEmCands->begin(); em != rctEmCands->end(); em++) {
133 (*myL1EmColl).push_back(*myL1EmCand);
137 if ((*em).bx() == 0) {
138 unsigned short n_emcands = 0;
141 if ((*em).rank() > 0) {
143 h_emIeta->Fill((*em).regionId().ieta());
144 h_emIphi->Fill((*em).regionId().iphi());
145 h_emIso->Fill((*em).isolated());
146 h_emRankInIetaIphi->Fill((*em).regionId().ieta(), (*em).regionId().iphi(), (*em).rank());
147 if ((*em).isolated()) {
155 if ((*em).rank() > 0) {
157 unsigned short rgnPhi = 999;
158 unsigned short rgn = (
unsigned short)(*em).rctRegion();
159 unsigned short card = (
unsigned short)(*em).rctCard();
160 unsigned short crate = (
unsigned short)(*em).rctCrate();
164 }
else if (card < 6) {
167 std::cout <<
"rgnPhi not assigned (still " << rgnPhi <<
") -- Weird card number! " << card;
171 short eta_bin = (card / 2) * 2 + 1;
173 eta_bin = eta_bin + rgn;
199 for (em = myL1EmColl->begin(); em != myL1EmColl->end(); em++) {
200 emRank.push_back((*em).rank());
201 emIeta.push_back((*em).regionId().ieta());
202 emIphi.push_back((*em).regionId().iphi());
203 emIso.push_back((*em).isolated());
210 for (rgn = rctRegions->begin(); rgn != rctRegions->end(); rgn++) {
211 if ((*rgn).bx() == 0) {
215 if ((*rgn).et() > 0) {
238 return (cand1.
rank() < cand2.
rank());
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< int > emIeta
std::vector< L1CaloEmCand > L1CaloEmCollection
TH2F * h_regionSumInIetaIphi
static bool compareEmCands(const L1CaloEmCand &cand1, const L1CaloEmCand &cand2)
std::vector< T >::const_iterator const_iterator
Level-1 Region Calorimeter Trigger EM candidate.
TH2F * h_emRankInIetaIphi
TH1F * h_emCandTimeSample
TH2F * h_emNonIsoInIetaIphi
~L1RCTTestAnalyzer() override
std::vector< int > emRank
edm::InputTag rctDigisLabel
const_iterator begin() const
L1RCTTestAnalyzer(const edm::ParameterSet &)
edm::InputTag hcalDigisLabel
const_iterator end() const
unsigned rank() const
get rank bits
TH2F * h_regionFGInIetaIphi
edm::InputTag ecalDigisLabel
std::vector< int > emIphi