CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTracoChip.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
14 //
15 //--------------------------------------------------
16 #ifndef DT_TRACO_CHIP_H
17 #define DT_TRACO_CHIP_H
18 
19 //-------------------
20 // Constants file --
21 //-------------------
25 
26 //------------------------------------
27 // Collaborating Class Declarations --
28 //------------------------------------
29 class DTTracoCard;
30 class DTBtiTrigData;
31 class DTTracoCand;
32 class DTTracoTrig;
33 class DTTracoTrigData;
34 
35 //----------------------
36 // Base Class Headers --
37 //----------------------
45 
46 //---------------
47 // C++ Headers --
48 //---------------
49 #include <vector>
50 
51 // ---------------------
52 // -- Class Interface --
53 // ---------------------
54 
55 class DTTracoChip {
56 
57  public:
58 
60  //DTTracoChip(DTTracoCard* card, int n);
61 
64 
66  DTTracoChip(const DTTracoChip& traco);
67 
69  ~DTTracoChip();
70 
72  DTTracoChip& operator=(const DTTracoChip& traco);
73 
75  void add_btiT(int step, int pos, const DTBtiTrigData* btitrig);
76 
78  void addTrig(int step, DTTracoTrig*);
79 
81  void setPV(int step, int ntrk, int code, int K);
82 
85 
87  void run();
88 
90  void clear();
91 
93  inline int number() const { return _id.traco(); }
94 
96  void raiseOverlap(int step);
97 
99  inline DTTrigGeom* geom() const { return _geom; }
100 
102  inline DTTracoId id() const { return _id; }
103 
105  inline int wheel() const { return _geom->wheel(); }
106 
108  inline int station() const { return _geom->station(); }
109 
111  inline int sector() const { return _geom->sector(); }
112 
114  //inline DTConfig* config() const { return _geom->config(); }
115 
117  inline DTConfigTraco* config() const { return _config; }
118 
120  float psiRad(int sl=0) const;
121 
123  int KRad() const;
124  //int KRad(int sl=0) const;
125 
127  int BTIC() const { return _btic; }
128 
130  int IBTIOFF() const { return _ibtioff; }
131 
133  int DD() const { return _dd; }
134 
136  int nTrig(int step) const;
137 
139  DTTracoTrig* trigger(int step, unsigned n) const;
140 
142  DTTracoTrigData triggerData(int step, unsigned n) const;
143 
145  int useSecondTrack(int step) const;
146 
148  int edgeBTI(int step, int io, int lr) const;
149 
152 
155 
157  void setFlag(int step,int ext=0);
158 
160  inline int ovlFlag(int step) {
161  return _flag[step-DTConfigTraco::NSTEPF].element(1);}
162 
163  private:
164 
166  DTTracoCand* bestCand(int itk, std::vector<DTTracoCand> & tclist);
167 
170 
172  void DoAdjBtiLts(DTTracoCand* candidate, std::vector<DTTracoCand> & tclist);
173 
175  int AdjBtiLTSuppressed(DTTracoCand* candidate);
176 
178  int storeCorr(DTTracoTrig* tctrig, DTTracoCand* inner, DTTracoCand* outer, int tkn);
179 
181  int storeUncorr(DTTracoTrig* tctrig, DTTracoCand* inner, DTTracoCand* outer, int tkn);
182 
184  int insideAngWindow(DTTracoTrig* ) const;
185 
187  void setTracoAcceptances();
188 
189  private:
190  // identification
193  // parent card
195  //config
197 
198  int _krad;
199  int _btic;
200  int _ibtioff;
201  int _dd;
202 
203  // input data
206 
207  // output data
209 
210  // internal use variables: SV 11V04 lts suppression if to bx+1, bx=array index
212  // *** FOR TESTBEAM DATA *** SV from input data instead from card!
213  // 1: overlap with II track from bx-1)
214  // 2: II track rej.
215  // 3...8: IL,IR,OL,OR,th,th
216  // 9: H present in traco at bx
218 
219  // psi acceptance of correlator MT ports
222 
223  // LUT file class
225 
227 
228 };
229 
230 #endif
int sector() const
Return sector number.
Definition: DTTracoChip.h:111
int _PSIMAX[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:221
GlobalPoint CMSPosition() const
Position in CMS frame.
Definition: DTTracoChip.h:154
int sector() const
Return sector number.
Definition: DTTrigGeom.h:69
std::vector< DTTracoTrig * > _tracotrig[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:208
DTConfigTraco * config() const
Configuration set.
Definition: DTTracoChip.h:117
void run()
Run TRACO algorithm.
Definition: DTTracoChip.cc:255
DTTrigGeom * geom() const
Return trigger geometry.
Definition: DTTracoChip.h:99
int DD() const
DD parameter.
Definition: DTTracoChip.h:133
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:554
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:63
Lut * _lutsCCB
Definition: DTTracoChip.h:226
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:426
void addTrig(int step, DTTracoTrig *)
Add a TRACO trigger.
void setTracoAcceptances()
Compute traco chip acceptances.
DTTracoLUTs * _luts
Definition: DTTracoChip.h:224
int BTIC() const
BTIC parameter.
Definition: DTTracoChip.h:127
DTTracoId _id
Definition: DTTracoChip.h:192
static const int NSTEPF
Definition: DTConfig.h:36
int KRad() const
K par of the radial angle of corr center referred to plane sl.
void add_btiT(int step, int pos, const DTBtiTrigData *btitrig)
Add a BTI trigger to the TRACO.
Definition: DTTracoChip.cc:990
~DTTracoChip()
Destructor.
Definition: DTTracoChip.cc:183
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:471
int ovlFlag(int step)
return overlap flag
Definition: DTTracoChip.h:160
void raiseOverlap(int step)
raise overlap flag
Definition: DTTracoChip.cc:419
int number() const
Return TRACO number.
Definition: DTTracoChip.h:93
std::vector< DTTracoCand > _outerCand[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:205
int storeUncorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Store uncorrelated trigger.
Definition: DTTracoChip.cc:796
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:105
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:66
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:217
DTTracoChip & operator=(const DTTracoChip &traco)
Assignment operator.
Definition: DTTracoChip.cc:205
int element(const int pos) const
Definition: BitArray.h:210
void clear()
Clear.
Definition: DTTracoChip.cc:237
BitArray< DTConfigTraco::NSTEPL+2 > _bxlts
Definition: DTTracoChip.h:211
void DoAdjBtiLts(DTTracoCand *candidate, std::vector< DTTracoCand > &tclist)
Do suppression of LTRIG on BTI close to selected HTRIG.
Definition: DTTracoChip.cc:532
int IBTIOFF() const
IBTIOFF parameter.
Definition: DTTracoChip.h:130
DTConfigTraco * _config
Definition: DTTracoChip.h:196
int storeCorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Check correlation and store correlated trigger.
Definition: DTTracoChip.cc:648
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:523
int _PSIMIN[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:220
DTTracoCard * _card
Definition: DTTracoChip.h:194
int useSecondTrack(int step) const
a flag for a usable second track
static const int NBTITC
Definition: DTConfig.h:38
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:108
DTTrigGeom * _geom
Definition: DTTracoChip.h:191
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:184
LocalPoint localPosition() const
Position in chamber frame.
Definition: DTTracoChip.h:151
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:102
Definition: Lut.h:33
int nTrig(int step) const
Return the number of trigger candidates.