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
DTTracoChip::setPV
void setPV(int step, int ntrk, int code, int K)
Set the preview values for a TRACO trigger.
ext
Definition: memstream.h:15
DTTracoChip::sector
int sector() const
Return sector number.
Definition: DTTracoChip.h:107
DTTrigGeom::wheel
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
DTTracoId
Definition: DTTracoId.h:34
DTTracoChip::_lutsCCB
Lut * _lutsCCB
Definition: DTTracoChip.h:220
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DTTracoChip::calculateAngles
void calculateAngles(DTTracoTrig *)
Calculate trigger angles.
Definition: DTTracoChip.cc:1166
DTTracoChip::setFlag
void setFlag(int step, int ext=0)
Set flags for multiple trigger detection between cons. TRACO's.
Definition: DTTracoChip.cc:406
DTTracoChip::BTIC
int BTIC() const
BTIC parameter.
Definition: DTTracoChip.h:123
step
step
Definition: StallMonitor.cc:94
DTConfigTraco
Definition: DTConfigTraco.h:37
Lut
Definition: Lut.h:31
pos
Definition: PixelAliasList.h:18
DTTracoChip::KRad
int KRad() const
K par of the radial angle of corr center referred to plane sl.
Definition: DTTracoChip.cc:1103
DTTracoId.h
DTTracoChip::_luts
DTTracoLUTs * _luts
Definition: DTTracoChip.h:218
DTTrigGeom.h
DTConfig::NSTEPL
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
DTTracoChip::_btic
int _btic
Definition: DTTracoChip.h:193
DTTracoChip::run
void run()
Run TRACO algorithm.
Definition: DTTracoChip.cc:239
DTTracoChip::_id
DTTracoId _id
Definition: DTTracoChip.h:186
DTTracoChip::station
int station() const
Return station number.
Definition: DTTracoChip.h:104
DTConfig::NSTEPF
static const int NSTEPF
Definition: DTConfig.h:35
DTTracoChip::insideAngWindow
int insideAngWindow(DTTracoTrig *) const
Check if a trigger is inside the angular acceptance window.
Definition: DTTracoChip.cc:1284
DTTracoChip::add_btiT
void add_btiT(int step, int pos, const DTBtiTrigData *btitrig)
Add a BTI trigger to the TRACO.
Definition: DTTracoChip.cc:962
DTTracoChip::_krad
int _krad
Definition: DTTracoChip.h:192
DTTracoChip::psiRad
float psiRad(int sl=0) const
Radial angle of correlator center in mrad referred to plane sl.
Definition: DTTracoChip.cc:1082
DTTracoChip::nTrig
int nTrig(int step) const
Return the number of trigger candidates.
Definition: DTTracoChip.cc:1043
DTTracoChip::geom
DTTrigGeom * geom() const
Return trigger geometry.
Definition: DTTracoChip.h:95
DTTracoChip::edgeBTI
int edgeBTI(int step, int io, int lr) const
flags for HTRIG in edge BTI
Definition: DTTracoChip.cc:1125
config
Definition: config.py:1
Lut.h
DTConfigTraco.h
DTTracoChip::raiseOverlap
void raiseOverlap(int step)
raise overlap flag
Definition: DTTracoChip.cc:401
BitArray::element
int element(const int pos) const
Definition: BitArray.h:206
DTTracoChip::~DTTracoChip
~DTTracoChip()
Destructor.
Definition: DTTracoChip.cc:175
SurfaceOrientation::inner
Definition: Surface.h:19
DTBtiTrigData
Definition: DTBtiTrigData.h:39
DTTracoChip::bestCand
DTTracoCand * bestCand(int itk, std::vector< DTTracoCand > &tclist)
Get the best inner/outer candidate.
Definition: DTTracoChip.cc:447
DTTracoChip::CMSPosition
GlobalPoint CMSPosition() const
Position in CMS frame.
Definition: DTTracoChip.h:150
DTTracoChip::useSecondTrack
int useSecondTrack(int step) const
a flag for a usable second track
Definition: DTTracoChip.cc:1114
Point3DBase< float, LocalTag >
DTTracoChip::DTTracoChip
DTTracoChip(DTTracoCard *card, int n, DTConfigTraco *config)
Constructor.
Definition: DTTracoChip.cc:47
DTTracoTrig
Definition: DTTracoTrig.h:40
DTTracoChip
Definition: DTTracoChip.h:53
DTTracoChip::triggerData
DTTracoTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
Definition: DTTracoChip.cc:1067
DTTracoChip::localPosition
LocalPoint localPosition() const
Position in chamber frame.
Definition: DTTracoChip.h:147
DTTrigGeom::localPosition
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:508
DTTracoCand
Definition: DTTracoCand.h:38
DTTrigGeom::sector
int sector() const
Return sector number.
Definition: DTTrigGeom.h:65
DTTracoChip::_config
DTConfigTraco * _config
Definition: DTTracoChip.h:190
DTTracoChip::_dd
int _dd
Definition: DTTracoChip.h:195
DTTracoLUTs.h
DTTracoChip::storeUncorr
int storeUncorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Store uncorrelated trigger.
Definition: DTTracoChip.cc:768
DTTracoChip::_outerCand
std::vector< DTTracoCand > _outerCand[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:199
DTTracoChip::trigger
DTTracoTrig * trigger(int step, unsigned n) const
Return the requested trigger.
Definition: DTTracoChip.cc:1052
DTTracoChip::_ibtioff
int _ibtioff
Definition: DTTracoChip.h:194
DTTracoChip::storeCorr
int storeCorr(DTTracoTrig *tctrig, DTTracoCand *inner, DTTracoCand *outer, int tkn)
Check correlation and store correlated trigger.
Definition: DTTracoChip.cc:624
DTConfig.h
DTTracoChip::ovlFlag
int ovlFlag(int step)
return overlap flag
Definition: DTTracoChip.h:156
DTTracoChip::_PSIMIN
int _PSIMIN[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:214
DTTracoChip::_card
DTTracoCard * _card
Definition: DTTracoChip.h:188
DTTracoChip::operator=
DTTracoChip & operator=(const DTTracoChip &traco)
Assignment operator.
Definition: DTTracoChip.cc:195
DTTracoChip::DD
int DD() const
DD parameter.
Definition: DTTracoChip.h:129
DTTrigGeom::CMSPosition
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
DTTracoChip::_tracotrig
std::vector< DTTracoTrig * > _tracotrig[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:202
DTTracoCard
Definition: DTTracoCard.h:58
DTTracoChip::id
DTTracoId id() const
Return TRACO id.
Definition: DTTracoChip.h:98
DTTracoChip::clear
void clear()
Clear.
Definition: DTTracoChip.cc:225
DTTracoChip::number
int number() const
Return TRACO number.
Definition: DTTracoChip.h:89
DTTracoChip::_flag
BitArray< 32 > _flag[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:211
DTTracoChip::_geom
DTTrigGeom * _geom
Definition: DTTracoChip.h:185
DTTracoChip::DoAdjBtiLts
void DoAdjBtiLts(DTTracoCand *candidate, std::vector< DTTracoCand > &tclist)
Do suppression of LTRIG on BTI close to selected HTRIG.
Definition: DTTracoChip.cc:508
LocalPoint.h
DTTracoId::traco
int traco() const
Returns the traco.
Definition: DTTracoId.h:59
DTTrigGeom
Definition: DTTrigGeom.h:41
DTTracoChip::_innerCand
std::vector< DTTracoCand > _innerCand[DTConfigTraco::NSTEPL - DTConfigTraco::NSTEPF+1]
Definition: DTTracoChip.h:198
DTTracoTrigData
Definition: DTTracoTrigData.h:37
DTTracoChip::wheel
int wheel() const
Return wheel number.
Definition: DTTracoChip.h:101
DTTracoChip::_PSIMAX
int _PSIMAX[4 *DTConfig::NBTITC]
Definition: DTTracoChip.h:215
DTTracoChip::config
DTConfigTraco * config() const
Configuration set.
Definition: DTTracoChip.h:113
DTBtiTrigData.h
SurfaceOrientation::outer
Definition: Surface.h:19
DTTracoChip::_bxlts
BitArray< DTConfigTraco::NSTEPL+2 > _bxlts
Definition: DTTracoChip.h:205
BitArray.h
DTTracoChip::IBTIOFF
int IBTIOFF() const
IBTIOFF parameter.
Definition: DTTracoChip.h:126
GlobalPoint.h
DTTracoChip::AdjBtiLTSuppressed
int AdjBtiLTSuppressed(DTTracoCand *candidate)
Do suppression of LTRIG on adjacent TRACO.
Definition: DTTracoChip.cc:528
DTTrigGeom::station
int station() const
Return station number.
Definition: DTTrigGeom.h:62
DTConfig::NBTITC
static const int NBTITC
Definition: DTConfig.h:37
BitArray< DTConfigTraco::NSTEPL+2 >
DTTracoLUTs
Definition: DTTracoLUTs.h:33
DTTracoChip::addTrig
void addTrig(int step, DTTracoTrig *)
Add a TRACO trigger.
Definition: DTTracoChip.cc:1026
DTTracoChip::setTracoAcceptances
void setTracoAcceptances()
Compute traco chip acceptances.
Definition: DTTracoChip.cc:1307