CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
L1TGT Class Reference

#include <L1TGT.h>

Inheritance diagram for L1TGT:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TGT (const edm::ParameterSet &ps)
 
virtual ~L1TGT ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

enum  activeDAQ {
  FDL = 0, PSB9, PSB13, PSB14,
  PSB15, PSB19, PSB20, PSB21,
  GMT
}
 
enum  activeEVM { TCS, FDLEVM }
 
typedef std::vector< std::pair
< int, int > >::const_iterator 
CItVecPair
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
void bookHistograms ()
 book all histograms for the module More...
 
void countPfsIndicesPerLs ()
 
virtual void endJob ()
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 end section More...
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
bool isActive (int word, int bit)
 

Private Attributes

MonitorElementalgo_bits
 
MonitorElementalgo_bits_corr
 
MonitorElementalgo_bits_lumi
 
MonitorElementalgo_tt_bits_corr
 
MonitorElementBST_beamMode
 
MonitorElementBST_beamMomentum
 
MonitorElementBST_intensityBeam1
 
MonitorElementBST_intensityBeam2
 
MonitorElementBST_lhcFillNumber
 
MonitorElementBST_MasterStatus
 
MonitorElementBST_turnCountNumber
 
MonitorElementdbx_module
 
MonitorElementevent_lumi
 
MonitorElementevent_number
 
MonitorElementevent_type
 
MonitorElementevnum_trignum_lumi
 
MonitorElementgpsfreq
 
MonitorElementgpsfreqlum
 
MonitorElementgpsfreqwide
 
edm::InputTag gtEvmSource_
 input tag for L1 GT EVM readout record More...
 
MonitorElementgtfe_bx
 
edm::InputTag gtSource_
 input parameters More...
 
DQMStorem_dbe
 internal members More...
 
std::string m_histFolder
 histogram folder for L1 GT plots More...
 
MonitorElementm_monL1PfIndicesPerLs
 
MonitorElementm_monL1PrescaleFactorSet
 
MonitorElementm_monLsNrDiffTcsFdlEvm
 
MonitorElementm_monLsNrDiffTcsFdlEvmLs
 
MonitorElementm_monOrbitNrDiffTcsFdlEvm
 
MonitorElementm_monOrbitNrDiffTcsFdlEvmLs
 
int m_nrEvJob
 number of events processed More...
 
int m_nrEvRun
 
std::vector< std::pair< int,
int > > 
m_pairLsNumberPfIndex
 
bool m_runInEndJob
 
bool m_runInEndLumi
 
bool m_runInEndRun
 
bool m_runInEventLoop
 switches to choose the running of various methods More...
 
MonitorElementorbit_lumi
 
boost::uint64_t preGps_
 
boost::uint64_t preOrb_
 
MonitorElementsetupversion_lumi
 
MonitorElementtrigger_lumi
 
MonitorElementtrigger_number
 
MonitorElementtt_bits
 
MonitorElementtt_bits_corr
 
MonitorElementtt_bits_lumi
 
bool verbose_
 verbosity switch More...
 

Static Private Attributes

static const int MaxLsNrDiffTcsFdlEvm = 24
 
static const int MaxOrbitNrDiffTcsFdlEvm = 24
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: DQM for L1 Global Trigger.

Author
J. Berryhill, I. Mikulec
Vasile Mihai Ghete - HEPHY Vienna
Date:
2012/05/31 16:52:42
Revision:
1.12

Description: DQM for L1 Global Trigger.

Author
J. Berryhill, I. Mikulec
Vasile Mihai Ghete - HEPHY Vienna
Date:
2012/05/31 16:52:42
Revision:
1.24

Definition at line 42 of file L1TGT.h.

Member Typedef Documentation

typedef std::vector<std::pair<int, int> >::const_iterator L1TGT::CItVecPair
private

Definition at line 190 of file L1TGT.h.

Member Enumeration Documentation

enum L1TGT::activeDAQ
private
Enumerator
FDL 
PSB9 
PSB13 
PSB14 
PSB15 
PSB19 
PSB20 
PSB21 
GMT 

Definition at line 84 of file L1TGT.h.

84  {
86  };
enum L1TGT::activeEVM
private
Enumerator
TCS 
FDLEVM 

Definition at line 90 of file L1TGT.h.

90  {
91  TCS, FDLEVM
92  };

Constructor & Destructor Documentation

L1TGT::L1TGT ( const edm::ParameterSet ps)

Definition at line 22 of file L1TGT.cc.

References edm::ParameterSet::getUntrackedParameter(), m_dbe, m_histFolder, m_pairLsNumberPfIndex, cppFunctionSkipper::operator, and AlCaHLTBitMon_QueryRunRegistry::string.

22  :
23  gtSource_(ps.getParameter<edm::InputTag> ("gtSource")),
24  gtEvmSource_(ps.getParameter<edm::InputTag> ("gtEvmSource")),
25  m_runInEventLoop(ps.getUntrackedParameter<bool>("runInEventLoop", false)),
26  m_runInEndLumi(ps.getUntrackedParameter<bool>("runInEndLumi", false)),
27  m_runInEndRun(ps.getUntrackedParameter<bool>("runInEndRun", false)),
28  m_runInEndJob(ps.getUntrackedParameter<bool>("runInEndJob", false)),
29  verbose_(ps.getUntrackedParameter<bool> ("verbose", false)),
30  m_dbe(0),
31  //
32  m_nrEvJob(0), m_nrEvRun(0),
33  preGps_(0ULL), preOrb_(0ULL)
34 {
35 
37  "L1T/L1TGT");
38 
40  if (m_dbe == 0) {
41  edm::LogInfo("L1TGT") << "\n Unable to get DQMStore service.";
42  } else {
43 
44  m_dbe->setVerbose(0);
46 
47  }
48 
49  // reserve space for 1000 LS
50  m_pairLsNumberPfIndex.reserve(1000);
51 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool m_runInEndRun
Definition: L1TGT.h:112
int m_nrEvRun
Definition: L1TGT.h:180
boost::uint64_t preGps_
Definition: L1TGT.h:185
DQMStore * m_dbe
internal members
Definition: L1TGT.h:176
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:189
bool verbose_
verbosity switch
Definition: L1TGT.h:117
edm::InputTag gtSource_
input parameters
Definition: L1TGT.h:104
bool m_runInEventLoop
switches to choose the running of various methods
Definition: L1TGT.h:110
edm::InputTag gtEvmSource_
input tag for L1 GT EVM readout record
Definition: L1TGT.h:107
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
std::string m_histFolder
histogram folder for L1 GT plots
Definition: L1TGT.h:183
bool m_runInEndLumi
Definition: L1TGT.h:111
int m_nrEvJob
number of events processed
Definition: L1TGT.h:179
boost::uint64_t preOrb_
Definition: L1TGT.h:186
bool m_runInEndJob
Definition: L1TGT.h:113
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
L1TGT::~L1TGT ( )
virtual

Definition at line 53 of file L1TGT.cc.

53  {
54 
55  // empty
56 }

Member Function Documentation

void L1TGT::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
privatevirtual

get Global Trigger algo and technical trigger bit statistics

Implements edm::EDAnalyzer.

Definition at line 104 of file L1TGT.cc.

References L1GtfeWord::activeBoards(), algo_bits, algo_bits_corr, algo_bits_lumi, algo_tt_bits_corr, L1GtfeExtWord::beamMode(), L1GtfeExtWord::beamMomentum(), BST_beamMode, BST_beamMomentum, BST_intensityBeam1, BST_intensityBeam2, BST_lhcFillNumber, BST_MasterStatus, BST_turnCountNumber, L1GtfeExtWord::bstMasterStatus(), L1TcsWord::bxNr(), L1GtPsbWord::bxNr(), L1GtFdlWord::bxNr(), L1GtfeWord::bxNr(), dbx_module, event_lumi, event_number, event_type, L1TcsWord::eventNr(), evnum_trignum_lumi, FDL, MonitorElement::Fill(), spr::find(), edm::Event::getByLabel(), GMT, gpsfreq, gpsfreqlum, gpsfreqwide, L1GtfeExtWord::gpsTime(), gtEvmSource_, gtfe_bx, L1GtFdlWord::gtPrescaleFactorIndexAlgo(), gtSource_, i, isActive(), edm::HandleBase::isValid(), j, edm::InputTag::label(), L1GtfeExtWord::lhcFillNumber(), L1GtPsbWord::localBxNr(), L1GtFdlWord::localBxNr(), edm::EventBase::luminosityBlock(), L1TcsWord::luminositySegmentNr(), L1GtFdlWord::lumiSegmentNr(), m_monL1PrescaleFactorSet, m_monLsNrDiffTcsFdlEvm, m_monLsNrDiffTcsFdlEvmLs, m_monOrbitNrDiffTcsFdlEvm, m_monOrbitNrDiffTcsFdlEvmLs, m_nrEvJob, m_pairLsNumberPfIndex, autoMagneticFieldProducer_cfi::master, MaxLsNrDiffTcsFdlEvm, MaxOrbitNrDiffTcsFdlEvm, orbit_lumi, L1TcsWord::orbitNr(), L1GtFdlWord::orbitNr(), edm::EventBase::orbitNumber(), L1TcsWord::partTrigNr(), preGps_, preOrb_, PSB9, L1GtfeWord::setupVersion(), setupversion_lumi, TCS, L1GtfeExtWord::totalIntensityBeam1(), L1GtfeExtWord::totalIntensityBeam2(), trigger_lumi, trigger_number, L1TcsWord::triggerType(), tt_bits, tt_bits_corr, tt_bits_lumi, L1GtfeExtWord::turnCountNumber(), and verbose_.

104  {
105 
106  m_nrEvJob++;
107 
108  if (verbose_) {
109  edm::LogInfo("L1TGT") << "L1TGT: analyze...." << std::endl;
110  }
111 
112  // initialize Bx, orbit number, luminosity segment number to invalid value
113  int tcsBx = -1;
114  int gtfeEvmBx = -1;
115 
116  long long int orbitTcs = -1;
117  int orbitEvmFdl = -1;
118 
119  int lsTcs = -1;
120  int lsEvmFdl = -1;
121 
122  // get once only the LS block number, to be used in many histograms
123  const int lsNumber = iEvent.luminosityBlock();
124 
125  // open EVM readout record if available
127  iEvent.getByLabel(gtEvmSource_, gtEvmReadoutRecord);
128 
129  if (!gtEvmReadoutRecord.isValid()) {
130  edm::LogInfo("L1TGT")
131  << "can't find L1GlobalTriggerEvmReadoutRecord with label "
132  << gtSource_.label();
133  } else {
134 
135  // get all info from the EVM record if available and fill the histograms
136 
137  const L1GtfeWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
138  const L1GtfeExtWord& gtfeEvmExtWord = gtEvmReadoutRecord->gtfeWord();
139 
140  gtfeEvmBx = gtfeEvmWord.bxNr();
141  int gtfeEvmActiveBoards = gtfeEvmWord.activeBoards();
142 
143  if (isActive(gtfeEvmActiveBoards, TCS)) { // if TCS present in the record
144 
145  const L1TcsWord& tcsWord = gtEvmReadoutRecord->tcsWord();
146 
147  tcsBx = tcsWord.bxNr();
148  orbitTcs = tcsWord.orbitNr();
149  lsTcs = tcsWord.luminositySegmentNr();
150 
151  event_type->Fill(tcsWord.triggerType());
152  orbit_lumi->Fill(lsNumber, orbitTcs);
153 
154  trigger_number->Fill(tcsWord.partTrigNr());
155  event_number->Fill(tcsWord.eventNr());
156 
157  trigger_lumi->Fill(lsNumber, tcsWord.partTrigNr());
158  event_lumi->Fill(lsNumber, tcsWord.eventNr());
159  evnum_trignum_lumi->Fill(lsNumber,
160  static_cast<double>(tcsWord.eventNr()) / static_cast<double>(tcsWord.partTrigNr()));
161 
162  boost::uint16_t master = gtfeEvmExtWord.bstMasterStatus();
163  boost::uint32_t turnCount = gtfeEvmExtWord.turnCountNumber();
164  boost::uint32_t lhcFill = gtfeEvmExtWord.lhcFillNumber();
165  boost::uint16_t beam = gtfeEvmExtWord.beamMode();
166  boost::uint16_t momentum = gtfeEvmExtWord.beamMomentum();
167  boost::uint32_t intensity1 = gtfeEvmExtWord.totalIntensityBeam1();
168  boost::uint32_t intensity2 = gtfeEvmExtWord.totalIntensityBeam2();
169 
170  BST_MasterStatus->Fill(lsNumber, static_cast<double>(master));
171  BST_turnCountNumber->Fill(lsNumber, static_cast<double>(turnCount));
172  BST_lhcFillNumber->Fill(static_cast<double>(lhcFill % 1000));
173  BST_beamMode->Fill(lsNumber, static_cast<double>(beam));
174 
175  BST_beamMomentum->Fill(lsNumber, static_cast<double>(momentum));
176  BST_intensityBeam1->Fill(lsNumber, static_cast<double>(intensity1));
177  BST_intensityBeam2->Fill(lsNumber, static_cast<double>(intensity2));
178 
179  if (verbose_) {
180  edm::LogInfo("L1TGT") << " check mode = " << beam << " momentum " << momentum
181  << " int2 " << intensity2 << std::endl;
182  }
183 
184  boost::uint64_t gpsr = gtfeEvmExtWord.gpsTime();
185  boost::uint64_t gpshi = (gpsr >> 32) & 0xffffffff;
186  boost::uint64_t gpslo = gpsr & 0xffffffff;
187  boost::uint64_t gps = gpshi * 1000000 + gpslo;
188  // edm::LogInfo("L1TGT") << " gpsr = " << std::hex << gpsr << " hi=" << gpshi << " lo=" << gpslo << " gps=" << gps << std::endl;
189 
190  Long64_t delorb = orbitTcs - preOrb_;
191  Long64_t delgps = gps - preGps_;
192  Double_t freq = -1.;
193 
194  if (delgps > 0) {
195  freq = ((Double_t)(delorb)) * 3564. / ((Double_t)(delgps));
196  }
197 
198  if (delorb > 0) {
199  gpsfreq->Fill(freq);
200  gpsfreqwide->Fill(freq);
201  gpsfreqlum->Fill(lsNumber, freq);
202  if (verbose_) {
203  if (freq > 200.) {
204  edm::LogInfo("L1TGT") << " preOrb_ = " << preOrb_ << " orbitTcs=" << orbitTcs
205  << " delorb=" << delorb << std::hex << " preGps_="
206  << preGps_ << " gps=" << gps << std::dec
207  << " delgps=" << delgps << " freq=" << freq
208  << std::endl;
209 
210  }
211  }
212  }
213 
214  preGps_ = gps;
215  preOrb_ = orbitTcs;
216 
217  }
218 
219  // get info from FDL if active
220  if (isActive(gtfeEvmActiveBoards, FDL)) {
221  const L1GtFdlWord& fdlWord = gtEvmReadoutRecord->gtFdlWord();
222 
223  orbitEvmFdl = fdlWord.orbitNr();
224  lsEvmFdl = fdlWord.lumiSegmentNr();
225  }
226 
227  if ((orbitTcs >= 0) && (orbitEvmFdl >= 0)) {
228 
229  int diffOrbit = static_cast<float> (orbitTcs - orbitEvmFdl);
230  edm::LogInfo("L1TGT") << "\n orbitTcs = " << orbitTcs << " orbitEvmFdl = "
231  << orbitEvmFdl << " diffOrbit = " << diffOrbit
232  << " orbitEvent = " << iEvent.orbitNumber() << std::endl;
233 
234  if (diffOrbit >= MaxOrbitNrDiffTcsFdlEvm) {
236 
237  } else if (diffOrbit <= -MaxOrbitNrDiffTcsFdlEvm) {
239 
240  } else {
241  m_monOrbitNrDiffTcsFdlEvm->Fill(diffOrbit);
243  diffOrbit);
244 
245  }
246 
247  } else {
248 
249  if (orbitTcs >= 0) {
250  // EVM_FDL error
252  } else if (orbitEvmFdl >= 0) {
253  // TCS error
255 
256  } else {
257  // TCS and EVM_FDL error
260  }
261  }
262 
263  if ((lsTcs >= 0) && (lsEvmFdl >= 0)) {
264 
265  int diffLs = static_cast<float> (lsTcs - lsEvmFdl);
266  edm::LogInfo("L1TGT") << "\n lsTcs = " << lsTcs << " lsEvmFdl = " << lsEvmFdl
267  << " diffLs = " << diffLs << " lsEvent = "
268  << lsNumber << std::endl;
269 
270  if (diffLs >= MaxLsNrDiffTcsFdlEvm) {
272 
273  } else if (diffLs <= -MaxLsNrDiffTcsFdlEvm) {
275 
276  } else {
277  m_monLsNrDiffTcsFdlEvm->Fill(diffLs);
278  m_monLsNrDiffTcsFdlEvmLs->Fill(lsNumber, diffLs);
279 
280  }
281 
282  } else {
283 
284  if (lsTcs >= 0) {
285  // EVM_FDL error
287  } else if (lsEvmFdl >= 0) {
288  // TCS error
290 
291  } else {
292  // TCS and EVM_FDL error
295  }
296  }
297 
298  }
299 
300  // open GT DAQ readout record - exit if failed
302  iEvent.getByLabel(gtSource_, gtReadoutRecord);
303 
304  if (!gtReadoutRecord.isValid()) {
305  edm::LogInfo("L1TGT")
306  << "can't find L1GlobalTriggerReadoutRecord with label "
307  << gtSource_.label();
308  return;
309  }
310 
311  // initialize bx's to invalid value
312  int gtfeBx = -1;
313  int fdlBx[2] = { -1, -1 };
314  int psbBx[2][7] = { { -1, -1, -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1,
315  -1, -1 } };
316  int gmtBx = -1;
317 
318  // get info from GTFE DAQ record
319  const L1GtfeWord& gtfeWord = gtReadoutRecord->gtfeWord();
320  gtfeBx = gtfeWord.bxNr();
321  gtfe_bx->Fill(gtfeBx);
322  setupversion_lumi->Fill(lsNumber, gtfeWord.setupVersion());
323  int gtfeActiveBoards = gtfeWord.activeBoards();
324 
325  // look for GMT readout collection from the same source if GMT active
326  if (isActive(gtfeActiveBoards, GMT)) {
327  edm::Handle<L1MuGMTReadoutCollection> gmtReadoutCollection;
328  iEvent.getByLabel(gtSource_, gmtReadoutCollection);
329 
330  if (gmtReadoutCollection.isValid()) {
331  gmtBx = gmtReadoutCollection->getRecord().getBxNr();
332  }
333  }
334 
335  // get info from FDL if active (including decision word)
336  if (isActive(gtfeActiveBoards, FDL)) {
337  const L1GtFdlWord& fdlWord = gtReadoutRecord->gtFdlWord();
338  fdlBx[0] = fdlWord.bxNr();
339  fdlBx[1] = fdlWord.localBxNr();
340 
342  const DecisionWord& gtDecisionWord = gtReadoutRecord->decisionWord();
343  const TechnicalTriggerWord& gtTTWord =
344  gtReadoutRecord->technicalTriggerWord();
345 
346  int dbitNumber = 0;
347  DecisionWord::const_iterator GTdbitItr;
348  algo_bits->Fill(-1.); // fill underflow to normalize
349  for (GTdbitItr = gtDecisionWord.begin(); GTdbitItr
350  != gtDecisionWord.end(); GTdbitItr++) {
351  if (*GTdbitItr) {
352  algo_bits->Fill(dbitNumber);
353  algo_bits_lumi->Fill(lsNumber, dbitNumber);
354  int dbitNumber1 = 0;
355  DecisionWord::const_iterator GTdbitItr1;
356  for (GTdbitItr1 = gtDecisionWord.begin(); GTdbitItr1
357  != gtDecisionWord.end(); GTdbitItr1++) {
358  if (*GTdbitItr1)
359  algo_bits_corr->Fill(dbitNumber, dbitNumber1);
360  dbitNumber1++;
361  }
362  int tbitNumber1 = 0;
363  TechnicalTriggerWord::const_iterator GTtbitItr1;
364  for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1
365  != gtTTWord.end(); GTtbitItr1++) {
366  if (*GTtbitItr1)
367  algo_tt_bits_corr->Fill(dbitNumber, tbitNumber1);
368  tbitNumber1++;
369  }
370  }
371  dbitNumber++;
372  }
373 
374  int tbitNumber = 0;
375  TechnicalTriggerWord::const_iterator GTtbitItr;
376  tt_bits->Fill(-1.); // fill underflow to normalize
377  for (GTtbitItr = gtTTWord.begin(); GTtbitItr != gtTTWord.end(); GTtbitItr++) {
378  if (*GTtbitItr) {
379  tt_bits->Fill(tbitNumber);
380  tt_bits_lumi->Fill(lsNumber, tbitNumber);
381  int tbitNumber1 = 0;
382  TechnicalTriggerWord::const_iterator GTtbitItr1;
383  for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1
384  != gtTTWord.end(); GTtbitItr1++) {
385  if (*GTtbitItr1)
386  tt_bits_corr->Fill(tbitNumber, tbitNumber1);
387  tbitNumber1++;
388  }
389  }
390  tbitNumber++;
391  }
392 
393 
394  // fill the index of actual prescale factor set
395  // the index for technical triggers and algorithm trigger is the same (constraint in L1 GT TS)
396  // so we read only pfIndexAlgoTrig (boost::uint16_t)
397 
398  const int pfIndexAlgoTrig = fdlWord.gtPrescaleFactorIndexAlgo();
399  m_monL1PrescaleFactorSet->Fill(lsNumber,
400  static_cast<float> (pfIndexAlgoTrig));
401 
402  //
403 
404  // check that the combination (lsNumber, pfIndex) is not already included
405  // to avoid fake entries due to different event order
406 
407  std::pair<int, int> pairLsPfi = std::make_pair(lsNumber,
408  pfIndexAlgoTrig);
409 
410  CItVecPair cIt = find(m_pairLsNumberPfIndex.begin(),
411  m_pairLsNumberPfIndex.end(), pairLsPfi);
412 
413  if (cIt == m_pairLsNumberPfIndex.end()) {
414 
415  m_pairLsNumberPfIndex.push_back(pairLsPfi);
416 
417  }
418 
419  }
420 
421  // get info from active PSB's
422  int ibit = PSB9; // first psb
423  // for now hardcode psb id's - TODO - get them from Vasile's board maps...
424  int psbID[7] = { 0xbb09, 0xbb0d, 0xbb0e, 0xbb0f, 0xbb13, 0xbb14, 0xbb15 };
425  for (int i = 0; i < 7; i++) {
426  if (isActive(gtfeActiveBoards, ibit)) {
427  L1GtPsbWord psbWord = gtReadoutRecord->gtPsbWord(psbID[i]);
428  psbBx[0][i] = psbWord.bxNr();
429  psbBx[1][i] = psbWord.localBxNr();
430  }
431  ibit++;
432  }
433 
434  //fill the dbx histo
435  if (gtfeEvmBx > -1)
436  dbx_module->Fill(0., gtfeEvmBx - gtfeBx);
437  if (tcsBx > -1)
438  dbx_module->Fill(1., tcsBx - gtfeBx);
439  for (int i = 0; i < 2; i++) {
440  if (fdlBx[i] > -1)
441  dbx_module->Fill(2. + i, fdlBx[i] - gtfeBx);
442  }
443  for (int j = 0; j < 7; j++) {
444  for (int i = 0; i < 2; i++) {
445  if (psbBx[i][j] > -1)
446  dbx_module->Fill(4. + i + 2 * j, psbBx[i][j] - gtfeBx);
447  }
448  }
449  if (gmtBx > -1)
450  dbx_module->Fill(18., gmtBx - gtfeBx);
451 
452 }
MonitorElement * m_monL1PrescaleFactorSet
Definition: L1TGT.h:152
MonitorElement * gpsfreqwide
Definition: L1TGT.h:149
const cms_uint16_t bxNr() const
get/set bunch cross number of the actual bx
Definition: L1GtPsbWord.h:110
int i
Definition: DBlmapReader.cc:9
boost::uint64_t preGps_
Definition: L1TGT.h:185
const cms_uint64_t orbitNr() const
get/set orbit number since start of run
Definition: L1TcsWord.h:268
MonitorElement * m_monLsNrDiffTcsFdlEvmLs
Definition: L1TGT.h:168
std::vector< std::pair< int, int > >::const_iterator CItVecPair
Definition: L1TGT.h:190
const cms_uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:189
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
const cms_uint16_t luminositySegmentNr() const
get/set luminosity segment number
Definition: L1TcsWord.h:168
MonitorElement * BST_intensityBeam1
Definition: L1TGT.h:146
static const int MaxOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:164
MonitorElement * algo_bits_corr
Definition: L1TGT.h:122
MonitorElement * tt_bits
Definition: L1TGT.h:123
bool verbose_
verbosity switch
Definition: L1TGT.h:117
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
const cms_uint16_t bstMasterStatus() const
MonitorElement * gtfe_bx
Definition: L1TGT.h:138
const cms_uint32_t partTrigNr() const
get/set total number of L1A sent since start of the run to this DAQ partition
Definition: L1TcsWord.h:228
edm::InputTag gtSource_
input parameters
Definition: L1TGT.h:104
MonitorElement * BST_beamMode
Definition: L1TGT.h:144
void Fill(long long x)
MonitorElement * BST_MasterStatus
Definition: L1TGT.h:141
const cms_uint16_t beamMomentum() const
const cms_uint16_t bxNr() const
get/set BxNr - bunch cross number of the actual bx
Definition: L1GtFdlWord.h:112
MonitorElement * BST_intensityBeam2
Definition: L1TGT.h:147
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the TCS chip
Definition: L1TcsWord.h:89
MonitorElement * event_number
Definition: L1TGT.h:130
edm::InputTag gtEvmSource_
input tag for L1 GT EVM readout record
Definition: L1TGT.h:107
std::vector< bool > DecisionWord
typedefs
static const int MaxLsNrDiffTcsFdlEvm
Definition: L1TGT.h:165
MonitorElement * orbit_lumi
Definition: L1TGT.h:135
int j
Definition: DBlmapReader.cc:9
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
int orbitNumber() const
Definition: EventBase.h:63
const cms_uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
Definition: L1GtPsbWord.h:180
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * algo_bits_lumi
Definition: L1TGT.h:126
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
const cms_uint16_t activeBoards() const
get/set boards contributing to EVM respectively DAQ record
Definition: L1GtfeWord.h:165
MonitorElement * m_monLsNrDiffTcsFdlEvm
Definition: L1TGT.h:156
MonitorElement * gpsfreq
Definition: L1TGT.h:148
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:124
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
MonitorElement * algo_bits
Definition: L1TGT.h:121
MonitorElement * event_type
Definition: L1TGT.h:128
const cms_uint16_t gtPrescaleFactorIndexAlgo() const
Definition: L1GtFdlWord.h:269
MonitorElement * m_monOrbitNrDiffTcsFdlEvmLs
Definition: L1TGT.h:167
const cms_uint16_t lumiSegmentNr() const
get/set luminosity segment number of the actual bx
Definition: L1GtFdlWord.h:354
MonitorElement * dbx_module
Definition: L1TGT.h:139
unsigned long long uint64_t
Definition: Time.h:15
const cms_uint32_t lhcFillNumber() const
MonitorElement * tt_bits_corr
Definition: L1TGT.h:124
bool isActive(int word, int bit)
Definition: L1TGT.cc:752
MonitorElement * gpsfreqlum
Definition: L1TGT.h:150
int m_nrEvJob
number of events processed
Definition: L1TGT.h:179
std::string const & label() const
Definition: InputTag.h:42
const cms_uint16_t triggerType() const
get/set trigger type, identical with event type in CMS header
Definition: L1TcsWord.h:129
const cms_uint32_t eventNr() const
get/set event number since last L1 reset generated in TCS chip
Definition: L1TcsWord.h:248
const cms_uint32_t setupVersion() const
get/set setup version
Definition: L1GtfeWord.h:142
MonitorElement * trigger_number
Definition: L1TGT.h:132
MonitorElement * BST_beamMomentum
Definition: L1TGT.h:145
MonitorElement * BST_lhcFillNumber
Definition: L1TGT.h:143
MonitorElement * setupversion_lumi
Definition: L1TGT.h:136
const cms_uint32_t turnCountNumber() const
MonitorElement * BST_turnCountNumber
Definition: L1TGT.h:142
boost::uint64_t preOrb_
Definition: L1TGT.h:186
MonitorElement * event_lumi
Definition: L1TGT.h:131
const cms_uint16_t beamMode() const
MonitorElement * tt_bits_lumi
Definition: L1TGT.h:127
MonitorElement * trigger_lumi
Definition: L1TGT.h:133
MonitorElement * evnum_trignum_lumi
Definition: L1TGT.h:134
const cms_uint32_t orbitNr() const
get/set orbit number
Definition: L1GtFdlWord.h:334
MonitorElement * algo_tt_bits_corr
Definition: L1TGT.h:125
const cms_uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
Definition: L1GtFdlWord.h:374
MonitorElement * m_monOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:155
void L1TGT::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 58 of file L1TGT.cc.

References m_nrEvJob, preGps_, and preOrb_.

58  {
59 
60  m_nrEvJob = 0;
61 
62  preGps_ = 0ULL;
63  preOrb_ = 0ULL;
64 
65 }
boost::uint64_t preGps_
Definition: L1TGT.h:185
int m_nrEvJob
number of events processed
Definition: L1TGT.h:179
boost::uint64_t preOrb_
Definition: L1TGT.h:186
void L1TGT::beginLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup evSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file L1TGT.cc.

96  {
97 
98  //
99 
100 }
void L1TGT::beginRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 67 of file L1TGT.cc.

References bookHistograms(), DQMStore::dirExists(), m_dbe, m_histFolder, m_nrEvRun, m_pairLsNumberPfIndex, cppFunctionSkipper::operator, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

67  {
68 
69  m_nrEvRun = 0;
70 
72 
73  if (m_dbe == 0) {
74  edm::LogInfo("L1TGT") << "\n Unable to get DQMStore service.";
75  } else {
76 
77  // clean up directory
81  }
82 
84 
85  }
86 
87  // book histograms
89 
90  // clear bookkeeping for prescale factor change
91  m_pairLsNumberPfIndex.clear();
92 
93 }
int m_nrEvRun
Definition: L1TGT.h:180
DQMStore * m_dbe
internal members
Definition: L1TGT.h:176
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:189
void bookHistograms()
book all histograms for the module
Definition: L1TGT.cc:488
std::string m_histFolder
histogram folder for L1 GT plots
Definition: L1TGT.h:183
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:498
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void L1TGT::bookHistograms ( )
private

book all histograms for the module

Definition at line 488 of file L1TGT.cc.

References algo_bits, algo_bits_corr, algo_bits_lumi, algo_tt_bits_corr, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), BST_beamMode, BST_beamMomentum, BST_intensityBeam1, BST_intensityBeam2, BST_lhcFillNumber, BST_MasterStatus, BST_turnCountNumber, dbx_module, event_lumi, event_number, event_type, evnum_trignum_lumi, gpsfreq, gpsfreqlum, gpsfreqwide, gtfe_bx, m_dbe, m_histFolder, m_monL1PfIndicesPerLs, m_monL1PrescaleFactorSet, m_monLsNrDiffTcsFdlEvm, m_monLsNrDiffTcsFdlEvmLs, m_monOrbitNrDiffTcsFdlEvm, m_monOrbitNrDiffTcsFdlEvmLs, MaxLsNrDiffTcsFdlEvm, MaxOrbitNrDiffTcsFdlEvm, orbit_lumi, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), setupversion_lumi, trigger_lumi, trigger_number, tt_bits, tt_bits_corr, and tt_bits_lumi.

Referenced by beginRun().

488  {
489 
490  const int TotalNrBinsLs = 1000;
491  const double totalNrBinsLs = static_cast<double>(TotalNrBinsLs);
492 
493  if (m_dbe) {
495 
496  algo_bits = m_dbe->book1D("algo_bits", "GT algorithm trigger bits", 128, -0.5, 127.5);
497  algo_bits->setAxisTitle("Algorithm trigger bits", 1);
498 
499  algo_bits_corr = m_dbe->book2D("algo_bits_corr",
500  "GT algorithm trigger bit correlation",
501  128, -0.5, 127.5, 128, -0.5, 127.5);
502  algo_bits_corr->setAxisTitle("Algorithm trigger bits", 1);
503  algo_bits_corr->setAxisTitle("Algorithm trigger bits", 2);
504 
505  tt_bits = m_dbe->book1D("tt_bits",
506  "GT technical trigger bits",
507  64, -0.5, 63.5);
508  tt_bits->setAxisTitle("Technical trigger bits", 1);
509 
510  tt_bits_corr = m_dbe->book2D("tt_bits_corr",
511  "GT technical trigger bit correlation",
512  64, -0.5, 63.5, 64, -0.5, 63.5);
513  tt_bits_corr->setAxisTitle("Technical trigger bits", 1);
514  tt_bits_corr->setAxisTitle("Technical trigger bits", 2);
515 
516  algo_tt_bits_corr = m_dbe->book2D("algo_tt_bits_corr",
517  "GT algorithm - technical trigger bit correlation",
518  128, -0.5, 127.5, 64, -0.5, 63.5);
519  algo_tt_bits_corr->setAxisTitle("Algorithm trigger bits", 1);
520  algo_tt_bits_corr->setAxisTitle("Technical trigger bits", 2);
521 
522  algo_bits_lumi = m_dbe->book2D("algo_bits_lumi",
523  "GT algorithm trigger bit rate per LS",
524  TotalNrBinsLs, 0., totalNrBinsLs, 128, -0.5, 127.5);
525  algo_bits_lumi->setAxisTitle("Luminosity segment", 1);
526  algo_bits_lumi->setAxisTitle("Algorithm trigger bits", 2);
527 
528  tt_bits_lumi = m_dbe->book2D("tt_bits_lumi",
529  "GT technical trigger bit rate per LS",
530  TotalNrBinsLs, 0., totalNrBinsLs, 64, -0.5, 63.5);
531  tt_bits_lumi->setAxisTitle("Luminosity segment", 1);
532  tt_bits_lumi->setAxisTitle("Technical trigger bits", 2);
533 
534  event_type = m_dbe->book1D("event_type", "GT event type", 10, -0.5, 9.5);
535  event_type->setAxisTitle("Event type", 1);
536  event_type->setBinLabel(2, "Physics", 1);
537  event_type->setBinLabel(3, "Calibration", 1);
538  event_type->setBinLabel(4, "Random", 1);
539  event_type->setBinLabel(6, "Traced", 1);
540  event_type->setBinLabel(7, "Test", 1);
541  event_type->setBinLabel(8, "Error", 1);
542 
543  event_number = m_dbe->book1D("event_number",
544  "GT event number (from last resync)",
545  100, 0., 50000.);
546  event_number->setAxisTitle("Event number", 1);
547 
548  event_lumi = m_dbe->bookProfile("event_lumi",
549  "GT event number (from last resync) vs LS",
550  TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e15, "s");
551  event_lumi->setAxisTitle("Luminosity segment", 1);
552  event_lumi->setAxisTitle("Event number", 2);
553 
554  trigger_number = m_dbe->book1D("trigger_number",
555  "GT trigger number (from start run)",
556  100, 0., 50000.);
557  trigger_number->setAxisTitle("Trigger number", 1);
558 
559  trigger_lumi = m_dbe->bookProfile("trigger_lumi",
560  "GT trigger number (from start run) vs LS",
561  TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e15, "s");
562  trigger_lumi->setAxisTitle("Luminosity segment", 1);
563  trigger_lumi->setAxisTitle("Trigger number", 2);
564 
565  evnum_trignum_lumi = m_dbe->bookProfile("evnum_trignum_lumi",
566  "GT event/trigger number ratio vs LS",
567  TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 2., "s");
568  evnum_trignum_lumi->setAxisTitle("Luminosity segment", 1);
569  evnum_trignum_lumi->setAxisTitle("Event/trigger number ratio", 2);
570 
571  orbit_lumi = m_dbe->bookProfile("orbit_lumi",
572  "GT orbit number vs LS",
573  TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e15, "s");
574  orbit_lumi->setAxisTitle("Luminosity segment", 1);
575  orbit_lumi->setAxisTitle("Orbit number", 2);
576 
577  setupversion_lumi = m_dbe->bookProfile("setupversion_lumi",
578  "GT setup version vs LS",
579  TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e10, "i");
580  setupversion_lumi->setAxisTitle("Luminosity segment", 1);
581  setupversion_lumi->setAxisTitle("Setup version", 2);
582 
583  gtfe_bx = m_dbe->book1D("gtfe_bx", "GTFE Bx number", 3600, 0., 3600.);
584  gtfe_bx->setAxisTitle("GTFE BX number", 1);
585 
586  dbx_module = m_dbe->bookProfile("dbx_module",
587  "delta Bx of GT modules wrt GTFE",
588  20, 0., 20., 100, -4000., 4000., "i");
589  dbx_module->setAxisTitle("GT crate module", 1);
590  dbx_module->setAxisTitle("Module Bx - GTFE Bx", 2);
591  dbx_module->setBinLabel(1, "GTFEevm", 1);
592  dbx_module->setBinLabel(2, "TCS", 1);
593  dbx_module->setBinLabel(3, "FDL", 1);
594  dbx_module->setBinLabel(4, "FDLloc", 1);
595  dbx_module->setBinLabel(5, "PSB9", 1);
596  dbx_module->setBinLabel(6, "PSB9loc", 1);
597  dbx_module->setBinLabel(7, "PSB13", 1);
598  dbx_module->setBinLabel(8, "PSB13loc", 1);
599  dbx_module->setBinLabel(9, "PSB14", 1);
600  dbx_module->setBinLabel(10, "PSB14loc", 1);
601  dbx_module->setBinLabel(11, "PSB15", 1);
602  dbx_module->setBinLabel(12, "PSB15loc", 1);
603  dbx_module->setBinLabel(13, "PSB19", 1);
604  dbx_module->setBinLabel(14, "PSB19loc", 1);
605  dbx_module->setBinLabel(15, "PSB20", 1);
606  dbx_module->setBinLabel(16, "PSB20loc", 1);
607  dbx_module->setBinLabel(17, "PSB21", 1);
608  dbx_module->setBinLabel(18, "PSB21loc", 1);
609  dbx_module->setBinLabel(19, "GMT", 1);
610 
611  BST_MasterStatus = m_dbe->book2D("BST_MasterStatus",
612  "BST master status over LS",
613  TotalNrBinsLs, 0., totalNrBinsLs, 6, -1., 5.);
614  BST_MasterStatus->setAxisTitle("Luminosity segment", 1);
615  BST_MasterStatus->setAxisTitle("BST master status", 2);
616  BST_MasterStatus->setBinLabel(2, "Master Beam 1", 2);
617  BST_MasterStatus->setBinLabel(3, "Master Beam 2", 2);
618 
619  BST_turnCountNumber = m_dbe->book2D("BST_turnCountNumber",
620  "BST turn count over LS",
621  TotalNrBinsLs, 0., totalNrBinsLs, 250, 0., 4.3e9);
622  BST_turnCountNumber->setAxisTitle("Luminosity segment", 1);
623  BST_turnCountNumber->setAxisTitle("BST turn count number", 2);
624 
625  BST_lhcFillNumber = m_dbe->book1D("BST_lhcFillNumber",
626  "BST LHC fill number % 1000", 1000, 0., 1000.);
627  BST_lhcFillNumber->setAxisTitle("BST LHC fill number modulo 1000");
628 
629  BST_beamMode = m_dbe->book2D("BST_beamMode",
630  "BST beam mode over LS",
631  TotalNrBinsLs, 0., totalNrBinsLs, 25, 1., 26.);
632  BST_beamMode->setAxisTitle("Luminosity segment", 1);
633  BST_beamMode->setAxisTitle("Mode", 2);
634  BST_beamMode->setBinLabel(1, "No mode", 2);
635  BST_beamMode->setBinLabel(2, "Setup", 2);
636  BST_beamMode->setBinLabel(3, "Inj pilot", 2);
637  BST_beamMode->setBinLabel(4, "Inj intr", 2);
638  BST_beamMode->setBinLabel(5, "Inj nomn", 2);
639  BST_beamMode->setBinLabel(6, "Pre ramp", 2);
640  BST_beamMode->setBinLabel(7, "Ramp", 2);
641  BST_beamMode->setBinLabel(8, "Flat top", 2);
642  BST_beamMode->setBinLabel(9, "Squeeze", 2);
643  BST_beamMode->setBinLabel(10, "Adjust", 2);
644  BST_beamMode->setBinLabel(11, "Stable", 2);
645  BST_beamMode->setBinLabel(12, "Unstable", 2);
646  BST_beamMode->setBinLabel(13, "Beam dump", 2);
647  BST_beamMode->setBinLabel(14, "Ramp down", 2);
648  BST_beamMode->setBinLabel(15, "Recovery", 2);
649  BST_beamMode->setBinLabel(16, "Inj dump", 2);
650  BST_beamMode->setBinLabel(17, "Circ dump", 2);
651  BST_beamMode->setBinLabel(18, "Abort", 2);
652  BST_beamMode->setBinLabel(19, "Cycling", 2);
653  BST_beamMode->setBinLabel(20, "Warn beam dump", 2);
654  BST_beamMode->setBinLabel(21, "No beam", 2);
655 
656  BST_beamMomentum = m_dbe->book2D("BST_beamMomentum",
657  "BST beam momentum",
658  TotalNrBinsLs, 0., totalNrBinsLs, 100, 0., 7200.);
659  BST_beamMomentum->setAxisTitle("Luminosity segment", 1);
660  BST_beamMomentum->setAxisTitle("Beam momentum", 2);
661 
662  gpsfreq = m_dbe->book1D("gpsfreq", "Clock frequency measured by GPS",
663  1000, 39.95, 40.2);
664  gpsfreq->setAxisTitle("CMS clock frequency (MHz)");
665 
666  gpsfreqwide = m_dbe->book1D("gpsfreqwide",
667  "Clock frequency measured by GPS", 1000, -2., 200.);
668  gpsfreqwide->setAxisTitle("CMS clock frequency (MHz)");
669 
670  gpsfreqlum = m_dbe->book2D("gpsfreqlum",
671  "Clock frequency measured by GPS",
672  TotalNrBinsLs, 0., totalNrBinsLs, 100, 39.95, 40.2);
673  gpsfreqlum->setAxisTitle("Luminosity segment", 1);
674  gpsfreqlum->setAxisTitle("CMS clock frequency (MHz)", 2);
675 
676  BST_intensityBeam1 = m_dbe->book2D("BST_intensityBeam1",
677  "Intensity beam 1",
678  TotalNrBinsLs, 0., totalNrBinsLs, 1000, 0., 5000.);
679  BST_intensityBeam1->setAxisTitle("Luminosity segment", 1);
680  BST_intensityBeam1->setAxisTitle("Beam intensity", 2);
681 
682  BST_intensityBeam2 = m_dbe->book2D("BST_intensityBeam2",
683  "Intensity beam 2",
684  TotalNrBinsLs, 0., totalNrBinsLs, 1000, 0., 5000.);
685  BST_intensityBeam2->setAxisTitle("Luminosity segment", 1);
686  BST_intensityBeam2->setAxisTitle("Beam intensity", 2);
687 
688  // prescale factor index monitoring
689 
690  m_monL1PrescaleFactorSet = m_dbe->book2D("L1PrescaleFactorSet",
691  "Index of L1 prescale factor set",
692  TotalNrBinsLs, 0., totalNrBinsLs, 25, 0., 25.);
693  m_monL1PrescaleFactorSet->setAxisTitle("Luminosity segment", 1);
694  m_monL1PrescaleFactorSet->setAxisTitle("L1 PF set index", 2);
695 
696  m_monL1PfIndicesPerLs = m_dbe->book1D("L1PfIndicesPerLs",
697  "Number of prescale factor indices used per LS", 10, 0., 10.);
698  m_monL1PfIndicesPerLs->setAxisTitle("Number of PF indices used per LS", 1);
699  m_monL1PfIndicesPerLs->setAxisTitle("Entries", 2);
700 
701 
702  // TCS vs FDL common quantity monitoring
703 
704  m_dbe->setCurrentFolder(m_histFolder + "/TCSvsEvmFDL");
705 
706  // orbit number
707  m_monOrbitNrDiffTcsFdlEvm = m_dbe->book1D("OrbitNrDiffTcsFdlEvm",
708  "Orbit number difference (TCS - EVM_FDL)",
709  2 * MaxOrbitNrDiffTcsFdlEvm + 1,
710  static_cast<float>(-(MaxOrbitNrDiffTcsFdlEvm + 1)),
711  static_cast<float>(MaxOrbitNrDiffTcsFdlEvm + 1));
712  m_monOrbitNrDiffTcsFdlEvm->setAxisTitle("Orbit number difference", 1);
713  m_monOrbitNrDiffTcsFdlEvm->setAxisTitle("Entries/run", 2);
714 
715  m_monLsNrDiffTcsFdlEvm = m_dbe->book1D("LsNrDiffTcsFdlEvm",
716  "LS number difference (TCS - EVM_FDL)",
717  2 * MaxLsNrDiffTcsFdlEvm + 1,
718  static_cast<float>(-(MaxLsNrDiffTcsFdlEvm + 1)),
719  static_cast<float>(MaxLsNrDiffTcsFdlEvm + 1));
720  m_monLsNrDiffTcsFdlEvm->setAxisTitle("LS number difference", 1);
721  m_monLsNrDiffTcsFdlEvm->setAxisTitle("Entries/run", 2);
722 
723  // LS number
724 
725  m_monOrbitNrDiffTcsFdlEvmLs = m_dbe->book2D("OrbitNrDiffTcsFdlEvmLs",
726  "Orbit number difference (TCS - EVM_FDL)",
727  TotalNrBinsLs, 0., totalNrBinsLs,
728  2 * MaxOrbitNrDiffTcsFdlEvm + 1,
729  static_cast<float>(-(MaxOrbitNrDiffTcsFdlEvm + 1)),
730  static_cast<float>(MaxOrbitNrDiffTcsFdlEvm + 1));
731  m_monOrbitNrDiffTcsFdlEvmLs->setAxisTitle("Luminosity segment", 1);
732  m_monOrbitNrDiffTcsFdlEvmLs->setAxisTitle("Orbit number difference (TCS - EVM_FDL)", 2);
733 
734  m_monLsNrDiffTcsFdlEvmLs = m_dbe->book2D("LsNrDiffTcsFdlEvmLs",
735  "LS number difference (TCS - EVM_FDL)",
736  TotalNrBinsLs, 0., totalNrBinsLs,
737  2 * MaxLsNrDiffTcsFdlEvm + 1,
738  static_cast<float>(-(MaxLsNrDiffTcsFdlEvm + 1)),
739  static_cast<float>(MaxLsNrDiffTcsFdlEvm + 1));
740  m_monLsNrDiffTcsFdlEvmLs->setAxisTitle("Luminosity segment", 1);
741  m_monLsNrDiffTcsFdlEvmLs->setAxisTitle("LS number difference (TCS - EVM_FDL)", 2);
742 
744  }
745 
746 
747 
748 }
MonitorElement * m_monL1PrescaleFactorSet
Definition: L1TGT.h:152
MonitorElement * gpsfreqwide
Definition: L1TGT.h:149
DQMStore * m_dbe
internal members
Definition: L1TGT.h:176
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * m_monLsNrDiffTcsFdlEvmLs
Definition: L1TGT.h:168
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * BST_intensityBeam1
Definition: L1TGT.h:146
static const int MaxOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:164
MonitorElement * algo_bits_corr
Definition: L1TGT.h:122
MonitorElement * tt_bits
Definition: L1TGT.h:123
MonitorElement * gtfe_bx
Definition: L1TGT.h:138
MonitorElement * BST_beamMode
Definition: L1TGT.h:144
MonitorElement * BST_MasterStatus
Definition: L1TGT.h:141
MonitorElement * BST_intensityBeam2
Definition: L1TGT.h:147
MonitorElement * event_number
Definition: L1TGT.h:130
static const int MaxLsNrDiffTcsFdlEvm
Definition: L1TGT.h:165
MonitorElement * orbit_lumi
Definition: L1TGT.h:135
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1036
std::string m_histFolder
histogram folder for L1 GT plots
Definition: L1TGT.h:183
MonitorElement * algo_bits_lumi
Definition: L1TGT.h:126
MonitorElement * m_monLsNrDiffTcsFdlEvm
Definition: L1TGT.h:156
MonitorElement * gpsfreq
Definition: L1TGT.h:148
MonitorElement * algo_bits
Definition: L1TGT.h:121
MonitorElement * event_type
Definition: L1TGT.h:128
MonitorElement * m_monOrbitNrDiffTcsFdlEvmLs
Definition: L1TGT.h:167
MonitorElement * dbx_module
Definition: L1TGT.h:139
MonitorElement * tt_bits_corr
Definition: L1TGT.h:124
MonitorElement * gpsfreqlum
Definition: L1TGT.h:150
MonitorElement * m_monL1PfIndicesPerLs
Definition: L1TGT.h:153
MonitorElement * trigger_number
Definition: L1TGT.h:132
MonitorElement * BST_beamMomentum
Definition: L1TGT.h:145
MonitorElement * BST_lhcFillNumber
Definition: L1TGT.h:143
MonitorElement * setupversion_lumi
Definition: L1TGT.h:136
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
MonitorElement * BST_turnCountNumber
Definition: L1TGT.h:142
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * event_lumi
Definition: L1TGT.h:131
MonitorElement * tt_bits_lumi
Definition: L1TGT.h:127
MonitorElement * trigger_lumi
Definition: L1TGT.h:133
MonitorElement * evnum_trignum_lumi
Definition: L1TGT.h:134
MonitorElement * algo_tt_bits_corr
Definition: L1TGT.h:125
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * m_monOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:155
void L1TGT::countPfsIndicesPerLs ( )
private

Definition at line 759 of file L1TGT.cc.

References MonitorElement::Fill(), m_monL1PfIndicesPerLs, m_pairLsNumberPfIndex, MonitorElement::Reset(), python.multivaluedict::sort(), and verbose_.

Referenced by endJob(), endLuminosityBlock(), and endRun().

759  {
760 
761  if (verbose_) {
762  edm::LogInfo("L1TGT") << "\n Prescale factor indices used in a LS "
763  << std::endl;
764 
765  for (CItVecPair cIt = m_pairLsNumberPfIndex.begin(); cIt
766  != m_pairLsNumberPfIndex.end(); ++cIt) {
767 
768  edm::LogVerbatim("L1TGT") << " lsNumber = " << (*cIt).first
769  << " pfIndex = " << (*cIt).second << std::endl;
770  }
771  edm::LogVerbatim("L1TGT") << std::endl;
772  }
773 
774  // reset the histogram...
776 
777  // sort the vector (for pairs: sort after first argument, then after the second argument)
779 
780  int previousLsNumber = -1;
781  int previousPfsIndex = -1;
782 
783  // count the number of pairs (lsNumber, pfIndex) per Ls
784  // there are no duplicate entries, and pairs are sorted after both members
785  // ... and fill again the histogram
786  for (CItVecPair cIt = m_pairLsNumberPfIndex.begin(); cIt
787  != m_pairLsNumberPfIndex.end(); ++cIt) {
788 
789  int pfsIndicesPerLs = 1;
790 
791  if ((*cIt).first == previousLsNumber) {
792 
793  if ((*cIt).second != previousPfsIndex) {
794  pfsIndicesPerLs++;
795  previousPfsIndex = (*cIt).second;
796  }
797 
798  } else {
799 
800  // fill the histogram with the number of PF indices for the previous Ls
801  if (previousLsNumber != -1) {
802  m_monL1PfIndicesPerLs->Fill(pfsIndicesPerLs);
803  }
804 
805  // new Ls
806  previousLsNumber = (*cIt).first;
807  previousPfsIndex = (*cIt).second;
808 
809  pfsIndicesPerLs = 1;
810  }
811 
812  }
813 
814 }
std::vector< std::pair< int, int > >::const_iterator CItVecPair
Definition: L1TGT.h:190
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:189
bool verbose_
verbosity switch
Definition: L1TGT.h:117
void Fill(long long x)
MonitorElement * m_monL1PfIndicesPerLs
Definition: L1TGT.h:153
void Reset(void)
reset ME (ie. contents, errors, etc)
void L1TGT::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 473 of file L1TGT.cc.

References countPfsIndicesPerLs(), m_nrEvJob, m_runInEndJob, and verbose_.

473  {
474 
475  if (m_runInEndJob) {
477  }
478 
479  if (verbose_) {
480  edm::LogInfo("L1TGT") << "\n Analyzed " << m_nrEvJob << " events";
481  }
482 
483  return;
484 }
bool verbose_
verbosity switch
Definition: L1TGT.h:117
int m_nrEvJob
number of events processed
Definition: L1TGT.h:179
void countPfsIndicesPerLs()
Definition: L1TGT.cc:759
bool m_runInEndJob
Definition: L1TGT.h:113
void L1TGT::endLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup evSetup 
)
privatevirtual

end section

Reimplemented from edm::EDAnalyzer.

Definition at line 456 of file L1TGT.cc.

References countPfsIndicesPerLs(), and m_runInEndLumi.

457  {
458 
459  if (m_runInEndLumi) {
461  }
462 }
bool m_runInEndLumi
Definition: L1TGT.h:111
void countPfsIndicesPerLs()
Definition: L1TGT.cc:759
void L1TGT::endRun ( const edm::Run iRrun,
const edm::EventSetup evSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 464 of file L1TGT.cc.

References countPfsIndicesPerLs(), and m_runInEndRun.

464  {
465 
466  if (m_runInEndRun) {
468  }
469 
470 }
bool m_runInEndRun
Definition: L1TGT.h:112
void countPfsIndicesPerLs()
Definition: L1TGT.cc:759
bool L1TGT::isActive ( int  word,
int  bit 
)
private

Definition at line 752 of file L1TGT.cc.

Referenced by analyze().

752  {
753  if (word & (1 << bit))
754  return true;
755  return false;
756 }

Member Data Documentation

MonitorElement* L1TGT::algo_bits
private

Definition at line 121 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::algo_bits_corr
private

Definition at line 122 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::algo_bits_lumi
private

Definition at line 126 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::algo_tt_bits_corr
private

Definition at line 125 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_beamMode
private

Definition at line 144 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_beamMomentum
private

Definition at line 145 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_intensityBeam1
private

Definition at line 146 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_intensityBeam2
private

Definition at line 147 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_lhcFillNumber
private

Definition at line 143 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_MasterStatus
private

Definition at line 141 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::BST_turnCountNumber
private

Definition at line 142 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::dbx_module
private

Definition at line 139 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::event_lumi
private

Definition at line 131 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::event_number
private

Definition at line 130 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::event_type
private

Definition at line 128 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::evnum_trignum_lumi
private

Definition at line 134 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::gpsfreq
private

Definition at line 148 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::gpsfreqlum
private

Definition at line 150 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::gpsfreqwide
private

Definition at line 149 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TGT::gtEvmSource_
private

input tag for L1 GT EVM readout record

Definition at line 107 of file L1TGT.h.

Referenced by analyze().

MonitorElement* L1TGT::gtfe_bx
private

Definition at line 138 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TGT::gtSource_
private

input parameters

input tag for L1 GT DAQ readout record

Definition at line 104 of file L1TGT.h.

Referenced by analyze().

DQMStore* L1TGT::m_dbe
private

internal members

Definition at line 176 of file L1TGT.h.

Referenced by beginRun(), bookHistograms(), and L1TGT().

std::string L1TGT::m_histFolder
private

histogram folder for L1 GT plots

Definition at line 183 of file L1TGT.h.

Referenced by beginRun(), bookHistograms(), and L1TGT().

MonitorElement* L1TGT::m_monL1PfIndicesPerLs
private

Definition at line 153 of file L1TGT.h.

Referenced by bookHistograms(), and countPfsIndicesPerLs().

MonitorElement* L1TGT::m_monL1PrescaleFactorSet
private

Definition at line 152 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::m_monLsNrDiffTcsFdlEvm
private

Definition at line 156 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::m_monLsNrDiffTcsFdlEvmLs
private

Definition at line 168 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::m_monOrbitNrDiffTcsFdlEvm
private

Definition at line 155 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::m_monOrbitNrDiffTcsFdlEvmLs
private

Definition at line 167 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

int L1TGT::m_nrEvJob
private

number of events processed

Definition at line 179 of file L1TGT.h.

Referenced by analyze(), beginJob(), and endJob().

int L1TGT::m_nrEvRun
private

Definition at line 180 of file L1TGT.h.

Referenced by beginRun().

std::vector<std::pair<int,int> > L1TGT::m_pairLsNumberPfIndex
private

Definition at line 189 of file L1TGT.h.

Referenced by analyze(), beginRun(), countPfsIndicesPerLs(), and L1TGT().

bool L1TGT::m_runInEndJob
private

Definition at line 113 of file L1TGT.h.

Referenced by endJob().

bool L1TGT::m_runInEndLumi
private

Definition at line 111 of file L1TGT.h.

Referenced by endLuminosityBlock().

bool L1TGT::m_runInEndRun
private

Definition at line 112 of file L1TGT.h.

Referenced by endRun().

bool L1TGT::m_runInEventLoop
private

switches to choose the running of various methods

Definition at line 110 of file L1TGT.h.

const int L1TGT::MaxLsNrDiffTcsFdlEvm = 24
staticprivate

Definition at line 165 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

const int L1TGT::MaxOrbitNrDiffTcsFdlEvm = 24
staticprivate

Definition at line 164 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::orbit_lumi
private

Definition at line 135 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

boost::uint64_t L1TGT::preGps_
private

Definition at line 185 of file L1TGT.h.

Referenced by analyze(), and beginJob().

boost::uint64_t L1TGT::preOrb_
private

Definition at line 186 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::setupversion_lumi
private

Definition at line 136 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::trigger_lumi
private

Definition at line 133 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::trigger_number
private

Definition at line 132 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::tt_bits
private

Definition at line 123 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::tt_bits_corr
private

Definition at line 124 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGT::tt_bits_lumi
private

Definition at line 127 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

bool L1TGT::verbose_
private

verbosity switch

Definition at line 117 of file L1TGT.h.

Referenced by analyze(), countPfsIndicesPerLs(), and endJob().