36 emTree = fs->
make<TTree>(
"emTree",
"L1 RCT EM tree");
46 h_emRank = fs->
make<TH1F>(
"emRank",
"emRank", 64, 0., 64.);
48 h_emIeta = fs->
make<TH1F>(
"emIeta",
"emIeta", 22, 0., 22.);
49 h_emIphi = fs->
make<TH1F>(
"emIphi",
"emIphi", 18, 0., 18.);
50 h_emIso = fs->
make<TH1F>(
"emIso",
"emIso", 2, 0., 2.);
83 #ifdef THIS_IS_AN_EVENT_EXAMPLE 88 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE 90 iSetup.
get<SetupRecord>().
get(pSetup);
99 L1CaloEmCollection::const_iterator em;
100 L1CaloRegionCollection::const_iterator rgn;
112 for (ecal = ecalColl->
begin(); ecal != ecalColl->
end(); ecal++) {
118 for (hcal = hcalColl->
begin(); hcal != hcalColl->
end(); hcal++) {
128 for (em = rctEmCands->begin(); em != rctEmCands->end(); em++) {
132 (*myL1EmColl).push_back(*myL1EmCand);
136 if ((*em).bx() == 0) {
137 unsigned short n_emcands = 0;
140 if ((*em).rank() > 0) {
142 h_emIeta->Fill((*em).regionId().ieta());
143 h_emIphi->Fill((*em).regionId().iphi());
144 h_emIso->Fill((*em).isolated());
145 h_emRankInIetaIphi->Fill((*em).regionId().ieta(), (*em).regionId().iphi(), (*em).rank());
146 if ((*em).isolated()) {
154 if ((*em).rank() > 0) {
156 unsigned short rgnPhi = 999;
157 unsigned short rgn = (
unsigned short)(*em).rctRegion();
158 unsigned short card = (
unsigned short)(*em).rctCard();
159 unsigned short crate = (
unsigned short)(*em).rctCrate();
163 }
else if (card < 6) {
166 std::cout <<
"rgnPhi not assigned (still " << rgnPhi <<
") -- Weird card number! " << card;
170 short eta_bin = (card / 2) * 2 + 1;
172 eta_bin = eta_bin + rgn;
196 std::sort(myL1EmColl->begin(), myL1EmColl->end(),
compareEmCands);
198 for (em = myL1EmColl->begin(); em != myL1EmColl->end(); em++) {
199 emRank.push_back((*em).rank());
200 emIeta.push_back((*em).regionId().ieta());
201 emIphi.push_back((*em).regionId().iphi());
202 emIso.push_back((*em).isolated());
209 for (rgn = rctRegions->begin(); rgn != rctRegions->end(); rgn++) {
210 if ((*rgn).bx() == 0) {
214 if ((*rgn).et() > 0) {
237 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.
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