28 showEmCands(iConfig.getUntrackedParameter<
bool>(
"showEmCands")),
29 showRegionSums(iConfig.getUntrackedParameter<
bool>(
"showRegionSums")),
30 ecalDigisLabel(iConfig.getParameter<
edm::InputTag>(
"ecalDigisLabel")),
31 hcalDigisLabel(iConfig.getParameter<
edm::InputTag>(
"hcalDigisLabel")),
32 rctDigisLabel(iConfig.getParameter<
edm::InputTag>(
"rctDigisLabel"))
38 emTree = fs->
make<TTree>(
"emTree",
"L1 RCT EM tree");
48 h_emRank = fs->
make<TH1F>(
"emRank",
"emRank", 64, 0., 64. );
51 h_emIeta = fs->
make<TH1F>(
"emIeta",
"emIeta", 22, 0., 22. );
52 h_emIphi = fs->
make<TH1F>(
"emIphi",
"emIphi", 18, 0., 18. );
53 h_emIso = fs->
make<TH1F>(
"emIso",
"emIso", 2, 0., 2. );
63 h_regionSum = fs->
make<TH1F>(
"regionSum",
"regionSum", 100, 0., 100. );
68 0., 22., 18, 0., 18. );
72 h_towerMip = fs->
make<TH1F>(
"towerMip",
"towerMipBit", 2, 0., 2. );
101 #ifdef THIS_IS_AN_EVENT_EXAMPLE 106 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE 108 iSetup.
get<SetupRecord>().
get(pSetup);
117 L1CaloEmCollection::const_iterator em;
118 L1CaloRegionCollection::const_iterator rgn;
130 for (ecal=ecalColl->
begin(); ecal!=ecalColl->
end(); ecal++)
138 for (hcal=hcalColl->
begin(); hcal!=hcalColl->
end(); hcal++)
151 for (em=rctEmCands->begin(); em!=rctEmCands->end(); em++){
155 (*myL1EmColl).push_back(*myL1EmCand);
161 unsigned short n_emcands = 0;
164 if ((*em).rank() > 0)
167 h_emIeta->Fill( (*em).regionId().ieta() );
168 h_emIphi->Fill( (*em).regionId().iphi() );
169 h_emIso->Fill( (*em).isolated() );
171 (*em).regionId().iphi(),
173 if ((*em).isolated())
176 (*em).regionId().iphi() );
181 (*em).regionId().iphi() );
187 if ((*em).rank() > 0)
190 unsigned short rgnPhi = 999;
191 unsigned short rgn = (
unsigned short) (*em).rctRegion();
192 unsigned short card = (
unsigned short) (*em).rctCard();
193 unsigned short crate = (
unsigned short) (*em).rctCrate();
205 std::cout <<
"rgnPhi not assigned (still " << rgnPhi <<
") -- Weird card number! " << card ;
209 short eta_bin = (card/2) * 2 + 1;
212 eta_bin = eta_bin + rgn;
239 for (em=myL1EmColl->begin(); em!=myL1EmColl->end(); em++)
241 emRank.push_back( (*em).rank() );
242 emIeta.push_back( (*em).regionId().ieta() );
243 emIphi.push_back( (*em).regionId().iphi() );
244 emIso.push_back( (*em).isolated() );
253 for (rgn=rctRegions->begin(); rgn!=rctRegions->end(); rgn++)
255 if ((*rgn).bx() == 0)
261 if ( (*rgn).et() > 0 )
269 (*rgn).fineGrain() );
290 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< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
Level-1 Region Calorimeter Trigger EM candidate.
T * make(const Args &...args) const
make new ROOT object
TH2F * h_emRankInIetaIphi
TH1F * h_emCandTimeSample
TH2F * h_emNonIsoInIetaIphi
~L1RCTTestAnalyzer() override
std::vector< int > emRank
unsigned rank() const
get rank bits
edm::InputTag rctDigisLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
L1RCTTestAnalyzer(const edm::ParameterSet &)
edm::InputTag hcalDigisLabel
const_iterator end() const
TH2F * h_regionFGInIetaIphi
edm::InputTag ecalDigisLabel
const_iterator begin() const
std::vector< int > emIphi