63 using namespace l1extra;
100 ,rctSource_( ps.getParameter<
InputTag >(
"rctSource") )
101 ,gctSource_( ps.getParameter<
InputTag >(
"gctSource") )
102 ,ecalTpgSource_(ps.getParameter<edm::
InputTag>(
"ecalTpgSource"))
111 std::cout <<
"L1TCompare: constructor...." << std::endl;
124 cout <<
"L1T Monitoring histograms will be saved to " <<
212 "ECAL TPG-RCT: rank",
219 "ECAL TPG-RCT: #eta",
225 "ECAL TPG-RCT: #eta (2)",
231 "ECAL TPG-RCT: #phi",
243 std::cout <<
"L1TCompare: end job...." << std::endl;
244 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
256 std::cout <<
"L1TCompare: analyze...." << std::endl;
280 edm::LogInfo(
"DataNotFound") <<
"can't find L1CaloEmCollection with label "
290 <<
"L1CaloRegionCollection with label "
300 std::cerr <<
"L1TGCT: could not find one of the classes?" << std::endl;
303 if (!gctIsoEmCands.
isValid()) {
304 std::cerr <<
"L1TGCT: could not find one of the classes?" << std::endl;
307 if (!gctNonIsoEmCands.
isValid()) {
308 std::cerr <<
"L1TGCT: could not find one of the classes?" << std::endl;
315 for ( L1GctEmCandCollection::const_iterator iem = gctIsoEmCands->begin();
316 iem != gctIsoEmCands->end(); ++iem) {
320 << iem->etaIndex() <<
"("
335 for (L1CaloEmCollection::const_iterator iem = em->begin();
336 iem != em->end(); ++iem) {
343 RctObject h(
id.rctEta(),
id.rctPhi(), iem->rank());
344 if ( !iem->isolated() )
345 rcj_non_iso.push_back(
h);
347 rcj_iso.push_back(
h);
355 for (RctObjectCollection::reverse_iterator ij = rcj_iso.rbegin();
356 ij != rcj_iso.rend() && ij != rcj_iso.rbegin()+8; ++ij) {
358 << ij->rank_ <<
", " << ij->eta_ <<
", " << ij->phi_
362 L1GctEmCandCollection::const_iterator lead_em = gctIsoEmCands->begin();
363 if ( !lead_em->empty() ) {
371 for ( L1GctEmCandCollection::const_iterator iem
372 = gctNonIsoEmCands->begin(); iem != gctNonIsoEmCands->end();
374 if ( ! iem->empty() )
375 std::cout <<
"GCT EM non: " << iem->rank()
386 for (RctObjectCollection::reverse_iterator ij = rcj_non_iso.rbegin();
387 ij != rcj_non_iso.rend() && ij != rcj_non_iso.rbegin()+8; ++ij) {
389 << ij->rank_ <<
", " << ij->eta_ <<
", " << ij->phi_
393 lead_em = gctNonIsoEmCands->begin();
394 if ( !lead_em->empty() ) {
396 rcj_non_iso.rbegin()->eta_);
398 rcj_non_iso.rbegin()->phi_);
400 rcj_non_iso.rbegin()->rank_);
409 <<
"can't find EcalTrigPrimCollection with label "
415 ieTP != eTP->end(); ieTP++) {
416 ecalobs.push_back(
RctObject(ieTP->id().ieta(),
418 ieTP->compressedEt()));
422 for (RctObjectCollection::reverse_iterator ij = ecalobs.rbegin();
423 ij != ecalobs.rend() && ij != ecalobs.rbegin()+8; ++ij) {
425 << ij->rank_ <<
", " << ij->eta_ <<
", " << ij->phi_
430 if ( rcj.rbegin()->rank_ > 4 ) {
432 ecalobs.rbegin()->eta_);
433 int e2 = (rcj.rbegin()->eta_&0x7UL)* ((rcj.rbegin()->eta_&0x8UL)?1:-1);
437 ecalobs.rbegin()->rank_);
440 int seta = rcj.rbegin()->eta_;
441 seta = (seta&0x7UL)*(seta&0x8?-1:1);
443 << rcj.rbegin()->eta_ <<
" "
444 << rcj.rbegin()->phi_ <<
" "
445 << rcj.rbegin()->rank_ <<
" "
446 << (++rcj.rbegin())->rank_<<
" "
447 << ecalobs.rbegin()->eta_ <<
" "
448 << ecalobs.rbegin()->phi_ <<
" "
449 << ecalobs.rbegin()->rank_ <<
" "
450 << (++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
const unsigned int R12BINS
MonitorElement * rctGctLeadingIsoEmRank_
void rmdir(const std::string &fullpath)
L1TCompare(const edm::ParameterSet &ps)
MonitorElement * rctGctLeadingIsoEmEta_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const unsigned int R10BINS
MonitorElement * ecalTpgRctLeadingEmEta2_
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
const unsigned int TPPHIBINS
MonitorElement * ecalTpgRctLeadingEmRank_
const unsigned int TPETABINS
MonitorElement * rctGctLeadingNonIsoEmEta_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< L1TCompare::RctObject > RctObjectCollection
MonitorElement * ecalTpgRctLeadingEmEta_
edm::InputTag ecalTpgSource_
MonitorElement * rctGctLeadingNonIsoEmPhi_
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmCandsToken_
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_