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 
55 public:
57  // DTTracoChip(DTTracoCard* card, int n);
58 
61 
63  DTTracoChip(const DTTracoChip &traco);
64 
66  ~DTTracoChip();
67 
69  DTTracoChip &operator=(const DTTracoChip &traco);
70 
72  void add_btiT(int step, int pos, const DTBtiTrigData *btitrig);
73 
75  void addTrig(int step, DTTracoTrig *);
76 
78  void setPV(int step, int ntrk, int code, int K);
79 
82 
84  void run();
85 
87  void clear();
88 
90  inline int number() const { return _id.traco(); }
91 
93  void raiseOverlap(int step);
94 
96  inline DTTrigGeom *geom() const { return _geom; }
97 
99  inline DTTracoId id() const { return _id; }
100 
102  inline int wheel() const { return _geom->wheel(); }
103 
105  inline int station() const { return _geom->station(); }
106 
108  inline int sector() const { return _geom->sector(); }
109 
111  // inline DTConfig* config() const { return _geom->config(); }
112 
114  inline DTConfigTraco *config() const { return _config; }
115 
117  float psiRad(int sl = 0) const;
118 
120  int KRad() const;
121  // int KRad(int sl=0) const;
122 
124  int BTIC() const { return _btic; }
125 
127  int IBTIOFF() const { return _ibtioff; }
128 
130  int DD() const { return _dd; }
131 
133  int nTrig(int step) const;
134 
136  DTTracoTrig *trigger(int step, unsigned n) const;
137 
139  DTTracoTrigData triggerData(int step, unsigned n) const;
140 
142  int useSecondTrack(int step) const;
143 
145  int edgeBTI(int step, int io, int lr) const;
146 
149 
152 
154  void setFlag(int step, int ext = 0);
155 
157  inline int ovlFlag(int step) {
158  return _flag[step - DTConfigTraco::NSTEPF].element(1);
159  }
160 
161 private:
163  DTTracoCand *bestCand(int itk, std::vector<DTTracoCand> &tclist);
164 
167 
169  void DoAdjBtiLts(DTTracoCand *candidate, std::vector<DTTracoCand> &tclist);
170 
172  int AdjBtiLTSuppressed(DTTracoCand *candidate);
173 
175  int storeCorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer,
176  int tkn);
177 
179  int storeUncorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer,
180  int tkn);
181 
183  int insideAngWindow(DTTracoTrig *) const;
184 
186  void setTracoAcceptances();
187 
188 private:
189  // identification
192  // parent card
194  // config
196 
197  int _krad;
198  int _btic;
199  int _ibtioff;
200  int _dd;
201 
202  // input data
203  std::vector<DTTracoCand>
205  std::vector<DTTracoCand>
207 
208  // output data
209  std::vector<DTTracoTrig *>
211 
212  // internal use variables: SV 11V04 lts suppression if to bx+1, bx=array index
214  // *** FOR TESTBEAM DATA *** SV from input data instead from card!
215  // 1: overlap with II track from bx-1)
216  // 2: II track rej.
217  // 3...8: IL,IR,OL,OR,th,th
218  // 9: H present in traco at bx
220 
221  // psi acceptance of correlator MT ports
224 
225  // LUT file class
227 
229 };
230 
231 #endif
int sector() const
Return sector number.
Definition: DTTracoChip.h:108
int _PSIMAX[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:223
GlobalPoint CMSPosition() const
Position in CMS frame.
Definition: DTTracoChip.h:151
int sector() const
Return sector number.
Definition: DTTrigGeom.h:66
DTConfigTraco * config() const
Configuration set.
Definition: DTTracoChip.h:114
void run()
Run TRACO algorithm.
Definition: DTTracoChip.cc:261
DTTrigGeom * geom() const
Return trigger geometry.
Definition: DTTracoChip.h:96
int DD() const
DD parameter.
Definition: DTTracoChip.h:130
int insideAngWindow(DTTracoTrig *) const
Check if a trigger is inside the angular acceptance window.
int AdjBtiLTSuppressed(DTTracoCand *candidate)
Do suppression of LTRIG on adjacent TRACO.
Definition: DTTracoChip.cc:580
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:60
Lut * _lutsCCB
Definition: DTTracoChip.h:228
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:446
void addTrig(int step, DTTracoTrig *)
Add a TRACO trigger.
void setTracoAcceptances()
Compute traco chip acceptances.
DTTracoLUTs * _luts
Definition: DTTracoChip.h:226
int BTIC() const
BTIC parameter.
Definition: DTTracoChip.h:124
DTTracoId _id
Definition: DTTracoChip.h:191
static const int NSTEPF
Definition: DTConfig.h:36
int KRad() const
K par of the radial angle of corr center referred to plane sl.
Definition: config.py:1
void add_btiT(int step, int pos, const DTBtiTrigData *btitrig)
Add a BTI trigger to the TRACO.
~DTTracoChip()
Destructor.
Definition: DTTracoChip.cc:191
int traco() const
Returns the traco.
Definition: DTTracoId.h:70
DTTracoCand * bestCand(int itk, std::vector< DTTracoCand > &tclist)
Get the best inner/outer candidate.
Definition: DTTracoChip.cc:489
int ovlFlag(int step)
return overlap flag
Definition: DTTracoChip.h:157
void raiseOverlap(int step)
raise overlap flag
Definition: DTTracoChip.cc:441
int number() const
Return TRACO number.
Definition: DTTracoChip.h:90
std::vector< DTTracoCand > _outerCand[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:206
int storeUncorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Store uncorrelated trigger.
Definition: DTTracoChip.cc:839
std::vector< DTTracoCand > _innerCand[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:204
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
int wheel() const
Return wheel number.
Definition: DTTracoChip.h:102
DTTracoTrig * trigger(int step, unsigned n) const
Return the requested trigger.
DTTracoChip(DTTracoCard *card, int n, DTConfigTraco *config)
Constructor.
Definition: DTTracoChip.cc:47
int station() const
Return station number.
Definition: DTTrigGeom.h:63
int edgeBTI(int step, int io, int lr) const
flags for HTRIG in edge BTI
BitArray< 32 > _flag[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:219
DTTracoChip & operator=(const DTTracoChip &traco)
Assignment operator.
Definition: DTTracoChip.cc:211
int element(const int pos) const
Definition: BitArray.h:210
void clear()
Clear.
Definition: DTTracoChip.cc:245
void DoAdjBtiLts(DTTracoCand *candidate, std::vector< DTTracoCand > &tclist)
Do suppression of LTRIG on BTI close to selected HTRIG.
Definition: DTTracoChip.cc:557
int IBTIOFF() const
IBTIOFF parameter.
Definition: DTTracoChip.h:127
DTConfigTraco * _config
Definition: DTTracoChip.h:195
std::vector< DTTracoTrig * > _tracotrig[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:210
int storeCorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Check correlation and store correlated trigger.
Definition: DTTracoChip.cc:681
DTTracoTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:541
int _PSIMIN[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:222
DTTracoCard * _card
Definition: DTTracoChip.h:193
int useSecondTrack(int step) const
a flag for a usable second track
BitArray< DTConfigTraco::NSTEPL+2 > _bxlts
Definition: DTTracoChip.h:213
step
Definition: StallMonitor.cc:94
static const int NBTITC
Definition: DTConfig.h:38
Definition: memstream.h:15
float psiRad(int sl=0) const
Radial angle of correlator center in mrad referred to plane sl.
int station() const
Return station number.
Definition: DTTracoChip.h:105
DTTrigGeom * _geom
Definition: DTTracoChip.h:190
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:188
LocalPoint localPosition() const
Position in chamber frame.
Definition: DTTracoChip.h:148
void setPV(int step, int ntrk, int code, int K)
Set the preview values for a TRACO trigger.
DTTracoId id() const
Return TRACO id.
Definition: DTTracoChip.h:99
Definition: Lut.h:31
int nTrig(int step) const
Return the number of trigger candidates.