42 meEtSpectrumReal_[1] = 0;
90 array.resize(
nSM, static_cast<MonitorElement*>(0) );
119 for (
int iside = 0; iside < 2; iside++) {
131 for (
int i = 0;
i < 18;
i++) {
151 (
prefixME_ +
"/EETriggerTowerTask").c_str(),
false );
153 setup(
"Emulated Digis",
154 (
prefixME_ +
"/EETriggerTowerTask/Emulated").c_str(),
true);
157 edm::LogError(
"EETriggerTowerTask") <<
"Bad DQMStore, cannot book MonitorElements.";
176 name =
"EETTT Et spectrum " + nameext +
" EE -";
180 name =
"EETTT Et spectrum " + nameext +
" EE +";
184 name =
"EETTT TP matching index EE -";
188 name =
"EETTT TP matching index EE +";
192 name =
"EETTT max TP matching index EE -";
196 name =
"EETTT max TP matching index EE +";
201 for (
int i=0;
i<=11;
i++ ) xbins[
i] =
i-1;
205 for (
int i=12;
i<=22;
i++) xbins[
i] = 3371+
i-12;
207 for (
int i=23;
i<=50;
i++) xbins[
i] = 3382+(
i-23)*6;
209 name =
"EETTT Et vs bx " + nameext +
" EE -";
214 name =
"EETTT Et vs bx " + nameext +
" EE +";
219 name =
"EETTT TP occupancy vs bx " + nameext +
" EE -";
224 name =
"EETTT TP occupancy vs bx " + nameext +
" EE +";
230 name =
"EETTT TCC timing calo triggers " + nameext +
" EE -";
235 name =
"EETTT TCC timing calo triggers " + nameext +
" EE +";
242 name =
"EETTT TCC timing muon triggers " + nameext +
" EE -";
247 name =
"EETTT TCC timing muon triggers " + nameext +
" EE +";
254 name =
"EETTT Et spectrum " + nameext +
" EE -";
258 name =
"EETTT Et spectrum " + nameext +
" EE +";
262 name =
"EETTT Et spectrum " + nameext +
" max EE -";
266 name =
"EETTT Et spectrum " + nameext +
" max EE +";
271 for (
int i = 0;
i < 18;
i++) {
279 if (
i+1 >= 1 &&
i+1 <= 9 ) (*meEtMap)[
i]->setAxisTitle(
"101-ix", 1);
280 (*meEtMap)[
i]->setAxisTitle(
"iy", 2);
290 if ( i+1 >= 1 && i+1 <= 9 )
meEmulError_[
i]->setAxisTitle(
"101-ix", 1);
300 if ( i+1 >= 1 && i+1 <= 9 )
meEmulMatch_[
i]->setAxisTitle(
"101-ix", 1);
304 name =
"EETTT EmulFineGrainVetoError " +
Numbers::sEE(i+1);
320 if ( !
init_ )
return;
352 int neetpd = realDigis->size();
353 LogDebug(
"EETriggerTowerTask") <<
"event " <<
ievt_ <<
" trigger primitive digi collection size: " << neetpd;
361 edm::LogWarning(
"EETriggerTowerTask") <<
"realCollection not available";
380 edm::LogWarning(
"EETriggerTowerTask") <<
"HLTResultsCollection not available";
384 edm::LogInfo(
"EETriggerTowerTask") <<
"emulCollection not available";
401 int readoutCrystalsInTower[108][41];
402 for (
int itcc = 0; itcc < 108; itcc++) {
403 for (
int itt = 0; itt < 41; itt++) readoutCrystalsInTower[itcc][itt] = 0;
422 readoutCrystalsInTower[itcc-1][itt-1]++;
427 edm::LogWarning(
"EETriggerTowerTask") <<
"EEDigiCollection not available";
432 bool caloTrg =
false;
433 bool muonTrg =
false;
437 int ntrigs = hltResults->size();
442 for (
int itrig = 0; itrig != ntrigs; ++itrig ) {
444 bool accept = hltResults->accept(itrig);
453 edm::LogWarning(
"EBTriggerTowerTask") <<
" zero size trigger names in input TriggerResults";
468 float xvalEt = tpdigiItr->compressedEt();
469 float xvalVeto = 0.5 + tpdigiItr->fineGrain();
472 bool goodVeto =
true;
474 int compDigiInterest = -1;
477 for (
int j=0;
j<6;
j++) matchSample[
j]=
false;
481 if ( ismt >= 1 && ismt <= 9 ) {
489 for (
int j=0;
j<5;
j++) {
490 float EtTP = (*tpdigiItr)[
j].compressedEt();
491 if ( EtTP > maxEt ) {
497 if ( ismt >= 1 && ismt <= 9 ) {
506 if ( compDigiItr != compDigis->end() ) {
507 int compDigiEt = compDigiItr->compressedEt();
508 compDigiInterest = (compDigiItr->ttFlag() & 0x3);
510 if ( ismt >= 1 && ismt <= 9 ) {
511 if ( compDigiEt > 0 ) nTP[0]++;
515 if ( compDigiEt > 0 ) nTP[1]++;
522 matchSample[0]=
false;
523 bool matchedAny=
false;
525 for (
int j=0;
j<5;
j++) {
526 if ((*tpdigiItr)[
j].compressedEt() == compDigiEt ) {
527 matchSample[
j+1]=
true;
530 matchSample[
j+1]=
false;
534 if (!matchedAny) matchSample[0]=
true;
537 if (readoutCrystalsInTower[itcc-1][itt-1] ==
int(crystals->size()) &&
538 (compDigiInterest == 1 || compDigiInterest == 3) && compDigiEt > 0) {
540 if ( tpdigiItr->compressedEt() != compDigiEt ) {
543 if ( tpdigiItr->fineGrain() != compDigiItr->fineGrain() ) {
547 for (
int j=0;
j<6;
j++) {
548 if (matchSample[
j]) {
550 int index = ( j==0 ) ? -1 : j;
552 if ( ismt >= 1 && ismt <= 9 ) {
558 for (
unsigned int i=0;
i<crystals->size();
i++ ) {
565 if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
571 if ( ismt >= 1 && ismt <= 9 ) {
591 for (
unsigned int i=0;
i<crystals->size();
i++ ) {
598 if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
614 for (
unsigned int i=0;
i<crystals->size();
i++ ) {
621 if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
626 if ( meEtMap[ismt-1] ) meEtMap[ismt-1]->Fill(xix, xiy, xvalEt);
627 if ( meVeto[ismt-1] ) meVeto[ismt-1]->Fill(xix, xiy, xvalVeto);
bool enableCleanup_
remove MEs
T getParameter(std::string const &) const
edm::EDGetTokenT< EEDigiCollection > EEDigiCollection_
to find the input collection of crystal digis
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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 const int nSM
number of supermodules
static const int nTTPhi
number of trigger towers in phi
MonitorElement * meOccupancyBxReal_[2]
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
int bunchCrossing() const
void reserveArray(array1 &array)
reserve an array to hold one histogram per supermodule
MonitorElement * meEtSpectrumEmul_[2]
static int ix0EE(const unsigned ism)
void beginJob(void)
BeginJob.
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static int iy0EE(const unsigned ism)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
void tag(MonitorElement *me, unsigned int myTag)
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
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 const int nTTEta
number of trigger towers in eta
static unsigned iTCC(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
DQMStore * dqmStore_
DQM back-end interface.
std::string HLTCaloHLTBit_
MonitorElement * meEmulMatchMaxIndex1D_[2]
array1 meEtMapEmul_
Emulated Et vs ix vs iy, for each SM.
edm::EDGetTokenT< edm::TriggerResults > HLTResultsCollection_
to find the input collection of HLT bits
array1 meVetoReal_
fine grain veto vs ix vs iy, for each SM
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")
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
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.
edm::EDGetTokenT< EcalTrigPrimDigiCollection > emulCollection_
to find the input collection of emulated digis
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
MonitorElement * meEtSpectrumReal_[2]
ET spectrums for the whole EE+/-.
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.
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
edm::EDGetTokenT< EcalTrigPrimDigiCollection > realCollection_
to find the input collection of real 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")