9#include <svd/modules/svdDQM/SVDDQMInjectionModule.h>
10#include "TDirectory.h"
32 std::string(
"SVDInjection"));
39 TDirectory* oldDir = gDirectory;
45 m_hOccAfterInjLER =
new TH1F(
"SVDOccInjLER",
"SVDOccInjLER/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
46 m_hOccAfterInjHER =
new TH1F(
"SVDOccInjHER",
"SVDOccInjHER/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
47 m_hTrgOccAfterInjLER =
new TH1F(
"SVDTrgOccInjLER",
"SVDTrgOccInjLER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0,
49 m_hTrgOccAfterInjHER =
new TH1F(
"SVDTrgOccInjHER",
"SVDTrgOccInjHER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0,
51 m_hMaxOccAfterInjLER =
new TH1F(
"SVDMaxOccInjLER",
"SVDMaxOccInjLER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0,
53 m_hMaxOccAfterInjHER =
new TH1F(
"SVDMaxOccInjHER",
"SVDMaxOccInjHER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0,
55 m_hBunchNumVSNStrips =
new TH2F(
"SVDBunchNumVSNStrips",
"SVDBunchNumVSNStrips;Bunch No.;Number of fired strips", 1280, 0, 1280, 10,
88 B2WARNING(
"Missing RawFTSW, SVDDQMInjection is skipped.");
99 B2DEBUG(29,
"TTD FTSW : " << hex << it.GetTTUtime(0) <<
" " << it.GetTTCtime(0) <<
" EvtNr " << it.GetEveNo(0) <<
" Type " <<
100 (it.GetTTCtimeTRGType(0) & 0xF) <<
" TimeSincePrev " << it.GetTimeSincePrevTrigger(0) <<
" TimeSinceInj " <<
101 it.GetTimeSinceLastInjection(0) <<
" IsHER " << it.GetIsHER(0) <<
" Bunch " << it.GetBunchNumber(0));
104 auto difference = it.GetTimeSinceLastInjection(0);
106 if (difference != 0x7FFFFFFF) {
107 unsigned int allV = 0;
108 unsigned int allU = 0;
109 unsigned int nHitsL3v = 0;
110 unsigned int nHitsL3u = 0;
112 if (p.isUStrip()) allU++;
115 if (p.getSensorID().getLayerNumber() != 3)
continue;
121 B2DEBUG(29,
"L3 V = " << nHitsL3v <<
", L3 U = " << nHitsL3u <<
", all V = " << allV <<
", all U = " << allU);
124 unsigned int counter = nHitsL3u;
126 float diff2 = difference / 127.;
127 if (it.GetIsHER(0)) {
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
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 initialize() override final
initialize function
TH1F * m_hOccAfterInjLER
Histogram Occupancy after LER injection.
TH1F * m_hMaxOccAfterInjLER
Histogram Max Occupancy after LER injection.
TH1F * m_hMaxOccAfterInjHER
Histogram Max Occupancy after HER injection.
StoreArray< RawFTSW > m_rawTTD
Input array for DAQ Status.
void defineHisto() override final
defineHisto function
void event() override final
event function
TH1F * m_hTrgOccAfterInjHER
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
TH1F * m_hOccAfterInjHER
Histogram Occupancy after HER injection.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
StoreArray< SVDShaperDigit > m_digits
Input array for SVD Raw Hits.
void beginRun() override final
beginRun function
TH2F * m_hBunchNumVSNStrips
Histogram Bunch Number VS Number of strips.
SVDDQMInjectionModule()
Constructor defining the parameters.
std::string m_SVDShaperDigitsName
The name of the StoreArray of SVDShaperDigit to be generated.
TH1F * m_hTrgOccAfterInjLER
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
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.
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes.
Abstract base class for different kinds of events.