#include <EETriggerTowerTask.h>
Public Member Functions | |
EETriggerTowerTask (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~EETriggerTowerTask () |
Destructor. | |
Static Public Attributes | |
static const int | nSM = 18 |
number of supermodules | |
static const int | nTTEta = 20 |
number of trigger towers in eta | |
static const int | nTTPhi = 20 |
number of trigger towers in phi | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginJob (void) |
BeginJob. | |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
void | endJob (void) |
EndJob. | |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
EndRun. | |
void | reset (void) |
Reset. | |
void | setup (void) |
Setup. | |
Private Types | |
typedef std::vector < MonitorElement * > | array1 |
1D array | |
Private Member Functions | |
void | processDigis (const edm::Event &e, const edm::Handle< EcalTrigPrimDigiCollection > &digis, array1 &meEtMap, array1 &meVeto, const edm::Handle< EcalTrigPrimDigiCollection > &compDigis=edm::Handle< EcalTrigPrimDigiCollection >(), const edm::Handle< edm::TriggerResults > &hltResults=edm::Handle< edm::TriggerResults >()) |
process a collection of digis, either real or emulated | |
void | reserveArray (array1 &array) |
reserve an array to hold one histogram per supermodule | |
void | setup (const char *nameext, const char *folder, bool emulated) |
book monitor elements for real, or emulated digis | |
Private Attributes | |
DQMStore * | dqmStore_ |
DQM back-end interface. | |
edm::InputTag | EEDigiCollection_ |
to find the input collection of crystal digis | |
edm::InputTag | emulCollection_ |
to find the input collection of emulated digis | |
bool | enableCleanup_ |
remove MEs | |
std::string | HLTCaloHLTBit_ |
std::string | HLTMuonHLTBit_ |
edm::InputTag | HLTResultsCollection_ |
to find the input collection of HLT bits | |
int | ievt_ |
local event counter | |
bool | init_ |
init flag | |
array1 | meEmulError_ |
array1 | meEmulMatch_ |
MonitorElement * | meEmulMatchIndex1D_ [2] |
1D emulator match 1D | |
MonitorElement * | meEmulMatchMaxIndex1D_ [2] |
MonitorElement * | meEtBxReal_ [2] |
number and ET average of TP vs bx for the whole EE+/- | |
array1 | meEtMapEmul_ |
Emulated Et vs ix vs iy, for each SM. | |
array1 | meEtMapReal_ |
Et vs ix vs iy, for each SM. | |
MonitorElement * | meEtSpectrumEmul_ [2] |
MonitorElement * | meEtSpectrumEmulMax_ [2] |
MonitorElement * | meEtSpectrumReal_ [2] |
ET spectrums for the whole EE+/-. | |
MonitorElement * | meOccupancyBxReal_ [2] |
bool | mergeRuns_ |
merge MEs across runs | |
MonitorElement * | meTCCTimingCalo_ [2] |
TCC timing. | |
MonitorElement * | meTCCTimingMuon_ [2] |
array1 | meVetoEmul_ |
Emulated fine grain veto vs ix vs iy, for each SM. | |
array1 | meVetoEmulError_ |
array1 | meVetoReal_ |
fine grain veto vs ix vs iy, for each SM | |
std::string | outputFile_ |
debug output root file. if empty, no output file created. | |
std::string | prefixME_ |
path to MEs | |
edm::InputTag | realCollection_ |
to find the input collection of real digis |
Definition at line 23 of file EETriggerTowerTask.h.
typedef std::vector<MonitorElement*> EETriggerTowerTask::array1 [private] |
1D array
Definition at line 72 of file EETriggerTowerTask.h.
EETriggerTowerTask::EETriggerTowerTask | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 32 of file EETriggerTowerTask.cc.
References dqmStore_, EEDigiCollection_, emulCollection_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTCaloHLTBit_, HLTMuonHLTBit_, HLTResultsCollection_, init_, LogDebug, meEmulError_, meEmulMatch_, meEmulMatchIndex1D_, meEmulMatchMaxIndex1D_, meEtBxReal_, meEtMapEmul_, meEtMapReal_, meEtSpectrumEmul_, meEtSpectrumEmulMax_, meEtSpectrumReal_, meOccupancyBxReal_, mergeRuns_, meTCCTimingCalo_, meTCCTimingMuon_, meVetoEmul_, meVetoEmulError_, meVetoReal_, cmsCodeRules::cppFunctionSkipper::operator, outputFile_, prefixME_, realCollection_, and reserveArray().
{ init_ = false; dqmStore_ = edm::Service<DQMStore>().operator->(); prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", ""); mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false); enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); meEtSpectrumReal_[0] = 0; meEtSpectrumReal_[1] = 0; meEtSpectrumEmul_[0] = 0; meEtSpectrumEmul_[1] = 0; meEtSpectrumEmulMax_[0] = 0; meEtSpectrumEmulMax_[1] = 0; meEtBxReal_[0] = 0; meEtBxReal_[1] = 0; meOccupancyBxReal_[0] = 0; meOccupancyBxReal_[1] = 0; meTCCTimingCalo_[0] = 0; meTCCTimingCalo_[1] = 0; meTCCTimingMuon_[0] = 0; meTCCTimingMuon_[1] = 0; meEmulMatchIndex1D_[0] = 0; meEmulMatchIndex1D_[1] = 0; meEmulMatchMaxIndex1D_[0] = 0; meEmulMatchMaxIndex1D_[1] = 0; reserveArray(meEtMapReal_); reserveArray(meVetoReal_); reserveArray(meEtMapEmul_); reserveArray(meVetoEmul_); reserveArray(meEmulError_); reserveArray(meEmulMatch_); reserveArray(meVetoEmulError_); realCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollectionReal"); emulCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollectionEmul"); EEDigiCollection_ = ps.getParameter<edm::InputTag>("EEDigiCollection"); HLTResultsCollection_ = ps.getParameter<edm::InputTag>("HLTResultsCollection"); HLTCaloHLTBit_ = ps.getUntrackedParameter<std::string>("HLTCaloHLTBit", ""); HLTMuonHLTBit_ = ps.getUntrackedParameter<std::string>("HLTMuonHLTBit", ""); outputFile_ = ps.getUntrackedParameter<std::string>("OutputRootFile", ""); LogDebug("EETriggerTowerTask") << "REAL digis: " << realCollection_; LogDebug("EETriggerTowerTask") << "EMULATED digis: " << emulCollection_; }
EETriggerTowerTask::~EETriggerTowerTask | ( | ) | [virtual] |
void EETriggerTowerTask::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 347 of file EETriggerTowerTask.cc.
References emulCollection_, edm::Event::getByLabel(), JetPDSkim_cfg::hltResults, HLTResultsCollection_, ievt_, init_, edm::InputTag::instance(), edm::InputTag::label(), LogDebug, meEtMapEmul_, meEtMapReal_, meVetoEmul_, meVetoReal_, processDigis(), realCollection_, and setup().
{ if ( ! init_ ) this->setup(); ievt_++; edm::Handle<EcalTrigPrimDigiCollection> realDigis; if ( e.getByLabel(realCollection_, realDigis) ) { int neetpd = realDigis->size(); LogDebug("EETriggerTowerTask") << "event " << ievt_ << " trigger primitive digi collection size: " << neetpd; processDigis( e, realDigis, meEtMapReal_, meVetoReal_); } else { edm::LogWarning("EETriggerTowerTask") << realCollection_ << " not available"; } edm::Handle<EcalTrigPrimDigiCollection> emulDigis; if ( e.getByLabel(emulCollection_, emulDigis) ) { edm::Handle<edm::TriggerResults> hltResults; if ( !e.getByLabel(HLTResultsCollection_, hltResults) ) { HLTResultsCollection_ = edm::InputTag(HLTResultsCollection_.label(), HLTResultsCollection_.instance(), "HLT"); } if ( !e.getByLabel(HLTResultsCollection_, hltResults) ) { HLTResultsCollection_ = edm::InputTag(HLTResultsCollection_.label(), HLTResultsCollection_.instance(), "FU"); } if ( e.getByLabel(HLTResultsCollection_, hltResults) ) { processDigis( e, emulDigis, meEtMapEmul_, meVetoEmul_, realDigis, hltResults); } else { edm::LogWarning("EETriggerTowerTask") << HLTResultsCollection_ << " not available"; } } else { edm::LogInfo("EETriggerTowerTask") << emulCollection_ << " not available"; } }
void EETriggerTowerTask::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 97 of file EETriggerTowerTask.cc.
References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().
void EETriggerTowerTask::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 108 of file EETriggerTowerTask.cc.
References Numbers::initGeometry(), mergeRuns_, and reset().
{ Numbers::initGeometry(c, false); if ( ! mergeRuns_ ) this->reset(); }
void EETriggerTowerTask::cleanup | ( | void | ) | [protected] |
Cleanup.
Definition at line 323 of file EETriggerTowerTask.cc.
References dqmStore_, init_, outputFile_, prefixME_, DQMStore::rmdir(), and DQMStore::save().
Referenced by endJob().
{ if ( ! init_ ) return; if ( dqmStore_ ) { if ( !outputFile_.empty() ) dqmStore_->save( outputFile_.c_str() ); dqmStore_->rmdir( prefixME_ + "/EETriggerTowerTask" ); } init_ = false; }
void EETriggerTowerTask::endJob | ( | void | ) | [protected, virtual] |
EndJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 339 of file EETriggerTowerTask.cc.
References cleanup(), enableCleanup_, and ievt_.
{ edm::LogInfo("EETriggerTowerTask") << "analyzed " << ievt_ << " events"; if ( enableCleanup_ ) this->cleanup(); }
void EETriggerTowerTask::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
EndRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 116 of file EETriggerTowerTask.cc.
{ }
void EETriggerTowerTask::processDigis | ( | const edm::Event & | e, |
const edm::Handle< EcalTrigPrimDigiCollection > & | digis, | ||
array1 & | meEtMap, | ||
array1 & | meVeto, | ||
const edm::Handle< EcalTrigPrimDigiCollection > & | compDigis = edm::Handle<EcalTrigPrimDigiCollection>() , |
||
const edm::Handle< edm::TriggerResults > & | hltResults = edm::Handle<edm::TriggerResults>() |
||
) | [private] |
process a collection of digis, either real or emulated
Definition at line 403 of file EETriggerTowerTask.cc.
References accept(), edm::EventBase::bunchCrossing(), Numbers::crystals(), EcalEndcap, EEDigiCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), HLTCaloHLTBit_, HLTMuonHLTBit_, i, getHLTprescales::index, Numbers::iSM(), ecalpyutils::ism(), edm::HandleBase::isValid(), Numbers::iTCC(), Numbers::iTT(), EEDetId::ix(), j, meEmulError_, meEmulMatch_, meEmulMatchIndex1D_, meEmulMatchMaxIndex1D_, meEtBxReal_, meEtSpectrumEmul_, meEtSpectrumEmulMax_, meEtSpectrumReal_, meOccupancyBxReal_, meTCCTimingCalo_, meTCCTimingMuon_, meVetoEmulError_, Numbers::subDet(), edm::TriggerNames::triggerName(), and edm::Event::triggerNames().
Referenced by analyze().
{ int bx = e.bunchCrossing(); int nTP[2]; nTP[0] = nTP[1] = 0; // indexes are: readoutCrystalsInTower[TCCId][iTT] int readoutCrystalsInTower[108][41]; for (int itcc = 0; itcc < 108; itcc++) { for (int itt = 0; itt < 41; itt++) readoutCrystalsInTower[itcc][itt] = 0; } if ( compDigis.isValid() ) { edm::Handle<EEDigiCollection> crystalDigis; if ( e.getByLabel(EEDigiCollection_, crystalDigis) ) { for ( EEDigiCollection::const_iterator cDigiItr = crystalDigis->begin(); cDigiItr != crystalDigis->end(); ++cDigiItr ) { EEDetId id = cDigiItr->id(); int ix = id.ix(); int iy = id.iy(); int ism = Numbers::iSM( id ); int itcc = Numbers::iTCC( ism, EcalEndcap, ix, iy ); int itt = Numbers::iTT( ism, EcalEndcap, ix, iy ); readoutCrystalsInTower[itcc-1][itt-1]++; } } else { edm::LogWarning("EETriggerTowerTask") << EEDigiCollection_ << " not available"; } } bool caloTrg = false; bool muonTrg = false; if ( hltResults.isValid() ) { int ntrigs = hltResults->size(); if ( ntrigs!=0 ) { const edm::TriggerNames & triggerNames = e.triggerNames(*hltResults); for ( int itrig = 0; itrig != ntrigs; ++itrig ) { std::string trigName = triggerNames.triggerName(itrig); bool accept = hltResults->accept(itrig); if ( trigName == HLTCaloHLTBit_ ) caloTrg = accept; if ( trigName == HLTMuonHLTBit_ ) muonTrg = accept; } } else { edm::LogWarning("EBTriggerTowerTask") << " zero size trigger names in input TriggerResults"; } } for ( EcalTrigPrimDigiCollection::const_iterator tpdigiItr = digis->begin(); tpdigiItr != digis->end(); ++tpdigiItr ) { if ( Numbers::subDet( tpdigiItr->id() ) != EcalEndcap ) continue; int ismt = Numbers::iSM( tpdigiItr->id() ); int itt = Numbers::iTT( tpdigiItr->id() ); int itcc = Numbers::iTCC( tpdigiItr->id() ); std::vector<DetId>* crystals = Numbers::crystals( tpdigiItr->id() ); float xvalEt = tpdigiItr->compressedEt(); float xvalVeto = 0.5 + tpdigiItr->fineGrain(); bool good = true; bool goodVeto = true; int compDigiInterest = -1; bool matchSample[6]; for (int j=0; j<6; j++) matchSample[j]=false; if ( compDigis.isValid() ) { if ( ismt >= 1 && ismt <= 9 ) { if ( meEtSpectrumEmul_[0] ) meEtSpectrumEmul_[0]->Fill( xvalEt ); } else { if ( meEtSpectrumEmul_[1] ) meEtSpectrumEmul_[1]->Fill( xvalEt ); } float maxEt = 0; int maxTPIndex = -1; for (int j=0; j<5; j++) { float EtTP = (*tpdigiItr)[j].compressedEt(); if ( EtTP > maxEt ) { maxEt = EtTP; maxTPIndex = j+1; } } if ( ismt >= 1 && ismt <= 9 ) { if ( meEtSpectrumEmulMax_[0] ) meEtSpectrumEmulMax_[0]->Fill( maxEt ); if ( meEmulMatchMaxIndex1D_[0] && maxEt > 0 ) meEmulMatchMaxIndex1D_[0]->Fill( maxTPIndex ); } else { if ( meEtSpectrumEmulMax_[1] ) meEtSpectrumEmulMax_[1]->Fill( maxEt ); if ( meEmulMatchMaxIndex1D_[1] && maxEt > 0 ) meEmulMatchMaxIndex1D_[1]->Fill( maxTPIndex ); } EcalTrigPrimDigiCollection::const_iterator compDigiItr = compDigis->find( tpdigiItr->id().rawId() ); if ( compDigiItr != compDigis->end() ) { int compDigiEt = compDigiItr->compressedEt(); compDigiInterest = (compDigiItr->ttFlag() & 0x3); if ( ismt >= 1 && ismt <= 9 ) { if ( compDigiEt > 0 ) nTP[0]++; if ( meEtSpectrumReal_[0] ) meEtSpectrumReal_[0]->Fill( compDigiEt ); if ( meEtBxReal_[0] && compDigiEt > 0 ) meEtBxReal_[0]->Fill( bx, compDigiEt ); } else { if ( compDigiEt > 0 ) nTP[1]++; if ( meEtSpectrumReal_[1] ) meEtSpectrumReal_[1]->Fill( compDigiEt ); if ( meEtBxReal_[1] && compDigiEt > 0 ) meEtBxReal_[1]->Fill( bx, compDigiEt ); } // compare the 5 TPs with different time-windows // sample 0 means no match, 1-5: sample of the TP that matches matchSample[0]=false; bool matchedAny=false; for (int j=0; j<5; j++) { if ((*tpdigiItr)[j].compressedEt() == compDigiEt ) { matchSample[j+1]=true; matchedAny=true; } else { matchSample[j+1]=false; } } if (!matchedAny) matchSample[0]=true; // check if the tower has been readout completely and if it is medium or high interest if (readoutCrystalsInTower[itcc-1][itt-1] == int(crystals->size()) && (compDigiInterest == 1 || compDigiInterest == 3) && compDigiEt > 0) { if ( tpdigiItr->compressedEt() != compDigiEt ) { good = false; } if ( tpdigiItr->fineGrain() != compDigiItr->fineGrain() ) { goodVeto = false; } for (int j=0; j<6; j++) { if (matchSample[j]) { int index = ( j==0 ) ? -1 : j; if ( ismt >= 1 && ismt <= 9 ) { meEmulMatchIndex1D_[0]->Fill(index+0.5); } else { meEmulMatchIndex1D_[1]->Fill(index+0.5); } for ( unsigned int i=0; i<crystals->size(); i++ ) { EEDetId id = (*crystals)[i]; int ix = id.ix(); int iy = id.iy(); if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix; float xix = ix-0.5; float xiy = iy-0.5; meEmulMatch_[ismt-1]->Fill(xix, xiy, j+0.5); if ( ismt >= 1 && ismt <= 9 ) { if ( meTCCTimingCalo_[0] && caloTrg ) meTCCTimingCalo_[0]->Fill( itcc, index+0.5 ); if ( meTCCTimingMuon_[0] && muonTrg ) meTCCTimingMuon_[0]->Fill( itcc, index+0.5 ); } else { if ( meTCCTimingCalo_[1] && caloTrg ) meTCCTimingCalo_[1]->Fill( itcc, index+0.5 ); if ( meTCCTimingMuon_[1] && muonTrg ) meTCCTimingMuon_[1]->Fill( itcc, index+0.5 ); } } // loop on crystals } } } // check readout } else { good = false; goodVeto = false; } for ( unsigned int i=0; i<crystals->size(); i++ ) { EEDetId id = (*crystals)[i]; int ix = id.ix(); int iy = id.iy(); if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix; float xix = ix-0.5; float xiy = iy-0.5; if (!good ) { if ( meEmulError_[ismt-1] ) meEmulError_[ismt-1]->Fill(xix, xiy); } if (!goodVeto) { if ( meVetoEmulError_[ismt-1] ) meVetoEmulError_[ismt-1]->Fill(xix, xiy); } } // loop on crystals } // compDigis.isValid for ( unsigned int i=0; i<crystals->size(); i++ ) { EEDetId id = (*crystals)[i]; int ix = id.ix(); int iy = id.iy(); if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix; float xix = ix-0.5; float xiy = iy-0.5; if ( meEtMap[ismt-1] ) meEtMap[ismt-1]->Fill(xix, xiy, xvalEt); if ( meVeto[ismt-1] ) meVeto[ismt-1]->Fill(xix, xiy, xvalVeto); } // loop on crystals } // loop on TP if ( meOccupancyBxReal_[0] ) meOccupancyBxReal_[0]->Fill( bx, nTP[0] ); if ( meOccupancyBxReal_[1] ) meOccupancyBxReal_[1]->Fill( bx, nTP[1] ); }
void EETriggerTowerTask::reserveArray | ( | array1 & | array | ) | [private] |
reserve an array to hold one histogram per supermodule
Definition at line 90 of file EETriggerTowerTask.cc.
References nSM.
Referenced by EETriggerTowerTask().
void EETriggerTowerTask::reset | ( | void | ) | [protected] |
Reset.
Definition at line 120 of file EETriggerTowerTask.cc.
References i, meEmulError_, meEmulMatch_, meEmulMatchIndex1D_, meEmulMatchMaxIndex1D_, meEtBxReal_, meEtMapEmul_, meEtMapReal_, meEtSpectrumEmul_, meEtSpectrumEmulMax_, meEtSpectrumReal_, meOccupancyBxReal_, meTCCTimingCalo_, meTCCTimingMuon_, meVetoEmul_, meVetoEmulError_, meVetoReal_, and MonitorElement::Reset().
Referenced by beginRun().
{ for (int iside = 0; iside < 2; iside++) { if ( meEtSpectrumReal_[iside] ) meEtSpectrumReal_[iside]->Reset(); if ( meEtSpectrumEmul_[iside] ) meEtSpectrumEmul_[iside]->Reset(); if ( meEtSpectrumEmulMax_[iside] ) meEtSpectrumEmulMax_[iside]->Reset(); if ( meEtBxReal_[iside] ) meEtBxReal_[iside]->Reset(); if ( meOccupancyBxReal_[iside] ) meOccupancyBxReal_[iside]->Reset(); if ( meTCCTimingCalo_[iside] ) meTCCTimingCalo_[iside]->Reset(); if ( meTCCTimingMuon_[iside] ) meTCCTimingMuon_[iside]->Reset(); if ( meEmulMatchIndex1D_[iside] ) meEmulMatchIndex1D_[iside]->Reset(); if ( meEmulMatchMaxIndex1D_[iside] ) meEmulMatchMaxIndex1D_[iside]->Reset(); } for (int i = 0; i < 18; i++) { if ( meEtMapReal_[i] ) meEtMapReal_[i]->Reset(); if ( meVetoReal_[i] ) meVetoReal_[i]->Reset(); if ( meEtMapEmul_[i] ) meEtMapEmul_[i]->Reset(); if ( meVetoEmul_[i] ) meVetoEmul_[i]->Reset(); if ( meEmulError_[i] ) meEmulError_[i]->Reset(); if ( meEmulMatch_[i] ) meEmulMatch_[i]->Reset(); if ( meVetoEmulError_[i] ) meVetoEmulError_[i]->Reset(); } }
void EETriggerTowerTask::setup | ( | void | ) | [protected] |
void EETriggerTowerTask::setup | ( | const char * | nameext, |
const char * | folder, | ||
bool | emulated | ||
) | [private] |
book monitor elements for real, or emulated digis
Definition at line 164 of file EETriggerTowerTask.cc.
References DQMStore::book1D(), DQMStore::book2D(), DQMStore::book3D(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, trackerHits::histo, HLTCaloHLTBit_, HLTMuonHLTBit_, i, Numbers::ix0EE(), Numbers::iy0EE(), meEmulError_, meEmulMatch_, meEmulMatchIndex1D_, meEmulMatchMaxIndex1D_, meEtBxReal_, meEtMapEmul_, meEtMapReal_, meEtSpectrumEmul_, meEtSpectrumEmulMax_, meEtSpectrumReal_, meOccupancyBxReal_, meTCCTimingCalo_, meTCCTimingMuon_, meVetoEmul_, meVetoEmulError_, meVetoReal_, Numbers::sEE(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), DQMStore::tag(), and fw3dlego::xbins.
{ array1* meEtMap = &meEtMapReal_; array1* meVeto = &meVetoReal_; if ( emulated ) { meEtMap = &meEtMapEmul_; meVeto = &meVetoEmul_; } dqmStore_->setCurrentFolder(folder); char histo[200]; if (!emulated) { sprintf(histo, "EETTT Et spectrum %s EE -", nameext); meEtSpectrumReal_[0] = dqmStore_->book1D(histo, histo, 256, 0., 256.); meEtSpectrumReal_[0]->setAxisTitle("energy (ADC)", 1); sprintf(histo, "EETTT Et spectrum %s EE +", nameext); meEtSpectrumReal_[1] = dqmStore_->book1D(histo, histo, 256, 0., 256.); meEtSpectrumReal_[1]->setAxisTitle("energy (ADC)", 1); sprintf(histo, "EETTT TP matching index EE -"); meEmulMatchIndex1D_[0] = dqmStore_->book1D(histo, histo, 7, -1., 6.); meEmulMatchIndex1D_[0]->setAxisTitle("TP data matching emulator", 1); sprintf(histo, "EETTT TP matching index EE +"); meEmulMatchIndex1D_[1] = dqmStore_->book1D(histo, histo, 7, -1., 6.); meEmulMatchIndex1D_[1]->setAxisTitle("TP data matching emulator", 1); sprintf(histo, "EETTT max TP matching index EE -"); meEmulMatchMaxIndex1D_[0] = dqmStore_->book1D(histo, histo, 7, -1., 6.); meEmulMatchMaxIndex1D_[0]->setAxisTitle("Max TP data matching emulator", 1); sprintf(histo, "EETTT max TP matching index EE +"); meEmulMatchMaxIndex1D_[1] = dqmStore_->book1D(histo, histo, 7, -1., 6.); meEmulMatchMaxIndex1D_[1]->setAxisTitle("Max TP data matching emulator", 1); double xbins[51]; for ( int i=0; i<=11; i++ ) xbins[i] = i-1; // begin of orbit // abort gap in presence of calibration: [3381-3500] // abort gap in absence of calibration: [3444-3500] // using the wider abort gap always, start finer binning at bx=3371 for ( int i=12; i<=22; i++) xbins[i] = 3371+i-12; // use 29 bins for the abort gap for ( int i=23; i<=50; i++) xbins[i] = 3382+(i-23)*6; sprintf(histo, "EETTT Et vs bx %s EE -", nameext); meEtBxReal_[0] = dqmStore_->bookProfile(histo, histo, 50, xbins, 256, 0, 256); meEtBxReal_[0]->setAxisTitle("bunch crossing", 1); meEtBxReal_[0]->setAxisTitle("energy (ADC)", 2); sprintf(histo, "EETTT Et vs bx %s EE +", nameext); meEtBxReal_[1] = dqmStore_->bookProfile(histo, histo, 50, xbins, 256, 0, 256); meEtBxReal_[1]->setAxisTitle("bunch crossing", 1); meEtBxReal_[1]->setAxisTitle("energy (ADC)", 2); sprintf(histo, "EETTT TP occupancy vs bx %s EE -", nameext); meOccupancyBxReal_[0] = dqmStore_->bookProfile(histo, histo, 50, xbins, 2448, 0, 2448); meOccupancyBxReal_[0]->setAxisTitle("bunch crossing", 1); meOccupancyBxReal_[0]->setAxisTitle("TP number", 2); sprintf(histo, "EETTT TP occupancy vs bx %s EE +", nameext); meOccupancyBxReal_[1] = dqmStore_->bookProfile(histo, histo, 50, xbins, 2448, 0, 2448); meOccupancyBxReal_[1]->setAxisTitle("bunch crossing", 1); meOccupancyBxReal_[1]->setAxisTitle("TP number", 2); if ( HLTCaloHLTBit_ != "" ) { sprintf(histo, "EETTT TCC timing calo triggers %s EE -", nameext); meTCCTimingCalo_[0] = dqmStore_->book2D(histo, histo, 36, 1, 37, 7, -1., 6.); meTCCTimingCalo_[0]->setAxisTitle("nTCC", 1); meTCCTimingCalo_[0]->setAxisTitle("TP data matching emulator", 2); sprintf(histo, "EETTT TCC timing calo triggers %s EE +", nameext); meTCCTimingCalo_[1] = dqmStore_->book2D(histo, histo, 36, 73, 109, 7, -1., 6.); meTCCTimingCalo_[1]->setAxisTitle("nTCC", 1); meTCCTimingCalo_[1]->setAxisTitle("TP data matching emulator", 2); } if ( HLTMuonHLTBit_ != "" ) { sprintf(histo, "EETTT TCC timing muon triggers %s EE -", nameext); meTCCTimingMuon_[0] = dqmStore_->book2D(histo, histo, 36, 1, 37, 7, -1., 6.); meTCCTimingMuon_[0]->setAxisTitle("nTCC", 1); meTCCTimingMuon_[0]->setAxisTitle("TP data matching emulator", 2); sprintf(histo, "EETTT TCC timing muon triggers %s EE +", nameext); meTCCTimingMuon_[1] = dqmStore_->book2D(histo, histo, 36, 73, 109, 7, -1., 6.); meTCCTimingMuon_[1]->setAxisTitle("nTCC", 1); meTCCTimingMuon_[1]->setAxisTitle("TP data matching emulator", 2); } } else { sprintf(histo, "EETTT Et spectrum %s EE -", nameext); meEtSpectrumEmul_[0] = dqmStore_->book1D(histo, histo, 256, 0., 256.); meEtSpectrumEmul_[0]->setAxisTitle("energy (ADC)", 1); sprintf(histo, "EETTT Et spectrum %s EE +", nameext); meEtSpectrumEmul_[1] = dqmStore_->book1D(histo, histo, 256, 0., 256.); meEtSpectrumEmul_[1]->setAxisTitle("energy (ADC)", 1); sprintf(histo, "EETTT Et spectrum %s max EE -", nameext); meEtSpectrumEmulMax_[0] = dqmStore_->book1D(histo, histo, 256, 0., 256.); meEtSpectrumEmulMax_[0]->setAxisTitle("energy (ADC)", 1); sprintf(histo, "EETTT Et spectrum %s max EE +", nameext); meEtSpectrumEmulMax_[1] = dqmStore_->book1D(histo, histo, 256, 0., 256.); meEtSpectrumEmulMax_[1]->setAxisTitle("energy (ADC)", 1); } for (int i = 0; i < 18; i++) { sprintf(histo, "EETTT Et map %s %s", nameext, Numbers::sEE(i+1).c_str()); (*meEtMap)[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 256, 0, 256.); (*meEtMap)[i]->setAxisTitle("ix", 1); if ( i+1 >= 1 && i+1 <= 9 ) (*meEtMap)[i]->setAxisTitle("101-ix", 1); (*meEtMap)[i]->setAxisTitle("iy", 2); dqmStore_->tag((*meEtMap)[i], i+1); if (!emulated) { sprintf(histo, "EETTT EmulError %s", Numbers::sEE(i+1).c_str()); meEmulError_[i] = dqmStore_->book2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50. ); meEmulError_[i]->setAxisTitle("ix", 1); if ( i+1 >= 1 && i+1 <= 9 ) meEmulError_[i]->setAxisTitle("101-ix", 1); meEmulError_[i]->setAxisTitle("iy", 2); dqmStore_->tag(meEmulError_[i], i+1); sprintf(histo, "EETTT EmulMatch %s", Numbers::sEE(i+1).c_str()); meEmulMatch_[i] = dqmStore_->book3D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 6, 0., 6.); meEmulMatch_[i]->setAxisTitle("ix", 1); if ( i+1 >= 1 && i+1 <= 9 ) meEmulMatch_[i]->setAxisTitle("101-ix", 1); meEmulMatch_[i]->setAxisTitle("iy", 2); dqmStore_->tag(meEmulMatch_[i], i+1); sprintf(histo, "EETTT EmulFineGrainVetoError %s", Numbers::sEE(i+1).c_str()); meVetoEmulError_[i] = dqmStore_->book2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50.); meVetoEmulError_[i]->setAxisTitle("ix", 1); if ( i+1 >= 1 && i+1 <= 9 ) meVetoEmulError_[i]->setAxisTitle("101-ix", 1); meVetoEmulError_[i]->setAxisTitle("iy", 2); dqmStore_->tag(meVetoEmulError_[i], i+1); } } }
DQMStore* EETriggerTowerTask::dqmStore_ [private] |
DQM back-end interface.
Definition at line 120 of file EETriggerTowerTask.h.
Referenced by beginJob(), cleanup(), EETriggerTowerTask(), and setup().
to find the input collection of crystal digis
Definition at line 138 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), and processDigis().
to find the input collection of emulated digis
Definition at line 135 of file EETriggerTowerTask.h.
Referenced by analyze(), and EETriggerTowerTask().
bool EETriggerTowerTask::enableCleanup_ [private] |
remove MEs
Definition at line 126 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), and endJob().
std::string EETriggerTowerTask::HLTCaloHLTBit_ [private] |
Definition at line 142 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), and setup().
std::string EETriggerTowerTask::HLTMuonHLTBit_ [private] |
Definition at line 143 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), and setup().
to find the input collection of HLT bits
Definition at line 141 of file EETriggerTowerTask.h.
Referenced by analyze(), and EETriggerTowerTask().
int EETriggerTowerTask::ievt_ [private] |
local event counter
Definition at line 95 of file EETriggerTowerTask.h.
Referenced by analyze(), beginJob(), and endJob().
bool EETriggerTowerTask::init_ [private] |
init flag
Definition at line 117 of file EETriggerTowerTask.h.
Referenced by analyze(), cleanup(), EETriggerTowerTask(), and setup().
array1 EETriggerTowerTask::meEmulError_ [private] |
error flag vs ix vs iy, for each SM the error flag is set to true in case of a discrepancy between the emulator and the real data
Definition at line 112 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
array1 EETriggerTowerTask::meEmulMatch_ [private] |
Definition at line 113 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meEmulMatchIndex1D_[2] [private] |
1D emulator match 1D
Definition at line 149 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meEmulMatchMaxIndex1D_[2] [private] |
Definition at line 150 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meEtBxReal_[2] [private] |
number and ET average of TP vs bx for the whole EE+/-
Definition at line 158 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
array1 EETriggerTowerTask::meEtMapEmul_ [private] |
Emulated Et vs ix vs iy, for each SM.
Definition at line 104 of file EETriggerTowerTask.h.
Referenced by analyze(), EETriggerTowerTask(), reset(), and setup().
array1 EETriggerTowerTask::meEtMapReal_ [private] |
Et vs ix vs iy, for each SM.
Definition at line 98 of file EETriggerTowerTask.h.
Referenced by analyze(), EETriggerTowerTask(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meEtSpectrumEmul_[2] [private] |
Definition at line 154 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meEtSpectrumEmulMax_[2] [private] |
Definition at line 155 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meEtSpectrumReal_[2] [private] |
ET spectrums for the whole EE+/-.
Definition at line 153 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meOccupancyBxReal_[2] [private] |
Definition at line 159 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
bool EETriggerTowerTask::mergeRuns_ [private] |
merge MEs across runs
Definition at line 129 of file EETriggerTowerTask.h.
Referenced by beginRun(), and EETriggerTowerTask().
MonitorElement* EETriggerTowerTask::meTCCTimingCalo_[2] [private] |
TCC timing.
Definition at line 162 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
MonitorElement* EETriggerTowerTask::meTCCTimingMuon_[2] [private] |
Definition at line 163 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
array1 EETriggerTowerTask::meVetoEmul_ [private] |
Emulated fine grain veto vs ix vs iy, for each SM.
Definition at line 107 of file EETriggerTowerTask.h.
Referenced by analyze(), EETriggerTowerTask(), reset(), and setup().
array1 EETriggerTowerTask::meVetoEmulError_ [private] |
Definition at line 114 of file EETriggerTowerTask.h.
Referenced by EETriggerTowerTask(), processDigis(), reset(), and setup().
array1 EETriggerTowerTask::meVetoReal_ [private] |
fine grain veto vs ix vs iy, for each SM
Definition at line 101 of file EETriggerTowerTask.h.
Referenced by analyze(), EETriggerTowerTask(), reset(), and setup().
const int EETriggerTowerTask::nSM = 18 [static] |
number of supermodules
Definition at line 40 of file EETriggerTowerTask.h.
Referenced by reserveArray().
const int EETriggerTowerTask::nTTEta = 20 [static] |
number of trigger towers in eta
Definition at line 34 of file EETriggerTowerTask.h.
const int EETriggerTowerTask::nTTPhi = 20 [static] |
number of trigger towers in phi
Definition at line 37 of file EETriggerTowerTask.h.
std::string EETriggerTowerTask::outputFile_ [private] |
debug output root file. if empty, no output file created.
Definition at line 146 of file EETriggerTowerTask.h.
Referenced by cleanup(), and EETriggerTowerTask().
std::string EETriggerTowerTask::prefixME_ [private] |
path to MEs
Definition at line 123 of file EETriggerTowerTask.h.
Referenced by beginJob(), cleanup(), EETriggerTowerTask(), and setup().
to find the input collection of real digis
Definition at line 132 of file EETriggerTowerTask.h.
Referenced by analyze(), and EETriggerTowerTask().