20#include <trg/cdc/modules/trgcdct2dDQM/TRGCDCT2DDQMModule.h>
22#include <framework/datastore/StoreObjPtr.h>
23#include <framework/datastore/StoreArray.h>
25#include <framework/datastore/DataStore.h>
27#include <TDirectory.h>
29#include <TPostScript.h>
35#include <framework/logging/Logger.h>
36#include <boost/algorithm/string.hpp>
51 "Genarete postscript file or not",
54 "postscript file name",
70 h_tsfhit =
new TH1I(
"hCDCT2D_tsfhit",
"hCDCT2D_tsfhit", 2500, 0, 2500);
71 h_tsfhit->SetTitle(
"TSF hit in 2D module");
72 h_tsfhit->GetXaxis()->SetTitle(
"TSF ID");
75 h_phi =
new TH1D(
"hCDCT2D_phi",
"hCDCT2D_phi", 80, -1, 7);
76 h_phi->SetTitle(
"2D track phi");
77 h_phi->GetXaxis()->SetTitle(
"rad");
80 h_pt =
new TH1D(
"hCDCT2D_pt",
"hCDCT2D_pt", 30, 0, 3);
81 h_pt->SetTitle(
"2D track pt");
82 h_pt->GetXaxis()->SetTitle(
"GeV");
85 h_omega =
new TH1D(
"hCDCT2D_omega",
"hCDCT2D_omega", 80, -0.02, 0.02);
86 h_omega->SetTitle(
"2D track omega");
87 h_omega->GetXaxis()->SetTitle(
"");
91 h_time =
new TH1D(
"hCDCT2D_time",
"hCDCT2D_time", 100, -50, 50);
92 h_time->SetTitle(
"2D track foundtime");
93 h_time->GetXaxis()->SetTitle(
"CLK 32ns");
116 _exp = bevt->getExperiment();
117 _run = bevt->getRun();
122 char c_name_tsf[100];
123 sprintf(c_name_tsf,
"CDCTriggerSegmentHits");
126 char c_name_t2d[100];
127 sprintf(c_name_t2d,
"CDCTrigger2DFinderTracks");
139 gStyle->SetOptStat(0);
140 TCanvas c1(
"c1",
"", 0, 0, 500, 300);
143 TPostScript* ps_tsfhit =
new TPostScript((
m_postScriptName +
".tsfhit" +
".ps").c_str(), 112);
148 TPostScript* ps_phi =
new TPostScript((
m_postScriptName +
".phi" +
".ps").c_str(), 112);
153 TPostScript* ps_pt =
new TPostScript((
m_postScriptName +
".pt" +
".ps").c_str(), 112);
158 TPostScript* ps_omega =
new TPostScript((
m_postScriptName +
".omega" +
".ps").c_str(), 112);
163 TPostScript* ps_time =
new TPostScript((
m_postScriptName +
".time" +
".ps").c_str(), 112);
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...
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
Type-safe access to single objects in the data store.
TRGCDCT2DDQMModule()
Costructor.
StoreArray< CDCTriggerTrack > entAry_t2d
T2D data store.
unsigned _exp
experiment number
TH1D * h_time
2D foundtime distribution
virtual void initialize() override
initialize
TH1D * h_pt
2D pt distribution
TDirectory * oldDir
TDirectories.
virtual void event() override
Event.
virtual void endRun() override
End Run.
TH1D * h_omega
2D omega distribution
TH1D * h_phi
2D phi distribution
virtual void beginRun() override
begin Run
TH1I * h_tsfhit
TSF hit distribution as a function of tsfid.
TDirectory * dirDQM
TDirectories.
std::string m_postScriptName
name of ps file
StoreArray< CDCTriggerSegmentHit > entAry_tsf
TSF data store.
virtual void defineHisto() override
Define Histogram.
bool m_generatePostscript
flag to save ps file
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.
Abstract base class for different kinds of events.