Belle II Software development
trg modules

Classes

class  CDCTriggerNeuroDQMModule
 CDC Trigger DQM Module. More...
 
class  CDCTrigger2DFitterModule
 Module for the 2D Fitter of the CDC trigger. More...
 
class  CDCTrigger3DFitterModule
 Module for the 3D Fitter of the CDC trigger. More...
 
class  CDCTriggerHoughCand
 Hough Candidates class. More...
 
class  CDCTriggerHoughETFModule
 
class  CDCTrigger2DFinderModule
 
class  CDCTriggerMCMatcherModule
 A module to match CDCTriggerTracks to MCParticles. More...
 
class  CDCTriggerRecoHitMatcherModule
 A module to match CDCTriggerTracks to RecoTracks. More...
 
class  CDCTriggerRecoMatcherModule
 A module to match CDCTriggerTracks to RecoTracks. More...
 
class  CDCTriggerNDFinderModule
 CDC Trigger NDFinder Module. More...
 
class  CDCTriggerNeuroDataModule
 
class  CDCTriggerNeuroIDHistModule
 Description. More...
 
class  CDCTriggerNeuroModule
 The neural network module of the CDC trigger. More...
 
class  CDCTriggerETFModule
 Module for the Event Time Finder of the CDC trigger. More...
 
class  CDCTriggerTrackCombinerModule
 Module to combine the information from the various track trigger stages. More...
 
class  CDCTriggerTSFFirmwareModule
 This class is the interface between TSim/basf2 TSF module and the firmware simulation core of XSim/ISim. More...
 
class  CDCTriggerTSFModule
 Module for the Track Segment Finder of the CDC trigger. More...
 
class  TRGCDCModule
 A module to simulate the CDC trigger. More...
 
class  TRGCDCT2DDQMModule
 DQM module of TRGCDCT2D. More...
 
class  TRGCDCT3DDQMModule
 DQM module for TRGCDCT3D. More...
 
class  TRGCDCTSFDQMModule
 DQM module of TRGCDCTSF. More...
 
class  TRGCDCTSStreamModule
 A module to process CDC trigger data. More...
 
struct  SubTrigger
 enum class SubTriggerType : unsigned char {Merger, TSF, T2D, T3D, Neuro, ETF}; More...
 
class  CDCTriggerUnpackerModule
 Unpack the trigger data recorded in B2L. More...
 
struct  Merger
 unpacker for the merger reader (TSF which reads the merger output) More...
 
struct  Tracker2D
 unpacker for the 2D tracker More...
 
struct  Neuro
 unpacker for the Neuro More...
 
class  MCMatcherTRGECLModule
 Class to represent the hit of one cell. More...
 
class  TRGECLFAMModule
 A module of FAM. More...
 
class  TRGECLModule
 A module of ETM. More...
 
class  TRGECLBGTCHitModule
 
class  TRGECLDQMModule
 
class  TRGECLEventTimingDQMModule
 This module is for ecl trigger DQM related to L1 event timing. More...
 
class  TRGECLQAMModule
 
class  TRGECLRawdataAnalysisModule
 A module of ETM. More...
 
class  TRGECLTimingCalModule
 Class ECL Trigger Timiing Calibration Module. More...
 
class  TRGECLUnpackerModule
 A module of TRG ECL Unpacker. More...
 
class  TRGGDLCosmicRunModule
 Module that returns true if the trigger condition for the 2017 cosmic runs is fulfilled. More...
 
class  TRGGDLModule
 A module to simulate the Global Decision Logic. More...
 
class  TRGEFFDQMModule
 Make summary of data quality from reconstruction. More...
 
class  TRGGDLDQMModule
 
class  TRGGDLDSTModule
 
class  TRGGDLSummaryModule
 
class  TRGGRLMatchModule
 Match between CDC trigger track and ECL trigger cluster. More...
 
class  TRGGRLModule
 A module to simulate the Global Decision Logic. More...
 
class  TRGGRLProjectsModule
 A module to simulate the Global Decision Logic. More...
 
class  TRGGRLDQMModule
 
class  GRLNeuroModule
 The module for application of the neural networks of the GRL. More...
 
class  GRLNeuroTrainerModule
 The trainer module for the neural networks of the CDC trigger. More...
 
class  klmtrg_layer_counter_t
 
class  klm_trig_linear_fit_t
 
class  KLMTriggerModule
 
struct  track_maker_t
 
struct  Linear_fit_of_Hits_t
 
class  TRGTOPDQMModule
 
class  TRGTOPTRD2TTSConverterModule
 TRG TOP Raw Digits to TimeStamps Converter. More...
 
class  TRGTOPUnpackerModule
 TRG TOP Unpacker. More...
 
class  TRGTOPUnpackerWaveformModule
 TRG TOP Unpacker for Timestamps. More...
 
class  TRGTOPWaveformPlotterModule
 
class  TRGRAWDATAModule
 

Typedefs

typedef std::pair< unsigned short, ROOT::Math::XYVector > cdcPair
 Pair of <iSuperLayer, (x, y)>, for hits in conformal space.
 
typedef std::map< int, cdcPaircdcMap
 Map of <counter, cdcPair>, for hits with indices.
 
typedef std::pair< ROOT::Math::XYVector, ROOT::Math::XYVector > coord2dPair
 Hough Tuples.
 
using NodeList = std::vector< std::vector< int > >
 Node list.
 
using MergerBus = std::array< std::bitset< mergerWidth >, nAllMergers >
 Merger data bus.
 
using MergerBits = Bitstream< MergerBus >
 Merger data bus Bitstream.
 

Functions

bool operator== (const CDCTriggerHoughCand &a, const CDCTriggerHoughCand &b)
 Two cells are identical if they have the same coordinates.
 
 REG_MODULE (CDCTriggerNeuroData)
 
 REG_MODULE (CDCTriggerNeuroIDHist)
 
 REG_MODULE (TRGCDC)
 register the basf2 module TRGCDC
 
 REG_MODULE (TRGCDCTSStream)
 register the basf2 TRGCDCTSStream module
 
 REG_MODULE (TRGECLFAM)
 Register module name.
 
 REG_MODULE (TRGECL)
 Register Module.
 
 REG_MODULE (TRGECLBGTCHit)
 Register module name.
 
 REG_MODULE (TRGECLQAM)
 Register module name.
 
 REG_MODULE (TRGECLRawdataAnalysis)
 Register Module.
 
 REG_MODULE (TRGGDL)
 
 REG_MODULE (TRGGRL)
 Register module for TRGGRL.
 
int countBits (uint64_t n)
 
template<typename AXIS_NAME_T , typename CONTAINER_T >
uint64_t to_bit_mask (const CONTAINER_T &container)
 
void bitshift (int64_t &out, int64_t &shift, int64_t in, int64_t deltashift)
 
template<typename T >
constexpr int64_t get_index (const T &e, int track_id=0)
 
 CDCTriggerNeuroDataModule ()
 Constructor, for setting module description and parameters.
 
virtual void initialize () override
 Initialize the module.
 
virtual void event () override
 Called once for each event.
 
virtual void terminate () override
 Do the training for all sectors.
 
 CDCTriggerNeuroIDHistModule ()
 Constructor, for setting module description and parameters.
 
virtual void initialize () override
 Initialize the module.
 
virtual void event () override
 Called once for each event.
 
virtual void terminate () override
 Do the training for all sectors.
 
std::string version (void) const
 returns version of TRGCDCModule.
 
 TRGCDCModule ()
 Constructor.
 
virtual ~TRGCDCModule ()
 Destructor.
 
virtual void initialize () override
 Initilizes TRGCDCModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
std::string version (void) const
 returns version of TRGCDCTSStreamModule.
 
 TRGCDCTSStreamModule ()
 Constructor.
 
virtual ~TRGCDCTSStreamModule ()
 Destructor.
 
virtual void initialize () override
 Initilizes TRGCDCTSStreamModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
std::string version (void) const
 returns version of TRGECLFAMModule.
 
 TRGECLFAMModule ()
 Constructor.
 
virtual ~TRGECLFAMModule ()
 Destructor.
 
virtual void initialize () override
 Initilizes TRGECLFAMModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
std::string version (void) const
 returns version of TRGECLModule.
 
 TRGECLModule ()
 Constructor.
 
virtual ~TRGECLModule ()
 Destructor

 
virtual void initialize () override
 Initilizes TRGECLModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
std::string version (void) const
 returns version of TRGECLBGTCHitModule.
 
 TRGECLBGTCHitModule ()
 Constructor.
 
virtual ~TRGECLBGTCHitModule ()
 Destructor.
 
virtual void initialize () override
 Initilizes TRGECLBGTCHitModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
void genSimulationObj ()
 Parameters.
 
void genRandomTrgObj ()
 
std::string version () const
 version
 
 TRGECLQAMModule ()
 Costructor.
 
virtual ~TRGECLQAMModule ()
 Destrunctor.
 
virtual void initialize () override
 initialize
 
virtual void beginRun () override
 begin Run
 
virtual void event () override
 Event.
 
virtual void endRun () override
 End Run.
 
virtual void terminate () override
 terminate
 
std::string version (void) const
 returns version of TRGECLModule.
 
 TRGECLRawdataAnalysisModule ()
 Constructor.
 
virtual ~TRGECLRawdataAnalysisModule ()
 Destructor

 
virtual void initialize () override
 Initilizes TRGECLModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
std::string version (void) const
 returns version of TRGGDLModule.
 
 TRGGDLModule ()
 Constructor.
 
virtual ~TRGGDLModule ()
 Destructor.
 
virtual void defineHisto () override
 Define Histogram.
 
virtual void initialize () override
 Initilizes TRGGDLModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
std::string version (void) const
 returns version of TRGGRLModule.
 
 TRGGRLModule ()
 Constructor.
 
virtual ~TRGGRLModule ()
 Destructor.
 
virtual void initialize () override
 Initilizes TRGGRLModule.
 
virtual void beginRun () override
 Called when new run started.
 
virtual void event () override
 Called event by event.
 
virtual void endRun () override
 Called when run ended.
 
virtual void terminate () override
 Called when processing ended.
 
void clear_layersUsed ()
 
void add_layersUsed (int layersUsed)
 
void set_NLayerTrigger (int NlayerTrigger)
 
void run (const KLM_TRG_definitions::KLM_Digit_compact_ts &hits)
 
int get_n_sections_trig (int subdetector)
 
int get_triggermask (int subdetector, int section)
 
int get_BKLM_back_to_back_flag (int subdetector)
 
void clear_geometry ()
 
void add_geometry (const KLM_TRG_definitions::KLM_geo_fit_t &geometry)
 
void run (const KLM_TRG_definitions::KLM_Digit_compact_ts &hits)
 
const KLM_TRG_definitions::KLM_trig_linear_fits & get_result () const
 
int get_triggermask (int subdetector, int section)
 
int get_triggermask_or (int subdetector, int section)
 
void set_y_cutoff (int cutoff)
 
void set_intercept_cutoff (int cutoff)
 

Variables

static constexpr int mergerWidth = 256
 Merger data width.
 
static constexpr int nAllMergers = 146
 Number of Mergers.
 
static constexpr int wordWidth = 32
 width of a single word in the raw int buffer
 
static constexpr int nFinesse = 48
 Number of FINESSE in a PCIe40.
 
constexpr Linear_fit_of_Hits_t Linear_fit_of_Hits
 
static const int intNaN = std::numeric_limits<int>::quiet_NaN()
 
static TRGGDL_gdl = 0
 A pointer to a TRGGDL;.
 
static TRGGRL_grl = 0
 A pointer to a TRGGRL;.
 

Detailed Description

Typedef Documentation

◆ cdcMap

typedef std::map< int, cdcPair > cdcMap

Map of <counter, cdcPair>, for hits with indices.

Definition at line 37 of file CDCTriggerHoughETFModule.h.

◆ cdcPair

typedef std::pair< unsigned short, ROOT::Math::XYVector > cdcPair

Pair of <iSuperLayer, (x, y)>, for hits in conformal space.

Definition at line 35 of file CDCTriggerHoughETFModule.h.

◆ coord2dPair

typedef std::pair< ROOT::Math::XYVector, ROOT::Math::XYVector > coord2dPair

Hough Tuples.

Definition at line 39 of file CDCTriggerHoughETFModule.h.

◆ MergerBits

Merger data bus Bitstream.

Definition at line 55 of file CDCTriggerUnpackerModule.h.

◆ MergerBus

using MergerBus = std::array<std::bitset<mergerWidth>, nAllMergers>

Merger data bus.

Definition at line 53 of file CDCTriggerUnpackerModule.h.

◆ NodeList

using NodeList = std::vector<std::vector<int> >

Node list.

Definition at line 42 of file CDCTriggerUnpackerModule.h.

Function Documentation

◆ add_geometry()

void add_geometry ( const KLM_TRG_definitions::KLM_geo_fit_t geometry)

Definition at line 154 of file klm_trig_linear_fit.cc.

155 {
156
157 m_KLMgeomap[get_index(geometry)] = geo_KLM_t{
158 geometry.slopeX,
159 geometry.offsetX,
160 geometry.slopeY,
161 geometry.offsetY
162 };
163
164
165 }

◆ add_layersUsed()

void add_layersUsed ( int  layersUsed)

Definition at line 44 of file KLM_Trig.cc.

45 {
46 m_layersUsed.emplace_back(layersUsed);
47 }

◆ beginRun() [1/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 353 of file TRGCDCModule.cc.

354 {
355 if (TRGDebug::level())
356 cout << "TRGCDCModule ... beginRun called " << endl;
357 }
static int level(void)
returns the debug level.
Definition: Debug.cc:67

◆ beginRun() [2/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 102 of file TRGCDCTSStreamModule.cc.

103 {
104
106
107 //...Super layer loop...
108 for (unsigned l = 0; l < _cdc->nSegmentLayers(); l++) {
109 const Belle2::TRGCDCLayer* lyr = _cdc->segmentLayer(l);
110 const unsigned nWires = lyr->nCells();
111
112 //...Clear old pointers...
113 _wires[l].clear();
114
115 //...TS loop...
116 for (unsigned i = 0; i < nWires; i++) {
117 const TCSegment& s = (TCSegment&) * (* lyr)[i];
118 _wires[l].push_back(s.wires()[5]);
119 }
120 }
121
122 if (_out) {
123 unsigned val = TRGBSRecord_BeginRun;
124 _out->write((char*) & val, 4);
125 val = 0;
126 _out->write((char*) & val, 4);
127 }
128
129 if (TRGDebug::level())
130 cout << "TRGCDCTSStreamModule ... beginRun called. TRGCDC version="
131 << _cdc->version() << endl;
132 }
A class to represent a cell layer.
Definition: Layer.h:33
std::ofstream * _out
A pointer to an output file.
std::vector< const TRGCDCWire * > _wires[9]
Storage for TS central wires.
TRGCDC * _cdc
A pointer to a TRGCDC;.
unsigned nSegmentLayers(void) const
returns # of track segment layers.
Definition: TRGCDC.h:1070
static TRGCDC * getTRGCDC(void)
returns TRGCDC object.
Definition: TRGCDC.cc:192
const TRGCDCLayer * segmentLayer(unsigned id) const
returns a pointer to a track segment layer.
Definition: TRGCDC.h:1061
unsigned nCells(void) const
returns # of cells.
Definition: Layer.h:194
std::string version(void) const
returns version.
Definition: TRGCDC.cc:98

◆ beginRun() [3/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 131 of file TRGECLFAMModule.cc.

132 {
133 if (_ConditionDB == 0) {
134 Threshold.resize(576, _threshold);
135 } else if (_ConditionDB == 1) { //Use global tag
136 Threshold.resize(576, 0);
137 for (const auto& para : m_FAMPara) {
138 Threshold[para.getTCId() - 1] = (int)((para.getThreshold()) * (para.getConversionFactor()));
139 }
140 }
141
142 B2DEBUG(200, "TRGECLFAMModule ... beginRun called ");
143
144 }
int _ConditionDB
Use Condition DB.
int _threshold
Threshold input.
std::vector< int > Threshold
Threshold.
DBArray< TRGECLFAMPara > m_FAMPara
FAM Parameters.

◆ beginRun() [4/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 255 of file TRGECLModule.cc.

256 {
257 if (_ConditionDB == 1) {
258 for (const auto& para : m_ETMPara) {
259 _TotalEnergy = {(double)para.getELow(),
260 (double)para.getELow(),
261 (double)para.getELow()
262 };
263 for (int index = 0; index < 14; index ++) {
264 _2DBhabhaThresholdFWD.push_back((double)para.get2DBhabhaFWD(index));
265 _2DBhabhaThresholdBWD.push_back((double)para.get2DBhabhaBWD(index));
266 }
268 (double)para.get3DBhabhaVetoThreshold(0),
269 (double)para.get3DBhabhaVetoThreshold(1)
270 }; // /100 MeV
272 (double)para.get3DBhabhaSelectionThreshold(0),
273 (double)para.get3DBhabhaSelectionThreshold(1)
274 }; // /100 MeV
276 (double)para.get3DBhabhaVetoAngle(0),
277 (double)para.get3DBhabhaVetoAngle(1),
278 (double)para.get3DBhabhaVetoAngle(2),
279 (double)para.get3DBhabhaVetoAngle(3)
280 };
282 (double)para.get3DBhabhaSelectionAngle(0),
283 (double)para.get3DBhabhaSelectionAngle(1),
284 (double)para.get3DBhabhaSelectionAngle(2),
285 (double)para.get3DBhabhaSelectionAngle(3)
286 };
288 (double)(para.getmumuThreshold());
289 _mumuAngle = {
290 (double)para.getmumuAngle(0),
291 (double)para.getmumuAngle(1),
292 (double)para.getmumuAngle(2)
293 };
295 (double)para.getLowMultiThreshold(0),
296 (double)para.getLowMultiThreshold(1),
297 (double)para.getLowMultiThreshold(2),
298 (double)para.getLowMultiThreshold(3)
299 }; // /100 MeV
300 }
301 }
302
303 B2INFO("[TRGECLModule] 3DBhabhaVetoInTrackThetaRegion (low : high) = ("
306
307 B2INFO("[TRGECLModule] EventTimingQualityThresholds (low : high)= ("
308 << m_EventTimingQualityThresholds[0] << " : "
309 << m_EventTimingQualityThresholds[1] << ") (GeV)");
310
311 B2INFO("[TRGECLModule] Taub2b two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H ) = ("
312 << m_taub2bAngleCut[0] << ","
313 << m_taub2bAngleCut[1] << ","
314 << m_taub2bAngleCut[2] << ","
315 << m_taub2bAngleCut[3] << ")");
316 B2INFO("[TRGECLModule] Taub2b Total Energy Cut in lab. (GeV) = "
317 << m_taub2bEtotCut);
318 B2INFO("[TRGECLModule] Taub2b Cluster Energy Cut in lab. (GeV) : (E(CL1), E(CL2)) = ("
319 << m_taub2bClusterECut1 << ", "
320 << m_taub2bClusterECut2 << ")");
321 B2INFO("[TRGECLModule] Bhabha Add Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
322 << m_3DBhabhaAddAngleCut[0] << ","
323 << m_3DBhabhaAddAngleCut[1] << ","
324 << m_3DBhabhaAddAngleCut[2] << ","
325 << m_3DBhabhaAddAngleCut[3] << ")");
326
327 B2INFO("[TRGECLModule] Taub2b2 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
328 << m_taub2b2AngleCut[0] << ","
329 << m_taub2b2AngleCut[1] << ","
330 << m_taub2b2AngleCut[2] << ","
331 << m_taub2b2AngleCut[3] << ")");
332 B2INFO("[TRGECLModule] Taub2b2 Total Energy Cut in lab. (GeV) = "
334 B2INFO("[TRGECLModule] Taub2b2 Energy Cut in lab. for cluster in endcap (GeV) = "
336 B2INFO("[TRGECLModule] Taub2b2 Cluster energy cut in lab. (GeV) = "
337 << m_taub2b2CLECut);
338
339 B2INFO("[TRGECLModule] Taub2b3 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
340 << m_taub2b3AngleCut[0] << ","
341 << m_taub2b3AngleCut[1] << ","
342 << m_taub2b3AngleCut[2] << ","
343 << m_taub2b3AngleCut[3] << ")");
344 B2INFO("[TRGECLModule] Taub2b3 Total Energy Cut in lab. (GeV) = "
346 B2INFO("[TRGECLModule] Taub2b3 Cluster energy cut in lab. for one of b2b clusters (GeV) = "
348 B2INFO("[TRGECLModule] Taub2b3 Cluster energy low cut in lab. for all clusters (GeV) = "
350 B2INFO("[TRGECLModule] Taub2b3 Cluster energy high cut in lab. for all clusters(GeV) = "
352
353 if (TRGDebug::level()) {
354 std::cout << "TRGECLModule ... beginRun called " << std::endl;
355 }
356 // _ecl = TrgEcl::getTrgEcl();
357
358 }
double m_taub2b3CLELowCut
taub2b3 cluster energy low cut in lab for all clusters (GeV)
Definition: TRGECLModule.h:163
double m_taub2bEtotCut
taub2b total energy (TC theta ID =1-17) (GeV)
Definition: TRGECLModule.h:143
double m_taub2b3CLEHighCut
taub2b3 cluster energy high cut in lab for all clusters (GeV)
Definition: TRGECLModule.h:165
int _ConditionDB
Flag to use Condition DB.
Definition: TRGECLModule.h:108
std::vector< double > m_EventTimingQualityThresholds
Energy threshold(low, high) of event timing quality flag (GeV)
Definition: TRGECLModule.h:138
std::vector< int > m_taub2bAngleCut
taub2b 2 cluster angle cut (degree) (dphi low, dphi high, theta_sum low, theta_sum high)
Definition: TRGECLModule.h:141
DBArray< TRGECLETMPara > m_ETMPara
ETN Parameters.
Definition: TRGECLModule.h:173
double _mumuThreshold
mumu bit Energy Threshold
Definition: TRGECLModule.h:122
std::vector< int > m_3DBhabhaVetoInTrackThetaRegion
Theta region (low, high) of 3D Bhabha Veto InTrack.
Definition: TRGECLModule.h:136
std::vector< double > _TotalEnergy
Total Energy Theshold (low, high, lum)
Definition: TRGECLModule.h:132
std::vector< double > _mumuAngle
mumu bit Angle
Definition: TRGECLModule.h:124
std::vector< double > m_3DBhabhaAddAngleCut
Angle selection of additional Bhabha veto in CM frame.
Definition: TRGECLModule.h:126
std::vector< double > _3DBhabhaVetoThreshold
3D Veto Bhabha Energy Threshold
Definition: TRGECLModule.h:116
double m_taub2b2EtotCut
taub2b2 total energy cut (GeV)
Definition: TRGECLModule.h:149
std::vector< double > _LowMultiThreshold
Low Multiplicity Threshold.
Definition: TRGECLModule.h:134
std::vector< double > _3DBhabhaSelectionAngle
3D Selection Bhabha Energy Angle
Definition: TRGECLModule.h:118
std::vector< double > _2DBhabhaThresholdBWD
2D Bhabha Energy Threshold
Definition: TRGECLModule.h:112
double m_taub2bClusterECut2
taub2b Cluster energy selection (GeV)
Definition: TRGECLModule.h:147
std::vector< int > m_taub2b2AngleCut
taub2b2 two Cluster angle cut (degree)
Definition: TRGECLModule.h:151
double m_taub2b3EtotCut
taub2b3 total energy cut in lab (GeV)
Definition: TRGECLModule.h:157
std::vector< double > _3DBhabhaSelectionThreshold
3D Selection Bhabha Energy Threshold
Definition: TRGECLModule.h:114
double m_taub2b3CLEb2bCut
taub2b3 cluster energy cut in lab for one of b2b clusters (GeV)
Definition: TRGECLModule.h:161
double m_taub2bClusterECut1
taub2b Cluster energy selection (GeV)
Definition: TRGECLModule.h:145
double m_taub2b2CLECut
taub2b2 cluster energy cut (GeV)
Definition: TRGECLModule.h:155
std::vector< double > _2DBhabhaThresholdFWD
2D Bhabha Energy Threshold
Definition: TRGECLModule.h:110
std::vector< double > _3DBhabhaVetoAngle
3D Veto Bhabha Energy Angle
Definition: TRGECLModule.h:120
double m_taub2b2CLEEndcapCut
taub2b2 cluster energy cut for endcap cluster (GeV)
Definition: TRGECLModule.h:153
std::vector< int > m_taub2b3AngleCut
taub2b3 two Cluster angle cut in cms (degree)
Definition: TRGECLModule.h:159

◆ beginRun() [5/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 103 of file TRGECLBGTCHitModule.cc.

104 {
105 B2DEBUG(200, "TRGECLBGTCHitModule ... beginRun called ");
106 }

◆ beginRun() [6/9]

void beginRun ( void  )
overridevirtual

begin Run

Reimplemented from Module.

Definition at line 132 of file TRGECLQAMModule.cc.

133 {
134
135 B2DEBUG(200, "TRGECLQAMModule ... beginRun called ");
136
137 }

◆ beginRun() [7/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 97 of file TRGECLRawdataAnalysisModule.cc.

98 {
99
100 if (TRGDebug::level()) {
101 std::cout << "TRGECLRawdataAnalysisModule ... beginRun called " << std::endl;
102 }
103 // _ecl = TrgEcl::getTrgEcl();
104
105 }

◆ beginRun() [8/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from HistoModule.

Definition at line 147 of file TRGGDLModule.cc.

148 {
149
150 //...GDL config. name...
151 string cfn = _configFilename;
152
153 //...GDL...
154 if (_gdl == 0) {
159 _Phase,
161 _algFilePath,
165 } else if (cfn != _gdl->configFile()) {
170 _Phase,
172 _algFilePath,
176 }
177 if (_debugLevel > 9) printf("TRGGDLModule::beginRun() ends.\n");
178
180
181 B2DEBUG(100, "TRGGDLModule ... beginRun called configFile = " << cfn);
182 }
std::string _configFilename
Config. file name.
Definition: TRGGDLModule.h:80
bool _algFromDB
Switch for algorithm source. False when using local .alg file.
Definition: TRGGDLModule.h:94
int _debugLevel
Debug level.
Definition: TRGGDLModule.h:77
double _timquality_threshold_sfin
Threshold to determine timing quality flag with MC truth: super fine.
Definition: TRGGDLModule.h:103
int _simulationMode
Mode for TRGGDL simulation.
Definition: TRGGDLModule.h:84
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
Definition: TRGGDLModule.h:91
double _timquality_threshold_fine
Threshold to determine timing quality flag with MC truth: fine.
Definition: TRGGDLModule.h:106
int _fastSimulationMode
Switch for the fast simulation.
Definition: TRGGDLModule.h:88
static TRGGDL * _gdl
A pointer to a TRGGDL;.
Definition: TRGGDLModule.h:113
void checkDatabase() const
Check the content of the DBObjects used by this class.
Definition: TRGGDL.cc:1001
static TRGGDL * getTRGGDL(void)
returns TRGGDL object.
Definition: TRGGDL.cc:103
std::string configFile(void) const
returns configuration file name.
Definition: TRGGDL.h:334

◆ beginRun() [9/9]

void beginRun ( void  )
overridevirtual

Called when new run started.

Reimplemented from Module.

Definition at line 86 of file TRGGRLModule.cc.

87 {
88
89 //...GDL config. name...
90 string cfn = _configFilename;
91
92 //...GRL...
93 if (_grl == 0) {
98 } else if (cfn != _grl->configFile()) {
103 }
104
105 B2DEBUG(300, "TRGGDLModule ... beginRun called configFile = " << cfn);
106
107 }
std::string _configFilename
Config. file name.
Definition: TRGGRLModule.h:63
int _simulationMode
Mode for TRGGRL simulation.
Definition: TRGGRLModule.h:67
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
Definition: TRGGRLModule.h:74
int _fastSimulationMode
Switch for the fast simulation.
Definition: TRGGRLModule.h:71
static TRGGRL * _grl
A pointer to a TRGGRL;.
Definition: TRGGRLModule.h:79
static TRGGRL * getTRGGRL(void)
returns TRGGRL object.
Definition: TRGGRL.cc:73

◆ bitshift()

void bitshift ( int64_t &  out,
int64_t &  shift,
int64_t  in,
int64_t  deltashift 
)

Definition at line 31 of file klm_trig_linear_fit.cc.

32 {
33 int64_t mask = 0xFFFFFF;
34 if (((mask << deltashift) & in) > 0) {
35 throw std::runtime_error("bitshift error");
36 }
37
38 out |= (in << shift);
39 shift += deltashift;
40 }

◆ CDCTriggerNeuroDataModule()

Constructor, for setting module description and parameters.

Definition at line 42 of file CDCTriggerNeuroDataModule.cc.

42 : Module()
43 {
45 "This module takes 2dtracks, track segments, and targettracks (either recotracks or mcparticles) as input and generates training data for the neurotrigger in a tab separated, gzip compressed file."
46 );
47 // parameters for saving / loading
48 addParam("hitCollectionName", m_hitCollectionName,
49 "Name of the input StoreArray of CDCTriggerSegmentHits. The Axials need to have a relation to inputtracks",
50 std::string(""));
51 addParam("inputCollectionName", m_inputCollectionName,
52 "Name of the StoreArray holding the 2D input tracks.",
53 std::string("CDCTriggerNNInput2DTracks"));
54 addParam("targetCollectionName", m_targetCollectionName,
55 "Name of the MCParticle/RecoTrack collection used as target values.",
56 std::string("RecoTracks"));
57 addParam("trainOnRecoTracks", m_trainOnRecoTracks,
58 "If true, use RecoTracks as targets instead of MCParticles.",
59 true);
60 addParam("EventTimeName", m_EventTimeName,
61 "Name of the event time object.",
62 std::string("CDCTriggerNeuroETFT0"));
63 addParam("NeuroTrackInputMode", m_neuroTrackInputMode,
64 "When using real tracks, use neurotracks instead of 2dtracks as input to the neurotrigger. this is important to get the relations right.",
65 false);
66 addParam("singleUse", m_singleUse,
67 "Only use a track for a single expert", true);
68 addParam("configFileName", m_configFileName,
69 "Name of the configuration file. This File should be created by the CDCTriggerIDHistModule and will be extended in this module",
70 std::string(""));
71 addParam("writeconfigFileName", m_writeconfigFileName,
72 "Name of the configuration file, which will be written. If left blank, the same file as the input configuration file is used and it will be overwritten.",
73 std::string(""));
74 addParam("gzipFilename", m_filename,
75 "Name of the gzip file, where the training samples will be saved.",
76 std::string("out.gz"));
77
78
79
80
81 }
std::string m_EventTimeName
name of the event time StoreObjPtr
bool m_trainOnRecoTracks
Switch between MCParticles or RecoTracks as targets.
std::string m_targetCollectionName
Name of the MCParticles/RecoTracks collection used as target values.
bool m_neuroTrackInputMode
Switch to rescale out of range target values or ignore them.
std::string m_inputCollectionName
Name of the StoreArray containing the input 2D tracks.
std::string m_filename
Name of gzip file where the training data are saved.
bool m_singleUse
use a track only once and not for every expert
std::string m_writeconfigFileName
Name of the configuration file used in the module to write the neuroparamters.
std::string m_hitCollectionName
Name of the StoreArray containing the input track segment hits.
std::string m_configFileName
Name of the configuration file used in the module to load the neuroparamters.
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
Module()
Constructor.
Definition: Module.cc:30
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

◆ CDCTriggerNeuroIDHistModule()

Constructor, for setting module description and parameters.

Definition at line 38 of file CDCTriggerNeuroIDHistModule.cc.

38 : Module()
39 {
41 "description" //TODO
42 );
43 // parameters for saving / loading
44 addParam("hitCollectionName", m_hitCollectionName,
45 "Name of the input StoreArray of CDCTriggerSegmentHits.",
46 std::string(""));
47 addParam("inputCollectionName", m_inputCollectionName,
48 "Name of the StoreArray holding the 2D input tracks.",
49 std::string("TRGCDC2DFinderTracks"));
50 addParam("trainOnRecoTracks", m_trainOnRecoTracks,
51 "If true, use RecoTracks as targets instead of MCParticles.",
52 false);
53 addParam("targetCollectionName", m_targetCollectionName,
54 "Name of the MCParticle/RecoTrack collection used as target values.",
55 std::string("MCParticles"));
56 addParam("writeconfigfile", m_writeconfigFileName,
57 "Name of the config file, where all the parameters and the IDHist configuration is written.",
58 std::string(""));
59 addParam("configfile", m_configFileName,
60 "Name of the config file, where all the parameters and the IDHist configuration is read in from.",
61 std::string(""));
62 addParam("MaxEvents", m_nPrepare,
63 "amount of events used for creating the IDHist. If it is 0, "
64 "all Events are used.",
65 0);
66
67 }
bool m_trainOnRecoTracks
Switch between MCParticles or RecoTracks as targets.
std::string m_targetCollectionName
Name of the MCParticles/RecoTracks collection used as target values.
std::string m_inputCollectionName
name of the event time StoreObjPtr
int m_nPrepare
Number of samples to prepare input ranges.
std::string m_writeconfigFileName
name for the output configuration file which holds all the parameters and the idhist tables for each ...
std::string m_configFileName
name for the input configuration file which holds all the parameters and the idhist tables for each e...

◆ clear_geometry()

void clear_geometry ( )

Definition at line 148 of file klm_trig_linear_fit.cc.

149 {
150 m_KLMgeomap.clear();
151
152 }

◆ clear_layersUsed()

void clear_layersUsed ( )

Definition at line 39 of file KLM_Trig.cc.

40 {
41 m_layersUsed.clear();
42 }

◆ countBits()

int countBits ( uint64_t  n)
inline

Definition at line 21 of file bit_operations.h.

22 {
23 return static_cast<int>(std::bitset<64>(n).count());
24 }

◆ defineHisto()

void defineHisto ( )
overridevirtual

Define Histogram.

Reimplemented from HistoModule.

Definition at line 109 of file TRGGDLModule.cc.

110 {
111
112 oldDir = gDirectory;
113 newDir = gDirectory;
114 oldDir->mkdir("TRGGDLModule");
115 newDir->cd("TRGGDLModule");
116
117 h_inp = new TH1I("hTRGGDL_inp", "input bits from TRGGDLModule", 200, 0, 200);
118 h_ftd = new TH1I("hTRGGDL_ftd", "ftdl bits from TRGGDLModule", 200, 0, 200);
119 h_psn = new TH1I("hTRGGDL_psn", "psnm bits from TRGGDLModule", 200, 0, 200);
120
121 oldDir->cd();
122
123 }

◆ endRun() [1/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 391 of file TRGCDCModule.cc.

392 {
393 if (TRGDebug::level())
394 cout << "TRGCDCModule ... endRun called " << endl;
395 }

◆ endRun() [2/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 203 of file TRGCDCTSStreamModule.cc.

204 {
205 if (_out) {
206 unsigned val = TRGBSRecord_EndRun;
207 _out->write((char*) & val, 4);
208 val = 0;
209 _out->write((char*) & val, 4);
210 }
211
212 if (TRGDebug::level())
213 cout << "TRGCDCTSStreamModule ... endRun called " << endl;
214 }

◆ endRun() [3/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 233 of file TRGECLFAMModule.cc.

234 {
235 B2DEBUG(200, "TRGECLFAMModule ... endRun called ");
236 }

◆ endRun() [4/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 428 of file TRGECLModule.cc.

429 {
430 if (TRGDebug::level()) {
431 std::cout << "TRGECLModule ... endRun called " << std::endl;
432 }
433 }

◆ endRun() [5/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 125 of file TRGECLBGTCHitModule.cc.

126 {
127 B2DEBUG(200, "TRGECLBGTCHitModule ... endRun called ");
128 }

◆ endRun() [6/9]

void endRun ( void  )
overridevirtual

End Run.

Reimplemented from Module.

Definition at line 201 of file TRGECLQAMModule.cc.

202 {
203
204 double mean_FWD = 0;
205 double mean_BAR = 0;
206 double mean_BWD = 0;
207
208 //QAM TC Hit Map Check
209 for (int TCId = 1; TCId < 577; TCId++) {
210 if (TCId < 81) { //Forward Endcap
211 mean_FWD += TCID[TCId - 1];
212 } else if (TCId < 513) { //Barrel
213 mean_BAR += TCID[TCId - 1];
214 } else { //Backward Endcap
215 mean_BWD += TCID[TCId - 1];
216 }
217 }
218 mean_FWD /= 80;
219 mean_BAR /= (512 - 80);
220 mean_BWD /= (576 - 512);
221
222 for (int TCId = 1; TCId < 577; TCId++) {
223 if (TCId < 81) { //Forward Endcap
224 if (TCID[TCId - 1] < mean_FWD * 0.1)m_FWD++;
225 } else if (TCId < 513) { //Barrel
226 if (TCID[TCId - 1] < mean_BAR * 0.1)m_BAR++;
227 } else { //Backward Endcap
228 if (TCID[TCId - 1] < mean_BWD * 0.1)m_BWD++;
229 }
230 }
231
232 m_ALL = m_FWD + m_BAR + m_BWD;
233 const int etot_size = etot.size();
234 for (int i = 0; i < etot_size; i++) {
235 h_etot->Fill(etot[i]);
236 }
237 //Caluate E_total peak and width
238
239 RooRealVar* E_tot = new RooRealVar("E_tot", "E_tot", 0, 4000);
240 RooDataHist* data_E_tot = new RooDataHist("data_E_tot", "dataset with E_tot", *E_tot, h_etot);
241 RooRealVar* mean_check = new RooRealVar("mean_check", "Mean for checking", 2000, 1000, 3000);
242 RooRealVar* sigma_check = new RooRealVar("sigma_check", "Sigma for checking", 100, 0, 300);
243 RooGaussian* gauss_check = new RooGaussian("gauss_check", "Gaussian for checking", *E_tot, *mean_check, *sigma_check);
244 gauss_check->fitTo(*data_E_tot);
245 double mean_ch = mean_check->getVal();
246
247 RooRealVar* mean_E_tot = new RooRealVar("mean_E_tot", "Mean of Gaussian", mean_ch, mean_ch - 200, mean_ch + 200);
248 // RooRealVar sigma_E_tot("sigma_E_tot","Width of Gaussian", 10, 0, 50);
249
250 RooRealVar* sigma1_E_tot = new RooRealVar("sigma1_E_tot", "Width of Gaussian", 30, 0, 60);
251 RooGaussian* gauss1_E_tot = new RooGaussian("gauss1_E_tot", "gauss(x,mean,sigma)", *E_tot, *mean_E_tot, *sigma1_E_tot);
252 RooRealVar* sigma2_E_tot = new RooRealVar("sigma2_E_tot", "Width of Gaussian", 100, 30, 250);
253 RooGaussian* gauss2_E_tot = new RooGaussian("gauss2_E_tot", "gauss(x,mean,sigma)", *E_tot, *mean_E_tot, *sigma2_E_tot);
254
255 RooRealVar* frac_core_E_tot = new RooRealVar("frac_core", "core fraction", 0.85, 0.0, 1.0);
256 RooAddModel* gaussm_E_tot = new RooAddModel("gaussm", "core+tail gauss", RooArgList(*gauss1_E_tot, *gauss2_E_tot),
257 RooArgList(*frac_core_E_tot));
258
259 // RooGaussian gauss_E_tot("gauss_E_tot","gauss(x,mean,sigma)",E_tot,mean_E_tot,sigma_E_tot);
260
261 gaussm_E_tot->fitTo(*data_E_tot, RooFit::Range(mean_ch - 300, mean_ch + 300));
262 //RooPlot* xframe_E_tot = E_tot->frame();
263 RooPlot* xframe_E_tot = E_tot->frame(RooFit::Title("energy_tot"));
264 //data_E_tot->plotOn(xframe_E_tot);
265 data_E_tot->plotOn(xframe_E_tot, RooFit::MarkerStyle(7));
266 // gauss_E_tot->plotOn(xframe_E_tot);
267 gaussm_E_tot->plotOn(xframe_E_tot, RooFit::Name("Cal_energy"), RooFit::LineColor(2));
268 double v_m_E_tot = mean_E_tot->getVal();
269 double e_m_E_tot = mean_E_tot->getError();
270
271 double v1_s1_E_tot = sigma1_E_tot->getVal();
272 // double e1_s1_E_tot = sigma1_E_tot->getError();
273 double v2_s1_E_tot = sigma2_E_tot->getVal();
274 // double e2_s1_E_tot = sigma2_E_tot->getError();
275
276 double frac_E_tot = frac_core_E_tot->getVal();
277 double v_s1_E_tot = v1_s1_E_tot * (frac_E_tot) + v2_s1_E_tot * (1 - frac_E_tot);
278
279
280
281 for (long unsigned int ii = 0; ii < caltime.size(); ii++) {
282 h_caltime->Fill(caltime[ii]);
283 }
284
285
286 //Calculate Caltime peak and width
287 RooRealVar T_c("T_c", "T_c", -100, 100);
288 RooDataHist data_T_c("data_T_c", "dataset with T_c", T_c, h_caltime);
289
290 RooRealVar mean_T_c("mean_T_c", "Mean of Gaussian", 0, -100, 100);
291 RooRealVar sigma1_T_c("sigma1_T_c", "Width of Gaussian", 10, 0, 50);
292 RooGaussian gauss1_T_c("gauss1_T_c", "gauss(x,mean,sigma)", T_c, mean_T_c, sigma1_T_c);
293 RooRealVar sigma2_T_c("sigma2_T_c", "Width of Gaussian", 30, 10, 100);
294 RooGaussian gauss2_T_c("gauss2_T_c", "gauss(x,mean,sigma)", T_c, mean_T_c, sigma2_T_c);
295
296 RooRealVar frac_core_T_c("frac_core", "core fraction", 0.85, 0.0, 1.0);
297 RooAddModel gaussm_T_c("gaussm", "core+tail gauss", RooArgList(gauss1_T_c, gauss2_T_c), RooArgList(frac_core_T_c));
298
299 gaussm_T_c.fitTo(data_T_c, RooFit::Range(-45, 45));
300 RooPlot* xframe_T_c = T_c.frame(RooFit::Title("Caltime"));
301 data_T_c.plotOn(xframe_T_c, RooFit::MarkerStyle(7));
302 gaussm_T_c.plotOn(xframe_T_c, RooFit::Name("Caltime"), RooFit::LineColor(2));
303 gaussm_T_c.plotOn(xframe_T_c, RooFit::Components("gauss1_T_c"), RooFit::LineColor(kGreen));
304 gaussm_T_c.plotOn(xframe_T_c, RooFit::Components("gauss2_T_c"), RooFit::LineColor(kMagenta));
305
306 xframe_T_c->GetXaxis()->SetTitle("Caltime[ns]");
307 xframe_T_c->GetYaxis()->SetTitle("Entries");
308
309 double v_m_T_c = mean_T_c.getVal();
310 double e_m_T_c = mean_T_c.getError();
311
312 double v1_s1_T_c = sigma1_T_c.getVal();
313 // double e1_s1_T_c = sigma1_T_c.getError();
314 double v2_s1_T_c = sigma2_T_c.getVal();
315 // double e2_s1_T_c = sigma2_T_c.getError();
316
317 double frac_T_c = frac_core_T_c.getVal();
318 double v_s1_T_c = v1_s1_T_c * (frac_T_c) + v2_s1_T_c * (1 - frac_T_c);
319
320
321
322 //Cluster E sum for Bhabha skim
323 const int cluster_size = cluster.size();
324 for (int ii = 0; ii < cluster_size; ii++) {
325 h_clusterE->Fill(cluster[ii]);
326 }
327
328 RooRealVar x("x", "esum", 0, 4000);
329 RooDataHist dh("dh", "ecltrg", x, h_clusterE);
330
331 RooRealVar mean("mean", "mean", 2000, 1000, 2500);
332 RooRealVar sigma("sigma", "sigma", 150, 0, 300);
333 RooRealVar tail("tail", "tail", 0.45, 0, 1);
334 RooNovosibirsk novo("novo", "", x, mean, sigma, tail);
335 novo.fitTo(dh, RooFit::Extended(0), RooFit::Range(1500, 2200));
336
337
338 double clusterE_vm, clusterE_em, clusterE_vs;
339
340 clusterE_vm = mean.getVal();
341 clusterE_em = mean.getError();
342 clusterE_vs = sigma.getVal();
343
344
345 TString outputfile = m_outputfile;
346 TFile file(outputfile, "RECREATE");
347 TTree* tree = new TTree("tree", "tree");
348 int nevent;
349 double FWD;
350 double BAR;
351 double BWD;
352 double ALL;
353
354 nevent = m_nevent;
355 FWD = m_FWD;
356 BAR = m_BAR;
357 BWD = m_BWD;
358 ALL = m_ALL;
359
360 m_etot_mean = v_m_E_tot;
361 m_etot_error = e_m_E_tot;
362 m_etot_sigma = v_s1_E_tot;
363
364 m_caltime_mean = v_m_T_c;
365 m_caltime_error = e_m_T_c;
366 m_caltime_sigma = v_s1_T_c;
367
368 tree->Branch("m_nRun", &m_nRun, "m_nRun/I");
369 tree->Branch("m_nevent", &nevent, "m_nevent/I");
370 tree->Branch("m_FWD", &FWD, "m_FWD/D");
371 tree->Branch("m_BAR", &BAR, "m_BAR/D");
372 tree->Branch("m_BWD", &BWD, "m_BWD/D");
373 tree->Branch("m_ALL", &ALL, "m_ALL/D");
374 tree->Branch("m_etot_mean", &m_etot_mean, "m_etot_mean/D");
375 tree->Branch("m_etot_error", &m_etot_error, "m_etot_error/D");
376 tree->Branch("m_etot_sigma", &m_etot_sigma, "m_etot_sigma/D");
377 tree->Branch("m_caltime_mean", &m_caltime_mean, "m_caltime_mean/D");
378 tree->Branch("m_caltime_error", &m_caltime_error, "m_caltime_error/D");
379 tree->Branch("m_caltime_sigma", &m_caltime_sigma, "m_caltime_sigma/D");
380 tree->Branch("m_clusterE_mean", &clusterE_vm, "m_clusterE_mean/D");
381 tree->Branch("m_clusterE_error", &clusterE_em, "m_clusterE_error/D");
382 tree->Branch("m_clusterE_sigma", &clusterE_vs, "m_clusterE_sigma/D");
383
384 tree->Fill();
385 tree->Write();
386 file.Close();
387
388
389
390 B2INFO("ECL Trigger QAM result "
391 << LogVar("Run Number", m_nRun)
392 << LogVar("Total Event", nevent)
393 << LogVar("The # of Low Hit TC in Forward Endcap", FWD)
394 << LogVar("The # of Low Hit TC in Barrel", BAR)
395 << LogVar("The # of Low Hit TC in Backward Endcap", BWD)
396 << LogVar("Total Energy Peak", m_etot_mean)
397 << LogVar("Total Energy Peak width", m_etot_sigma)
398 << LogVar("Caltime Peak", m_caltime_mean)
399 << LogVar("Caltime Peak width", m_caltime_sigma)
400 << LogVar("Cluster Energy Peak", clusterE_vm)
401 << LogVar("Cluster Energy Peak width", clusterE_vs));
402
403
404 B2DEBUG(100, "TRGECLQAMModule ... endRun called ");
405
406 }
TH1F * h_caltime
Caltime Histogram.
double m_ALL
Total proble TC.
double m_etot_sigma
Total Energy sigma.
int TCID[576]
Hit TCID.
std::vector< int > caltime
Caltime check.
double m_BAR
Barrel problem TC.
double m_BWD
BWD problem TC.
TH1F * h_clusterE
Cluster Energy Histogram.
std::string m_outputfile
Output Root File Name.
double m_etot_mean
Total Energy mean.
std::vector< int > etot
tcenergy check
double m_caltime_mean
Caltime mean.
TH1F * h_etot
Total Energy Histogram.
std::vector< int > cluster
Cluster Energy Vector.
double m_etot_error
Total Energy error.
double m_caltime_error
Caltime error.
int m_nevent
The # of Events.
Double_t m_FWD
FWD problem TC.
double m_caltime_sigma
Caltime sigma.
Class to store variables with their name which were sent to the logging service.

◆ endRun() [7/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 184 of file TRGECLRawdataAnalysisModule.cc.

185 {
186 if (TRGDebug::level()) {
187 std::cout << "TRGECLRawdataAnalysisModule ... endRun called " << std::endl;
188 }
189 }

◆ endRun() [8/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from HistoModule.

Definition at line 212 of file TRGGDLModule.cc.

213 {
214 B2DEBUG(200, "TRGGDLModule ... endRun called ");
215 }

◆ endRun() [9/9]

void endRun ( void  )
overridevirtual

Called when run ended.

Reimplemented from Module.

Definition at line 120 of file TRGGRLModule.cc.

121 {
122 B2DEBUG(300, "TRGGRLModule ... endRun called ");
123 }

◆ event() [1/11]

void event ( void  )
overridevirtual

Called once for each event.

Prepare input and target for each track and store it.

Reimplemented from Module.

Definition at line 134 of file CDCTriggerNeuroDataModule.cc.

135 {
136 StoreObjPtr<EventMetaData> evtmetadata;
137 for (int itrack = 0; itrack < m_tracks.getEntries(); ++itrack) {
138 // get related MCParticle/RecoTrack for target
139 // and retrieve track parameters
140 //float phi0Target = 0;
141 //float invptTarget = 0;
142 float thetaTarget = 0;
143 float zTarget = 0;
145 RecoTrack* recoTrack =
146 m_tracks[itrack]->getRelatedTo<RecoTrack>(m_targetCollectionName);
147 if (!recoTrack) {
148 B2DEBUG(150, "Skipping CDCTriggerTrack without relation to RecoTrack.");
149 continue;
150 }
151 // a RecoTrack has multiple representations for different particle hypothesis
152 // -> just take the first one that does not give errors.
153 const std::vector<genfit::AbsTrackRep*>& reps = recoTrack->getRepresentations();
154 bool foundValidRep = false;
155 for (unsigned irep = 0; irep < reps.size() && !foundValidRep; ++irep) {
156 if (!recoTrack->wasFitSuccessful(reps[irep])) {
157 continue;
158 }
159
160 // get state (position, momentum etc.) from hit closest to IP and
161 // extrapolate to z-axis (may throw an exception -> continue to next representation)
162 try {
163 genfit::MeasuredStateOnPlane state =
164 recoTrack->getMeasuredStateOnPlaneClosestTo(ROOT::Math::XYZVector(0, 0, 0), reps[irep]);
165 reps[irep]->extrapolateToLine(state, TVector3(0, 0, -1000), TVector3(0, 0, 2000));
166 // flip tracks if necessary, such that trigger tracks and reco tracks
167 // point in the same direction
168 if (state.getMom().Dot(B2Vector3D(m_tracks[itrack]->getDirection())) < 0) {
169 state.setPosMom(state.getPos(), -state.getMom());
170 state.setChargeSign(-state.getCharge());
171 }
172 // get track parameters
173 //phi0Target = state.getMom().Phi();
174 //invptTarget = state.getCharge() / state.getMom().Pt();
175 thetaTarget = state.getMom().Theta();
176 zTarget = state.getPos().Z();
177 } catch (...) {
178 continue;
179 }
180 // break loop
181 foundValidRep = true;
182 }
183 if (!foundValidRep) {
184 B2DEBUG(150, "No valid representation found for RecoTrack, skipping.");
185 continue;
186 }
187 } else {
188 MCParticle* mcTrack =
189 m_tracks[itrack]->getRelatedTo<MCParticle>(m_targetCollectionName);
190 if (not mcTrack) {
191 B2DEBUG(150, "Skipping CDCTriggerTrack without relation to MCParticle.");
192 continue;
193 }
194 //phi0Target = mcTrack->getMomentum().Phi();
195 //invptTarget = mcTrack->getCharge() / mcTrack->getMomentum().Pt();
196 thetaTarget = mcTrack->getMomentum().Theta();
197 zTarget = mcTrack->getProductionVertex().Z();
198 }
200
201 // find all matching sectors
202 float phi0 = m_tracks[itrack]->getPhi0();
203 float invpt = m_tracks[itrack]->getKappa(1.5);
204 float theta = atan2(1., m_tracks[itrack]->getCotTheta());
205 std::vector<int> sectors = m_NeuroTrigger.selectMLPsTrain(phi0, invpt, theta);
206 if (sectors.size() == 0) continue;
207
208 // get target values
209 std::vector<float> targetRaw = {};
211 targetRaw.push_back(zTarget);
213 targetRaw.push_back(thetaTarget);
214 for (unsigned i = 0; i < sectors.size(); ++i) {
215 int isector = sectors[i];
216 std::vector<float> target = m_NeuroTrigger[isector].scaleTarget(targetRaw);
217 // skip out of range targets or rescale them
218 bool outOfRange = false;
219 for (unsigned itarget = 0; itarget < target.size(); ++itarget) {
220 if (fabs(target[itarget]) > 1.) {
221 outOfRange = true;
222 target[itarget] /= fabs(target[itarget]);
223 }
224 }
225 if (!m_neuroParameters.rescaleTarget && outOfRange) {
226 continue;
227 }
228 //
229 // read out or determine event time
231 // check hit pattern
232 unsigned long hitPattern = m_NeuroTrigger.getCompleteHitPattern(isector, *m_tracks[itrack], m_neuroTrackInputMode); // xxxxx0xxx
233 // sectorpattern holds the absolut necessary SLs for the expert
234 unsigned long sectorPattern = m_NeuroTrigger[isector].getSLpattern(); // 010100010
235 // sectorpatternmask holds the SLs, which are generally used to determine the right expert
236 unsigned long sectorPatternMask = m_NeuroTrigger[isector].getSLpatternMask(); // 010101010
237 B2DEBUG(250, "hitPattern " << hitPattern << " sectorPattern " << sectorPattern);
238 // if multiple experts should be trained with one track, the necessary SLs have to be in the hitpattern
239 if (!m_singleUse && sectorPattern > 0 && (sectorPattern & hitPattern) != sectorPattern) {
240 B2DEBUG(250, "hitPattern not matching " << (sectorPattern & hitPattern));
241 continue;
242 // if one track should only be used for one expert, the absolute necessary SLs for this expert should match exactly the set within the hitpattern of the generally used SLs for determining the expert.
243 } else if (m_singleUse && sectorPattern > 0 && (sectorPattern) != (hitPattern & sectorPatternMask)) {
244 // 010100010 != 0x0x0x0x0
245 B2DEBUG(250, "hitPattern not matching " << (sectorPatternMask & hitPattern));
246 continue;
247 }
248 // check, if enough axials are there. first, we select the axial bits from the
249 // hitpattern (341 = int('101010101',base=2)) and then check if the number of
250 // ones is equal or greater than 4.
251 if ((hitPattern & 341) != 341 && // this is an ugly workaround, because popcount is only
252 (hitPattern & 341) != 340 && // available with c++20 and newer
253 (hitPattern & 341) != 337 &&
254 (hitPattern & 341) != 325 &&
255 (hitPattern & 341) != 277 &&
256 (hitPattern & 341) != 85) {
257 B2DEBUG(250, "Not enough axial hits (<4), skipping!");
258 continue;
259 }
260 // get training data
261 std::vector<unsigned> hitIds;
263 hitIds = m_NeuroTrigger.selectHitsHWSim(isector, *m_tracks[itrack]);
264 } else {
265 hitIds = m_NeuroTrigger.selectHits(isector, *m_tracks[itrack]);
266 }
267 // add a "sample" it is a full training set including some zeroes for the neurotrigger values (raw and scaled z and theta). Those are sometimes used in the training for reference, but cannot be added here without running *some* neuotrigger instance.
268 CDCTriggerMLPData::NeuroSet<27, 2> sample(m_NeuroTrigger.getInputVector(isector, hitIds).data(), target.data(),
269 evtmetadata->getExperiment(), evtmetadata->getRun(), evtmetadata->getSubrun(), evtmetadata->getEvent(), itrack, i,
270 m_tracks.getEntries(), 0, 0, 0, 0, phi0, theta, invpt);
271 //check whether we already have enough samples
272 m_trainSet[isector].addSample(sample);
273 if ((m_trainSet)[isector].nSamples() % 1000 == 0) {
274 B2DEBUG(50, m_trainSet[isector].nSamples() << " samples for training collected for sector " << isector);
275 }
276 std::ofstream gzipfile4(m_filename, std::ios_base::app | std::ios_base::binary);
277 boost::iostreams::filtering_ostream outStream;
278 outStream.push(boost::iostreams::gzip_compressor());
279 outStream.push(gzipfile4);
280 outStream << sample << std::endl;
282 }
283
284 }
285 }
std::vector< CDCTriggerMLPData > m_trainSet
Sets of training data for all sectors.
NeuroTriggerParameters m_neuroParameters
Parameters for the NeuroTrigger.
NeuroTrigger m_NeuroTrigger
Instance of the NeuroTrigger.
StoreArray< CDCTriggerTrack > m_tracks
List of input tracks.
NNTParam< bool > rescaleTarget
flag to allow for target tracks lying out of the output range to be rescaled during training.
NNTParam< bool > targetTheta
train theta as output
NNTParam< bool > targetZ
train z as output
const std::string et_option() const
return the string variant ov the et option
void updateTrack(const CDCTriggerTrack &track)
Calculate 2D phi position and arclength for the given track and store them.
std::vector< unsigned > selectHits(unsigned isector, const CDCTriggerTrack &track, bool returnAllRelevant=false)
Select best hits for each super layer.
std::vector< float > getInputVector(unsigned isector, const std::vector< unsigned > &hitIds)
Calculate input values for MLP.
std::vector< unsigned > selectHitsHWSim(unsigned isector, const CDCTriggerTrack &track)
Select hits for each super layer from the ones related to input track.
std::vector< int > selectMLPsTrain(float phi0, float invpt, float theta)
Select all matching expert MLPs based on the given track parameters.
unsigned long getCompleteHitPattern(unsigned isector, const CDCTriggerTrack &track, const bool neurotrackinputmode)
Get complete hit pattern of neurotrack.
void getEventTime(unsigned isector, const CDCTriggerTrack &track, std::string et_option, const bool)
Read out the event time and store it.
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516

◆ event() [2/11]

void event ( void  )
overridevirtual

Called once for each event.

Prepare input and target for each track and store it.

Reimplemented from Module.

Definition at line 126 of file CDCTriggerNeuroIDHistModule.cc.

127 {
128 StoreObjPtr<EventMetaData> evtmetadata;
129 for (int itrack = 0; itrack < m_tracks.getEntries(); ++itrack) {
130 // get related MCParticle/RecoTrack for target
131 // and retrieve track parameters
132
133 std::vector<float> targetvector = NeuroTrainer::getTrainTargets(m_trainOnRecoTracks, m_tracks[itrack], m_targetCollectionName);
134 if (targetvector[4] == 0) {
135 continue;
136 } // no valid representation found
137 // float phi0Target = targetvector[0]; // currently unused
138 // float invptTarget = targetvector[1]; // currently unused
139 float thetaTarget = targetvector[2];
140 float zTarget = targetvector[3];
141
142
143 // update 2D track variables
145
146 // find all matching sectors
147 float phi0 = m_tracks[itrack]->getPhi0();
148 float invpt = m_tracks[itrack]->getKappa(1.5);
149 float theta = atan2(1., m_tracks[itrack]->getCotTheta());
150 std::vector<int> sectors = m_NeuroTrigger.selectMLPsTrain(phi0, invpt, theta);
151 if (sectors.size() == 0) continue;
152 // get target values
153 std::vector<float> targetRaw = {};
155 targetRaw.push_back(zTarget);
157 targetRaw.push_back(thetaTarget);
158 for (unsigned i = 0; i < sectors.size(); ++i) {
159 int isector = sectors[i];
160 std::vector<float> target = m_NeuroTrigger[isector].scaleTarget(targetRaw);
161 // skip out of range targets or rescale them
162 bool outOfRange = false;
163 for (unsigned itarget = 0; itarget < target.size(); ++itarget) {
164 if (fabs(target[itarget]) > 1.) {
165 outOfRange = true;
166 target[itarget] /= fabs(target[itarget]);
167 }
168 }
169 if (!m_neuroParameters.rescaleTarget && outOfRange) continue;
170 if (m_nPrepare == 0 || m_trainSets_prepare[isector].getTrackCounter() < m_nPrepare) {
171 // get relative ids for all hits related to the MCParticle / RecoTrack
172 // and count them to find relevant id range
173 // using only related hits suppresses background EXCEPT for curling tracks
175 RecoTrack* recoTrack =
176 m_tracks[itrack]->getRelatedTo<RecoTrack>(m_targetCollectionName);
177 for (const CDCTriggerSegmentHit& hit :
178 recoTrack->getRelationsTo<CDCTriggerSegmentHit>(m_hitCollectionName)) {
179 // get relative id
180 double relId = m_NeuroTrigger.getRelId(hit);
181 m_trainSets_prepare[isector].addHit(hit.getISuperLayer(), round(relId));
182 }
183 } else {
184 MCParticle* mcTrack =
185 m_tracks[itrack]->getRelatedTo<MCParticle>(m_targetCollectionName);
186 for (const CDCTriggerSegmentHit& hit :
187 mcTrack->getRelationsTo<CDCTriggerSegmentHit>(m_hitCollectionName)) {
188 // get relative id
189 double relId = m_NeuroTrigger.getRelId(hit);
190 m_trainSets_prepare[isector].addHit(hit.getISuperLayer(), round(relId));
191 }
192 }
193 m_trainSets_prepare[isector].countTrack();
194 }
195 }
196 }
197 bool stop = true;
198 for (unsigned isector = 0; isector < m_trainSets_prepare.size(); ++isector) {
199 if (m_nPrepare == 0 || m_trainSets_prepare[isector].getTrackCounter() < m_nPrepare) {
200 stop = false;
201 break;
202 }
203 }
204 if (stop) {
205 B2INFO("Training sample preparation for NeuroTrigger finished, stopping event loop.");
206 // if required hit number is reached, get relevant ids
207 StoreObjPtr<EventMetaData> eventMetaData;
208 eventMetaData->setEndOfData();
209 }
210 }
NeuroTriggerParameters m_neuroParameters
Parameters for the NeuroTrigger.
NeuroTrigger m_NeuroTrigger
Instance of the NeuroTrigger.
StoreArray< CDCTriggerTrack > m_tracks
List of input tracks.
std::vector< CDCTriggerMLPData > m_trainSets_prepare
dataset for all idhist prepare data
double getRelId(const CDCTriggerSegmentHit &hit)
Calculate phi position of a hit relative to 2D track (scaled to number of wires).

◆ event() [3/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 360 of file TRGCDCModule.cc.

361 {
362 // initialize returnValue
364
365 //...CDC trigger simulation...
366 _cdc->update();
367 _cdc->simulate();
368
369 // save the results to DataStore
373
374 // Set return value
375 int returnValue = _cdc->getReturnValue();
376 int mask = 0;
377 for (vector<string>::iterator it = _returnValueModuleNames.begin(); it != _returnValueModuleNames.end(); ++it) {
378 string const& moduleName = *it;
379 if (moduleName == "TSF") mask |= TRGCDC::EReturnValueType::TSF;
380 else if (moduleName == "ETF") mask |= TRGCDC::EReturnValueType::ETF;
381 else if (moduleName == "find2D") mask |= TRGCDC::EReturnValueType::find2D;
382 else if (moduleName == "fit2D") mask |= TRGCDC::EReturnValueType::fit2D;
383 else if (moduleName == "find3D") mask |= TRGCDC::EReturnValueType::find3D;
384 else if (moduleName == "fit3D") mask |= TRGCDC::EReturnValueType::fit3D;
385 }
386 if (mask != 0) returnValue &= mask;
387 setReturnValue(returnValue);
388 }
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
std::string m_3DfitterCollectionName
Name of the StoreArray holding the tracks made by the 3D fitter.
Definition: TRGCDCModule.h:209
std::string m_2DfinderCollectionName
Name of the StoreArray holding the tracks made by the 2D finder.
Definition: TRGCDCModule.h:205
TRGCDC * _cdc
A pointer to a TRGCDC;.
Definition: TRGCDCModule.h:214
std::string m_2DfitterCollectionName
Name of the StoreArray holding the tracks made by the 2D fitter.
Definition: TRGCDCModule.h:207
std::vector< std::string > _returnValueModuleNames
returnValue module's name. Can be ["", "TSF", "ETF", "find2D", "fit2D", "find3D", "fit3D"]....
Definition: TRGCDCModule.h:71
void setReturnValue(EReturnValueType const &moduleName, bool flag)
sets return value for trg cdc module.
Definition: TRGCDC.cc:2748
int getReturnValue(void) const
gets return value for trg cdc module.
Definition: TRGCDC.h:1098
void update()
updates TRGCDC wire information. clear() is called in this function.
Definition: TRGCDC.cc:984
void simulate(void)
fast trigger simulation.
Definition: TRGCDC.cc:2049
void storeSimulationResults(std::string collection2Dfinder, std::string collection2Dfitter, std::string collection3Dfitter)
Save results of fast simulation to data store (segment hits & tracks).
Definition: TRGCDC.cc:2248

◆ event() [4/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 135 of file TRGCDCTSStreamModule.cc.

136 {
137
138 //...To dump wire hits...
139 if (TRGDebug::level())
140 _cdc->dump("trgWireCentralHits");
141
142 if (_out) {
143 unsigned val = TRGBSRecord_BeginEvent;
144 _out->write((char*) & val, 4);
145 val = 0;
146 _out->write((char*) & val, 4);
147 }
148
149 //...Clock loop (from 0 to 99 cycles, about 800 ns)...
150 for (unsigned c = 0; c < 100; c++) {
151
152 if (_out) {
153 unsigned val = TRGBSRecord_Clock;
154 _out->write((char*) & val, 4);
155 val = 32;
156 _out->write((char*) & val, 4);
157 val = c;
158 _out->write((char*) & val, 4);
159 }
160
161 //...Super layer loop...
162 for (unsigned l = 0; l < 9; l++) {
163
164 //...Bit stream for this super layer...
165 TRGBitStream stream;
166
167 //...Wire loop...
168 for (unsigned i = 0; i < _wires[l].size(); i++) {
169 const TRGSignal& s = _wires[l][i]->signal();
170 bool hit = s.state(c);
171 stream.append(hit);
172 }
173
174 if (_out) {
175 unsigned val = TRGBSRecord_SegmentSL0;
176 val += l;
177 _out->write((char*) & val, 4);
178 val = stream.size();
179 _out->write((char*) & val, 4);
180 for (unsigned i = 0; i < stream.sizeInChar(); i++) {
181 char cs = stream.c(i);
182 _out->write(& cs, 1);
183 }
184 }
185
186 if (TRGDebug::level()) {
187 cout << "Super layer " << l << ", clock " << c << endl;
188 stream.dump();
189 }
190 }
191 }
192
193 if (_out) {
194 unsigned val = TRGBSRecord_EndEvent;
195 _out->write((char*) & val, 4);
196 val = 0;
197 _out->write((char*) & val, 4);
198 }
199
200 }
void dump(const std::string &message) const
dumps debug information.
Definition: TRGCDC.cc:767

◆ event() [5/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 149 of file TRGECLFAMModule.cc.

150 {
151
152 B2DEBUG(200, "TRGECLFAMMoudle ... event called");
153 //
154 //
155 if (m_nEvent < 1e2) {if (m_nEvent % 10 == 0) {B2DEBUG(200, "TRGECLFAMModule::event> evtno= " << m_nEvent);}}
156 else if (m_nEvent < 1e3) {if (m_nEvent % 100 == 0) {B2DEBUG(200, "TRGECLFAMModule::event> evtno= " << m_nEvent);}}
157 else if (m_nEvent < 1e4) {if (m_nEvent % 1000 == 0) {B2DEBUG(200, "TRGECLFAMModule::event> evtno= " << m_nEvent);}}
158 else if (m_nEvent < 1e5) {if (m_nEvent % 10000 == 0) {B2DEBUG(200, "TRGECLFAMModule::event> evtno= " << m_nEvent);}}
159 else if (m_nEvent < 1e6) {if (m_nEvent % 100000 == 0) {B2DEBUG(200, "TRGECLFAMModule::event> evtno= " << m_nEvent);}}
160
161
162 //
163 //
164 //
165 // FAM Digitizer
166 TrgEclDigitizer* obj_trgeclDigi = new TrgEclDigitizer();
167 obj_trgeclDigi->setWaveform(_waveform);
168 obj_trgeclDigi->setFADC(_FADC);
169 obj_trgeclDigi->setup(m_SourceOfTC);
170 if (_famMethod == 1 || _famMethod == 2) {
171 // no-fit method = backup method 1
172 obj_trgeclDigi->digitization01(TCDigiE, TCDigiT);
173 } else if (_famMethod == 3) {
174 // orignal method = backup method 2
175 obj_trgeclDigi->digitization02(TCDigiE, TCDigiT);
176 }
177 obj_trgeclDigi-> save(m_nEvent);
178
179
180 // FAM Fitter
181 TrgEclFAMFit* obj_trgeclfit = new TrgEclFAMFit();
182 obj_trgeclfit-> SetBeamBkgTagFlag(_beambkgtag);
183 obj_trgeclfit-> SetAnaTagFlag(_famana);
184 obj_trgeclfit-> setup(m_nEvent);
185 obj_trgeclfit-> SetThreshold(Threshold);
186
187 if (_famMethod == 1) {obj_trgeclfit-> FAMFit01(TCDigiE, TCDigiT); } // fitting method
188 else if (_famMethod == 2) {obj_trgeclfit-> FAMFit02(TCDigiE, TCDigiT); } // no-fit method = backup method 1
189 else if (_famMethod == 3) { obj_trgeclfit-> FAMFit03(TCDigiE, TCDigiT); } // orignal method = backup method 2
190 obj_trgeclfit-> save(m_nEvent);
191
192
193 // Count number of trigger cells in each ECL region for EventLevelClusteringInfo
194 uint16_t nTCsPerRegion[3] = {};
195 const double absTimeRequirement = 9999.; // Selection on time to reproduce data
196 const int firstBarrelId = 81; // First TCId in the barrel
197 const int lastBarrelId = 512; // Last TCId in the barrel
198 for (auto& trgeclhit : m_TRGECLHit) {
199 const int tcId = trgeclhit.getTCId();
200 const double tcTime = trgeclhit.getTimeAve();
201 if (std::abs(tcTime) < absTimeRequirement) {
202 if (tcId < firstBarrelId) {
203 nTCsPerRegion[0]++;
204 } else if (tcId > lastBarrelId) {
205 nTCsPerRegion[2]++;
206 } else {
207 nTCsPerRegion[1]++;
208 }
209 }
210 }
211
212 // Store
214 m_eventLevelClusteringInfo->setNECLTriggerCellsFWD(nTCsPerRegion[0]);
215 m_eventLevelClusteringInfo->setNECLTriggerCellsBarrel(nTCsPerRegion[1]);
216 m_eventLevelClusteringInfo->setNECLTriggerCellsBWD(nTCsPerRegion[2]);
217
218
219 //
220 //
221 //
222 m_nEvent++;
223 delete obj_trgeclDigi;
224 delete obj_trgeclfit;
225 //
226 //
227 //
228 }
int _FADC
Set Shaping Function.
int m_SourceOfTC
Set source of TC data (1:=ECLHit or 2:=ECLSimHit or 3:=ECLHit+TRGECLBGTCHit)
int _famana
save FAM ana table
std::vector< std::vector< double > > TCDigiT
Digitized TC T [ns].
int _beambkgtag
save Beam background tag in TRGECLHit table
std::vector< std::vector< double > > TCDigiE
Digitized TC E [GeV].
int m_nEvent
Event number.
StoreArray< TRGECLHit > m_TRGECLHit
output for TRGECLHit
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
EventLevelClusteringInfo.

◆ event() [6/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 363 of file TRGECLModule.cc.

364 {
365
366 if (TRGDebug::level()) {
367 std::cout << "TRGECLMoudle ... event called" << std::endl;
368 }
369 //
370 // simulation
371 //
372 TrgEclMaster* _ecl = new TrgEclMaster();
373
374 _ecl->initialize(m_nEvent);
375 _ecl->setClusterMethod(_Clustering);
376 _ecl->setClusterLimit(_ClusterLimit);
377 _ecl->setBhabhaMethod(_Bhabha);
378 _ecl->setEventTimingMethod(_EventTiming);
379 _ecl->setTimeWindow(_TimeWindow);
380 _ecl->setOverlapWindow(_OverlapWindow);
381 _ecl->setNofTopTC(_NofTopTC);
382 _ecl->set2DBhabhaThreshold(_2DBhabhaThresholdFWD, _2DBhabhaThresholdBWD);
383 _ecl->set3DBhabhaSelectionThreshold(_3DBhabhaSelectionThreshold);
384 _ecl->set3DBhabhaVetoThreshold(_3DBhabhaVetoThreshold);
385 _ecl->set3DBhabhaSelectionAngle(_3DBhabhaSelectionAngle);
386 _ecl->set3DBhabhaVetoAngle(_3DBhabhaVetoAngle);
387 _ecl->setmumuThreshold(_mumuThreshold);
388 _ecl->setmumuAngle(_mumuAngle);
389 _ecl->set3DBhabhaAddAngleCut(m_3DBhabhaAddAngleCut);
390 _ecl->setTaub2bAngleCut(m_taub2bAngleCut);
391 _ecl->setTaub2bEtotCut(m_taub2bEtotCut);
392 _ecl->setTaub2bClusterECut(m_taub2bClusterECut1,
394 _ecl->setTaub2b2Cut(m_taub2b2AngleCut,
398 _ecl->setTaub2b3Cut(m_taub2b3AngleCut,
403 _ecl->setTotalEnergyThreshold(_TotalEnergy);
404 _ecl->setLowMultiplicityThreshold(_LowMultiThreshold);
405 _ecl->setn300MeVClusterThreshold(_n300MeVCluster);
406 _ecl->setECLBurstThreshold(_ECLBurstThreshold);
407 _ecl->set3DBhabhaVetoInTrackThetaRegion(m_3DBhabhaVetoInTrackThetaRegion);
408 _ecl->setEventTimingQualityThresholds(m_EventTimingQualityThresholds);
409
410 if (_SelectEvent == 0) {
411 _ecl->simulate01(m_nEvent);
412 } else if (_SelectEvent == 1) {
413 _ecl->simulate02(m_nEvent);
414 }
415 // printf("TRGECLModule> eventId = %d \n", m_nEvent);
416 //
417 //
418 m_nEvent++;
419 //
420 //
421 //
422 delete _ecl;
423 }
int _Clustering
Clustering option.
Definition: TRGECLModule.h:94
double _ECLBurstThreshold
ECL Burst Bit Threshold.
Definition: TRGECLModule.h:130
int _ClusterLimit
Cluster Limit.
Definition: TRGECLModule.h:96
int _n300MeVCluster
The number of Cluster exceeding 300 MeV.
Definition: TRGECLModule.h:128
int _SelectEvent
Event selection.
Definition: TRGECLModule.h:106
double _TimeWindow
Trigger decision time window.
Definition: TRGECLModule.h:100
int m_nEvent
Event number.
Definition: TRGECLModule.h:90
int _EventTiming
Eventtiming option.
Definition: TRGECLModule.h:98
int _Bhabha
Bhabha option.
Definition: TRGECLModule.h:92
double _OverlapWindow
Trigger decision overlap window in oder to avoid boundary effect.
Definition: TRGECLModule.h:102

◆ event() [7/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 111 of file TRGECLBGTCHitModule.cc.

112 {
113 B2DEBUG(200, "TRGECLBGTCHitMoudle ... event called");
114
115 if (m_eclHits.getEntries() > 0) {
117 } else if (m_trgeclUnpackerStores.getEntries() > 0) {
118 genRandomTrgObj();
119 }
120 }

◆ event() [8/11]

void event ( void  )
overridevirtual

Event.

Reimplemented from Module.

Definition at line 142 of file TRGECLQAMModule.cc.

143 {
144
145 B2DEBUG(200, "TRGECLFAMMoudle ... event called");
146
147
148
149 //QAM ECL Hit Map
150
151 // StoreArray<TRGECLUnpackerStore> m_TRGECLUnpackerStore;
152 for (int ii = 0; ii < m_TRGECLUnpackerStore.getEntries(); ii++) {
153 TRGECLUnpackerStore* m_TRGECLUnpacker = m_TRGECLUnpackerStore[ii];
154
155
156 int TCId = (m_TRGECLUnpacker->getTCId());
157 int HitEnergy = (m_TRGECLUnpacker->getTCEnergy());
158
159 m_etot += HitEnergy;
160 if (TCId < 1 || TCId > 576 || HitEnergy == 0) {continue;}
161 TCID[TCId - 1]++;
162 int Caltime = m_TRGECLUnpacker->getTCCALTime();
163 if (Caltime != 0) {
164 caltime.push_back(Caltime);
165 }
166 }
167
168 etot.push_back(m_etot);
169
170 m_etot = 0;
171
172 //Unpacker EvtStore
173 //for ( int ii = 0; ii < m_TRGECLUnpackerSumStore.getEntries(); ii++){
174 TRGECLUnpackerEvtStore* m_TRGECLUnpackerEvt = m_TRGECLUnpackerEvtStore[0];
175
176 if (m_TRGECLUnpackerEvt->get3DBhabhaS() == 1) {
177 //Cluster Energy 2D Check
178 const int* clE = m_TRGECLUnpackerEvt->getCLEnergy();
179
180 int clER[6] = {0};
181
182 for (int i = 0; i < 6; i++) {
183 clER[i] = clE[i];
184 }
185
186 sort(clER, clER + 6);
187
188 clusterE = clER[5] + clER[4]; // Ecl1+Ecl2
189 cluster.push_back(clusterE);
190 }
191
192 StoreObjPtr<EventMetaData> bevt;
193 m_nRun = bevt->getRun();
194 m_nevent++;
195
196 }
StoreArray< TRGECLUnpackerEvtStore > m_TRGECLUnpackerEvtStore
ECL Trigger Unpacker Event output.
StoreArray< TRGECLUnpackerStore > m_TRGECLUnpackerStore
ECL Trigger Unpacker TC output.
int clusterE
Cluster Energy.
int m_etot
Total Energy.

◆ event() [9/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 110 of file TRGECLRawdataAnalysisModule.cc.

111 {
112
113 if (TRGDebug::level()) {
114 std::cout << "TRGECLMoudle ... event called" << std::endl;
115 }
116
117 std::vector<int> TCId;
118 std::vector<double> TCTiming;
119 std::vector<double> TCEnergy;
120
121 TCId.clear();
122 TCTiming.clear();
123 TCEnergy.clear();
124
125 int HitRevoFAM = 0;
126 int HitFineTime = 0;
127
128
129 //
130 StoreArray<TRGECLUnpackerStore> trgeclUnpackerStoreArray;
131 for (int ii = 0; ii < trgeclUnpackerStoreArray.getEntries(); ii++) {
132
133 TRGECLUnpackerStore* TCHit = trgeclUnpackerStoreArray[ii];
134 int iTCID = (TCHit->getTCId() - 1);
135 int HitTiming = TCHit ->getTCTime();
136 int HitEnergy = TCHit -> getTCEnergy();
137 HitRevoFAM = TCHit -> getRevoFAM();
138 HitFineTime = TCHit -> getTCTime();
139
140 if (iTCID == -1) {continue;}
141
142 TCId.push_back(iTCID + 1);
143 TCTiming.push_back(HitTiming);
144 TCEnergy.push_back(HitEnergy);
145
146
147
148 }
149 TrgEclCluster obj_cluster;
150 if (TCId.size() > 0) {
151
152 obj_cluster.setClusteringMethod(_Clustering);
153 obj_cluster.setEventId(m_nEvent);
154 obj_cluster.setICN(TCId, TCEnergy, TCTiming); // Make Cluster
155 obj_cluster.save(m_nEvent); // Save Clusters to TRGECLCluster
156
157 }
158
159 int Timing = ((HitFineTime >> 3) & 0xF) + ((HitRevoFAM & 0x7F) << 4);
160
161 m_hitNum = 0;
162 StoreArray<TRGECLTiming> TimingArray;
163 TimingArray.appendNew();
164 m_hitNum = TimingArray.getEntries() - 1;
165 TimingArray[m_hitNum]->setEventId(m_nEvent);
166 TimingArray[m_hitNum]->setTiming(Timing);
167
168
169 //
170
171 //
172 //
173 m_nEvent++;
174 //
175 //
176 //
177
178
179 }
int m_hitNum
The current number of created hits in an event.

◆ event() [10/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from HistoModule.

Definition at line 185 of file TRGGDLModule.cc.

186 {
187
188 if (_debugLevel > 9) printf("TRGGDLModule::event() starts.\n");
189
190 newDir->cd();
191
192 //...GDL simulation...
193 _gdl->update(true);
194 _gdl->simulate();
195 _gdl->accumulateInp(h_inp);
196 _gdl->accumulateFtd(h_ftd);
197 _gdl->accumulatePsn(h_psn);
198
199 //StoreObjPtr<TRGSummary> m_TRGSummary; /**< output for TRGSummary */
200 bool result_summary = false;
201 if (m_TRGSummary) {
202 result_summary = m_TRGSummary->test();
203 } else {
204 B2WARNING("TRGGDLModule.cc: TRGSummary not found. Check it!!!!");
205 }
206 setReturnValue(result_summary);
207
208 oldDir->cd();
209 }
void accumulatePsn(TH1I *)
Accumulate bit info in histogram.
Definition: TRGGDL.cc:994
void accumulateFtd(TH1I *)
Accumulate bit info in histogram.
Definition: TRGGDL.cc:986
void update(bool mcAnalysis=true)
updates TRGGDL information.
Definition: TRGGDL.cc:209
void accumulateInp(TH1I *)
Accumulate bit info in histogram.
Definition: TRGGDL.cc:978

◆ event() [11/11]

void event ( void  )
overridevirtual

Called event by event.

Reimplemented from Module.

Definition at line 110 of file TRGGRLModule.cc.

111 {
112
113 //...GRL simulation...
114 _grl->update(true);
115 _grl->simulate();
116
117 }

◆ genRandomTrgObj()

void genRandomTrgObj ( )
private

Definition at line 181 of file TRGECLBGTCHitModule.cc.

182 {
183
184 for (const TRGECLUnpackerStore& ttt : m_trgeclUnpackerStores) {
185 int tcID = ttt.getTCId();
186 // TC energy(ADC)
187 double tcEnergyADC = (double) ttt.getTCEnergy();
188 // TC timing(ns)
189 double tcTime = (double) ttt.getTCTime();
190 if (tcID <= 0) {continue;}
191 // ADC to Energy(MeV) conversion
192 double adc2energy = 5.231;
193 // TC energy (GeV)
194 double tcEnergy = tcEnergyADC * (adc2energy / 1000);
195 // TC energy cut to reduce object size
196 if (tcEnergy < m_TCEnergyCut) { continue; }
197 // TC timing cut to reduce object size
198 if (tcTime < m_TCTimingCutLow || tcTime > m_TCTimingCutHigh) { continue; }
199 // store data
200 m_trgeclBGTCHits.appendNew(tcID,
201 tcEnergy,
202 tcTime);
203 }
204 }

◆ genSimulationObj()

void genSimulationObj ( )
private

Parameters.

Definition at line 141 of file TRGECLBGTCHitModule.cc.

142 {
143
144 struct hit_t { double e, t; };
145 map<int, hit_t> a;
146
147 for (const ECLHit& t : m_eclHits) {
148 double txtal = t.getTimeAve();
149 // timing cut, +-8ns, (almost) same as ECL in SensitiveDetector.cc
150 if (txtal >= 8000.0 || txtal < -8000.0) continue;
151 double edep = t.getEnergyDep();
152 int TimeIndex = (txtal + 8000.0) * (1. / 100);
153 int cellId = t.getCellId() - 1;
154 int iTCIdm = m_TCMap->getTCIdFromXtalId(cellId + 1) - 1;
155
156 int key = iTCIdm * 160 + TimeIndex;
157 hit_t& h = a[key];
158 double old_edep = h.e, old_txtal = h.t;
159 double new_edep = old_edep + edep;
160 h.e = new_edep;
161 h.t = (old_edep * old_txtal + edep * txtal) / new_edep;
162 }
163 // save TC data to dataobject
164 for (pair<int, hit_t> t : a) {
165 int key = t.first;
166 int tcid = key / 160;
167 const hit_t& h = t.second;
168 // TC energy cut to reduce object size
169 if (h.e < m_TCEnergyCut) { continue; }
170 // TC timing cut to reduce object size
171 if (h.t < m_TCTimingCutLow || h.t > m_TCTimingCutHigh) { continue; }
172 // store data
173 m_trgeclBGTCHits.appendNew(tcid + 1, h.e, h.t);
174 }
175
176 }
int getTCIdFromXtalId(int)
get [TC ID] from [Xtal ID]

◆ get_BKLM_back_to_back_flag()

int get_BKLM_back_to_back_flag ( int  subdetector)

Definition at line 157 of file KLM_Trig.cc.

158 {
159 for (const auto& e : m_summary1) {
160 if (e.subdetector == subdetector) {
161 return e.back2back;
162 }
163 }
164 return 0;
165 }

◆ get_index()

constexpr int64_t get_index ( const T &  e,
int  track_id = 0 
)
constexpr

Definition at line 43 of file klm_trig_linear_fit.cc.

44 {
45 int64_t ret = 0;
46 int64_t shift = 0;
47 bitshift(ret, shift, track_id, 5);
48 bitshift(ret, shift, e.layer, 6);
49 bitshift(ret, shift, e.plane, 2);
50 bitshift(ret, shift, e.sector, 6);
51 bitshift(ret, shift, e.section, 3);
52 bitshift(ret, shift, e.subdetector, 3);
53
54
55 return ret;
56 };

◆ get_n_sections_trig()

int get_n_sections_trig ( int  subdetector)

Definition at line 137 of file KLM_Trig.cc.

138 {
139 for (const auto& e : m_summary1) {
140 if (e.subdetector == subdetector) {
141 return e.n_sections_trig;
142 }
143 }
144 return 0;
145 }

◆ get_result()

const KLM_trig_linear_fits & get_result ( ) const

Definition at line 275 of file klm_trig_linear_fit.cc.

276 {
277 return m_linear_fits;
278 }

◆ get_triggermask() [1/2]

int get_triggermask ( int  subdetector,
int  section 
)

Definition at line 147 of file KLM_Trig.cc.

148 {
149 for (const auto& e : m_sections_trig) {
150 if (e.subdetector == subdetector && e.section == section) {
151 return e.sector_mask;
152 }
153 }
154 return 0;
155 }

◆ get_triggermask() [2/2]

int get_triggermask ( int  subdetector,
int  section 
)

Definition at line 282 of file klm_trig_linear_fit.cc.

283 {
284 for (const auto& e : m_sections_trig) {
285 if (e.subdetector == subdetector && e.section == section) {
286 return e.sector_mask;
287 }
288 }
289 return 0;
290 }

◆ get_triggermask_or()

int get_triggermask_or ( int  subdetector,
int  section 
)

Definition at line 292 of file klm_trig_linear_fit.cc.

293 {
294 for (const auto& e : m_sections_trig) {
295 if (e.subdetector == subdetector && e.section == section) {
296 return e.sector_mask_or;
297 }
298 }
299 return 0;
300 }

◆ initialize() [1/11]

void initialize ( void  )
overridevirtual

Initialize the module.

Initialize the networks and register datastore objects.

Reimplemented from Module.

Definition at line 83 of file CDCTriggerNeuroDataModule.cc.

84 {
85 // register store objects
87 // decided wether to load mcparticles or recotracks as training targets.
88 // This has to be done because the train target values are obtained
89 // for both classes in a different way.
91 StoreArray<RecoTrack> targets(m_targetCollectionName);
92 targets.isRequired(m_targetCollectionName);
93 } else {
94 StoreArray<MCParticle> targets(m_targetCollectionName);
95 targets.isRequired(m_targetCollectionName);
96 }
97 // initialize the neurotrigger object, but use the parameters given in the module
98 if (m_configFileName != "") {
101 } else {
102 B2ERROR("The Neurotrigger needs to be initialized by a configuration file! Make sure to give the configuration file as a parameter.");
103 }
104 // in this version, we first need an idhistfile in prior to collect the training data.
105 // this idhistfile is created by running another steering file before
106 // and stored in the config file loaded in the previous step.
107 m_trainSet.clear();
108 CDC::CDCGeometryPar& cdc = CDC::CDCGeometryPar::Instance();
109 // create an empty dataset of training data for each expert network
110 for (unsigned iMLP = 0; iMLP < m_NeuroTrigger.nSectors(); ++iMLP) {
111 m_trainSet.push_back(CDCTriggerMLPData());
112 int layerId = 3;
113 for (int iSL = 0; iSL < 9; ++iSL) {
114 m_trainSet[iMLP].addCounters(cdc.nWiresInLayer(layerId));
115 layerId += (iSL > 0 ? 6 : 7);
116 }
117 }
118 // this one sets up the other root store arrays needed to collect training data
120 // consistency check of training parameters
121 if (m_NeuroTrigger.nSectors() != m_trainSet.size()) {
122 B2ERROR("Number of ID sets (" << m_trainSet.size() << ") should match " <<
123 "number of sectors (" << m_NeuroTrigger.nSectors() << ")");
124 }
125 // overwrite previous file with empty file, in case it already exists
126 std::ofstream gzipfile4(m_filename, std::ios_base::trunc | std::ios_base::binary);
127 boost::iostreams::filtering_ostream outStream;
128 outStream.push(boost::iostreams::gzip_compressor());
129 outStream.push(gzipfile4);
130 CDCTriggerMLPData::NeuroSet<27, 2> sample;
131 outStream << sample.headline << std::endl;
132 }
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
void loadconfigtxt(const std::string &filename)
load the configuration from a file
void initialize(const Parameters &p)
Set parameters and get some network independent parameters.
void initializeCollections(std::string hitCollectionName, std::string eventTimeName, const std::string &et_option)
set the hit collection and event time to required and store the hit collection name
unsigned nSectors() const
return number of neural networks
Definition: NeuroTrigger.h:164
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.

◆ initialize() [2/11]

void initialize ( void  )
overridevirtual

Initialize the module.

Initialize the networks and register datastore objects.

First Initialize the neurotrigger object, which is needed because of the original structure of the training procedure in the old module. Second, the dataset for the idhist data will be initialized and set up.

Reimplemented from Module.

Definition at line 70 of file CDCTriggerNeuroIDHistModule.cc.

71 {
77 if (m_configFileName != "") {
80 } else {
81 m_neuroParameters.saveconfigtxt("neuroconfig_example.conf");
82 B2ERROR("Configuration file is missing! Make sure to give the configuration file as a parameter. \
83 An example file neuroconfig_example.conf has been saved.");
84 }
85 m_trainSets_prepare.clear();
86 CDC::CDCGeometryPar& cdc = CDC::CDCGeometryPar::Instance();
87 for (unsigned iMLP = 0; iMLP < m_NeuroTrigger.nSectors(); ++iMLP) {
88 // sectors means experts here; this is the old naming within the neurotrigger
89 // class which originates from times were we had different expert networks for
90 // different geometrical sectors. In future, this might come back because of
91 // the 3DFinder and its rough information about the theta angle of the tracks.
92 m_trainSets_prepare.push_back(CDCTriggerMLPData());
93 // layerid is the layer number where the priority hits are.
94 // for every 1st priority wire there is a corresponding track segment.
95 int layerId = 3;
96 for (int iSL = 0; iSL < 9; ++iSL) {
97
98 m_trainSets_prepare[iMLP].addCounters(cdc.nWiresInLayer(layerId));
99 // the first superlayer has 2 layers extra compared to the rest
100 layerId += (iSL > 0 ? 6 : 7);
101 }
104 StoreArray<RecoTrack> targets(m_targetCollectionName);
105 targets.isRequired(m_targetCollectionName);
106 } else {
107 StoreArray<MCParticle> targets(m_targetCollectionName);
108 targets.isRequired(m_targetCollectionName);
109 }
110
111 m_NeuroTrigger.initializeCollections(m_hitCollectionName);
112
113
114
115
116 }
117 if (m_NeuroTrigger.nSectors() == 0) {
118 B2ERROR("No networks defined, please make sure to have a proper configuration file! Example file will be created here: ./neurotrigger_default.conf");
119 m_neuroParameters.saveconfigtxt("neurotrigger_default.conf");
120 }
121 }
void saveconfigtxt(const std::string &filename)
save the configuration to a file

◆ initialize() [3/11]

void initialize ( void  )
overridevirtual

Initilizes TRGCDCModule.

Reimplemented from Module.

Definition at line 257 of file TRGCDCModule.cc.

258 {
259
260 //...Stop curl buck...
261 if (_curlBackStop) {
262 G4RunManager* g4rm = G4RunManager::GetRunManager();
263 if (g4rm != 0) {
264 if (g4rm->GetUserPhysicsList() != 0) {
265 _sa = new TCSAction();
266 g4rm->SetUserAction(_sa);
267 }
268 }
269 }
271
272 if (TRGDebug::level()) {
273 cout << "TRGCDCModule::initialize ... options" << endl;
274 cout << TRGDebug::tab(4) << "debug level = " << TRGDebug::level()
275 << endl;
276 cout << TRGDebug::tab(4) << "back stop = " << _curlBackStop << endl;
277 cout << TRGDebug::tab(4) << "2D finder perfect = " << _perfect2DFinder
278 << endl;
279 cout << TRGDebug::tab(4) << "Hough finder Min. Peak = "
281 << endl;
282 }
283
284 // register DataStore elements
285 StoreArray<CDCTriggerSegmentHit> segmentHits;
286 segmentHits.registerInDataStore();
287 StoreArray<CDCHit> cdcHits(m_inputCollectionName);
288 cdcHits.isRequired();
289 StoreArray<MCParticle> mcparticles;
290 segmentHits.registerRelationTo(cdcHits);
291 mcparticles.registerRelationTo(segmentHits);
292 // register tracks only for full simulation (not for TSF simulation)
293 if (!(_fastSimulationMode & 1)) {
294 StoreArray<CDCTriggerTrack> tracks2Dfinder(m_2DfinderCollectionName);
295 StoreArray<CDCTriggerTrack> tracks2Dfitter(m_2DfitterCollectionName);
296 StoreArray<CDCTriggerTrack> tracks3Dfitter(m_3DfitterCollectionName);
297 tracks2Dfinder.registerInDataStore(m_2DfinderCollectionName);
298 tracks2Dfitter.registerInDataStore(m_2DfitterCollectionName);
299 tracks3Dfitter.registerInDataStore(m_3DfitterCollectionName);
300 tracks2Dfinder.registerRelationTo(segmentHits); // hits related over Hough cell
301 tracks2Dfitter.registerRelationTo(segmentHits); // hits used for the 2D fit
302 tracks3Dfitter.registerRelationTo(segmentHits); // hits used for the 2D and 3D fit
303 tracks2Dfinder.registerRelationTo(tracks2Dfitter);
304 tracks2Dfinder.registerRelationTo(tracks3Dfitter);
305 }
306 StoreObjPtr<TRGTiming> eventTime("CDCTriggerEventTime");
307 eventTime.registerInDataStore("CDCTriggerEventTime");
308
309 //...CDC trigger config. name...
310 static string cfn = _configFilename;
311
312 //...CDC trigger...
313 if ((cfn != _configFilename) || (_cdc == 0)) {
333 _fLRLUT,
338 _fileTSF,
339 _fileETF,
340 _fverETF,
346 cdc.getTdcBinWidth(),
349 }
350 }
The Class for CDC Geometry Parameters.
int _curlBackStop
Curl back stop parameter. 0:do nothing, 1:stop curling. Default is 0.
Definition: TRGCDCModule.h:119
bool _fileFitter3D
Switch for Fitter3D.root file.
Definition: TRGCDCModule.h:194
bool _fFitter3Ds2DFitDrift
Switch to us wire 2D fit or drift 2D fit.
Definition: TRGCDCModule.h:170
bool _fFitter3Ds2DFit
Switch to us 2D fit or Hough finder results.
Definition: TRGCDCModule.h:167
std::string _configFilename
Config. file name.
Definition: TRGCDCModule.h:68
int _trgCDCDataInputMode
Switch for TRG CDC input mode.
Definition: TRGCDCModule.h:200
std::string _hFinderMappingFilePlus
Hough mapping file for charge plus.
Definition: TRGCDCModule.h:149
int _debugLevel
Debug level.
Definition: TRGCDCModule.h:65
int _finder3DMode
Sets mode of 3DFinder.
Definition: TRGCDCModule.h:191
bool _fXtSimpleFitter3D
Switch for using simple x-t curve or non-linear x-t curve. 0: non-linear 1: simple.
Definition: TRGCDCModule.h:197
std::string _outerTSLUTFilename
The filename of LUT for outer track segments.(tmp)
Definition: TRGCDCModule.h:83
int _simulationMode
Mode for TRGCDC simulation. 0th bit : fast simulation switch, 1st bit : firmware simulation switch.
Definition: TRGCDCModule.h:122
std::string _innerTSLUTFilename
The filename of LUT for the inner-most track segments.(tmp)
Definition: TRGCDCModule.h:80
bool _fLogicLUTTSF
Switch for the Logic/LUT TSF.
Definition: TRGCDCModule.h:158
TRGCDCSteppingAction * _sa
A pointer to a TRGCDCSteppingAction which stops curl backs.
Definition: TRGCDCModule.h:217
int _fverETF
Switch for selecting ETF version.
Definition: TRGCDCModule.h:182
bool _fileHough3D
Switch for Hough3D.root file.
Definition: TRGCDCModule.h:188
bool _fileTSF
Switch for TSF.root file.
Definition: TRGCDCModule.h:176
bool _fileETF
Switch for ETF.root file.
Definition: TRGCDCModule.h:179
std::string _rootTRGCDCFilename
The filename of root file for TRGCDC.
Definition: TRGCDCModule.h:113
int _hFinderPeakMin
Min. peak height for the Hough finder.
Definition: TRGCDCModule.h:146
bool _fprintFirmETF
Switch for printing Firmware inputs for ETF.
Definition: TRGCDCModule.h:185
std::string m_inputCollectionName
Name of the CDCHit StoreArray used as input.
Definition: TRGCDCModule.h:203
bool _fileTRGCDC
Switch for TRGCDC.root file.
Definition: TRGCDCModule.h:137
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
Definition: TRGCDCModule.h:128
bool _perfect2DFinder
Switch to activate perfect 2D finder.
Definition: TRGCDCModule.h:140
double _wireHitInefficiency
Parameter for Hit inefficiency.
Definition: TRGCDCModule.h:173
int _hFinderDoit
Hough finder doit version.
Definition: TRGCDCModule.h:155
int _firmwareSimulationStop
Stop clock for the firmware simultion. (clock=cdcfe)
Definition: TRGCDCModule.h:134
int _firmwareSimulationStart
Start clock for the firmware simultion. (clock=cdcfe)
Definition: TRGCDCModule.h:131
int _fastSimulationMode
Switch for the fast simulation. 0:do everything, 1:stop after the track segment simulation....
Definition: TRGCDCModule.h:125
bool _perfect3DFinder
Switch to activate perfect 3D finder.
Definition: TRGCDCModule.h:143
std::string _rootFitter3DFilename
The filename of root file for Fitter3D.
Definition: TRGCDCModule.h:116
bool _fFitter3Dsmclr
Switch for Fitter3D's MC L/R information.
Definition: TRGCDCModule.h:164
bool _fLRLUT
Switch for the LR LUT in Fitter3D.
Definition: TRGCDCModule.h:161
std::string _hFinderMappingFileMinus
Hough mapping file for charge minus.
Definition: TRGCDCModule.h:152
static std::string tab(void)
returns tab spaces.
Definition: Debug.cc:47

◆ initialize() [4/11]

void initialize ( void  )
overridevirtual

Initilizes TRGCDCTSStreamModule.

Reimplemented from Module.

Definition at line 81 of file TRGCDCTSStreamModule.cc.

82 {
83 if (TRGDebug::level()) {
84 cout << "TRGCDCTSStreamModule::initialize ... options" << endl;
85 cout << TRGDebug::tab(4) << "debug level = " << _debugLevel << endl;
86 cout << TRGDebug::tab(4) << " mode = " << _mode << endl;
87 cout << TRGDebug::tab(4) << "output file = " << _streamFilename << endl;
88 }
89
90 if (_streamFilename != "unknown") {
91 _out = new ofstream(_streamFilename.c_str(), ios::out | ios::binary);
92 unsigned val = TRGBSRecord_Comment;
93 _out->write((char*) & val, 4);
94 const string cmt = "test data ";
95 val = cmt.size() * 8;
96 _out->write((char*) & val, 4);
97 _out->write(cmt.c_str(), cmt.size());
98 }
99 }
int _mode
Mode for streaming data.
std::string _streamFilename
The filename of bit stream.

◆ initialize() [5/11]

void initialize ( void  )
overridevirtual

Initilizes TRGECLFAMModule.

Reimplemented from Module.

Definition at line 101 of file TRGECLFAMModule.cc.

102 {
103
104 B2DEBUG(100, "TRGECLFAMModule::initialize ... options");
105 B2DEBUG(100, "TRGECLFAMModule::initialize> FAM Fit Method = " << _famMethod
106 << " ; Bin of Time Interval = " << _binTimeInterval
107 << " ;output TC waveforml = " << _waveform);
108 if (m_SourceOfTC <= 0 ||
109 m_SourceOfTC >= 4) {
110 B2FATAL("TRGECLFAMModule::initialize> SourceOfTC must be 1 or 2 or 3");
111 }
112
113 m_nRun = 0;
114 m_nEvent = 1;
115
116 m_TRGECLDigi0.registerInDataStore();
117 m_TRGECLWaveform.registerInDataStore();
118 m_TRGECLHit.registerInDataStore();
119 m_TRGECLFAMAna.registerInDataStore();
120 // This object is registered by few packages. Let's be agnostic about the
121 // execution order of the modules: the first package run registers the module
122 m_eventLevelClusteringInfo.isOptional() ? m_eventLevelClusteringInfo.isRequired() :
123 m_eventLevelClusteringInfo.registerInDataStore();
124
125 // m_FAMPara = new DBObjPtr<TRGECLFAMPara>;
126 }
StoreArray< TRGECLFAMAna > m_TRGECLFAMAna
output for TRGECLFAMAna
int _binTimeInterval
Time interval.
StoreArray< TRGECLDigi0 > m_TRGECLDigi0
output for TRGECLDigi0
StoreArray< TRGECLWaveform > m_TRGECLWaveform
output for TRGECLWaveform

◆ initialize() [6/11]

void initialize ( void  )
overridevirtual

Initilizes TRGECLModule.

Reimplemented from Module.

Definition at line 228 of file TRGECLModule.cc.

229 {
230
232
233 if (TRGDebug::level()) {
234 std::cout << "TRGECLModule::initialize ... options" << std::endl;
235 std::cout << TRGDebug::tab(4) << "debug level = " << TRGDebug::level()
236 << std::endl;
237 }
238 //
239 //
240 //
241 m_nRun = 0 ;
242 m_nEvent = 0 ;
243 m_hitNum = 0;
244 m_hitTCNum = 0;
245
246 m_TRGECLHit.registerInDataStore();
247 m_TRGECLTrg.registerInDataStore();
248 m_TRGECLCluster.registerInDataStore();
249
250 }
int _debugLevel
Parameters.
Definition: TRGECLModule.h:62
StoreArray< TRGECLTrg > m_TRGECLTrg
output for TRGECLTrg
Definition: TRGECLModule.h:169
int m_hitNum
The current number of created hits in an event.
Definition: TRGECLModule.h:80
int m_hitTCNum
TC Hit number.
Definition: TRGECLModule.h:82
int m_nRun
Run number.
Definition: TRGECLModule.h:88
StoreArray< TRGECLCluster > m_TRGECLCluster
output for TRGECLCluster
Definition: TRGECLModule.h:171
StoreArray< TRGECLHit > m_TRGECLHit
output for TRGECLHit
Definition: TRGECLModule.h:167

◆ initialize() [7/11]

void initialize ( void  )
overridevirtual

Initilizes TRGECLBGTCHitModule.

Reimplemented from Module.

Definition at line 84 of file TRGECLBGTCHitModule.cc.

85 {
86 B2DEBUG(100, "TRGECLBGTCHitModule::initialize>");
87
88 B2INFO("[TRGECLBGTCHitModule] TCEnergyCut : TC(E) GeV = "
89 << m_TCEnergyCut);
90 B2INFO("[TRGECLBGTCHitModule] TCTimingCutLow : TC(T) ns = "
91 << m_TCTimingCutLow);
92 B2INFO("[TRGECLBGTCHitModule] TCTimingCutHigh : TC(T) ns = "
93 << m_TCTimingCutHigh);
94
95 m_eclHits.registerInDataStore();
96 m_trgeclUnpackerStores.registerInDataStore();
97 m_trgeclBGTCHits.registerInDataStore();
98 }

◆ initialize() [8/11]

void initialize ( void  )
overridevirtual

initialize

Reimplemented from Module.

Definition at line 114 of file TRGECLQAMModule.cc.

115 {
116
117 B2DEBUG(100, "TRGECLQAMModule::initialize ... options");
118
119
120 m_TRGECLUnpackerStore.registerInDataStore();
121 m_TRGECLUnpackerEvtStore.registerInDataStore();
122
123 m_TRGSummary.registerInDataStore();
124 // EvtMeta.registterInDataStore();
125
126
127 }
StoreObjPtr< TRGSummary > m_TRGSummary
Trigger Summary.

◆ initialize() [9/11]

void initialize ( void  )
overridevirtual

Initilizes TRGECLModule.

Reimplemented from Module.

Definition at line 70 of file TRGECLRawdataAnalysisModule.cc.

71 {
72
74
75 if (TRGDebug::level()) {
76 std::cout << "TRGECLRawdataAnalysisModule::initialize ... options" << std::endl;
77 std::cout << TRGDebug::tab(4) << "debug level = " << TRGDebug::level()
78 << std::endl;
79 }
80 //
81 //
82 //
83 m_nRun = 0 ;
84 m_nEvent = 0 ;
85 m_hitNum = 0;
86 m_hitTCNum = 0;
87
88 m_TRGECLUnpackerStore.registerInDataStore();
89 m_TRGECLCluster.registerInDataStore();
90 m_TRGECLTiming.registerInDataStore();
91
92 }
StoreArray< TRGECLCluster > m_TRGECLCluster
output for TRGECLCluster
StoreArray< TRGECLUnpackerStore > m_TRGECLUnpackerStore
output for TRGECLUnpackerStore
StoreArray< TRGECLTiming > m_TRGECLTiming
output for TRGECLTiming

◆ initialize() [10/11]

void initialize ( void  )
overridevirtual

Initilizes TRGGDLModule.

Reimplemented from HistoModule.

Definition at line 126 of file TRGGDLModule.cc.

127 {
128
129 REG_HISTOGRAM
130 defineHisto();
131
132// m_TRGSummary.isRequired();
134
135 B2INFO("TRGGDLModule::initialize. simulationMode=" << _simulationMode);
136 if (_simulationMode != 3) {
137 m_TRGGRLInfo.isRequired("TRGGRLObjects");
138 }
139
141 m_simClockState.isRequired();
142
143 m_TRGSummary.registerInDataStore();
144 }
StoreObjPtr< TRGGRLInfo > m_TRGGRLInfo
< required input for TRGGRLInfo
Definition: TRGGDLModule.h:71
bool m_simulateT0Jitter
if True, L1 jitter is simulated by EventT0Generator
Definition: TRGGDLModule.h:108
StoreObjPtr< SimClockState > m_simClockState
generated hardware clock state
Definition: TRGGDLModule.h:115
virtual void defineHisto() override
Define Histogram.

◆ initialize() [11/11]

void initialize ( void  )
overridevirtual

Initilizes TRGGRLModule.

Reimplemented from Module.

Definition at line 77 of file TRGGRLModule.cc.

78 {
79
80// TRGDebug::level(_debugLevel);
81
82 B2DEBUG(100, "TRGGRLModule::initialize ... options");
83 }

◆ operator==()

bool operator== ( const CDCTriggerHoughCand a,
const CDCTriggerHoughCand b 
)
inline

Two cells are identical if they have the same coordinates.

Definition at line 77 of file CDCTriggerHoughETFModule.h.

78 {
79 return (a.getCoord().first.X() == b.getCoord().first.X() &&
80 a.getCoord().first.Y() == b.getCoord().first.Y());
81 }

◆ run() [1/2]

void run ( const KLM_TRG_definitions::KLM_Digit_compact_ts &  hits)

Definition at line 54 of file KLM_Trig.cc.

55 {
56
57
58 m_sections_trig.clear();
59 m_summary1.clear();
60
61 auto hits1 = nt::algorithms::join_vectors(
62 hits,
63 m_layersUsed,
64 nt::comparators::on_common_args,
65 [&](auto e1, const auto&) {
66 e1.layer = e1.layer * 2 + e1.plane;
67 return e1;
68 }
69 );
70
71 __CSV__WRITE__(hits1);
72
73
74 auto grouped = nt_group(
75 hits1[0].subdetector,
76 hits1[0].section,
77 hits1[0].sector
78 ).apply_append(
79 hits,
80 [](const auto & e1) {
81 auto bit_mask = to_bit_mask<layer>(e1);
82 return nt::ntuple(
83 ax_maker(layer_count) = countBits(bit_mask),
84 ax_maker(layer_mask) = bit_mask
85 );
86 });
87
88
89 __CSV__WRITE__(grouped);
90
91 nt::algorithms::filter(grouped, [&](const auto & e) { return e.layer_count >= m_NlayerTrigger; });
92
93
94
95
96
97 m_sections_trig = nt_group(
98 grouped[0].subdetector,
99 grouped[0].section
100 ).apply_append(
101 grouped,
102 [&](const auto & e1) {
103 auto bit_mask = to_bit_mask<sector>(e1);
104 n_sections_trig nsector = countBits(bit_mask);
105 return nt::ntuple(
106 sector_mask(bit_mask),
107 nsector
108 );
109 }
110 );
111
112 __CSV__WRITE__(m_sections_trig);
113
114
115
116 m_summary1 = nt_group(
117 m_sections_trig[0].subdetector
118 ).apply_append(
119 m_sections_trig,
120 [](const auto & e1) {
121 auto bit_mask = countBits(to_bit_mask<section>(e1));
122 n_sections_trig nsector = nt::algorithms::sum(e1, [](auto&& e) {return e.n_sections_trig; });
123
124 return nt::ntuple(
125 nsector,
126 back2back(bit_mask == 2)
127
128 );
129 }
130 );
131
132 __CSV__WRITE__(m_summary1);
133
134
135 }

◆ run() [2/2]

void run ( const KLM_TRG_definitions::KLM_Digit_compact_ts &  hits)

Definition at line 167 of file klm_trig_linear_fit.cc.

168 {
169
170 __CSV__WRITE__(hits);
171 m_linear_fits.clear();
172
173
174 auto hits_w_geo_fit = nt::algorithms::add_column(
175 hits,
176 [&](const auto & e1) {
177 auto ret = nt::ntuple(
178 Belle2::KLM_TRG_definitions::x_pos(0),
179 Belle2::KLM_TRG_definitions::y_pos(0)
180 );
181
182 auto&& e2 = m_KLMgeomap[get_index(e1)];
183 ret.x_pos.v = e1.layer * e2.slopeX + e2.offsetX;
184 ret.y_pos.v = e1.strip * e2.slopeY + e2.offsetY;
185 return ret;
186
187 }
188 );
189
190
191 __CSV__WRITE__(hits_w_geo_fit);
192 nt::algorithms::sort(hits_w_geo_fit);
193
194
195 auto track_maker_ = track_maker_t{};
196 track_maker_.y_cutoff = y_cutoff;
197
198
199 auto hits_w_geo_fit_w_tracks = nt::algorithms::add_column(
200 hits_w_geo_fit,
201 [&](const auto & e) {
202 return nt::ntuple{
203 track_id(track_maker_(e))
204 };
205
206
207 }
208
209 );
210
211
212 __CSV__WRITE__(hits_w_geo_fit_w_tracks);
213
214
215
216 m_linear_fits = nt_group(
217 hits_w_geo_fit_w_tracks[0].subdetector,
218 hits_w_geo_fit_w_tracks[0].section,
219 hits_w_geo_fit_w_tracks[0].sector,
220 hits_w_geo_fit_w_tracks[0].plane,
221 hits_w_geo_fit_w_tracks[0].track_id
222 ).apply_append(
223 hits_w_geo_fit_w_tracks,
224 Linear_fit_of_Hits
225 );
226 __CSV__WRITE__(m_linear_fits);
227
228
229 nt::algorithms::filter(m_linear_fits, [&](const auto & e) { return std::abs(e.interceptXY) <= m_intercept_cutoff; });
230
231
232 auto m_linear_fits1 = nt_group(
233 m_linear_fits[0].subdetector,
234 m_linear_fits[0].section,
235 m_linear_fits[0].sector
236 ).apply_append(
237 m_linear_fits,
238 [](const auto & es) {
239 bool plane0 = false;
240 bool plane1 = false;
241 for (const auto& e : es) {
242 if (e.plane == 0) { plane0 = true; }
243 if (e.plane == 1) { plane1 = true; }
244 }
245 return nt::ntuple{
246 ax_maker(trigger_or) = (int)(plane0 || plane1),
247 ax_maker(trigger_and) = (int)(plane0 && plane1)
248 };
249 }
250 );
251 __CSV__WRITE__(m_linear_fits1);
252
253 m_sections_trig = nt_group(
254 m_linear_fits1[0].subdetector,
255 m_linear_fits1[0].section
256 ).apply_append(
257 m_linear_fits1,
258 [](const auto & e) {
259 auto ret = nt::ntuple{
260 KLM_TRG_definitions::sector_mask {},
261 KLM_TRG_definitions::sector_mask_or{}
262 };
263 auto trig_and = nt::algorithms::filter_copy(e, [](const auto & x) { return x.trigger_and > 0; });
264 ret.sector_mask.v = Belle2::to_bit_mask< sector >(trig_and);
265 ret.sector_mask_or.v = Belle2::to_bit_mask< sector >(e);
266 return ret;
267
268 }
269 );
270 __CSV__WRITE__(m_sections_trig);
271
272
273 }

◆ set_intercept_cutoff()

void set_intercept_cutoff ( int  cutoff)

Definition at line 307 of file klm_trig_linear_fit.cc.

308 {
309 m_intercept_cutoff = cutoff;
310 }

◆ set_NLayerTrigger()

void set_NLayerTrigger ( int  NlayerTrigger)

Definition at line 49 of file KLM_Trig.cc.

50 {
51 m_NlayerTrigger = NlayerTrigger;
52 }

◆ set_y_cutoff()

void set_y_cutoff ( int  cutoff)

Definition at line 302 of file klm_trig_linear_fit.cc.

303 {
304 y_cutoff = cutoff;
305 }

◆ terminate() [1/11]

void terminate ( void  )
overridevirtual

Do the training for all sectors.

Reimplemented from Module.

Definition at line 287 of file CDCTriggerNeuroDataModule.cc.

288 {
289 std::stringstream ss;
290 for (unsigned int i = 0; i < m_trainSet.size(); ++i) {
291 ss << "expert " << i << " : " << m_trainSet[i].nSamples() << ", ";
292 }
293 // lock the parameters, which were used to obtain the training data, so they cannot be altered in the next steps.
298 for (auto x : m_neuroParameters.maxHitsPerSL) {
299 x.lock();
300 }
301 if (m_writeconfigFileName == "") {
302 B2INFO("write writeconfig now: " + m_configFileName);
304 } else {
305 B2INFO("write writeconfig now: " + m_writeconfigFileName);
307 }
308
309 B2DEBUG(10, "Collected events: " << ss.str());
310 }
void lock()
lock the variable, to make it read only
std::vector< NNTParam< unsigned short > > maxHitsPerSL
Maximum number of hits in a single super layer for all networks.
NNTParam< unsigned > ETOption
Determine, how the event time should be obtained.

◆ terminate() [2/11]

void terminate ( void  )
overridevirtual

Do the training for all sectors.

Reimplemented from Module.

Definition at line 213 of file CDCTriggerNeuroIDHistModule.cc.

214 {
215
216 if (m_neuroParameters.IDRanges.size() > 0) {
217 if (m_neuroParameters.IDRanges[0].size() > 0) {
218 if (m_neuroParameters.IDRanges[0][0].isSet()) {
219 // the idranges are already set, print warning:
220 if (!m_neuroParameters.IDRanges[0][0].isLocked()) {
221 B2WARNING("ID ranges are already set in the config file, they will be updated now!");
222 } else {
223 B2ERROR("The ID ranges in the config file are already locked and cannot be updated!");
224 return;
225 }
226 }
227 }
228 }
230 for (unsigned isector = 0; isector < m_trainSets_prepare.size(); ++isector) {
231 CDCTriggerMLPData::HeaderSet hset(isector, NeuroTrainer::getRelevantID(
232 m_trainSets_prepare[isector],
235 std::vector<NNTParam<float>> expertline;
236 expertline.push_back(float(isector));
237 expertline.back().lock();
238 for (auto x : hset.relID) {
239 expertline.push_back(x);
240 expertline.back().lock();
241 }
242 m_neuroParameters.IDRanges.push_back(expertline);
243 B2DEBUG(15, hset);
244 }
245 // lock the variables used in this module, that are not supposed be changed
246 // further down the training chain because of the danger of implications or
247 // wrong assumptions.
250 // the IDRanges are set here; however, they can be altered manually in the
251 // configuration file to achieve potentially better results, eg. widen
252 // the range of the axial phi acceptance. This is why they are not to be "locked".
256 for (auto x : m_neuroParameters.SLpattern) {
257 x.lock();
258 }
259 for (auto x : m_neuroParameters.SLpatternMask) {
260 x.lock();
261 }
262 for (auto x : m_neuroParameters.maxHitsPerSL) {
263 x.lock();
264 }
266
267 if (m_writeconfigFileName == "") {
269 } else {
271 }
272
273
274 // the *rangeTrain variables are used here, but just for obtaining the idranges.
275 // because they only have a very minor effect on those, they are not locked here.
276 //TODO: also write the config file to be directly able to start the training
277 }
NNTParam< unsigned > nMLP
Number of networks.
std::vector< NNTParam< unsigned long > > SLpatternMask
Super layer pattern mask for which MLP is trained for all networks.
std::vector< NNTParam< unsigned long > > SLpattern
Super layer pattern for which MLP is trained for all networks.
std::vector< std::vector< NNTParam< float > > > IDRanges
relative ID range of the relevant wire IDs of the track segments that are taken into consideration wh...
NNTParam< bool > multiplyHidden
If true, multiply nHidden with number of input nodes.
NNTParam< unsigned > nOutput
number of output nodes
NNTParam< bool > cutSum
only used in the idhist module.
NNTParam< double > relevantCut
only used in the idhist module.
NNTParam< unsigned > nInput
Network parameters.

◆ terminate() [3/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 398 of file TRGCDCModule.cc.

399 {
400
401 _cdc->terminate();
402
403 if (TRGDebug::level())
404 cout << "TRGCDCModule ... terminate called " << endl;
405 }
void terminate(void)
terminates when run is finished
Definition: TRGCDC.cc:739

◆ terminate() [4/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 217 of file TRGCDCTSStreamModule.cc.

218 {
219 if (_out) {
220 _out->flush();
221 _out->close();
222 }
223
224 if (TRGDebug::level())
225 cout << "TRGCDCTSStreamModule ... terminate called " << endl;
226 }

◆ terminate() [5/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 241 of file TRGECLFAMModule.cc.

242 {
243 B2DEBUG(100, "TRGECLFAMModule ... terminate called ");
244 }

◆ terminate() [6/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 438 of file TRGECLModule.cc.

439 {
440 if (TRGDebug::level()) {
441 std::cout << "TRGECLModule ... terminate called " << std::endl;
442 }
443 }

◆ terminate() [7/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 133 of file TRGECLBGTCHitModule.cc.

134 {
135 B2DEBUG(100, "TRGECLBGTCHitModule ... terminate called ");
136 }

◆ terminate() [8/11]

void terminate ( void  )
overridevirtual

terminate

Reimplemented from Module.

Definition at line 410 of file TRGECLQAMModule.cc.

411 {
412 B2DEBUG(100, "TRGECLQAMModule ... terminate called ");
413
414 }

◆ terminate() [9/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 194 of file TRGECLRawdataAnalysisModule.cc.

195 {
196 if (TRGDebug::level()) {
197 std::cout << "TRGECLRawdataAnalysisModule ... terminate called " << std::endl;
198 }
199 }

◆ terminate() [10/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from HistoModule.

Definition at line 218 of file TRGGDLModule.cc.

219 {
220
221 _gdl->terminate();
222
223 B2DEBUG(100, "TRGGDLModule ... terminate called ");
224 }

◆ terminate() [11/11]

void terminate ( void  )
overridevirtual

Called when processing ended.

Reimplemented from Module.

Definition at line 127 of file TRGGRLModule.cc.

128 {
129 _grl->terminate();
130 B2DEBUG(200, "TRGGRLModule ... terminate called ");
131 }

◆ to_bit_mask()

uint64_t to_bit_mask ( const CONTAINER_T &  container)

Definition at line 30 of file bit_operations.h.

31 {
32
33 return std::accumulate(container.begin(), container.end(), uint64_t(0),
34 [](const auto & lhs, const auto & rhs) {
35 const auto bitshift = uint64_t(AXIS_NAME_T::get(rhs));
36 if (bitshift > 32) {
37 throw std::runtime_error("from:\nuint64_t to_bit_mask(const CONTAINER_T& container)\ninput number to large.\n\n");
38 }
39 return lhs | (uint64_t(1) << bitshift);
40 });
41
42
43
44 }

◆ TRGCDCModule()

Constructor.

Definition at line 47 of file TRGCDCModule.cc.

49 _debugLevel(0),
50 _configFilename("TRGCDCConfig.dat"),
51 _innerTSLUTFilename("undefined"),
52 _outerTSLUTFilename("undefined"),
53 _rootTRGCDCFilename("undefined"),
54 _rootFitter3DFilename("undefined"),
60 _firmwareSimulationStop(32 * 32 - 1),
61 _fileTRGCDC(0),
62 _perfect2DFinder(false),
63 _perfect3DFinder(false),
65 _hFinderMappingFilePlus("HoughMappingPlus20160223.dat"),
66 _hFinderMappingFileMinus("HoughMappingMinus20160223.dat"),
67 _hFinderDoit(2),
69 _fLRLUT(1),
74 _fileTSF(0),
75 _fileETF(0),
76 _fverETF(0),
78 _fileHough3D(0),
83 _cdc(0),
84 _sa(0)
85 {
86
87 string desc = "TRGCDCModule(" + version() + ")";
88 setDescription(desc);
90
91 vector<string> emptyvector;
92
93 addParam("DebugLevel", _debugLevel, "TRGCDC debug level", _debugLevel);
94 addParam("ConfigFile",
96 "The filename of CDC trigger config file",
98 addParam("ReturnValueModuleNames", _returnValueModuleNames,
99 "Chooses modules for return value. Can be a list of [TSF, ETF, 2DFind, 2DFit, 3DFind, 3DFit]. If empty list then returnValue will be for all modules.",
100 emptyvector);
101 addParam("InnerTSLUTFile",
103 "The filename of LUT for inner-most track segments",
105 addParam("OuterTSLUTFile",
107 "The filename of LUT for outer track segments",
109 addParam("RootTRGCDCFile",
111 "The filename of root file for TRGCDC",
112 string("TRGCDC.root"));
113 addParam("RootFitter3DFile",
115 "The filename of root file for Fitter3D",
116 string("Fitter3D.root"));
117 addParam("CurlBackStop",
119 "Curl back stop parameter",
121 addParam("SimulationMode",
123 "TRGCDC simulation switch",
125 addParam("FastSimulationMode",
127 "TRGCDC fast simulation mode",
129 addParam("FirmwareSimulationMode",
131 "TRGCDC firmware simulation mode",
133 addParam("FirmwareSimulationStart",
135 "TRGCDC firmware simulation start clock of CDC FE",
137 addParam("FirmwareSimulationStop",
139 "TRGCDC firmware simulation stop clock of CDC FE",
141 addParam("TRGCDCRootFile",
143 "Flag for making TRGCDC.root",
145 addParam("TSFLogicLUT",
147 "Use logic or LUT for TSF",
149 addParam("2DFinderPerfect",
151 "2D finder perfect option",
153 addParam("3DFinderPerfect",
155 "3D finder perfect option",
157 addParam("HoughFinderPeakMin",
159 "Hough finder min. peak height",
161 addParam("HoughFinderMappingFilePlus",
163 "Hough finder cell mapping file for charge plus",
165 addParam("HoughFinderMappingFileMinus",
167 "Hough finder cell mapping file for charge minus",
169 addParam("HoughFinderDoit",
171 "Hough finder doit() version",
173 addParam("Fitter3DsLRLUT",
174 _fLRLUT,
175 "Using L/R LUT in fitter3D",
176 _fLRLUT);
177 addParam("Fitter3DsMcLR",
179 "Using MC L/R information for Fitter3D",
181 addParam("Fitter3Ds2DFit",
183 "Using 1: 2D fit or 0: Hough Finder results for Fitter3D",
185 addParam("Fitter3Ds2DFitDrift",
187 "Using 1: drift 2D fit or 0: wire 2D fit for Fitter3D",
189 addParam("wireHitInefficiency",
191 "wire hit inefficiency",
193 addParam("TSFRootFile",
194 _fileTSF,
195 "Flag for making TSF.root",
196 _fileTSF);
197 addParam("ETFRootFile",
198 _fileETF,
199 "Flag for making ETF.root",
200 _fileETF);
201 addParam("verETF",
202 _fverETF,
203 "Select ETF ver, 0:histogram, 1:old Version, 2:True T0",
204 _fverETF);
205 addParam("printFirmETF",
207 "Flag for printing Firmware inputs for ETF",
209 addParam("Hough3DRootFile",
211 "Flag for making Hough3D.root",
213 addParam("Finder3DMode",
215 "Mode for finder3D",
217 addParam("Fitter3DRootFile",
219 "Flag for making Fitter3D.root",
221 addParam("Fitter3DsXtSimple",
223 "0: Use simple xt curve table. 1: use non-linear xt curve table.",
225 addParam("TRGCDCDataInputMode",
227 "Flag for TRG CDC input mode",
229 addParam("inputCollection", m_inputCollectionName,
230 "Name of the CDCHit StoreArray to be used as input.",
231 string(""));
232 addParam("2DfinderCollection", m_2DfinderCollectionName,
233 "Name of the StoreArray holding the tracks made by the 2D finder.",
234 string("Trg2DFinderTracks"));
235 addParam("2DfitterCollection", m_2DfitterCollectionName,
236 "Name of the StoreArray holding the tracks made by the 2D fitter.",
237 string("Trg2DFitterTracks"));
238 addParam("3DfitterCollection", m_3DfitterCollectionName,
239 "Name of the StoreArray holding the tracks made by the 3D fitter.",
240 string("Trg3DFitterTracks"));
241
242
243 if (TRGDebug::level())
244 cout << "TRGCDCModule ... created" << endl;
245 }
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
std::string version(void) const
returns version of TRGCDCModule.
Definition: TRGCDCModule.cc:42

◆ TRGCDCTSStreamModule()

Constructor.

Definition at line 42 of file TRGCDCTSStreamModule.cc.

44 _debugLevel(0),
45 _mode(0),
46 _streamFilename("unknown"),
47 _cdc(0),
48 _out(0)
49 {
50
51 string desc = "TRGCDCTSStreamModule(" + version() + ")";
52 setDescription(desc);
53
54 addParam("DebugLevel",
56 "TRGCDCTSStream debug level",
58
59 addParam("Mode", _mode, "TRGCDCTSStream mode", _mode);
60
61 addParam("OutputStreamFile",
63 "The filename of bit stream",
65
66 if (TRGDebug::level())
67 cout << "TRGCDCTSStreamModule ... created" << endl;
68 }

◆ TRGECLBGTCHitModule()

Constructor.

Definition at line 41 of file TRGECLBGTCHitModule.cc.

43 m_TCEnergyCut(0.005),
44 m_TCTimingCutLow(-1500),
45 m_TCTimingCutHigh(1500),
46 m_debugLevel(0)
47 {
48 string desc = "TRGECLBGTCHitModule(" + version() + ")";
49 setDescription(desc);
51
52 addParam("TCEnergyCut",
53 m_TCEnergyCut,
54 "TC energy cut: TC(E)<X (GeV), X=",
55 m_TCEnergyCut);
56 addParam("TCTimingCutLow",
57 m_TCTimingCutLow,
58 "TC Timing cut low: TC(T)>X (ns), X=",
59 m_TCTimingCutLow);
60 addParam("TCTimingCutHigh",
61 m_TCTimingCutHigh,
62 "TC Timing cut high: TC(T)<X (ns), X=",
63 m_TCTimingCutHigh);
64 addParam("DebugLevel",
65 m_debugLevel,
66 "TRGECL debug level",
67 m_debugLevel);
68
69 m_TCMap = new TrgEclMapping();
70
71 B2DEBUG(100, "TRGECLBGTCHitModule ... created");
72 }

◆ TRGECLFAMModule()

Constructor.

Definition at line 45 of file TRGECLFAMModule.cc.

47 _debugLevel(0),
48 _famMethod(1),
50 _waveform(0),
51 _beambkgtag(0),
52 _famana(0),
53 _threshold(100.0),
54 _FADC(1),
55 _ConditionDB(0),
57 {
58
59 string desc = "TRGECLFAMModule(" + version() + ")";
60 setDescription(desc);
62
63 addParam("DebugLevel", _debugLevel, "TRGECL debug level", _debugLevel);
64 addParam("FAMFitMethod", _famMethod, "TRGECLFAM fit method", _famMethod);
65 addParam("FAMBinTimeInterval", _binTimeInterval, "TRGECLFAM binTimeInterval",
67 addParam("TCWaveform", _waveform, "Output the TC waveform ",
68 _waveform);
69 addParam("FAMAnaTable", _famana, "Save FAM ana table ",
70 _famana);
71 addParam("BeamBkgTag", _beambkgtag, "Save beambackground tag in TRGECLHit table ",
73 addParam("TCThreshold", _threshold, "Set FAM TC threshold ",
75 addParam("ShapingFunction", _FADC, "Set function of shaper ", _FADC);
76 addParam("ConditionDB", _ConditionDB, "Use conditionDB ", _ConditionDB);
77 addParam("SourceOfTC", m_SourceOfTC,
78 "Select source of TC data(1:=ECLHit or 2:=ECLSimHit or 3:=ECLHit+TRGECLBGTCHit)",
80
81 if (_ConditionDB == 1) { //Use global tag
82 m_FAMPara.addCallback(this, &TRGECLFAMModule::beginRun);
83 }
84 B2DEBUG(100, "TRGECLFAMModule ... created");
85 Threshold.clear();
86
87 }
int _debugLevel
Parameters.
virtual void beginRun() override
Called when new run started.

◆ TRGECLModule()

Constructor.

Definition at line 44 of file TRGECLModule.cc.

44 :
47 _TimeWindow(250.0), _OverlapWindow(125.0), _NofTopTC(3),
50 {
51
52 string desc = "TRGECLModule(" + version() + ")";
53 setDescription(desc);
55
56 addParam("DebugLevel",
58 "TRGECL debug level",
60 addParam("Bhabha",
61 _Bhabha,
62 "TRGECL Bhabha method 0 : Belle I, 1 :belle II(defult)",
63 _Bhabha);
64 addParam("Clustering",
66 "TRGECL Clustering method 0 : use only ICN, 1 : ICN + Energy(Defult)",
68 addParam("ClusterLimit",
70 "The Limit number of cluster (Defult:6)",
72 addParam("EventTiming",
74 "TRGECL EventTiming method 0 : Belle I, 1 : Energetic TC, 2 : Energy Weighted timing (defult)",
76 addParam("NofTopTC",
78 "TRGECL # of considered TC in energy weighted Timing method(Only work for EvenTiming Method 2)",
79 _NofTopTC);
80 addParam("TimeWindow",
82 "TRGECL Trigger decision Time Window",
84 addParam("OverlapWindow",
86 "TRGECL Trigger decision Time Window",
88 addParam("EventSelect",
90 "TRGECL Select one trigger window for logic study",
92 addParam("ConditionDB",
94 "Flag to use Condition Database(Defult 0)",
96 addParam("3DBhabhaVetoInTrackThetaRegion",
98 "set 3DBhabhaVetoInTrackThetaRegion (low TCID and high TCID)",
100 addParam("EventTimingQualityThresholds",
102 "set EventTimingQualityThresholds (low energy(GeV) and high energy(GeV))",
104 addParam("3DBhabhaAddAngleCut",
106 "set Angle Cut of Bhbaha Additional veto for hie (dphi low and high, theta sum low and high(degree)",
108 addParam("Taub2bAngleCut",
110 "set Taub2bAngleCut(dphi low and high, theta sum low and high(degree)",
112 addParam("Taub2bEtotCut",
114 "set Taub2b total energy cut in TC ThetaID 1-17(GeV)",
116 addParam("Taub2bClusterECut1",
118 "set Taub2b 1 cluster energy Cut (GeV) for CL1 : ",
120 addParam("Taub2bClusterECut2",
122 "set Taub2b 1 cluster energy Cut (GeV) for CL2 : ",
124
125 addParam("Taub2b2AngleCut",
127 "set Taub2b2AngleCut(dphi low and high, theta sum low and high(degree))",
129 addParam("Taub2b2EtotCut",
131 "set Taub2b2 total energy cut in TC ThetaID 1-17(GeV)",
133 addParam("Taub2b2CLEEndcapCut",
135 "set Taub2b2 energy Cut (GeV) for cluseter in endcap (GeV) : ",
137 addParam("Taub2b2CLECut",
139 "set Taub2b2 cluster energy Cut (GeV) : ",
141
142 addParam("Taub2b3AngleCut",
144 "set Taub2b3AngleCut(dphi low and high, theta sum low and high in cms (degree))",
146 addParam("Taub2b3EtotCut",
148 "set Taub2b3 total energy cut in lab in ThetaID 1-17(GeV)",
150 addParam("Taub2b3CLEb2bCut",
152 "set Taub2b3 cluster energy Cut in lab for one of b2b clusters (GeV) : ",
154 addParam("Taub2b3CLELowCut",
156 "set Taub2b3 cluster energy low Cut in lab for all clusters (GeV) : ",
158 addParam("Taub2b3CLEHighCut",
160 "set Taub2b3 cluster energy high Cut in lab for all clusters (GeV) : ",
162
163 _2DBhabhaThresholdFWD.clear();
164 _2DBhabhaThresholdBWD.clear();
168 _3DBhabhaVetoAngle.clear();
169 _mumuAngle.clear();
170 m_3DBhabhaAddAngleCut.clear();
171 m_taub2bAngleCut.clear();
172 m_taub2b2AngleCut.clear();
173 m_taub2b3AngleCut.clear();
174
175 _TotalEnergy.clear();
176 _LowMultiThreshold.clear();
177
178 _TotalEnergy = {5, 10, 30}; // /100 MeV
179 _2DBhabhaThresholdFWD = {40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 30, 35}; // /100 MeV
180 _2DBhabhaThresholdBWD = {25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 30}; // /100 MeV
181 _3DBhabhaVetoThreshold = {30, 45}; // /100 MeV
182 _3DBhabhaSelectionThreshold = {20, 40}; // /100 MeV
183 _3DBhabhaVetoAngle = {160, 200, 165, 190}; // /100 MeV
184 _3DBhabhaSelectionAngle = {140, 220, 160, 200}; // /100 MeV
185 _mumuThreshold = 20; //100 MeV
186 _mumuAngle = {160, 200, 165, 190}; // degree
187 m_3DBhabhaAddAngleCut = {150, 210, 160, 200}; // degree
188 _LowMultiThreshold = {10, 20, 25, 30}; // degree
189 _n300MeVCluster = 1;
192 m_EventTimingQualityThresholds = {0.5, 10}; // GeV
193 // taub2b
194 m_taub2bAngleCut = {110, 250, 130, 230}; // degree
195 m_taub2bEtotCut = 7; // GeV
196 m_taub2bClusterECut1 = 1.9; // GeV
197 m_taub2bClusterECut2 = 999; // GeV
198 // taub2b2
199 m_taub2b2AngleCut = {120, 240, 140, 220}; // degree
200 m_taub2b2EtotCut = 7.0; // GeV
201 m_taub2b2CLEEndcapCut = 3.0; // GeV
202 m_taub2b2CLECut = 0.162; // GeV
203 // taub2b3
204 m_taub2b3AngleCut = {120, 240, 140, 220}; // degree
205 m_taub2b3EtotCut = 7.0; // GeV
206 m_taub2b3CLEb2bCut = 0.14; // GeV
207 m_taub2b3CLELowCut = 0.12; // GeV
208 m_taub2b3CLEHighCut = 4.50; // GeV
209
210 if (TRGDebug::level()) {
211 std::cout << "TRGECLModule ... created" << std::endl;
212 }
213 }

◆ TRGECLQAMModule()

Costructor.

Definition at line 56 of file TRGECLQAMModule.cc.

59 {
60
61 string desc = "TRGECLQAMModule(" + version() + ")";
62 setDescription(desc);
64
65 addParam("outputFileName", m_outputfile, "TRGECL QAM file", m_outputfile);
66
67 m_nRun = 0;
68 m_nevent = 1;
69
70 //Problem TC Check
71 m_FWD = 0;
72 m_BAR = 0;
73 m_BWD = 0;
74 m_ALL = 0;
75 memset(TCID, 0, sizeof(TCID));
76
77
78 //Total Energy
79
80 m_etot = 0;
81 m_etot_mean = 0;
82 m_etot_error = 0;
83 m_etot_sigma = 0;
84
85 // std::vector<int> etot;
86 etot.clear();
87
88 //Caltime
89
93 caltime.clear();
94
95 //Cluster E
96
97 clusterE = 0;
98 cluster.clear();
99
100 B2DEBUG(100, "TRGECLQAMModule ... created");
101 }
std::string version() const
version

◆ TRGECLRawdataAnalysisModule()

Constructor.

Definition at line 37 of file TRGECLRawdataAnalysisModule.cc.

40 {
41
42 string desc = "TRGECLRawdataAnalysisModule(" + version() + ")";
43 setDescription(desc);
44 // setPropertyFlags(c_ParallelProcessingCertified | c_InitializeInProcess);
45
46 addParam("DebugLevel", _debugLevel, "TRGECL debug level", _debugLevel);
47 addParam("Clustering", _Clustering, "TRGECL Clustering method 0 : use only ICN, 1 : ICN + Energy(Defult)", _Clustering);
48
49
50
51 if (TRGDebug::level()) {
52 std::cout << "TRGECLRawdataAnalysisModule ... created" << std::endl;
53 }
54 }

◆ TRGGDLModule()

Constructor.

Definition at line 37 of file TRGGDLModule.cc.

37 : HistoModule(),
38//TRGGDLModule::TRGGDLModule()
39// : Module::Module(),
40 _debugLevel(0),
41 _configFilename("TRGGDLConfig.dat"),
45 _Phase("Phase2"),
46 _algFilePath("ftd.alg")
47 {
48
49 string desc = "TRGGDLModule(" + version() + ")";
50 setDescription(desc);
52
53 addParam("debugLevel", _debugLevel, "Debug Level", _debugLevel);
54 addParam("Belle2Phase", _Phase, "Phase2 or Phase3", _Phase);
55 addParam("ConfigFile",
57 "The filename of CDC trigger config file",
59 addParam("SimulationMode",
61 "TRGGDL simulation switch",
63 addParam("FastSimulationMode",
65 "TRGGDL fast simulation mode",
67 addParam("FirmwareSimulationMode",
69 "TRGGDL firmware simulation mode",
71
72 addParam("algFromDB",
74 "Set false when alg is taken from local file.",
75 true);
76
77 addParam("algFilePath",
78 _algFilePath,
79 ".alg file path",
80 _algFilePath);
81
82 addParam("timquality_threshold_sfin",
84 "Threshold to determine timing quality flag with MC truth: superfine",
85 -1.0);
86
87 addParam("timquality_threshold_fine",
89 "Threshold to determine timing quality flag with MC truth: fine",
90 10.0);
91
92 addParam("simulateT0jitter",
94 "if True, L1 jitter is simulated by EventT0Generator.",
95 false);
96
97 B2DEBUG(100, "TRGGDLModule ... created");
98 }
HistoModule()
Constructor.
Definition: HistoModule.h:32

◆ TRGGRLModule()

Constructor.

Definition at line 36 of file TRGGRLModule.cc.

38 _debugLevel(0),
39 _configFilename("TRGGDLConfig.dat"),
43 {
44
45 string desc = "TRGGRLModule(" + version() + ")";
46 setDescription(desc);
48
49 addParam("DebugLevel", _debugLevel, "TRGGRL debug level", _debugLevel);
50 addParam("ConfigFile",
52 "The filename of CDC trigger config file",
54 addParam("SimulationMode",
56 "TRGGRL simulation switch",
58 addParam("FastSimulationMode",
60 "TRGGRL fast simulation mode",
62 addParam("FirmwareSimulationMode",
64 "TRGGRL firmware simulation mode",
66 }
int _debugLevel
Debug level.
Definition: TRGGRLModule.h:60

◆ version() [1/9]

string version ( void  ) const

version

Definition at line 49 of file TRGECLQAMModule.cc.

50 {
51 return string("TRGECLQAMModule 1.00");
52 }

◆ version() [2/9]

string version ( void  ) const

returns version of TRGCDCModule.

Definition at line 42 of file TRGCDCModule.cc.

43 {
44 return string("TRGCDCModule 5.07");
45 }

◆ version() [3/9]

string version ( void  ) const

returns version of TRGCDCTSStreamModule.

Definition at line 37 of file TRGCDCTSStreamModule.cc.

38 {
39 return string("TRGCDCTSStreamModule 0.00");
40 }

◆ version() [4/9]

string version ( void  ) const

returns version of TRGECLFAMModule.

Definition at line 38 of file TRGECLFAMModule.cc.

39 {
40 return string("TRGECLFAMModule 1.00");
41 }

◆ version() [5/9]

string version ( void  ) const

returns version of TRGECLModule.

Definition at line 37 of file TRGECLModule.cc.

38 {
39 return string("TRGECLModule 1.00");
40 }

◆ version() [6/9]

string version ( void  ) const

returns version of TRGECLBGTCHitModule.

Definition at line 34 of file TRGECLBGTCHitModule.cc.

35 {
36 return string("TRGECLBGTCHitModule 1.00");
37 }

◆ version() [7/9]

string version ( void  ) const

returns version of TRGECLModule.

Definition at line 30 of file TRGECLRawdataAnalysisModule.cc.

31 {
32 return string("TRGECLAnalysisModule 1.00");
33 }

◆ version() [8/9]

string version ( void  ) const

returns version of TRGGDLModule.

Definition at line 32 of file TRGGDLModule.cc.

33 {
34 return string("TRGGDLModule 0.00");
35 }

◆ version() [9/9]

string version ( void  ) const

returns version of TRGGRLModule.

Definition at line 31 of file TRGGRLModule.cc.

32 {
33 return string("TRGGRLModule 0.00");
34 }

◆ ~TRGCDCModule()

~TRGCDCModule ( )
virtual

Destructor.

Definition at line 247 of file TRGCDCModule.cc.

248 {
249 if (_cdc)
250 TRGCDC::getTRGCDC("good-bye");
251
252 if (TRGDebug::level())
253 cout << "TRGCDCModule ... destructed " << endl;
254 }

◆ ~TRGCDCTSStreamModule()

~TRGCDCTSStreamModule ( )
virtual

Destructor.

Definition at line 70 of file TRGCDCTSStreamModule.cc.

71 {
72
73 if (_cdc)
74 TRGCDC::getTRGCDC("good-bye");
75
76 if (TRGDebug::level())
77 cout << "TRGCDCTSStreamModule ... destructed " << endl;
78 }

◆ ~TRGECLBGTCHitModule()

~TRGECLBGTCHitModule ( )
virtual

Destructor.

Definition at line 76 of file TRGECLBGTCHitModule.cc.

77 {
78 B2DEBUG(100, "TRGECLBGTCHitModule ... destructed ");
79 }

◆ ~TRGECLFAMModule()

~TRGECLFAMModule ( )
virtual

Destructor.

Definition at line 91 of file TRGECLFAMModule.cc.

92 {
93
94 B2DEBUG(100, "TRGECLFAMModule ... destructed ");
95
96 }

◆ ~TRGECLModule()

~TRGECLModule ( )
virtual

Destructor

Definition at line 217 of file TRGECLModule.cc.

218 {
219 if (TRGDebug::level()) {
220 std::cout << "TRGECLModule ... destructed " << std::endl;
221
222 }
223 }

◆ ~TRGECLQAMModule()

~TRGECLQAMModule ( )
virtual

Destrunctor.

Definition at line 105 of file TRGECLQAMModule.cc.

106 {
107
108 B2DEBUG(100, "TRGECLQAMModule ... destructed ");
109 }

◆ ~TRGECLRawdataAnalysisModule()

Destructor

Definition at line 58 of file TRGECLRawdataAnalysisModule.cc.

59 {
60
61 if (TRGDebug::level()) {
62 std::cout << "TRGECLRawdataAnalysisModule ... destructed " << std::endl;
63
64 }
65 }

◆ ~TRGGDLModule()

~TRGGDLModule ( )
virtual

Destructor.

Definition at line 100 of file TRGGDLModule.cc.

101 {
102
103 if (_gdl)
104 B2DEBUG(100, "good-bye");
105
106 B2DEBUG(100, "TRGGDLModule ... destructed ");
107 }

◆ ~TRGGRLModule()

~TRGGRLModule ( )
virtual

Destructor.

Definition at line 68 of file TRGGRLModule.cc.

69 {
70
71 if (_grl)
72 TRGGRL::getTRGGRL("good-bye");
73
74 }

Variable Documentation

◆ _gdl

TRGGDL * _gdl = 0
staticprivate

A pointer to a TRGGDL;.

Definition at line 113 of file TRGGDLModule.h.

◆ _grl

TRGGRL * _grl = 0
staticprivate

A pointer to a TRGGRL;.

Definition at line 79 of file TRGGRLModule.h.

◆ intNaN

const int intNaN = std::numeric_limits<int>::quiet_NaN()
static

Definition at line 53 of file trgrawdataModule.h.

◆ Linear_fit_of_Hits

constexpr Linear_fit_of_Hits_t Linear_fit_of_Hits
constexpr

Definition at line 140 of file klm_trig_linear_fit.cc.

◆ mergerWidth

constexpr int mergerWidth = 256
staticconstexpr

Merger data width.

Definition at line 45 of file CDCTriggerUnpackerModule.h.

◆ nAllMergers

constexpr int nAllMergers = 146
staticconstexpr

Number of Mergers.

Definition at line 47 of file CDCTriggerUnpackerModule.h.

◆ nFinesse

constexpr int nFinesse = 48
staticconstexpr

Number of FINESSE in a PCIe40.

Definition at line 51 of file CDCTriggerUnpackerModule.h.

◆ wordWidth

constexpr int wordWidth = 32
staticconstexpr

width of a single word in the raw int buffer

Definition at line 49 of file CDCTriggerUnpackerModule.h.