45 meEtSpectrumReal_[1] = 0;
93 array.resize(
nSM, static_cast<MonitorElement*>(0) );
122 for (
int iside = 0; iside < 2; iside++) {
134 for (
int i = 0;
i < 18;
i++) {
154 (
prefixME_ +
"/EETriggerTowerTask").c_str(),
false );
156 setup(
"Emulated Digis",
157 (
prefixME_ +
"/EETriggerTowerTask/Emulated").c_str(),
true);
160 edm::LogError(
"EETriggerTowerTask") <<
"Bad DQMStore, cannot book MonitorElements.";
165 std::string
const &folder,
181 name =
"EETTT Et spectrum " + nameext +
" EE -";
185 name =
"EETTT Et spectrum " + nameext +
" EE +";
189 name =
"EETTT TP matching index EE -";
193 name =
"EETTT TP matching index EE +";
197 name =
"EETTT max TP matching index EE -";
201 name =
"EETTT max TP matching index EE +";
206 for (
int i=0;
i<=11;
i++ ) xbins[
i] =
i-1;
210 for (
int i=12;
i<=22;
i++) xbins[
i] = 3371+
i-12;
212 for (
int i=23;
i<=50;
i++) xbins[
i] = 3382+(
i-23)*6;
214 name =
"EETTT Et vs bx " + nameext +
" EE -";
219 name =
"EETTT Et vs bx " + nameext +
" EE +";
224 name =
"EETTT TP occupancy vs bx " + nameext +
" EE -";
229 name =
"EETTT TP occupancy vs bx " + nameext +
" EE +";
235 name =
"EETTT TCC timing calo triggers " + nameext +
" EE -";
240 name =
"EETTT TCC timing calo triggers " + nameext +
" EE +";
247 name =
"EETTT TCC timing muon triggers " + nameext +
" EE -";
252 name =
"EETTT TCC timing muon triggers " + nameext +
" EE +";
259 name =
"EETTT Et spectrum " + nameext +
" EE -";
263 name =
"EETTT Et spectrum " + nameext +
" EE +";
267 name =
"EETTT Et spectrum " + nameext +
" max EE -";
271 name =
"EETTT Et spectrum " + nameext +
" max EE +";
276 for (
int i = 0;
i < 18;
i++) {
284 if (
i+1 >= 1 &&
i+1 <= 9 ) (*meEtMap)[
i]->setAxisTitle(
"101-ix", 1);
285 (*meEtMap)[
i]->setAxisTitle(
"iy", 2);
295 if ( i+1 >= 1 && i+1 <= 9 )
meEmulError_[
i]->setAxisTitle(
"101-ix", 1);
305 if ( i+1 >= 1 && i+1 <= 9 )
meEmulMatch_[
i]->setAxisTitle(
"101-ix", 1);
309 name =
"EETTT EmulFineGrainVetoError " +
Numbers::sEE(i+1);
325 if ( !
init_ )
return;
357 int neetpd = realDigis->size();
358 LogDebug(
"EETriggerTowerTask") <<
"event " <<
ievt_ <<
" trigger primitive digi collection size: " << neetpd;
414 int readoutCrystalsInTower[108][41];
415 for (
int itcc = 0; itcc < 108; itcc++) {
416 for (
int itt = 0; itt < 41; itt++) readoutCrystalsInTower[itcc][itt] = 0;
435 readoutCrystalsInTower[itcc-1][itt-1]++;
445 bool caloTrg =
false;
446 bool muonTrg =
false;
450 int ntrigs = hltResults->size();
455 for (
int itrig = 0; itrig != ntrigs; ++itrig ) {
456 std::string trigName = triggerNames.
triggerName(itrig);
457 bool accept = hltResults->accept(itrig);
466 edm::LogWarning(
"EBTriggerTowerTask") <<
" zero size trigger names in input TriggerResults";
481 float xvalEt = tpdigiItr->compressedEt();
482 float xvalVeto = 0.5 + tpdigiItr->fineGrain();
485 bool goodVeto =
true;
487 int compDigiInterest = -1;
490 for (
int j=0;
j<6;
j++) matchSample[
j]=
false;
494 if ( ismt >= 1 && ismt <= 9 ) {
502 for (
int j=0;
j<5;
j++) {
503 float EtTP = (*tpdigiItr)[
j].compressedEt();
504 if ( EtTP > maxEt ) {
510 if ( ismt >= 1 && ismt <= 9 ) {
519 if ( compDigiItr != compDigis->end() ) {
520 int compDigiEt = compDigiItr->compressedEt();
521 compDigiInterest = (compDigiItr->ttFlag() & 0x3);
523 if ( ismt >= 1 && ismt <= 9 ) {
524 if ( compDigiEt > 0 ) nTP[0]++;
528 if ( compDigiEt > 0 ) nTP[1]++;
535 matchSample[0]=
false;
536 bool matchedAny=
false;
538 for (
int j=0;
j<5;
j++) {
539 if ((*tpdigiItr)[
j].compressedEt() == compDigiEt ) {
540 matchSample[
j+1]=
true;
543 matchSample[
j+1]=
false;
547 if (!matchedAny) matchSample[0]=
true;
550 if (readoutCrystalsInTower[itcc-1][itt-1] ==
int(crystals->size()) &&
551 (compDigiInterest == 1 || compDigiInterest == 3) && compDigiEt > 0) {
553 if ( tpdigiItr->compressedEt() != compDigiEt ) {
556 if ( tpdigiItr->fineGrain() != compDigiItr->fineGrain() ) {
560 for (
int j=0;
j<6;
j++) {
561 if (matchSample[
j]) {
563 int index = ( j==0 ) ? -1 : j;
565 if ( ismt >= 1 && ismt <= 9 ) {
571 for (
unsigned int i=0;
i<crystals->size();
i++ ) {
578 if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
584 if ( ismt >= 1 && ismt <= 9 ) {
604 for (
unsigned int i=0;
i<crystals->size();
i++ ) {
611 if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
627 for (
unsigned int i=0;
i<crystals->size();
i++ ) {
634 if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
639 if ( meEtMap[ismt-1] ) meEtMap[ismt-1]->Fill(xix, xiy, xvalEt);
640 if ( meVeto[ismt-1] ) meVeto[ismt-1]->Fill(xix, xiy, xvalVeto);
bool enableCleanup_
remove MEs
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
virtual ~EETriggerTowerTask()
Destructor.
array1 meVetoEmul_
Emulated fine grain veto vs ix vs iy, for each SM.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * meEtBxReal_[2]
number and ET average of TP vs bx for the whole EE+/-
void rmdir(const std::string &fullpath)
static int iy0EE(const int ism)
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Some "id" conversions.
std::string outputFile_
debug output root file. if empty, no output file created.
static std::string sEE(const int ism)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
static const int nSM
number of supermodules
static const int nTTPhi
number of trigger towers in phi
MonitorElement * meOccupancyBxReal_[2]
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
void reserveArray(array1 &array)
reserve an array to hold one histogram per supermodule
MonitorElement * meEtSpectrumEmul_[2]
edm::InputTag emulCollection_
to find the input collection of emulated digis
void beginJob(void)
BeginJob.
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static int iTCC(const int ism, const EcalSubdetector subdet, const int i1, const int i2)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
static int iTT(const int ism, const EcalSubdetector subdet, const int i1, const int i2)
void tag(MonitorElement *me, unsigned int myTag)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
edm::InputTag HLTResultsCollection_
to find the input collection of HLT bits
std::vector< MonitorElement * > array1
1D array
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
static int iSM(const int ism, const EcalSubdetector subdet)
static const int nTTEta
number of trigger towers in eta
DQMStore * dqmStore_
DQM back-end interface.
std::string HLTCaloHLTBit_
MonitorElement * meEmulMatchMaxIndex1D_[2]
array1 meEtMapEmul_
Emulated Et vs ix vs iy, for each SM.
array1 meVetoReal_
fine grain veto vs ix vs iy, for each SM
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
array1 meEtMapReal_
Et vs ix vs iy, for each SM.
std::string prefixME_
path to MEs
EETriggerTowerTask(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meEtSpectrumEmulMax_[2]
std::string HLTMuonHLTBit_
bool mergeRuns_
merge MEs across runs
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
std::string const & triggerName(unsigned int index) const
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
static int ix0EE(const int ism)
MonitorElement * meEtSpectrumReal_[2]
ET spectrums for the whole EE+/-.
edm::InputTag realCollection_
to find the input collection of real digis
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * meTCCTimingCalo_[2]
TCC timing.
int ism(int ieta, int iphi)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meEmulMatchIndex1D_[2]
1D emulator match 1D
void setCurrentFolder(const std::string &fullpath)
void cleanup(void)
Cleanup.
edm::InputTag EEDigiCollection_
to find the input collection of crystal digis
MonitorElement * meTCCTimingMuon_[2]
int ievt_
local event counter
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")