CMS 3D CMS Logo

DTTracoChip.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef DT_TRACO_CHIP_H
15 #define DT_TRACO_CHIP_H
16 
17 //-------------------
18 // Constants file --
19 //-------------------
23 
24 //------------------------------------
25 // Collaborating Class Declarations --
26 //------------------------------------
27 class DTTracoCard;
28 class DTBtiTrigData;
29 class DTTracoCand;
30 class DTTracoTrig;
31 class DTTracoTrigData;
32 
33 //----------------------
34 // Base Class Headers --
35 //----------------------
43 
44 //---------------
45 // C++ Headers --
46 //---------------
47 #include <vector>
48 
49 // ---------------------
50 // -- Class Interface --
51 // ---------------------
52 
53 class DTTracoChip {
54 public:
56  // DTTracoChip(DTTracoCard* card, int n);
57 
60 
62  DTTracoChip(const DTTracoChip &traco);
63 
65  ~DTTracoChip();
66 
68  DTTracoChip &operator=(const DTTracoChip &traco);
69 
71  void add_btiT(int step, int pos, const DTBtiTrigData *btitrig);
72 
74  void addTrig(int step, DTTracoTrig *);
75 
77  void setPV(int step, int ntrk, int code, int K);
78 
81 
83  void run();
84 
86  void clear();
87 
89  inline int number() const { return _id.traco(); }
90 
92  void raiseOverlap(int step);
93 
95  inline DTTrigGeom *geom() const { return _geom; }
96 
98  inline DTTracoId id() const { return _id; }
99 
101  inline int wheel() const { return _geom->wheel(); }
102 
104  inline int station() const { return _geom->station(); }
105 
107  inline int sector() const { return _geom->sector(); }
108 
110  // inline DTConfig* config() const { return _geom->config(); }
111 
113  inline DTConfigTraco *config() const { return _config; }
114 
116  float psiRad(int sl = 0) const;
117 
119  int KRad() const;
120  // int KRad(int sl=0) const;
121 
123  int BTIC() const { return _btic; }
124 
126  int IBTIOFF() const { return _ibtioff; }
127 
129  int DD() const { return _dd; }
130 
132  int nTrig(int step) const;
133 
135  DTTracoTrig *trigger(int step, unsigned n) const;
136 
138  DTTracoTrigData triggerData(int step, unsigned n) const;
139 
141  int useSecondTrack(int step) const;
142 
144  int edgeBTI(int step, int io, int lr) const;
145 
148 
151 
153  void setFlag(int step, int ext = 0);
154 
156  inline int ovlFlag(int step) { return _flag[step - DTConfigTraco::NSTEPF].element(1); }
157 
158 private:
160  DTTracoCand *bestCand(int itk, std::vector<DTTracoCand> &tclist);
161 
164 
166  void DoAdjBtiLts(DTTracoCand *candidate, std::vector<DTTracoCand> &tclist);
167 
169  int AdjBtiLTSuppressed(DTTracoCand *candidate);
170 
172  int storeCorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn);
173 
175  int storeUncorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn);
176 
178  int insideAngWindow(DTTracoTrig *) const;
179 
181  void setTracoAcceptances();
182 
183 private:
184  // identification
187  // parent card
189  // config
191 
192  int _krad;
193  int _btic;
194  int _ibtioff;
195  int _dd;
196 
197  // input data
198  std::vector<DTTracoCand> _innerCand[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF + 1];
199  std::vector<DTTracoCand> _outerCand[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF + 1];
200 
201  // output data
202  std::vector<DTTracoTrig *> _tracotrig[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF + 1];
203 
204  // internal use variables: SV 11V04 lts suppression if to bx+1, bx=array index
206  // *** FOR TESTBEAM DATA *** SV from input data instead from card!
207  // 1: overlap with II track from bx-1)
208  // 2: II track rej.
209  // 3...8: IL,IR,OL,OR,th,th
210  // 9: H present in traco at bx
212 
213  // psi acceptance of correlator MT ports
216 
217  // LUT file class
219 
221 };
222 
223 #endif
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:508
int _PSIMAX[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:215
int KRad() const
K par of the radial angle of corr center referred to plane sl.
int sector() const
Return sector number.
Definition: DTTrigGeom.h:65
void run()
Run TRACO algorithm.
Definition: DTTracoChip.cc:239
int AdjBtiLTSuppressed(DTTracoCand *candidate)
Do suppression of LTRIG on adjacent TRACO.
Definition: DTTracoChip.cc:528
Lut * _lutsCCB
Definition: DTTracoChip.h:220
void calculateAngles(DTTracoTrig *)
Calculate trigger angles.
void setFlag(int step, int ext=0)
Set flags for multiple trigger detection between cons. TRACO&#39;s.
Definition: DTTracoChip.cc:406
void addTrig(int step, DTTracoTrig *)
Add a TRACO trigger.
void setTracoAcceptances()
Compute traco chip acceptances.
DTTracoLUTs * _luts
Definition: DTTracoChip.h:218
int BTIC() const
BTIC parameter.
Definition: DTTracoChip.h:123
DTTracoId _id
Definition: DTTracoChip.h:186
int station() const
Return station number.
Definition: DTTracoChip.h:104
static const int NSTEPF
Definition: DTConfig.h:35
DTTrigGeom * geom() const
Return trigger geometry.
Definition: DTTracoChip.h:95
Definition: config.py:1
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
void add_btiT(int step, int pos, const DTBtiTrigData *btitrig)
Add a BTI trigger to the TRACO.
Definition: DTTracoChip.cc:962
float psiRad(int sl=0) const
Radial angle of correlator center in mrad referred to plane sl.
int nTrig(int step) const
Return the number of trigger candidates.
~DTTracoChip()
Destructor.
Definition: DTTracoChip.cc:175
DTTracoCand * bestCand(int itk, std::vector< DTTracoCand > &tclist)
Get the best inner/outer candidate.
Definition: DTTracoChip.cc:447
int insideAngWindow(DTTracoTrig *) const
Check if a trigger is inside the angular acceptance window.
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
GlobalPoint CMSPosition() const
Position in CMS frame.
Definition: DTTracoChip.h:150
int useSecondTrack(int step) const
a flag for a usable second track
int edgeBTI(int step, int io, int lr) const
flags for HTRIG in edge BTI
LocalPoint localPosition() const
Position in chamber frame.
Definition: DTTracoChip.h:147
int ovlFlag(int step)
return overlap flag
Definition: DTTracoChip.h:156
void raiseOverlap(int step)
raise overlap flag
Definition: DTTracoChip.cc:401
int traco() const
Returns the traco.
Definition: DTTracoId.h:59
std::vector< DTTracoCand > _outerCand[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:199
int storeUncorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Store uncorrelated trigger.
Definition: DTTracoChip.cc:768
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
std::vector< DTTracoTrig * > _tracotrig[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:202
DTTracoTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
int station() const
Return station number.
Definition: DTTrigGeom.h:62
DTTracoChip(DTTracoCard *card, int n, DTConfigTraco *config)
Constructor.
Definition: DTTracoChip.cc:47
std::vector< DTTracoCand > _innerCand[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:198
DTTracoChip & operator=(const DTTracoChip &traco)
Assignment operator.
Definition: DTTracoChip.cc:195
int DD() const
DD parameter.
Definition: DTTracoChip.h:129
void clear()
Clear.
Definition: DTTracoChip.cc:225
void DoAdjBtiLts(DTTracoCand *candidate, std::vector< DTTracoCand > &tclist)
Do suppression of LTRIG on BTI close to selected HTRIG.
Definition: DTTracoChip.cc:508
DTConfigTraco * _config
Definition: DTTracoChip.h:190
DTTracoTrig * trigger(int step, unsigned n) const
Return the requested trigger.
int storeCorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Check correlation and store correlated trigger.
Definition: DTTracoChip.cc:624
int IBTIOFF() const
IBTIOFF parameter.
Definition: DTTracoChip.h:126
DTTracoId id() const
Return TRACO id.
Definition: DTTracoChip.h:98
DTConfigTraco * config() const
Configuration set.
Definition: DTTracoChip.h:113
BitArray< 32 > _flag[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:211
int _PSIMIN[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:214
DTTracoCard * _card
Definition: DTTracoChip.h:188
BitArray< DTConfigTraco::NSTEPL+2 > _bxlts
Definition: DTTracoChip.h:205
step
Definition: StallMonitor.cc:83
static const int NBTITC
Definition: DTConfig.h:37
Definition: memstream.h:15
int number() const
Return TRACO number.
Definition: DTTracoChip.h:89
DTTrigGeom * _geom
Definition: DTTracoChip.h:185
void setPV(int step, int ntrk, int code, int K)
Set the preview values for a TRACO trigger.
int element(const int pos) const
Definition: BitArray.h:206
Definition: Lut.h:31
int wheel() const
Return wheel number.
Definition: DTTracoChip.h:101
int sector() const
Return sector number.
Definition: DTTracoChip.h:107