CbmRoot
CbmTrdModuleRecT.h
Go to the documentation of this file.
1 #ifndef CBMTRDMODULERECT_H
2 #define CBMTRDMODULERECT_H
3 
4 #include "CbmTrdModuleRec.h"
5 #include <list>
6 #include <map>
7 #include <vector>
8 #define NBINSCORRX 151
9 #define NBINSCORRY 4
10 
11 class TGraphErrors;
12 class TF1;
17 public:
19  kVerbose = 0 // steer verbosity on/off
20  ,
21  kDraw // steer graphic representation on/off
22  };
23 
27  CbmTrdModuleRecT(Int_t mod, Int_t ly = -1, Int_t rot = 0);
28  virtual ~CbmTrdModuleRecT();
29 
30 
32  virtual Bool_t AddDigi(const CbmTrdDigi* d, Int_t id);
37  virtual inline void Config(Bool_t v, Bool_t d);
39  virtual Int_t GetOverThreshold() const;
41  virtual Bool_t Finalize();
43  virtual Int_t FindClusters();
45  virtual Bool_t MakeHits();
47  virtual CbmTrdHit* MakeHit(Int_t cId,
48  const CbmTrdCluster* c,
49  std::vector<const CbmTrdDigi*>* digis);
50 
51 protected:
52 private:
55 
56  Bool_t CDRAW() const { return TESTBIT(fConfigMap, kDraw); }
57  Bool_t CWRITE() const { return TESTBIT(fConfigMap, kVerbose); }
58  Double_t GetXoffset(Int_t n0) const;
59  Double_t GetYoffset(Int_t n0) const;
68  Int_t LoadDigis(std::vector<const CbmTrdDigi*>* digis,
69  std::vector<CbmTrdDigi*>* vdgM,
70  std::vector<Bool_t>* vmask,
71  ULong64_t& t0,
72  Int_t& cM);
79  Bool_t MergeDigis(std::vector<const CbmTrdDigi*>* digis,
80  std::vector<CbmTrdDigi*>* vdgM,
81  std::vector<Bool_t>* vmask);
82 
83  UChar_t fConfigMap; // task configuration settings
84  ULong64_t fT0;
85  std::map<Int_t, std::list<CbmTrdCluster*>>
86  fBuffer; //row-wise organized clusters
87  std::vector<Double_t> vs;
88  std::vector<Double_t> vse;
89  std::vector<Char_t> vt;
90  std::vector<Double_t> vx;
91  std::vector<Double_t>
92  vxe;
93 
94  static Float_t fgCorrXdx;
95  static Float_t fgCorrXval[2][NBINSCORRX];
96  static Float_t fgCorrYval[NBINSCORRY][2];
97  static Double_t fgDT[3];
98  static TGraphErrors* fgEdep;
99  static TF1* fgPRF;
100  static TGraphErrors* fgT;
101 
102  ClassDef(
104  1) // Triangular pad module; Cluster finding and hit reconstruction algorithms
105 };
106 
107 void CbmTrdModuleRecT::Config(Bool_t v, Bool_t d) {
108  if (v)
109  SETBIT(fConfigMap, kVerbose);
110  else
111  CLRBIT(fConfigMap, kVerbose);
112  printf("CbmTrdModuleRecT::Verbose[%c]\n", CWRITE() ? 'y' : 'n');
113  if (d)
114  SETBIT(fConfigMap, kDraw);
115  else
116  CLRBIT(fConfigMap, kDraw);
117  printf("CbmTrdModuleRecT::Draw[%c]\n", CDRAW() ? 'y' : 'n');
118 }
119 #endif
CbmTrdModuleRecT::vs
std::vector< Double_t > vs
Definition: CbmTrdModuleRecT.h:87
CbmTrdModuleRecT::fgDT
static Double_t fgDT[3]
discretized correction params
Definition: CbmTrdModuleRecT.h:97
CbmTrdModuleRecT::fgPRF
static TF1 * fgPRF
data handler for cluster PRF
Definition: CbmTrdModuleRecT.h:99
CbmTrdModuleRecT::MakeHits
virtual Bool_t MakeHits()
Steering routine for building hits.
Definition: CbmTrdModuleRecT.cxx:205
CbmTrdModuleRecT::CbmTrdModuleRecTconfig
CbmTrdModuleRecTconfig
Definition: CbmTrdModuleRecT.h:18
NBINSCORRX
#define NBINSCORRX
Definition: CbmTrdModuleRecT.h:8
CbmTrdModuleRecT::~CbmTrdModuleRecT
virtual ~CbmTrdModuleRecT()
Definition: CbmTrdModuleRecT.cxx:56
CbmTrdModuleRecT::vxe
std::vector< Double_t > vxe
working copy of signal relative positions
Definition: CbmTrdModuleRecT.h:92
CbmTrdModuleRecT::Finalize
virtual Bool_t Finalize()
Finalize hits (merge RC hits, etc)
Definition: CbmTrdModuleRecT.cxx:208
CbmTrdModuleRecT::AddDigi
virtual Bool_t AddDigi(const CbmTrdDigi *d, Int_t id)
Add digi to local module.
Definition: CbmTrdModuleRecT.cxx:59
CbmTrdModuleRecT::FindClusters
virtual Int_t FindClusters()
Finalize clusters.
Definition: CbmTrdModuleRecT.cxx:157
CbmTrdModuleRecT::fgCorrXval
static Float_t fgCorrXval[2][NBINSCORRX]
step of the discretized correction LUT
Definition: CbmTrdModuleRecT.h:95
CbmTrdHit
data class for a reconstructed Energy-4D measurement in the TRD
Definition: CbmTrdHit.h:35
CbmTrdModuleRecT::CWRITE
Bool_t CWRITE() const
Definition: CbmTrdModuleRecT.h:57
CbmTrdModuleRecT::CbmTrdModuleRecT
CbmTrdModuleRecT(const CbmTrdModuleRecT &ref)
CbmTrdModuleRecT::GetYoffset
Double_t GetYoffset(Int_t n0) const
Definition: CbmTrdModuleRecT.cxx:670
CbmTrdModuleRec
Abstract class for module wise cluster finding and hit reconstruction.
Definition: CbmTrdModuleRec.h:16
CbmTrdModuleRecT::MergeDigis
Bool_t MergeDigis(std::vector< const CbmTrdDigi * > *digis, std::vector< CbmTrdDigi * > *vdgM, std::vector< Bool_t > *vmask)
Merge R/T signals to digis if topological conditions in cluster are fulfilled.
Definition: CbmTrdModuleRecT.cxx:823
CbmTrdModuleRecT::fConfigMap
UChar_t fConfigMap
Definition: CbmTrdModuleRecT.h:83
CbmTrdModuleRecT::vt
std::vector< Char_t > vt
working copy of signal errors from cluster
Definition: CbmTrdModuleRecT.h:89
CbmTrdModuleRecT::fgCorrYval
static Float_t fgCorrYval[NBINSCORRY][2]
discretized correction LUT
Definition: CbmTrdModuleRecT.h:96
CbmTrdCluster
Data Container for TRD clusters.
Definition: CbmTrdCluster.h:23
CbmTrdModuleRecT::fgCorrXdx
static Float_t fgCorrXdx
working copy of signal relative position errors
Definition: CbmTrdModuleRecT.h:94
d
double d
Definition: P4_F64vec2.h:24
CbmTrdModuleRecT::vx
std::vector< Double_t > vx
working copy of signal relative timing
Definition: CbmTrdModuleRecT.h:90
CbmTrdModuleRecT::vse
std::vector< Double_t > vse
working copy of signals from cluster
Definition: CbmTrdModuleRecT.h:88
CbmTrdModuleRecT::CDRAW
Bool_t CDRAW() const
Definition: CbmTrdModuleRecT.h:56
CbmTrdModuleRecT::GetOverThreshold
virtual Int_t GetOverThreshold() const
Count RO channels (R or T) with data.
Definition: CbmTrdModuleRecT.cxx:142
CbmTrdModuleRecT::operator=
const CbmTrdModuleRecT & operator=(const CbmTrdModuleRecT &ref)
CbmTrdModuleRecT::kVerbose
@ kVerbose
Definition: CbmTrdModuleRecT.h:19
CbmTrdModuleRecT::MakeHit
virtual CbmTrdHit * MakeHit(Int_t cId, const CbmTrdCluster *c, std::vector< const CbmTrdDigi * > *digis)
Steering routine for converting cluster to hit.
Definition: CbmTrdModuleRecT.cxx:234
CbmTrdModuleRecT
Triangular pad module; Cluster finding and hit reconstruction algorithms.
Definition: CbmTrdModuleRecT.h:16
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
CbmTrdModuleRecT::LoadDigis
Int_t LoadDigis(std::vector< const CbmTrdDigi * > *digis, std::vector< CbmTrdDigi * > *vdgM, std::vector< Bool_t > *vmask, ULong64_t &t0, Int_t &cM)
Load digis info into local data structures.
Definition: CbmTrdModuleRecT.cxx:684
CbmTrdModuleRec.h
CbmTrdModuleRecT::fgEdep
static TGraphErrors * fgEdep
FASP delay wrt signal.
Definition: CbmTrdModuleRecT.h:98
CbmTrdDigi
Definition: CbmTrdDigi.h:14
NBINSCORRY
#define NBINSCORRY
Definition: CbmTrdModuleRecT.h:9
CbmTrdModuleRecT::fgT
static TGraphErrors * fgT
fitter for cluster PRF
Definition: CbmTrdModuleRecT.h:100
CbmTrdModuleRecT::kDraw
@ kDraw
Definition: CbmTrdModuleRecT.h:21
CbmTrdModuleRecT::GetXoffset
Double_t GetXoffset(Int_t n0) const
Definition: CbmTrdModuleRecT.cxx:657
CbmTrdModuleRecT::Config
virtual void Config(Bool_t v, Bool_t d)
Config task with the following settings.
Definition: CbmTrdModuleRecT.h:107
CbmTrdModuleRecT::fT0
ULong64_t fT0
Definition: CbmTrdModuleRecT.h:84
CbmTrdModuleRecT::CbmTrdModuleRecT
CbmTrdModuleRecT()
Default constructor.
Definition: CbmTrdModuleRecT.cxx:28
CbmTrdModuleRecT::fBuffer
std::map< Int_t, std::list< CbmTrdCluster * > > fBuffer
start time of event/time slice [clk]
Definition: CbmTrdModuleRecT.h:86