Belle II Software  release-06-02-00
KLMDQM2Module.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 /* Belle 2 headers. */
10 #include <klm/modules/KLMDQM2/KLMDQM2Module.h>
11 #include <mdst/dataobjects/Track.h>
12 
13 /* ROOT headers. */
14 #include <TDirectory.h>
15 
16 /* CLHEP headers. */
17 #include <CLHEP/Vector/ThreeVector.h>
18 
19 /* C++ headers. */
20 #include <vector>
21 #include <algorithm>
22 #include <string>
23 
24 using namespace Belle2;
25 
26 //-----------------------------------------------------------------
27 // Register the Module
28 //-----------------------------------------------------------------
29 REG_MODULE(KLMDQM2)
30 
31 //-----------------------------------------------------------------
32 // Implementation
33 //-----------------------------------------------------------------
34 
36  HistoModule(),
37  m_ElementNumbers(&(KLMElementNumbers::Instance())),
38  m_eklmElementNumbers(&(EKLMElementNumbers::Instance())),
39  m_PlaneArrayIndex(&(KLMPlaneArrayIndex::Instance())),
40  m_GeometryBKLM{nullptr},
41  m_MatchedHitsBKLM{nullptr},
42  m_AllExtHitsBKLM{nullptr},
43  m_MatchedHitsEKLM{nullptr},
44  m_AllExtHitsEKLM{nullptr},
45  m_MatchedHitsBKLMSector{nullptr},
46  m_AllExtHitsBKLMSector{nullptr},
47  m_MatchedHitsEKLMSector{nullptr},
48  m_AllExtHitsEKLMSector{nullptr}
49 {
50  // Set module properties
51  setDescription(R"DOC("Additional Module for KLMDQM plots after HLT filters
52 
53  An additional module developed to display plane efficiencies for the KLM dduring runs (i.e. for online analyses).
54  This module would be called after HLT filter in order to use mumu-tight skim to select reasonable events.
55  The output histograms would be plane efficiences = MatchedDigits/AllExtits.
56  )DOC");
57 
58  // Parameter definitions
59  addParam("MuonListName", m_MuonListName, "Muon list name.",
60  std::string("mu+:all"));
61  addParam("AllowedDistance1D", m_AllowedDistance1D,
62  "Maximal distance in the units of strip number from ExtHit to "
63  "matching KLMDigit.", double(8));
64  addParam("MinimalMatchingDigits", m_MinimalMatchingDigits,
65  "Minimal number of matching digits.", 0);
66  addParam("MinimalMatchingDigitsOuterLayers",
67  m_MinimalMatchingDigitsOuterLayers,
68  "Minimal number of matching digits in outer layers.", 0);
69  addParam("MinimalMomentumNoOuterLayers", m_MinimalMomentumNoOuterLayers,
70  "Minimal momentum in case there are no hits in outer layers.", 0.0);
71  addParam("RemoveUnusedMuons", m_RemoveUnusedMuons,
72  "Whether to remove unused muons.", false);
73  addParam("IgnoreBackwardPropagation", m_IgnoreBackwardPropagation,
74  "Whether to ignore ExtHits with backward propagation.", false);
75  setPropertyFlags(c_ParallelProcessingCertified);
76  addParam("histogramDirectoryName", m_HistogramDirectoryName,
77  "Directory for KLM DQM histograms in ROOT file.",
78  std::string("KLMEfficiencyDQM"));
79 
80 }
81 
82 
83 
84 
86 {
87 }
88 
90 {
91 
92  TDirectory* newDirectory{gDirectory->mkdir(m_HistogramDirectoryName.c_str())};
93  TDirectory::TContext context{gDirectory, newDirectory};
94 
95 
98 
99 
100  /* Number of hits per channel. */
101  /* KLM General Related. */
102  m_MatchedHitsBKLM = new TH1F("matched_hitsBKLM",
103  "Matched Hits in BKLM Plane",
104  m_PlaneNumBKLM, 0.5, 0.5 + m_PlaneNumBKLM);
105  m_MatchedHitsBKLM->GetXaxis()->SetTitle("Layer Number");
106  //m_MatchedHitsBKLM->SetOption("LIVE");
107 
108  m_AllExtHitsBKLM = new TH1F("all_ext_hitsBKLM",
109  "All ExtHits in BKLM Plane",
110  m_PlaneNumBKLM, 0.5, 0.5 + m_PlaneNumBKLM);
111  m_AllExtHitsBKLM->GetXaxis()->SetTitle("Layer number");
112  //m_AllExtHitsBKLM->SetOption("LIVE");
113 
114 
115 
116  m_MatchedHitsEKLM = new TH1F("matched_hitsEKLM",
117  "Matched Hits in EKLM Plane",
118  m_PlaneNumEKLM, 0.5, m_PlaneNumEKLM + 0.5);
119  m_MatchedHitsEKLM->GetXaxis()->SetTitle("Plane number");
120  //m_MatchedHitsEKLM->SetOption("LIVE");
121 
122  m_AllExtHitsEKLM = new TH1F("all_ext_hitsEKLM",
123  "All ExtHits in EKLM Plane",
124  m_PlaneNumEKLM, 0.5, m_PlaneNumEKLM + 0.5);
125  m_AllExtHitsEKLM->GetXaxis()->SetTitle("Plane number");
126  //m_AllExtHitsEKLM->SetOption("LIVE");
127 
128 
129 
130  /********************/
131  /********************/
132  /* binned by sector */
133  /********************/
134  /********************/
135 
136  m_MatchedHitsBKLMSector = new TH1F("matched_hitsBKLMSector",
137  "Matched Hits in BKLM Sector",
138  BKLMMaxSectors, 0.5, 0.5 + BKLMMaxSectors);
139  m_MatchedHitsBKLMSector->GetXaxis()->SetTitle("Sector Number");
140  //m_MatchedHitsBKLMSector->SetOption("LIVE");
141 
142  m_AllExtHitsBKLMSector = new TH1F("all_ext_hitsBKLMSector",
143  "All ExtHits in BKLM Sector",
144  BKLMMaxSectors, 0.5, 0.5 + BKLMMaxSectors);
145  m_AllExtHitsBKLMSector->GetXaxis()->SetTitle("Sector number");
146  //m_AllExtHitsBKLMSector->SetOption("LIVE");
147 
148 
149 
150  m_MatchedHitsEKLMSector = new TH1F("matched_hitsEKLMSector",
151  "Matched Hits in EKLM Sector",
152  EKLMMaxSectors, 0.5, EKLMMaxSectors + 0.5);
153  m_MatchedHitsEKLMSector->GetXaxis()->SetTitle("Sector number");
154  //m_MatchedHitsEKLMSector->SetOption("LIVE");
155 
156  m_AllExtHitsEKLMSector = new TH1F("all_ext_hitsEKLMSector",
157  "All ExtHits in EKLM Sector",
158  EKLMMaxSectors, 0.5, EKLMMaxSectors + 0.5);
159  m_AllExtHitsEKLMSector->GetXaxis()->SetTitle("Sector number");
160  //m_AllExtHitsEKLMSector->SetOption("LIVE");
161 
162 }//end of defineHisto
163 
164 
165 
167 {
168  REG_HISTOGRAM;
169  //inputs
170  m_softwareTriggerResult.isOptional();
171  m_MuonList.isRequired(m_MuonListName);
172  m_Digits.isOptional();
174 
175 }
176 
178 {
179 
180  //start by restarting histograms
181 
182  /* KLM General Related. */
183  m_MatchedHitsBKLM->Reset();
184  m_AllExtHitsBKLM->Reset();
185  m_MatchedHitsEKLM->Reset();
186  m_AllExtHitsEKLM->Reset();
187 
188  m_MatchedHitsBKLMSector->Reset();
189  m_AllExtHitsBKLMSector->Reset();
190  m_MatchedHitsEKLMSector->Reset();
191  m_AllExtHitsEKLMSector->Reset();
192 }
193 
194 
196 {
197  if (triggerFlag()) {
198  unsigned int nMuons = m_MuonList->getListSize();
199  for (unsigned int i = 0; i < nMuons; ++i) {
200  const Particle* muon = m_MuonList->getParticle(i);
205 
206  }
207 
208  }
209 }
210 
212 {
213 }
214 
216 {
217 }
218 
219 
221 {
222 
223  bool passed = false;
225  try {
226  passed = (m_softwareTriggerResult->getResult("software_trigger_cut&skim&accept_mumutight") == SoftwareTriggerCutResult::c_accept) ?
227  true : false;
228  } catch (const std::out_of_range&) {
229  passed = false;
230  }
231  }
232  return passed;
233 
234 }
235 
237  struct HitData* hitData)
238 {
239  for (const KLMDigit& digit : m_Digits) {
240  /*
241  * TODO: multi-strip digits are ignored for now.
242  * It is necessary to take them into account.
243  */
244  if (digit.isMultiStrip())
245  continue;
246  if (!(digit.getSubdetector() == hitData->subdetector &&
247  digit.getSection() == hitData->section &&
248  digit.getLayer() == hitData->layer &&
249  digit.getSector() == hitData->sector &&
250  digit.getPlane() == hitData->plane))
251  continue;
252  if (fabs(digit.getStrip() - hitData->strip) < m_AllowedDistance1D) {
253  hitData->digit = &digit;
254  return;
255  }
256  }
257 }
258 
260  std::map<KLMPlaneNumber, struct HitData>& hitMap,
261  KLMPlaneNumber planeGlobal, struct HitData* hitData)
262 {
263  std::map<KLMPlaneNumber, struct HitData>::iterator it;
264  it = hitMap.find(planeGlobal);
265  /*
266  * There may be more than one such hit e.g. if track crosses the edge
267  * of the strips or WLS fiber groove. Select only one hit per plane.
268  */
269  if (it == hitMap.end()) {
270  hitMap.insert(std::pair<KLMPlaneNumber, struct HitData>(
271  planeGlobal, *hitData));
272  }
273 }
274 
276  const Particle* muon, TH1F* matchedHitsBKLM, TH1F* allExtHitsBKLM,
277  TH1F* matchedHitsEKLM, TH1F* allExtHitsEKLM, TH1F* matchedHitsBKLMSec, TH1F* allExtHitsBKLMSec,
278  TH1F* matchedHitsEKLMSec, TH1F* allExtHitsEKLMSec)
279 {
280  const int nExtrapolationLayers =
282  const Track* track = muon->getTrack();
283  RelationVector<ExtHit> extHits = track->getRelationsTo<ExtHit>();
284  std::map<KLMPlaneNumber, struct HitData> selectedHits;
285  std::map<KLMPlaneNumber, struct HitData>::iterator it;
286  KLMChannelNumber channel;
288  struct HitData hitData, hitDataPrevious;
289  TVector3 extHitPosition;
290  CLHEP::Hep3Vector extHitPositionCLHEP, localPosition;
291  int layer;
292  int extHitLayer[nExtrapolationLayers] = {0};
293  int digitLayer[nExtrapolationLayers] = {0};
294  hitDataPrevious.subdetector = -1;
295  for (const ExtHit& hit : extHits) {
296  /*
297  * Choose hits that exit the sensitive volume.
298  * It is not possible to use entry hits because of a bug in Geant4:
299  * the step does not always have a correct status (fGeomBoundary),
300  * and, consequently, ExtHits are not created.
301  */
302  if (hit.getStatus() != EXT_EXIT)
303  continue;
304  /*
305  * Ignore ExtHits with backward propagation. This affects cosmic events
306  * only. The removal of hits with backward propagation is normally
307  * not needed, however, it is added because of backward error propagation
308  * bug in Geant4 10.6.
309  */
311  if (hit.isBackwardPropagated())
312  continue;
313  }
314  KLMPlaneNumber planeGlobal = 0;
315  hitData.hit = &hit;
316  hitData.digit = nullptr;
317  if (hit.getDetectorID() == Const::EDetector::EKLM) {
318  int stripGlobal = hit.getCopyID();
319  hitData.subdetector = KLMElementNumbers::c_EKLM;
321  stripGlobal, &hitData.section, &hitData.layer, &hitData.sector,
322  &hitData.plane, &hitData.strip);
324  hitData.section, hitData.sector, hitData.layer,
325  hitData.plane, hitData.strip);
326  status = m_ChannelStatus->getChannelStatus(channel);
327  if (status == KLMChannelStatus::c_Unknown)
328  B2FATAL("Incomplete KLM channel status data.");
329  if (status == KLMChannelStatus::c_Normal) {
331  hitData.subdetector, hitData.layer);
332  extHitLayer[layer - 1]++;
333  planeGlobal = m_ElementNumbers->planeNumberEKLM(
334  hitData.section, hitData.sector, hitData.layer,
335  hitData.plane);
336  addHit(selectedHits, planeGlobal, &hitData);
337  }
338  } else if (hit.getDetectorID() == Const::EDetector::BKLM) {
339  int moduleNumber = hit.getCopyID();
340  hitData.subdetector = KLMElementNumbers::c_BKLM;
342  moduleNumber, &hitData.section, &hitData.sector, &hitData.layer);
343  if (hitData.layer < BKLMElementNumbers::c_FirstRPCLayer) {
344  /*
345  * For scintillators, the plane and strip numbers are recorded
346  * in the copy number.
347  */
349  moduleNumber, &hitData.section, &hitData.sector, &hitData.layer,
350  &hitData.plane, &hitData.strip);
352  hitData.section, hitData.sector, hitData.layer,
353  hitData.plane, hitData.strip);
354  status = m_ChannelStatus->getChannelStatus(channel);
355  if (status == KLMChannelStatus::c_Unknown)
356  B2FATAL("Incomplete KLM channel status data.");
357  if (status == KLMChannelStatus::c_Normal) {
359  hitData.subdetector, hitData.layer);
360  extHitLayer[layer - 1]++;
361  planeGlobal = m_ElementNumbers->planeNumberBKLM(
362  hitData.section, hitData.sector, hitData.layer,
363  hitData.plane);
364  addHit(selectedHits, planeGlobal, &hitData);
365  }
366  } else {
367  /* For RPCs, the sensitive volume corresponds to both readout planes. */
368  extHitPosition = hit.getPosition();
369  extHitPositionCLHEP.setX(extHitPosition.X());
370  extHitPositionCLHEP.setY(extHitPosition.Y());
371  extHitPositionCLHEP.setZ(extHitPosition.Z());
372  const bklm::Module* module =
373  m_GeometryBKLM->findModule(hitData.section, hitData.sector,
374  hitData.layer);
375  localPosition = module->globalToLocal(extHitPositionCLHEP);
376  hitData.plane = BKLMElementNumbers::c_ZPlane;
377  hitData.strip = module->getZStrip(localPosition);
378  /*
379  * FIXME:
380  * There are 2 hits per module in RPCs, but the plane information is
381  * not available in ExtHit. For now, 2 entries are created (one for
382  * each plane) for the first hit, and the second one is removed.
383  */
384  if (hitData.subdetector == hitDataPrevious.subdetector &&
385  hitData.section == hitDataPrevious.section &&
386  hitData.sector == hitDataPrevious.sector &&
387  hitData.layer == hitDataPrevious.layer)
388  continue;
389  std::memcpy(&hitDataPrevious, &hitData, sizeof(struct HitData));
390  /* The returned strip may be out of the valid range. */
392  hitData.section, hitData.sector, hitData.layer, hitData.plane,
393  hitData.strip, false)) {
395  hitData.section, hitData.sector, hitData.layer,
396  hitData.plane, hitData.strip);
397  status = m_ChannelStatus->getChannelStatus(channel);
398  if (status == KLMChannelStatus::c_Unknown)
399  B2FATAL("Incomplete KLM channel status data.");
400  if (status == KLMChannelStatus::c_Normal) {
402  hitData.subdetector, hitData.layer);
403  extHitLayer[layer - 1]++;
404  hitData.localPosition = localPosition.z();
405  planeGlobal = m_ElementNumbers->planeNumberBKLM(
406  hitData.section, hitData.sector, hitData.layer,
407  hitData.plane);
408  addHit(selectedHits, planeGlobal, &hitData);
409  }
410  }
411  hitData.plane = BKLMElementNumbers::c_PhiPlane;
412  hitData.strip = module->getPhiStrip(localPosition);
413  /* The returned strip may be out of the valid range. */
415  hitData.section, hitData.sector, hitData.layer, hitData.plane,
416  hitData.strip, false)) {
418  hitData.section, hitData.sector, hitData.layer,
419  hitData.plane, hitData.strip);
420  status = m_ChannelStatus->getChannelStatus(channel);
421  if (status == KLMChannelStatus::c_Unknown)
422  B2FATAL("Incomplete KLM channel status data.");
423  if (status == KLMChannelStatus::c_Normal) {
425  hitData.subdetector, hitData.layer);
426  extHitLayer[layer - 1]++;
427  hitData.localPosition = localPosition.y();
428  planeGlobal = m_ElementNumbers->planeNumberBKLM(
429  hitData.section, hitData.sector, hitData.layer,
430  hitData.plane);
431  addHit(selectedHits, planeGlobal, &hitData);
432  } //end of channel status check
433  } //end of channel number check
434  }//end of detector condition
435  } else
436  continue;
437  }
438  /* Find matching digits. */
439  int nDigits = 0;
440  std::map<int, int>::iterator it2;
441  for (it = selectedHits.begin(); it != selectedHits.end(); ++it) {
442  findMatchingDigit(&(it->second));
443  if (it->second.digit != nullptr) {
444  nDigits++;
446  it->second.subdetector, it->second.layer);
447  digitLayer[layer - 1]++;
448  }
449  }
450  if (nDigits < m_MinimalMatchingDigits)
451  return false;
452  /* Write efficiency histograms */
453  for (it = selectedHits.begin(); it != selectedHits.end(); ++it) {
454  int matchingDigits = 0;
455  int matchingDigitsOuterLayers = 0;
456  int extHitsOuterLayers = 0;
458  it->second.subdetector, it->second.layer) - 1;
459  for (int i = 0; i < nExtrapolationLayers; ++i) {
460  if (i != layer)
461  matchingDigits += digitLayer[i];
462  if (i > layer) {
463  matchingDigitsOuterLayers += digitLayer[i];
464  extHitsOuterLayers += extHitLayer[i];
465  }
466  }
467  /* Check the number of matching digits in other layers. */
468  if (matchingDigits < m_MinimalMatchingDigits)
469  continue;
470  /*
471  * Check the number of matching digits in outer layers relatively to
472  * this hit.
473  */
474  if (matchingDigitsOuterLayers < m_MinimalMatchingDigitsOuterLayers) {
480  if (extHitsOuterLayers >= m_MinimalMatchingDigitsOuterLayers)
481  continue;
482  /*
483  * If the number of ExtHits is insufficient, then check the momentum.
484  * The muons with sufficiently large momentum have a very small
485  * probability to get absorbed in the detector.
486  */
487  if (muon->getMomentum().Mag() < m_MinimalMomentumNoOuterLayers)
488  continue;
489  }
490  //Filling AddExtHits and MatchedHits histograms
491  if (it->second.subdetector == KLMElementNumbers::c_EKLM) {
492  int planeNum = m_eklmElementNumbers->planeNumber(it->second.section, it->second.layer, it->second.sector, it->second.plane);
493  int sectorNum = (it->second.section - 1) * EKLMElementNumbers::getMaximalSectorNumber() + it->second.sector;
494  allExtHitsEKLM->Fill(planeNum);
495  allExtHitsEKLMSec->Fill(sectorNum);
496  if (it->second.digit) {
497  matchedHitsEKLM->Fill(planeNum);
498  matchedHitsEKLMSec->Fill(sectorNum);
499  }
500  }//end of if loop
501 
502 
503  else if (it->second.subdetector == KLMElementNumbers::c_BKLM) {
504  int layerGlobal = BKLMElementNumbers::layerGlobalNumber(
505  it->second.section, it->second.sector, it->second.layer);
506  int sectorGlobal = it->second.section * BKLMElementNumbers::getMaximalSectorNumber() + (it->second.sector);
507  allExtHitsBKLM->Fill(layerGlobal);
508  allExtHitsBKLMSec->Fill(sectorGlobal);
509  if (it->second.digit) {
510  matchedHitsBKLM->Fill(layerGlobal);
511  matchedHitsBKLMSec->Fill(sectorGlobal);
512  }
513  } else {
514  B2FATAL("Had a hit that didn't come from BKLM or EKLM?");
515  }
516 
517  } //end of selectedHits for loop
518  return true;
519 } //end of collectTrackData
520 
521 
static void channelNumberToElementNumbers(KLMChannelNumber channel, int *section, int *sector, int *layer, int *plane, int *strip)
Get element numbers by channel number.
static bool checkChannelNumber(int section, int sector, int layer, int plane, int strip, bool fatalError=true)
Check channel number.
@ c_FirstRPCLayer
First RPC layer.
static constexpr int getMaximalSectorNumber()
Get maximal sector number (1-based).
static void moduleNumberToElementNumbers(KLMModuleNumber module, int *section, int *sector, int *layer)
Get element numbers by module number.
static constexpr int getMaximalSectorGlobalNumber()
Get maximal sector global number.
static int layerGlobalNumber(int section, int sector, int layer)
Get layer global number.
EKLM element numbers.
void stripNumberToElementNumbers(int stripGlobal, int *section, int *layer, int *sector, int *plane, int *strip) const
Get element numbers by strip global number.
static constexpr int getMaximalSectorNumber()
Get maximal sector number.
int planeNumber(int section, int layer, int sector, int plane) const
Get plane number.
static constexpr int getMaximalSectorGlobalNumberKLMOrder()
Get maximal sector global number with KLM ordering (section, sector).
Store one Ext hit as a ROOT object.
Definition: ExtHit.h:30
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
ChannelStatus
Channel status.
@ c_Normal
Normally operating channel.
@ c_Unknown
Unknown status (no data).
Additional Module for KLMDQM plots after HLT filters.
Definition: KLMDQM2Module.h:51
TH1F * m_MatchedHitsBKLMSector
Matched hits in sector for BKLM.
TH1F * m_MatchedHitsEKLM
Matched hits in plane for EKLM.
virtual void endRun() override
Called if the current run ends.
const bklm::GeometryPar * m_GeometryBKLM
BKLM geometry.
void addHit(std::map< KLMPlaneNumber, struct HitData > &hitMap, KLMPlaneNumber planeGlobal, struct HitData *hitData)
Add hit to map.
StoreArray< KLMDigit > m_Digits
KLM digits.
DBObjPtr< KLMChannelStatus > m_ChannelStatus
Channel status.
virtual void terminate() override
Called at the end of the event processing.
TH1F * m_AllExtHitsBKLMSector
Extrapolated hits in sector for BKLM.
double m_MinimalMomentumNoOuterLayers
Minimal momentum in case there are no hits in outer layers.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
const EKLMElementNumbers * m_eklmElementNumbers
Element numbers.
void findMatchingDigit(struct HitData *hitData)
Find matching digit.
TH1F * m_AllExtHitsEKLMSector
Extrapolated hits in sector for EKLM.
TH1F * m_MatchedHitsBKLM
Matched hits in plane for BKLM.
virtual void event() override
Selection for mumu_tight_skim, then DQM plot filling
StoreObjPtr< ParticleList > m_MuonList
Muons.
virtual void initialize() override
Register input and output data.
bool m_IgnoreBackwardPropagation
Whether to ignore ExtHits with backward propagation.
double m_AllowedDistance1D
Maximal distance in the units of strip number from ExtHit to matching KLMDigit.
virtual void beginRun() override
Called when entering a new run.
~KLMDQM2Module()
Destructor.
TH1F * m_AllExtHitsBKLM
Extrapolated hits in plane for BKLM.
TH1F * m_MatchedHitsEKLMSector
Matched hits in sector for EKLM.
const int m_PlaneNumBKLM
Number of layers/planes for BKLM.
int m_MinimalMatchingDigitsOuterLayers
Minimal number of matching digits in outer layers.
std::string m_MuonListName
Muon list name.
int m_MinimalMatchingDigits
Minimal number of matching digits.
StoreObjPtr< SoftwareTriggerResult > m_softwareTriggerResult
Trigger Information.
const int m_PlaneNumEKLM
Number of layers/planes for EKLM.
TH1F * m_AllExtHitsEKLM
Extrapolated hits in plane for EKLM.
bool collectDataTrack(const Particle *muon, TH1F *matchedHitsBKLM, TH1F *allExtHitsBKLM, TH1F *matchedHitsEKLM, TH1F *allExtHitsEKLM, TH1F *matchedHitsBKLMSec, TH1F *allExtHitsBKLMSec, TH1F *matchedHitsEKLMSec, TH1F *allExtHitsEKLMSec)
Collect the data for one muon.
bool triggerFlag()
Uses TrigResult along with desired software cut to determine whether histograms are filled or not for...
std::string m_HistogramDirectoryName
Directory for KLM DQM histograms in ROOT file.
void defineHisto() override
Definition of the histograms.
KLM digit (class representing a digitized hit in RPCs or scintillators).
Definition: KLMDigit.h:30
KLM element numbers.
KLMChannelNumber channelNumberBKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for BKLM.
KLMPlaneNumber planeNumberEKLM(int section, int sector, int layer, int plane) const
Get channel number for EKLM.
int getExtrapolationLayer(int subdetector, int layer) const
Get extrapolation layer number (BKLM - from 1 to 15, EKLM - from 16 to 29).
KLMPlaneNumber planeNumberBKLM(int section, int sector, int layer, int plane) const
Get plane number for BKLM.
static constexpr int getMaximalExtrapolationLayer()
Get maximal extrapolation layer.
KLMChannelNumber channelNumberEKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for EKLM.
KLM plane array index.
Class to store reconstructed particles.
Definition: Particle.h:74
Class for type safe access to objects that are referred to in relations.
Class that bundles various TrackFitResults.
Definition: Track.h:25
const Module * findModule(int section, int sector, int layer) const
Get the pointer to the definition of a module.
Definition: GeometryPar.cc:727
static GeometryPar * instance(void)
Static method to get a reference to the singleton GeometryPar instance.
Definition: GeometryPar.cc:28
Define the geometry of a BKLM module Each sector [octant] contains Modules.
Definition: Module.h:76
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
uint16_t KLMChannelNumber
Channel number.
uint16_t KLMPlaneNumber
Plane number.
@ c_accept
Accept this event.
Abstract base class for different kinds of events.