9#include "reconstruction/modules/detectorOccupanciesDQM/DetectorOccupanciesDQMModule.h"
11#include <TDirectory.h>
33 std::string(
"DetectorOccupancies"));
41DetectorOccupanciesDQMModule::~DetectorOccupanciesDQMModule()
53 TDirectory* oldDir = gDirectory;
61 const std::string tag[2] = {
"OUT",
"IN"};
62 const std::string title[2] = {
"[Outside Active Veto Window]",
"[Inside Active Veto Window]"};
67 std::string histoName =
"bklm_plane_phi_occupancy";
68 std::string histoTitle =
"BKLM plane occupancy (#phi readout)";
70 (histoTitle +
" " + title[0]).c_str(),
83 histoName =
"bklm_plane_z_occupancy";
84 histoTitle =
"BKLM plane occupancy (z readout)";
86 (histoTitle +
" " + title[0]).c_str(),
98 histoName =
"eklm_plane_occupancy";
99 histoTitle =
"EKLM plane occupancy (both readouts)";
101 (histoTitle +
" " + title[0]).c_str(),
111 histoName =
"bklm_rpc_time";
112 histoTitle =
"BKLM RPC Hit Time";
114 (histoTitle +
" " + title[0]).c_str(),
115 128,
double(-1223.5),
double(-199.5));
121 m_BKLM_TimeRPC[1]->SetTitle((histoTitle +
" " + title[1]).c_str());
124 histoName =
"bklm_scintillator_time";
125 histoTitle =
"BKLM Scintillator Hit Time";
127 (histoTitle +
" " + title[0]).c_str(),
128 100,
double(-5300),
double(-4300));
137 histoName =
"eklm_scintillator_time";
138 histoTitle =
"EKLM Scintillator Hit Time";
140 (histoTitle +
" " + title[0]).c_str(),
141 100,
double(-5300),
double(-4300));
151 histoName =
"arich_occupancy";
152 histoTitle =
"ARICH Occupancy";
154 (histoTitle +
" " + title[0]).c_str(),
164 histoName =
"top_occupancy";
165 histoTitle =
"TOP Occupancy for good hits";
166 for (
int i = 0; i < 2; i++) {
168 (histoTitle +
" " + title[i]).c_str(),
175 histoName =
"ecl_occupancy";
176 histoTitle =
"ECL occupancy (for hits with E > " + std::to_string((
int)
m_eclEnergyThr) +
" MeV)";
177 for (
int i = 0; i < 2; i++) {
179 (histoTitle +
" " + title[i]).c_str(),
208 for (
int i = 0; i < 2; i++) {
247 }
catch (
const std::exception&) {
252 int section = hit1d.getSection();
253 int sector = hit1d.getSector();
254 int layer = hit1d.getLayer();
256 section, sector, layer);
257 if (hit1d.isPhiReadout())
273 int section = digit.getSection();
274 int layer = digit.getLayer();
275 int sector = digit.getSector();
276 int plane = digit.getPlane();
294 if (digit.getHitQuality() != TOPDigit::c_Junk) topGoodHits++;
298 std::array<bool, ECLElementNumbers::c_NCrystals> crystal_hit;
302 if (digit.getEnergy() > thresholdGeV)
303 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.