9#define TRGECL_SHORT_NAMES
11#include <framework/core/ModuleParamList.templateDetails.h>
12#include <framework/core/ModuleParamList.h>
13#include <framework/database/DBObjPtr.h>
15#include "trg/ecl/TrgEclMaster.h"
17#include "trg/trg/Debug.h"
18#include "trg/ecl/modules/trgecl/TRGECLModule.h"
19#include "trg/ecl/dbobjects/TRGECLETMPara.h"
20#include "trg/ecl/dbobjects/TRGECLETMParameters.h"
42 return string(
"TRGECLModule 1.00");
54 string desc =
"TRGECLModule(" +
version() +
")";
64 "TRGECL Bhabha method 0 : Belle I, 1 :belle II(default)",
68 "TRGECL Clustering method 0 : use only ICN, 1 : ICN + Energy(Default)",
72 "The Limit number of cluster (Default:6)",
76 "TRGECL EventTiming method 0 : Belle I, 1 : Energetic TC, 2 : Energy Weighted timing (default)",
80 "TRGECL # of considered TC in energy weighted Timing method(Only work for EvenTiming Method 2)",
84 "TRGECL Trigger decision Time Window",
88 "TRGECL Trigger decision Time Window",
92 "TRGECL Select one trigger window for logic study",
96 "Flag to use Condition Database (0:=not use, 1:=use(default))",
101 "set conversion factor of ADC to Energy (GeV) : ",
105 "set total energy cut(lowe, hie, lumie) in lab (GeV) : ",
109 "set energy threshold(14 regions) of 2D Bhabha veto for FWD side in Lab. (GeV) : ",
113 "set energy threshold(14 regions) of 2D Bhabha veto for BWD side in Lab. (GeV) : ",
117 "set energy threshold(low, high) of 3D Bhabha veto in CMS (GeV) : ",
121 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha veto in CMS(degree) : ",
123 addParam(
"Bhabha3DSelectionThreshold",
125 "set energy threshold(low, high) of 3D Bhabha selection in CMS (GeV) : ",
129 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha selection in CMS(degree) : ",
131 addParam(
"Bhabha3DSelectionPreScale",
133 "set prescale (FW, BR, BW for Bhabha selection : ",
137 "set cluster energy cut for mumu in CMS (GeV) : ",
141 "set angle cut (phi diff L, H, and theta sum L, H) of mumu in CMS(degree) : ",
146 "set lml cluster energy thresholds(high, middle, low) in Lab in GeV : ",
150 "set lml cluster energy thresholds(high, middle, low) in CMS in GeV : ",
154 "set lml00 the number of cluster for minimum energy cluster : ",
158 "set lml12 the number of cluster for minimum energy cluster : ",
162 "set lml13 theta ID selection : ",
167 "set ECL Burst Threshold in lab in GeV : ",
169 addParam(
"EventTimingQualityThreshold",
171 "set EventTimingQualityThreshold (low energy(GeV) and high energy(GeV))",
174 addParam(
"3DBhabhaVetoInTrackThetaRegion",
176 "set 3DBhabhaVetoInTrackThetaRegion (low TCID and high TCID)",
181 "set Taub2bAngleCut(dphi low and high, theta sum low and high(degree)",
185 "set Taub2b total energy cut in TC ThetaID 1-17(GeV)",
189 "set Taub2b cluster energy cut in Lab (GeV) : ",
194 "set Angle Cut of Bhbaha Additional veto for hie (dphi low and high, theta sum low and high(degree)",
199 "set Taub2b2AngleCut(dphi low and high, theta sum low and high(degree))",
203 "set Taub2b2 total energy cut in TC ThetaID 1-17(GeV)",
207 "set Taub2b2 cluster energy Cut(high, low) (GeV) : ",
212 "set Taub2b3AngleCut(dphi low and high, theta sum low and high in cms (degree))",
216 "set Taub2b3 total energy cut in lab in ThetaID 1-17(GeV)",
220 "set Taub2b3 cluster energy Cut in lab for one of b2b clusters (GeV) : ",
224 "set Taub2b3 cluster energy Cut(low, high) in lab for all clusters (GeV) : ",
250 m_2DBhabhaThresholdFWD = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 3.0, 3.5};
251 m_2DBhabhaThresholdBWD = {2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.0};
293 std::cout <<
"TRGECLModule ... created" << std::endl;
302 std::cout <<
"TRGECLModule ... destructed " << std::endl;
316 std::cout <<
"TRGECLModule::initialize ... options" << std::endl;
347 const auto& dbParmap = m_ETMParameters->getparMap();
349 B2DEBUG(100,
"[TRGECLModule] valid N(par) in ETMParameters = "
350 << m_ETMParameters->getnpar());
351 B2DEBUG(100,
"[TRGECLModule] all N(par) in ETMParameters = "
397 (int)
getDBparmap(dbParmap,
"bha3dveto_phi_d_l", 0),
398 (int)
getDBparmap(dbParmap,
"bha3dveto_phi_d_h", 0),
399 (int)
getDBparmap(dbParmap,
"bha3dveto_theta_s_l", 0),
400 (int)
getDBparmap(dbParmap,
"bha3dveto_theta_s_h", 0)
407 (int)
getDBparmap(dbParmap,
"bha3dsel_phi_d_l", 0),
408 (int)
getDBparmap(dbParmap,
"bha3dsel_phi_d_h", 0),
409 (int)
getDBparmap(dbParmap,
"bha3dsel_theta_s_l", 0),
410 (int)
getDBparmap(dbParmap,
"bha3dsel_theta_s_h", 0)
443 (int)
getDBparmap(dbParmap,
"bha3d_theta_id_in_trk_l", 100),
444 (int)
getDBparmap(dbParmap,
"bha3d_theta_id_in_trk_h", 0)
449 (int)
getDBparmap(dbParmap,
"taub2b_theta_s_l", 0),
463 (int)
getDBparmap(dbParmap,
"taub2b2_theta_s_l", 0),
464 (int)
getDBparmap(dbParmap,
"taub2b2_theta_s_h", 0)
474 (int)
getDBparmap(dbParmap,
"taub2b3_theta_s_l", 0),
475 (int)
getDBparmap(dbParmap,
"taub2b3_theta_s_h", 0)
488 B2DEBUG(100,
"[TRGECLModule] Clustering method (0 := BelleI, 1 := BelleII) = "
491 B2DEBUG(100,
"[TRGECLModule] ConditionDB usage (0 := no, 1 := yes) = "
493 B2DEBUG(100,
"[TRGECLModule] ADC to Energy in Lab in GeV = "
495 B2DEBUG(100,
"[TRGECLModule] TotalEnergyCut (Low, middle, high) in Lab in GeV = ("
499 B2DEBUG(100,
"[TRGECLModule] 2D BhaV E FW in GeV = ("
514 B2DEBUG(100,
"[TRGECLModule] 2D BhaV E BW in GeV = ("
529 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha veto CL E Threshold in CMS in GeV (Low, High) = ("
532 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha veto 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
537 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha selection CL E Threshold in CMS in GeV (Low, High) = ("
540 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha selection 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
545 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha selection prescale(FW, BR, BW) = ("
549 B2DEBUG(100,
"[TRGECLModule] mumu CL E Threshold in CMS in GeV = "
551 B2DEBUG(100,
"[TRGECLModule] mumu 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
556 B2DEBUG(100,
"[TRGECLModule] lml CL E cuts(high, mid, low) in Lab in GeV = ("
560 B2DEBUG(100,
"[TRGECLModule] lml CL E cuts(high, mid, low) in CMS in GeV = ("
564 B2DEBUG(100,
"[TRGECLModule] lml00 the number of cluster for minimum energy cluster = "
566 B2DEBUG(100,
"[TRGECLModule] lml12 the number of cluster for minimum energy cluster = "
568 B2DEBUG(100,
"[TRGECLModule] lml13 ThetaID selection = "
570 B2DEBUG(100,
"[TRGECLModule] ECL Burst Threshold in lab. in GeV = "
572 B2DEBUG(100,
"[TRGECLModule] EventTimingQualityThreshold (low, high)= ("
575 B2DEBUG(100,
"[TRGECLModule] 3DBhabhaVetoInTrackThetaRegion (low, high) = ("
578 B2DEBUG(100,
"[TRGECLModule] Taub2b two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H ) = ("
583 B2DEBUG(100,
"[TRGECLModule] Taub2b Total Energy Cut in lab. (GeV) = "
585 B2DEBUG(100,
"[TRGECLModule] Taub2b Cluster Energy Cut in lab. (GeV) = "
587 B2DEBUG(100,
"[TRGECLModule] hie12 Bhabha Add Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
592 B2DEBUG(100,
"[TRGECLModule] Taub2b2 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
597 B2DEBUG(100,
"[TRGECLModule] Taub2b2 Total Energy Cut in lab. (GeV) = "
599 B2DEBUG(100,
"[TRGECLModule] Taub2b2 Cluster energy cut(high, low) in lab. (GeV) = ("
602 B2DEBUG(100,
"[TRGECLModule] Taub2b3 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
607 B2DEBUG(100,
"[TRGECLModule] Taub2b3 Total Energy Cut in lab. (GeV) = "
609 B2DEBUG(100,
"[TRGECLModule] Taub2b3 Cluster energy cut in lab. for one of b2b clusters (GeV) = "
611 B2DEBUG(100,
"[TRGECLModule] Taub2b3 Cluster energy cut(low, high) in lab. for all clusters (GeV) = ("
614 B2DEBUG(100,
"[TRGECLModule] (hie4) CL E cut for minimum energy cluster = "
660 std::cout <<
"TRGECLModule ... beginRun called " << std::endl;
672 std::cout <<
"TRGECLMoudle ... event called" << std::endl;
691 double parAlternativeValue)
694 if (dbParmap.count(parName)) {
695 par = dbParmap.at(parName);
697 par = parAlternativeValue;
698 B2WARNING(
"No key(\"" + parName +
699 "\") for map in DB and set alternative value(" + parAlternativeValue +
712 std::cout <<
"TRGECLModule ... endRun called " << std::endl;
724 std::cout <<
"TRGECLModule ... terminate called " << std::endl;
Class for accessing objects in the database.
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...
int m_lml00NCLforMinE
lml0 the number of cluster for minimum energy
double m_taub2bEtotCut
taub2b total energy (TC theta ID =1-17) (GeV)
std::vector< int > m_hie12BhabhaVetoAngle
(hie1 and hie2) 2 cluster angle cut in CMS in degree for Bhabha veto in hie1 and hie2
int m_debugLevel
Parameters.
std::vector< int > m_3DBhabhaSelectionPreScale
3D Selection Bhabha preselection
int m_lml12NCLforMinE
lml12 the number of cluster for minimum energy
std::vector< double > m_2DBhabhaThresholdBWD
2D Bhabha Energy Threshold
double m_ECLBurstThreshold
ECL Burst Bit Threshold.
int m_Clustering
Clustering option.
std::vector< double > m_lmlCLECMSCut
Low Multiplicity cluster E cut in CMS in GeV.
std::vector< double > m_TotalEnergy
Total Energy Threshold (low, high, lum) in Lab in GeV.
std::vector< int > m_taub2bAngleCut
taub2b 2 cluster angle cut (degree) (dphi low, dphi high, theta_sum low, theta_sum high)
int m_ClusterLimit
Cluster Limit.
int m_SelectEvent
Event selection.
std::vector< int > m_mumuAngle
mumu bit Angle
StoreArray< TRGECLTrg > m_TRGECLTrg
output for TRGECLTrg
std::vector< int > m_3DBhabhaVetoInTrackThetaRegion
Theta region (low, high) of 3D Bhabha Veto InTrack.
int m_hitNum
The current number of created hits in an event.
double m_hie4LowCLELabCut
(hie4) CL E cut for minimum energy cluster
int m_EventTiming
Eventtiming option.
int m_hitTCNum
TC Hit number.
double m_OverlapWindow
Trigger decision overlap window in order to avoid boundary effect.
std::vector< int > m_3DBhabhaVetoAngle
3D Veto Bhabha Energy Angle
double m_ADCtoEnergy
conversion factor of ADC to Energy in GeV
TrgEclMaster * etm
ETM (ecl trigger master) to generate all trigger bits of ecl trigger.
int m_lml13ThetaIdSelection
lml13 cluster ThetaID selection
std::vector< double > m_3DBhabhaVetoThreshold
3D Veto Bhabha Energy Threshold
double m_taub2b2EtotCut
taub2b2 total energy cut in Lab (GeV)
std::vector< double > m_taub2b2CLELabCut
taub2b2 cluster energy cut(low, high) (GeV) in lab
std::vector< double > m_lmlCLELabCut
Low Multiplicity cluster E cut in Lab in GeV.
int m_nEvent
Event number.
std::vector< double > m_3DBhabhaSelectionThreshold
3D Selection Bhabha Energy Threshold
int m_Bhabha
Bhabha option.
bool m_ConditionDB
Flag to use Condition DB.
StoreArray< TRGECLCluster > m_TRGECLCluster
output for TRGECLCluster
double m_taub2bCLELabCut
taub2b Cluster energy selection in Lab (GeV)
double m_mumuThreshold
mumu bit Energy Threshold
std::vector< int > m_3DBhabhaSelectionAngle
3D Selection Bhabha Energy Angle
std::vector< int > m_taub2b2AngleCut
taub2b2 two Cluster angle cut (degree)
double m_taub2b3EtotCut
taub2b3 total energy cut in lab (GeV)
std::vector< double > m_EventTimingQualityThreshold
Energy threshold(low, high) of event timing quality flag (GeV)
double m_taub2b3CLEb2bLabCut
taub2b3 cluster energy cut in lab for one of b2b clusters (GeV)
StoreArray< TRGECLHit > m_TRGECLHit
output for TRGECLHit
std::vector< double > m_2DBhabhaThresholdFWD
2D Bhabha Energy Threshold
std::vector< double > m_taub2b3CLELabCut
taub2b3 cluster energy cut(low and high) in lab for all clusters (GeV)
std::vector< int > m_taub2b3AngleCut
taub2b3 two Cluster angle cut in cms (degree)
double m_TimeWindow
Trigger decision time window.
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.
virtual ~TRGECLModule()
Destructor.
virtual void initialize() override
Initializes TRGECLModule.
virtual void event() override
Called event by event.
virtual void endRun() override
Called when run ended.
virtual void terminate() override
Called when processing ended.
virtual void beginRun() override
Called when new run started.
double getDBparmap(const std::map< std::string, double >, std::string, double)
get payload from conditionDB
std::string version(void) const
returns version of TRGECLModule.
TRGECLModule()
Constructor.
static std::string tab(void)
returns tab spaces.
static int level(void)
returns the debug level.
Abstract base class for different kinds of events.