Belle II Software  release-08-01-10
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 #pragma once
12 
13 #include "framework/core/Module.h"
14 #include <string>
15 
16 #include "CLHEP/Geometry/Point3D.h"
17 #include "trg/trg/Clock.h"
18 
19 #include <framework/datastore/StoreArray.h>
20 #include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
21 #include <cdc/dataobjects/CDCHit.h>
22 #include <framework/database/DBObjPtr.h>
23 #include <trg/cdc/dbobjects/CDCTriggerDeadch.h>
24 #include <tracking/dataobjects/RecoTrack.h>
25 
26 namespace Belle2 {
32 
33  class TRGCDCLayer;
34 
38  class CDCTriggerTSFModule : public Module {
39 
40  public:
41 
44 
46  virtual ~CDCTriggerTSFModule() {}
47 
49  virtual void initialize() override;
50 
52  virtual void beginRun() override;
53 
55  virtual void event() override;
56 
58  virtual void terminate() override;
59 
61  void clear();
62 
63  protected:
67  std::string m_TSHitCollectionName;
69  std::string m_innerTSLUTFilename;
71  std::string m_outerTSLUTFilename;
88  bool m_makeRecoLRTable;
96  bool m_adcflag;
98  int m_adccut;
99 
100  private:
102  std::vector<std::vector<TRGCDCLayer*>> superLayers;
104  std::vector<TRGCDCLayer*> tsLayers;
106  std::vector<TRGClock*> clocks;
109  std::vector<std::vector<unsigned>> innerTrueLRTable = {};
112  std::vector<std::vector<unsigned>> outerTrueLRTable = {};
113  //** number of layers in Super layer**/
114  const static int MAX_N_LAYERS = c_maxWireLayersPerSuperLayer;
116  bool deadch_map[c_nSuperLayers][MAX_N_LAYERS][c_maxNDriftCells] = {};
119  std::vector<std::vector<unsigned>> innerRecoLRTable = {};
122  std::vector<std::vector<unsigned>> outerRecoLRTable = {};
123 
132 
133 
134  };
135 
137 } // namespace Belle2
138 
139 #endif // CDCTriggerTSFModule_H
Module for the Track Segment Finder of the CDC trigger.
std::string m_outerRecoLRTableFilename
filename for the table which contains the number of reconstructed left/right for each pattern in the ...
virtual ~CDCTriggerTSFModule()
Destructor.
std::vector< TRGCDCLayer * > tsLayers
structure to hold pointers to all track segment shapes
bool m_relateAllHits
relate all cdchtis to ts, not just opriority wire
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.
std::string m_innerRecoLRTableFilename
filename for the table which contains the number of reconstructed left/right for each pattern in the ...
bool m_adcflag
remove hits with lower ADC than cut threshold.
virtual void event() override
Run the TSF for an event.
bool deadch_map[c_nSuperLayers][MAX_N_LAYERS][c_maxNDriftCells]
bad channel mapping
OptionalDBObjPtr< CDCTriggerDeadch > m_db_deadchannel
dbobject to store deadchannel
StoreArray< CDCTriggerSegmentHit > m_segmentHits
list of output track segment hits
std::vector< std::vector< unsigned > > outerRecoLRTable
list of (# true right, # true left, # true background) for the outer super layers
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 > > innerRecoLRTable
list of (# reconstructed right, # reconstructed left, # unrelated background) for the inner-most supe...
std::vector< std::vector< unsigned > > innerTrueLRTable
list of (# true right, # true left, # true background) for the inner-most super layer
int m_adccut
threshold for the adc cut.
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
StoreArray< RecoTrack > m_recoTracks
list of recotracks, needed for recolrtable
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
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.