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:
56 
58  //DTTracoChip(DTTracoCard* card, int n);
59 
62 
64  DTTracoChip(const DTTracoChip& traco);
65 
67  ~DTTracoChip();
68 
70  DTTracoChip& operator=(const DTTracoChip& traco);
71 
73  void add_btiT(int step, int pos, const DTBtiTrigData* btitrig);
74 
76  void addTrig(int step, DTTracoTrig*);
77 
79  void setPV(int step, int ntrk, int code, int K);
80 
83 
85  void run();
86 
88  void clear();
89 
91  inline int number() const { return _id.traco(); }
92 
94  void raiseOverlap(int step);
95 
97  inline DTTrigGeom* geom() const { return _geom; }
98 
100  inline DTTracoId id() const { return _id; }
101 
103  inline int wheel() const { return _geom->wheel(); }
104 
106  inline int station() const { return _geom->station(); }
107 
109  inline int sector() const { return _geom->sector(); }
110 
112  //inline DTConfig* config() const { return _geom->config(); }
113 
115  inline DTConfigTraco* config() const { return _config; }
116 
118  float psiRad(int sl=0) const;
119 
121  int KRad() const;
122  //int KRad(int sl=0) const;
123 
125  int BTIC() const { return _btic; }
126 
128  int IBTIOFF() const { return _ibtioff; }
129 
131  int DD() const { return _dd; }
132 
134  int nTrig(int step) const;
135 
137  DTTracoTrig* trigger(int step, unsigned n) const;
138 
140  DTTracoTrigData triggerData(int step, unsigned n) const;
141 
143  int useSecondTrack(int step) const;
144 
146  int edgeBTI(int step, int io, int lr) const;
147 
150 
153 
155  void setFlag(int step,int ext=0);
156 
158  inline int ovlFlag(int step) {
159  return _flag[step-DTConfigTraco::NSTEPF].element(1);}
160 
161  private:
162 
164  DTTracoCand* bestCand(int itk, std::vector<DTTracoCand> & tclist);
165 
168 
170  void DoAdjBtiLts(DTTracoCand* candidate, std::vector<DTTracoCand> & tclist);
171 
173  int AdjBtiLTSuppressed(DTTracoCand* candidate);
174 
176  int storeCorr(DTTracoTrig* tctrig, DTTracoCand* inner, DTTracoCand* outer, int tkn);
177 
179  int storeUncorr(DTTracoTrig* tctrig, DTTracoCand* inner, DTTracoCand* outer, int tkn);
180 
182  int insideAngWindow(DTTracoTrig* ) const;
183 
185  void setTracoAcceptances();
186 
187  private:
188  // identification
191  // parent card
193  //config
195 
196  int _krad;
197  int _btic;
198  int _ibtioff;
199  int _dd;
200 
201  // input data
204 
205  // output data
207 
208  // internal use variables: SV 11V04 lts suppression if to bx+1, bx=array index
210  // *** FOR TESTBEAM DATA *** SV from input data instead from card!
211  // 1: overlap with II track from bx-1)
212  // 2: II track rej.
213  // 3...8: IL,IR,OL,OR,th,th
214  // 9: H present in traco at bx
216 
217  // psi acceptance of correlator MT ports
220 
221  // LUT file class
223 
225 
226 };
227 
228 #endif
int sector() const
Return sector number.
Definition: DTTracoChip.h:109
int _PSIMAX[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:219
GlobalPoint CMSPosition() const
Position in CMS frame.
Definition: DTTracoChip.h:152
int sector() const
Return sector number.
Definition: DTTrigGeom.h:67
std::vector< DTTracoTrig * > _tracotrig[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:206
DTConfigTraco * config() const
Configuration set.
Definition: DTTracoChip.h:115
void run()
Run TRACO algorithm.
Definition: DTTracoChip.cc:255
DTTrigGeom * geom() const
Return trigger geometry.
Definition: DTTracoChip.h:97
int DD() const
DD parameter.
Definition: DTTracoChip.h:131
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:61
Lut * _lutsCCB
Definition: DTTracoChip.h:224
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:222
int BTIC() const
BTIC parameter.
Definition: DTTracoChip.h:125
DTTracoId _id
Definition: DTTracoChip.h:190
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.
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:158
void raiseOverlap(int step)
raise overlap flag
Definition: DTTracoChip.cc:419
int number() const
Return TRACO number.
Definition: DTTracoChip.h:91
std::vector< DTTracoCand > _outerCand[DTConfigTraco::NSTEPL-DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:203
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:202
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:103
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:64
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:215
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:209
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:128
DTConfigTraco * _config
Definition: DTTracoChip.h:194
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:218
DTTracoCard * _card
Definition: DTTracoChip.h:192
int useSecondTrack(int step) const
a flag for a usable second track
step
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:106
DTTrigGeom * _geom
Definition: DTTracoChip.h:189
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:182
LocalPoint localPosition() const
Position in chamber frame.
Definition: DTTracoChip.h:149
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:100
Definition: Lut.h:32
int nTrig(int step) const
Return the number of trigger candidates.