9#include "reconstruction/modules/detectorOccupanciesDQM/DetectorOccupanciesDQMModule.h"
11#include <framework/dataobjects/EventMetaData.h>
12#include <ecl/dataobjects/ECLCalDigit.h>
13#include <ecl/dataobjects/ECLElementNumbers.h>
14#include <mdst/dataobjects/TRGSummary.h>
15#include <klm/dataobjects/bklm/BKLMElementNumbers.h>
16#include <klm/dataobjects/bklm/BKLMHit1d.h>
17#include <klm/dataobjects/KLMDigit.h>
18#include <arich/dataobjects/ARICHHit.h>
19#include <top/dataobjects/TOPDigit.h>
21#include <TDirectory.h>
43 std::string(
"DetectorOccupancies"));
51DetectorOccupanciesDQMModule::~DetectorOccupanciesDQMModule()
63 TDirectory* oldDir = gDirectory;
71 const std::string tag[2] = {
"OUT",
"IN"};
72 const std::string title[2] = {
"[Outside Active Veto Window]",
"[Inside Active Veto Window]"};
77 std::string histoName =
"bklm_plane_phi_occupancy";
78 std::string histoTitle =
"BKLM plane occupancy (#phi readout)";
80 (histoTitle +
" " + title[0]).c_str(),
93 histoName =
"bklm_plane_z_occupancy";
94 histoTitle =
"BKLM plane occupancy (z readout)";
96 (histoTitle +
" " + title[0]).c_str(),
108 histoName =
"eklm_plane_occupancy";
109 histoTitle =
"EKLM plane occupancy (both readouts)";
111 (histoTitle +
" " + title[0]).c_str(),
121 histoName =
"bklm_rpc_time";
122 histoTitle =
"BKLM RPC Hit Time";
124 (histoTitle +
" " + title[0]).c_str(),
125 128,
double(-1223.5),
double(-199.5));
131 m_BKLM_TimeRPC[1]->SetTitle((histoTitle +
" " + title[1]).c_str());
134 histoName =
"bklm_scintillator_time";
135 histoTitle =
"BKLM Scintillator Hit Time";
137 (histoTitle +
" " + title[0]).c_str(),
138 100,
double(-5300),
double(-4300));
147 histoName =
"eklm_scintillator_time";
148 histoTitle =
"EKLM Scintillator Hit Time";
150 (histoTitle +
" " + title[0]).c_str(),
151 100,
double(-5300),
double(-4300));
161 histoName =
"arich_occupancy";
162 histoTitle =
"ARICH Occupancy";
164 (histoTitle +
" " + title[0]).c_str(),
174 histoName =
"top_occupancy";
175 histoTitle =
"TOP Occupancy for good hits";
176 for (
int i = 0; i < 2; i++) {
178 (histoTitle +
" " + title[i]).c_str(),
185 histoName =
"ecl_occupancy";
186 histoTitle =
"ECL occupancy (for hits with E > " + std::to_string((
int)
m_eclEnergyThr) +
" MeV)";
187 for (
int i = 0; i < 2; i++) {
189 (histoTitle +
" " + title[i]).c_str(),
218 for (
int i = 0; i < 2; i++) {
257 }
catch (
const std::exception&) {
262 int section = hit1d.getSection();
263 int sector = hit1d.getSector();
264 int layer = hit1d.getLayer();
266 section, sector, layer);
267 if (hit1d.isPhiReadout())
283 int section = digit.getSection();
284 int layer = digit.getLayer();
285 int sector = digit.getSector();
286 int plane = digit.getPlane();
304 if (digit.getHitQuality() != TOPDigit::c_Junk) topGoodHits++;
308 std::array<bool, ECLElementNumbers::c_NCrystals> crystal_hit;
312 if (digit.getEnergy() > thresholdGeV)
313 crystal_hit.at(digit.getCellId() - 1) =
true;
static int layerGlobalNumber(int section, int sector, int layer)
Get layer global number.
Store one reconstructed BKLM 1D hit as a ROOT object.
void initialize() override final
Module function initialize.
TH1F * m_EKLM_Plane_Occupancy[2]
EKLM plane integrated occupancy.
DetectorOccupanciesDQMModule()
Constructor.
TH1F * m_TOP_Occupancy[2]
TOP occupancy (good hits only)
StoreArray< KLMDigit > m_KLMDigits
KLM digits.
const EKLMElementNumbers * m_eklmElementNumbers
EKLM Element numbers.
void defineHisto() override final
Defines Histograms.
StoreObjPtr< TRGSummary > m_trgSummary
trg summary
TH1F * m_BKLM_PlanePhi_Occupancy[2]
BKLM phi plane integrated occupancy.
StoreObjPtr< EventMetaData > m_eventMetaData
event meta data
void event() override final
Module function event.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
double m_eclEnergyThr
Energy threshold (in MeV) for ECL occupancy histogram.
StoreArray< BKLMHit1d > m_BklmHit1ds
BKLM hit 1D.
void beginRun() override final
Module function beginRun.
TH1F * m_ARICH_Occupancy[2]
ARICH Digit Occupancy.
TH1F * m_BKLM_TimeScintillator[2]
BKLM Scintillator Hit Time.
StoreArray< ARICHHit > m_ARICHHits
ARICH hits.
TH1F * m_EKLM_TimeScintillator[2]
EKLM Scintillator Hit Time.
TProfile * m_ECL_Occupancy[2]
ECL occupancy (hits above 5 MeV)
StoreArray< TOPDigit > m_topDigits
collection of TOP digits
StoreArray< ECLCalDigit > m_eclCalDigits
collection of ECL digits
TH1F * m_BKLM_PlaneZ_Occupancy[2]
BKLM z plane integrated occupancy.
TH1F * m_BKLM_TimeRPC[2]
RPC Hit Time.
HistoModule()
Constructor.
KLM digit (class representing a digitized hit in RPCs or scintillators).
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.