Belle II Software  release-06-01-15
CDCTriggerTSFModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef CDCTRIGGERTSFModule_H
9 #define CDCTRIGGERTSFModule_H
10 
11 #include "framework/core/Module.h"
12 #include <string>
13 
14 #include "CLHEP/Geometry/Point3D.h"
15 #include "trg/trg/Clock.h"
16 
17 #include <framework/datastore/StoreArray.h>
18 #include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
19 #include <cdc/dataobjects/CDCHit.h>
20 #include <framework/database/DBObjPtr.h>
21 #include <trg/cdc/dbobjects/CDCTriggerDeadch.h>
22 
23 namespace Belle2 {
29 
30  class TRGCDCLayer;
31 
35  class CDCTriggerTSFModule : public Module {
36 
37  public:
38 
41 
43  virtual ~CDCTriggerTSFModule() {}
44 
46  virtual void initialize() override;
47 
49  virtual void beginRun() override;
50 
52  virtual void event() override;
53 
55  virtual void terminate() override;
56 
58  void clear();
59 
60  protected:
64  std::string m_TSHitCollectionName;
66  std::string m_innerTSLUTFilename;
68  std::string m_outerTSLUTFilename;
85 
86  private:
88  std::vector<std::vector<TRGCDCLayer*>> superLayers;
90  std::vector<TRGCDCLayer*> tsLayers;
92  std::vector<TRGClock*> clocks;
95  std::vector<std::vector<unsigned>> innerTrueLRTable = {};
98  std::vector<std::vector<unsigned>> outerTrueLRTable = {};
99  //** number of layers in Super layer**/
100  const static int MAX_N_LAYERS = 8;
102  bool deadch_map[nSuperLayers][MAX_N_LAYERS][MAX_N_SCELLS] = {};
103 
108 
109  };
110 
112 } // namespace Belle2
113 
114 #endif // CDCTriggerTSFModule_H
Module for the Track Segment Finder of the CDC trigger.
virtual ~CDCTriggerTSFModule()
Destructor.
std::vector< TRGCDCLayer * > tsLayers
structure to hold pointers to all track segment shapes
bool m_clockSimulation
switch for simulating clock by clock
std::string m_CDCHitCollectionName
name of the input StoreArray
std::string m_outerTrueLRTableFilename
filename for the table which contains the number of true left/right for each pattern in the outer sup...
CDCTriggerTSFModule()
Constructor, for setting module description and parameters.
bool m_crosstalk_tdcfilter
TDC based crosstalk filtering logic on CDCFE.
virtual void initialize() override
Initialize the module and register DataStore arrays.
virtual void event() override
Run the TSF for an event.
OptionalDBObjPtr< CDCTriggerDeadch > m_db_deadchannel
dbobject to store deadchannel
StoreArray< CDCTriggerSegmentHit > m_segmentHits
list of output track segment hits
virtual void terminate() override
Clean up pointers.
std::vector< std::vector< unsigned > > outerTrueLRTable
list of (# true right, # true left, # true background) for the outer super layers
std::string m_innerTSLUTFilename
The filename of LUT for the inner-most track segments.
virtual void beginRun() override
Register run-dependent DataStore arrays.
std::vector< std::vector< unsigned > > innerTrueLRTable
list of (# true right, # true left, # true background) for the inner-most super layer
bool m_makeTrueLRTable
switch for saving the number of true left/right for each pattern
std::string m_TSHitCollectionName
name of the output StoreArray
StoreArray< CDCHit > m_cdcHits
list of input CDC hits
void clear()
remove hit information from last event
std::string m_outerTSLUTFilename
The filename of LUT for outer track segments.
std::vector< TRGClock * > clocks
list of clocks used in the TSF
bool deadch_map[nSuperLayers][MAX_N_LAYERS][MAX_N_SCELLS]
bad channel mapping
std::string m_innerTrueLRTableFilename
filename for the table which contains the number of true left/right for each pattern in the inner-mos...
std::vector< std::vector< TRGCDCLayer * > > superLayers
structure to hold pointers to all wires in the CDC
bool m_deadchflag
mask Dead channel or not.
Base class for Modules.
Definition: Module.h:72
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors w...
Definition: DBObjPtr.h:48
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
HepGeom::Point3D< double > Point3D
3D point
Definition: Cell.h:32
Abstract base class for different kinds of events.