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");
51 string desc =
"TRGECLModule(" +
version() +
")";
61 "TRGECL Clustering method 0 : use only ICN, 1 : ICN + Energy(Default)",
65 "The Limit number of cluster (Default:6)",
69 "TRGECL EventTiming method 0 : Belle I, 1 : Energetic TC (default), 2 : Energy Weighted timing",
73 "TRGECL # of considered TC in energy weighted Timing method(Only work for EvenTiming Method 2)",
77 "TRGECL Trigger decision Time Window",
81 "TRGECL Trigger decision Time Window",
85 "TRGECL Select one trigger window for logic study",
89 "Flag to use Condition Database (0:=not use, 1:=use (default))",
94 "set conversion factor of ADC to Energy (GeV) : ",
98 "set total energy cut(lowe, hie, lumie) in lab (GeV) : ",
102 "set energy threshold(14 regions) of 2D Bhabha veto for FWD side in Lab. (GeV) : ",
106 "set energy threshold(14 regions) of 2D Bhabha veto for BWD side in Lab. (GeV) : ",
110 "set energy threshold(low, high) of 3D Bhabha veto in CMS (GeV) : ",
114 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha veto in CMS(degree) : ",
116 addParam(
"Bhabha3DSelectionThreshold",
118 "set energy threshold(low, high) of 3D Bhabha selection in CMS (GeV) : ",
122 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha selection in CMS(degree) : ",
124 addParam(
"Bhabha3DSelectionPreScale",
126 "set prescale (FW, BR, BW for Bhabha selection : ",
130 "set cluster energy cut for mumu in CMS (GeV) : ",
134 "set angle cut (phi diff L, H, and theta sum L, H) of mumu in CMS(degree) : ",
139 "set lml cluster energy thresholds(high, middle, low) in Lab in GeV : ",
143 "set lml cluster energy thresholds(high, middle, low) in CMS in GeV : ",
147 "set lml00 the number of cluster for minimum energy cluster : ",
151 "set lml12 the number of cluster for minimum energy cluster : ",
155 "set lml13 theta ID selection : ",
160 "set ECL Burst Threshold in lab in GeV : ",
162 addParam(
"EventTimingQualityThreshold",
164 "set EventTimingQualityThreshold (low energy(GeV) and high energy(GeV))",
167 addParam(
"3DBhabhaVetoInTrackThetaRegion",
169 "set 3DBhabhaVetoInTrackThetaRegion (low TCID and high TCID)",
174 "set Taub2bAngleCut(dphi low and high, theta sum low and high(degree)",
178 "set Taub2b total energy cut in TC ThetaID 1-17(GeV)",
182 "set Taub2b cluster energy cut in Lab (GeV) : ",
187 "set Angle Cut of Bhbaha Additional veto for hie (dphi low and high, theta sum low and high(degree)",
192 "set Taub2b2AngleCut(dphi low and high, theta sum low and high(degree))",
196 "set Taub2b2 total energy cut in TC ThetaID 1-17(GeV)",
200 "set Taub2b2 cluster energy Cut(high, low) (GeV) : ",
205 "set Taub2b3AngleCut(dphi low and high, theta sum low and high in cms (degree))",
209 "set Taub2b3 total energy cut in lab in ThetaID 1-17(GeV)",
213 "set Taub2b3 cluster energy Cut in lab for one of b2b clusters (GeV) : ",
217 "set Taub2b3 cluster energy Cut(low, high) in lab for all clusters (GeV) : ",
243 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};
244 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};
286 std::cout <<
"TRGECLModule ... created" << std::endl;
295 std::cout <<
"TRGECLModule ... destructed " << std::endl;
309 std::cout <<
"TRGECLModule::initialize ... options" << std::endl;
340 const auto& dbParmap = m_ETMParameters->getparMap();
342 B2DEBUG(100,
"[TRGECLModule] valid N(par) in ETMParameters = "
343 << m_ETMParameters->getnpar());
344 B2DEBUG(100,
"[TRGECLModule] all N(par) in ETMParameters = "
390 (int)
getDBparmap(dbParmap,
"bha3dveto_phi_d_l", 0),
391 (int)
getDBparmap(dbParmap,
"bha3dveto_phi_d_h", 0),
392 (int)
getDBparmap(dbParmap,
"bha3dveto_theta_s_l", 0),
393 (int)
getDBparmap(dbParmap,
"bha3dveto_theta_s_h", 0)
400 (int)
getDBparmap(dbParmap,
"bha3dsel_phi_d_l", 0),
401 (int)
getDBparmap(dbParmap,
"bha3dsel_phi_d_h", 0),
402 (int)
getDBparmap(dbParmap,
"bha3dsel_theta_s_l", 0),
403 (int)
getDBparmap(dbParmap,
"bha3dsel_theta_s_h", 0)
436 (int)
getDBparmap(dbParmap,
"bha3d_theta_id_in_trk_l", 100),
437 (int)
getDBparmap(dbParmap,
"bha3d_theta_id_in_trk_h", 0)
442 (int)
getDBparmap(dbParmap,
"taub2b_theta_s_l", 0),
456 (int)
getDBparmap(dbParmap,
"taub2b2_theta_s_l", 0),
457 (int)
getDBparmap(dbParmap,
"taub2b2_theta_s_h", 0)
467 (int)
getDBparmap(dbParmap,
"taub2b3_theta_s_l", 0),
468 (int)
getDBparmap(dbParmap,
"taub2b3_theta_s_h", 0)
481 B2DEBUG(100,
"[TRGECLModule] Clustering method (0 := BelleI, 1 := BelleII) = "
484 B2DEBUG(100,
"[TRGECLModule] ConditionDB usage (0 := no, 1 := yes) = "
486 B2DEBUG(100,
"[TRGECLModule] ADC to Energy in Lab in GeV = "
488 B2DEBUG(100,
"[TRGECLModule] TotalEnergyCut (Low, middle, high) in Lab in GeV = ("
492 B2DEBUG(100,
"[TRGECLModule] 2D BhaV E FW in GeV = ("
507 B2DEBUG(100,
"[TRGECLModule] 2D BhaV E BW in GeV = ("
522 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha veto CL E Threshold in CMS in GeV (Low, High) = ("
525 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha veto 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
530 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha selection CL E Threshold in CMS in GeV (Low, High) = ("
533 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha selection 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
538 B2DEBUG(100,
"[TRGECLModule] 3D Bhabha selection prescale(FW, BR, BW) = ("
542 B2DEBUG(100,
"[TRGECLModule] mumu CL E Threshold in CMS in GeV = "
544 B2DEBUG(100,
"[TRGECLModule] mumu 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
549 B2DEBUG(100,
"[TRGECLModule] lml CL E cuts(high, mid, low) in Lab in GeV = ("
553 B2DEBUG(100,
"[TRGECLModule] lml CL E cuts(high, mid, low) in CMS in GeV = ("
557 B2DEBUG(100,
"[TRGECLModule] lml00 the number of cluster for minimum energy cluster = "
559 B2DEBUG(100,
"[TRGECLModule] lml12 the number of cluster for minimum energy cluster = "
561 B2DEBUG(100,
"[TRGECLModule] lml13 ThetaID selection = "
563 B2DEBUG(100,
"[TRGECLModule] ECL Burst Threshold in lab. in GeV = "
565 B2DEBUG(100,
"[TRGECLModule] EventTimingQualityThreshold (low, high)= ("
568 B2DEBUG(100,
"[TRGECLModule] 3DBhabhaVetoInTrackThetaRegion (low, high) = ("
571 B2DEBUG(100,
"[TRGECLModule] Taub2b two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H ) = ("
576 B2DEBUG(100,
"[TRGECLModule] Taub2b Total Energy Cut in lab. (GeV) = "
578 B2DEBUG(100,
"[TRGECLModule] Taub2b Cluster Energy Cut in lab. (GeV) = "
580 B2DEBUG(100,
"[TRGECLModule] hie12 Bhabha Add Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
585 B2DEBUG(100,
"[TRGECLModule] Taub2b2 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
590 B2DEBUG(100,
"[TRGECLModule] Taub2b2 Total Energy Cut in lab. (GeV) = "
592 B2DEBUG(100,
"[TRGECLModule] Taub2b2 Cluster energy cut(high, low) in lab. (GeV) = ("
595 B2DEBUG(100,
"[TRGECLModule] Taub2b3 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
600 B2DEBUG(100,
"[TRGECLModule] Taub2b3 Total Energy Cut in lab. (GeV) = "
602 B2DEBUG(100,
"[TRGECLModule] Taub2b3 Cluster energy cut in lab. for one of b2b clusters (GeV) = "
604 B2DEBUG(100,
"[TRGECLModule] Taub2b3 Cluster energy cut(low, high) in lab. for all clusters (GeV) = ("
607 B2DEBUG(100,
"[TRGECLModule] (hie4) CL E cut for minimum energy cluster = "
652 std::cout <<
"TRGECLModule ... beginRun called " << std::endl;
664 std::cout <<
"TRGECLMoudle ... event called" << std::endl;
683 double parAlternativeValue)
686 if (dbParmap.count(parName)) {
687 par = dbParmap.at(parName);
689 par = parAlternativeValue;
690 B2WARNING(
"No key(\"" + parName +
691 "\") for map in DB and set alternative value(" + parAlternativeValue +
704 std::cout <<
"TRGECLModule ... endRun called " << std::endl;
716 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
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.