63 using namespace l1extra;
94 ,rctSource_( ps.getParameter<
InputTag >(
"rctSource") )
95 ,gctSource_( ps.getParameter<
InputTag >(
"gctSource") )
96 ,ecalTpgSource_(ps.getParameter<edm::
InputTag>(
"ecalTpgSource"))
105 std::cout <<
"L1TCompare: constructor...." << std::endl;
118 cout <<
"L1T Monitoring histograms will be saved to " <<
206 "ECAL TPG-RCT: rank",
213 "ECAL TPG-RCT: #eta",
219 "ECAL TPG-RCT: #eta (2)",
225 "ECAL TPG-RCT: #phi",
237 std::cout <<
"L1TCompare: end job...." << std::endl;
238 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
250 std::cout <<
"L1TCompare: analyze...." << std::endl;
274 edm::LogInfo(
"DataNotFound") <<
"can't find L1CaloEmCollection with label "
284 <<
"L1CaloRegionCollection with label "
294 std::cerr <<
"L1TGCT: could not find one of the classes?" << std::endl;
297 if (!gctIsoEmCands.
isValid()) {
298 std::cerr <<
"L1TGCT: could not find one of the classes?" << std::endl;
301 if (!gctNonIsoEmCands.
isValid()) {
302 std::cerr <<
"L1TGCT: could not find one of the classes?" << std::endl;
309 for ( L1GctEmCandCollection::const_iterator iem = gctIsoEmCands->begin();
310 iem != gctIsoEmCands->end(); ++iem) {
314 << iem->etaIndex() <<
"("
329 for (L1CaloEmCollection::const_iterator iem = em->begin();
330 iem != em->end(); ++iem) {
337 RctObject h(
id.rctEta(),
id.rctPhi(), iem->rank());
338 if ( !iem->isolated() )
339 rcj_non_iso.push_back(
h);
341 rcj_iso.push_back(
h);
349 for (RctObjectCollection::reverse_iterator ij = rcj_iso.rbegin();
350 ij != rcj_iso.rend() && ij != rcj_iso.rbegin()+8; ++ij) {
352 << ij->rank_ <<
", " << ij->eta_ <<
", " << ij->phi_
356 L1GctEmCandCollection::const_iterator lead_em = gctIsoEmCands->begin();
357 if ( !lead_em->empty() ) {
365 for ( L1GctEmCandCollection::const_iterator iem
366 = gctNonIsoEmCands->begin(); iem != gctNonIsoEmCands->end();
368 if ( ! iem->empty() )
369 std::cout <<
"GCT EM non: " << iem->rank()
380 for (RctObjectCollection::reverse_iterator ij = rcj_non_iso.rbegin();
381 ij != rcj_non_iso.rend() && ij != rcj_non_iso.rbegin()+8; ++ij) {
383 << ij->rank_ <<
", " << ij->eta_ <<
", " << ij->phi_
387 lead_em = gctNonIsoEmCands->begin();
388 if ( !lead_em->empty() ) {
390 rcj_non_iso.rbegin()->eta_);
392 rcj_non_iso.rbegin()->phi_);
394 rcj_non_iso.rbegin()->rank_);
403 <<
"can't find EcalTrigPrimCollection with label "
409 ieTP != eTP->end(); ieTP++) {
410 ecalobs.push_back(
RctObject(ieTP->id().ieta(),
412 ieTP->compressedEt()));
416 for (RctObjectCollection::reverse_iterator ij = ecalobs.rbegin();
417 ij != ecalobs.rend() && ij != ecalobs.rbegin()+8; ++ij) {
419 << ij->rank_ <<
", " << ij->eta_ <<
", " << ij->phi_
424 if ( rcj.rbegin()->rank_ > 4 ) {
426 ecalobs.rbegin()->eta_);
427 int e2 = (rcj.rbegin()->eta_&0x7UL)* ((rcj.rbegin()->eta_&0x8UL)?1:-1);
431 ecalobs.rbegin()->rank_);
434 int seta = rcj.rbegin()->eta_;
435 seta = (seta&0x7UL)*(seta&0x8?-1:1);
437 << rcj.rbegin()->eta_ <<
" "
438 << rcj.rbegin()->phi_ <<
" "
439 << rcj.rbegin()->rank_ <<
" "
440 << (++rcj.rbegin())->rank_<<
" "
441 << ecalobs.rbegin()->eta_ <<
" "
442 << ecalobs.rbegin()->phi_ <<
" "
443 << ecalobs.rbegin()->rank_ <<
" "
444 << (++ecalobs.rbegin())->rank_<<
" "
const unsigned int R6BINS
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmCandsToken_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< L1CaloRegionCollection > rctSourceRctEmRgn_token_
std::vector< L1CaloEmCand > L1CaloEmCollection
MonitorElement * rctGctLeadingIsoEmRank_
void rmdir(const std::string &fullpath)
L1TCompare(const edm::ParameterSet &ps)
MonitorElement * rctGctLeadingIsoEmEta_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * ecalTpgRctLeadingEmEta2_
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
const unsigned int TPPHIBINS
MonitorElement * ecalTpgRctLeadingEmRank_
const unsigned int TPETABINS
MonitorElement * rctGctLeadingNonIsoEmEta_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void setVerbose(unsigned level)
void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsToken_
edm::EDGetTokenT< L1CaloEmCollection > rctSourceEm_token_
MonitorElement * rctGctLeadingIsoEmPhi_
std::vector< L1TCompare::RctObject > RctObjectCollection
MonitorElement * ecalTpgRctLeadingEmEta_
edm::InputTag ecalTpgSource_
MonitorElement * rctGctLeadingNonIsoEmPhi_
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmCandsToken_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTpgSource_token_
MonitorElement * rctGctLeadingNonIsoEmRank_
std::vector< L1CaloRegion > L1CaloRegionCollection
void beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * ecalTpgRctLeadingEmPhi_