 |
Belle II Software
release-05-02-19
|
11 #include <svd/modules/svdDQM/SVDDQMHitTimeModule.h>
12 #include <framework/core/HistoModule.h>
14 #include <TDirectory.h>
23 setPropertyFlags(c_ParallelProcessingCertified);
24 setDescription(
"Make data quality monitoring plots for SVD Hit Time for bhabha, mu mu, and hadron samples seeded by different trigger times.(ECL, CDC)");
25 addParam(
"desynchronizeSVDTime", m_desynchSVDTime,
26 "if TRUE (default is FALSE): svdTime back in SVD time reference",
bool(
false));
38 TDirectory* oldDir = gDirectory;
39 oldDir->mkdir(
"SVDHitTime")->cd();
45 TString refFrame =
"in FTSW reference";
47 refFrame =
"in SVD reference";
50 Form(
"SVD L3 V-Side Cluster Time %s: bhabhas, ECLTRG time", refFrame.Data()),
54 "SVD L3 V-Side Cluster Time - EventT0 : bhabhas, ECLTRG time",
59 Form(
"SVD L3 V-Side Cluster Time %s: hadrons, ECLTRG time", refFrame.Data()),
63 "SVD L3 V-Side Cluster Time - EventT0 : hadrons, ECLTRG time",
68 Form(
"SVD L3 V-Side Cluster Time %s: mumus, ECLTRG time", refFrame.Data()),
72 "SVD L3 V-Side Cluster Time - EventT0 : mumus, ECLTRG time",
77 Form(
"SVD L3 V-Side Cluster Time %s: bhabhas, CDCTRG time", refFrame.Data()),
81 "SVD L3 V-Side Cluster Time - EventT0 : bhabhas, CDCTRG time",
86 Form(
"SVD L3 V-Side Cluster Time %s: hadrons, CDCTRG time", refFrame.Data()),
90 "SVD L3 V-Side Cluster Time - EventT0 : hadrons, CDCTRG time",
95 Form(
"SVD L3 V-Side Cluster Time %s: mumus, CDCTRG time", refFrame.Data()),
99 "SVD L3 V-Side Cluster Time - EventT0 : mumus, CDCTRG time",
100 nBins, minT0, maxT0);
149 B2WARNING(
"Missing TRGSummary, SVDDQMHitTime is skipped.");
153 B2WARNING(
"Missing SVDEventInfo, SVDDQMHitTime is skipped.");
158 B2WARNING(
"Missing SVDClusters, SVDDQMHitTime is skipped.");
164 B2WARNING(
"TRGSummary object not available but required to indicate which detector provided the L1 trigger time");
170 bool Is_ECL_L1TriggerSource = false ;
171 bool Is_CDC_L1TriggerSource = false ;
173 Is_ECL_L1TriggerSource = true ;
175 Is_CDC_L1TriggerSource = true ;
178 B2DEBUG(20,
"Is_ECL_L1TriggerSource = " << Is_ECL_L1TriggerSource) ;
179 B2DEBUG(20,
"Is_CDC_L1TriggerSource= " << Is_CDC_L1TriggerSource) ;
183 B2WARNING(
"SoftwareTriggerResult object not available but require to select bhabha/mumu/hadron events for this module");
187 const std::map<std::string, int>& fresults =
m_TrgResult->getResults();
188 if ((fresults.find(
"software_trigger_cut&skim&accept_bhabha") == fresults.end()) ||
189 (fresults.find(
"software_trigger_cut&skim&accept_mumu_2trk") == fresults.end()) ||
190 (fresults.find(
"software_trigger_cut&skim&accept_hadron") == fresults.end())) {
191 B2WARNING(
"SVDDQMHitTimeModule: Can't find required bhabha or mumu or hadron trigger identifier");
198 const bool IsEvtAcceptedBhabha = (
m_TrgResult->getResult(
"software_trigger_cut&skim&accept_bhabha") ==
200 const bool IsEvtAcceptedHadron = (
m_TrgResult->getResult(
"software_trigger_cut&skim&accept_hadron") ==
202 const bool IsEvtAcceptedMumu = (
m_TrgResult->getResult(
"software_trigger_cut&skim&accept_mumu_2trk") ==
206 B2DEBUG(20,
"bhabha trigger result = " <<
static_cast<std::underlying_type<SoftwareTriggerCutResult>::type
>
207 (
m_TrgResult->getResult(
"software_trigger_cut&skim&accept_bhabha"))) ;
208 B2DEBUG(20,
"hadron trigger result = " <<
static_cast<std::underlying_type<SoftwareTriggerCutResult>::type
>
209 (
m_TrgResult->getResult(
"software_trigger_cut&skim&accept_hadron"))) ;
210 B2DEBUG(20,
"mu mu trigger result = " <<
static_cast<std::underlying_type<SoftwareTriggerCutResult>::type
>
211 (
m_TrgResult->getResult(
"software_trigger_cut&skim&accept_mumu_2trk"))) ;
212 B2DEBUG(20,
"bhabha trigger comparison bool = " << IsEvtAcceptedBhabha) ;
213 B2DEBUG(20,
"hadron trigger comparison bool = " << IsEvtAcceptedHadron) ;
214 B2DEBUG(20,
"mumu trigger comparison bool = " << IsEvtAcceptedMumu) ;
218 double eventT0 = -1000;
231 if (cluster.getSensorID().getLayerNumber() != 3)
continue;
233 if (cluster.isUCluster())
continue;
235 double time = cluster.getClsTime();
239 time = time -
m_svdEventInfo->getSVD2FTSWTimeShift(cluster.getFirstFrame());
242 if (Is_ECL_L1TriggerSource) {
243 if (IsEvtAcceptedBhabha) {
247 if (IsEvtAcceptedHadron) {
251 if (IsEvtAcceptedMumu) {
258 else if (Is_CDC_L1TriggerSource) {
259 if (IsEvtAcceptedBhabha) {
263 if (IsEvtAcceptedHadron) {
267 if (IsEvtAcceptedMumu) {
273 B2DEBUG(20,
"eventT0 = " << eventT0 <<
" ns" <<
", SVD HitTime = " << time <<
" ns") ;
This module to design collect the svd hit time for different detectors trigger timing and physics pro...
virtual ~SVDDQMHitTimeModule()
Destructor.
TH1F * m_l3vEvtT0_mumu_L1_CDCTRG
svd time histogram for mu mu events wrt the CDC trigger time
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
TH1F * m_l3vEvtT0_bhabha_L1_ECLTRG
svd time histogram for bhabha events wrt the ECL trigger time
StoreObjPtr< EventT0 > m_eventT0
EventT0 data object.
TH1F * m_l3vEvtT0_mumu_L1_ECLTRG
svd time histogram for mu mu events wrt the ECL trigger time
@ c_accept
Accept this event.
StoreObjPtr< SoftwareTriggerResult > m_TrgResult
Trigger selection data object.
StoreObjPtr< TRGSummary > m_objTrgSummary
Trigger Summary data object.
TH1F * m_l3v_hadron_L1_ECLTRG
svd time histogram for hadronic events wrt the ECL trigger time
TH1F * m_l3v_bhabha_L1_CDCTRG
svd time histogram for bhabha events wrt the CDC trigger time
int m_L1TimingSrc
L1 timing source from getTimeType() in TRGSummary See ETimingTYpe in mdst/dataobjects/include/TRGSumm...
virtual void event() override
This method is called for each event.
Abstract base class for different kinds of events.
TH1F * m_l3vEvtT0_hadron_L1_CDCTRG
svd time histogram for hadronic events wrt the CDC trigger time
StoreObjPtr< SVDEventInfo > m_svdEventInfo
SVDEventInfo data object.
TH1F * m_l3v_hadron_L1_CDCTRG
svd time histogram for hadronic events wrt the CDC trigger time
bool isValid() const
Check wether the array was registered.
virtual void defineHisto() override
Definition of histograms.
virtual void initialize() override
Initialize the module.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
virtual void beginRun() override
This method is called for each run.
TH1F * m_l3v_bhabha_L1_ECLTRG
svd time histogram for bhabha events wrt the ECL trigger time
TH1F * m_l3vEvtT0_hadron_L1_ECLTRG
svd time histogram for hadronic events wrt the ECL trigger time
bool m_desynchSVDTime
if TRUE: svdTime back in SVD time reference
TH1F * m_l3v_mumu_L1_ECLTRG
svd time histogram for mu mu events wrt the ECL trigger time
TH1F * m_l3v_mumu_L1_CDCTRG
svd time histogram for mu mu events wrt the CDC trigger time
TH1F * m_l3vEvtT0_bhabha_L1_CDCTRG
svd time histogram for bhabha events wrt the CDC trigger time
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
StoreArray< SVDCluster > m_clusters
Store array for clusters.