CMS 3D CMS Logo

DTSectColl.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
11 //--------------------------------------------------
12 #ifndef DT_SECT_COLL_H
13 #define DT_SECT_COLL_H
14 
15 //------------------------------------
16 // Collaborating Class Declarations --
17 //------------------------------------
18 class DTTracoTrigData;
19 class DTSectCollCand;
20 class DTConfigSectColl;
21 class DTTrigGeom;
22 class DTChambPhSegm;
23 class DTChambThSegm;
24 class DTSectCollSegm;
25 class DTSC;
26 class DTTSPhi;
27 class DTTSTheta;
29 
30 //----------------------
31 // Base Class Headers --
32 //----------------------
41 
42 //---------------
43 // C++ Headers --
44 //---------------
45 #include <vector>
46 
47 // ---------------------
48 // -- Class Interface --
49 // ---------------------
50 
51 typedef std::vector<DTSectCollPhSegm> DTSectCollPhVector;
52 typedef std::vector<DTSectCollThSegm> DTSectCollThVector;
55 
56 class DTSectColl : public DTSCPhCache, public DTSCThCache {
57 public:
59  //DTSectColl(edm::ParameterSet& sc_pset);
61 
63  ~DTSectColl() override;
64 
66  void setConfig(const DTConfigManager* conf);
67 
69  inline DTTSPhi* getTSPhi(int istat) const { return _tsphi[istat - 1]; }
70 
72  inline DTTSTheta* getTSTheta(int istat) const { return _tstheta[istat - 1]; }
73 
75  inline const DTConfigSectColl* config() const { return _config; }
76 
77  // non-const methods
78 
79  /* //! Add a TSM candidate to the Sect Coll, ifs is first/second track flag */
80  /* void addCandPh(DTSectCollPhCand* cand); */
81 
82  /* //! Add a TS Theta candidate to the Sect Coll, ifs is first/second track flag */
83  /* void addCandTh(DTSectCollThCand* cand); */
84 
85  /* //! Set a flag to skip sort2 */
86  /* void ignoreSecondTrack() { _ignoreSecondTrack=1; } */
87 
89  void localClear();
90 
92  void loadSectColl();
93 
95  void addTSPhi(int step, const DTChambPhSegm* tsmsegm, int ifs, int istat);
96 
98  void addTSTheta(int step, const DTChambThSegm* tsmsegm, int istat);
99 
101  void addTU(DTSCTrigUnit* tru);
102 
104  DTSC* getDTSC(int step, int istat) const;
105 
107  void runSectColl();
108 
110  DTSectCollPhCand* getDTSectCollPhCand(int ifs, unsigned n) const;
111 
113  DTSectCollThCand* getDTSectCollThCand(unsigned n) const;
114 
115  // const methods
116 
118  DTSectCollPhCand* getTrackPh(int n) const;
119 
121  DTSectCollThCand* getTrackTh(int n) const;
122 
124  unsigned nCandPh(int ifs) const;
125 
127  unsigned nCandTh() const;
128 
130  int nSegmPh(int step);
131 
133  int nSegmTh(int step);
134 
136  inline int nTracksPh() const { return _outcand_ph.size(); }
137 
139  inline int nTracksTh() const { return _outcand_th.size(); }
140 
142  const DTSectCollPhSegm* SectCollPhSegment(int step, unsigned n);
143 
146 
148  std::vector<DTSectCollPhSegm>::const_iterator beginPh() const { return DTSCPhCache::_cache.begin(); }
149 
151  int sizePh() const { return DTSCPhCache::_cache.size(); }
152 
154  std::vector<DTSectCollPhSegm>::const_iterator endPh() const { return DTSCPhCache::_cache.end(); }
155 
157  std::vector<DTSectCollThSegm>::const_iterator beginTh() const { return DTSCThCache::_cache.begin(); }
158 
160  int sizeTh() const { return DTSCThCache::_cache.size(); }
161 
163  std::vector<DTSectCollThSegm>::const_iterator endTh() const { return DTSCThCache::_cache.end(); }
164 
166  // LocalPoint LocalPosition(const DTTrigData*) const;
167 
169  // LocalVector LocalDirection(const DTTrigData*) const;
170 
172  void clearCache() {
175  }
176 
178  void reconstruct() override {
179  loadSectColl();
180  runSectColl();
181  }
182 
185 
186 private:
187  // Configuration
189 
190  // SC Id
192 
195 
196  // SM: new sector collector
198 
199  // input data Phi
200  std::vector<DTSectCollPhCand*> _incand_ph[2];
201 
202  // output data Phi
203  std::vector<DTSectCollPhCand*> _outcand_ph;
204 
205  // input data Theta
206  std::vector<DTSectCollThCand*> _incand_th;
207 
208  // output data Theta
209  std::vector<DTSectCollThCand*> _outcand_th;
210 };
211 #endif
my_collection _cache
Definition: DTCache.h:53
void reconstruct() override
Load Trigger Units triggers and run Sector Collector algorithm.
Definition: DTSectColl.h:178
DTCache< DTSectCollPhSegm, DTSectCollPhVector > DTSCPhCache
Definition: DTSectColl.h:53
DTSectCollId _sectcollid
Definition: DTSectColl.h:191
DTSectCollId SectCollId()
Return the Sector Collector Id.
Definition: DTSectColl.h:184
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:206
Definition: DTSC.h:41
DTSC * _tsc[DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:197
static const int NSTEPF
Definition: DTConfig.h:35
~DTSectColl() override
Destructor.
Definition: DTSectColl.cc:65
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:209
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
Definition: DTSectColl.cc:431
const DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:75
int nTracksTh() const
Return the number of output Theta tracks.
Definition: DTSectColl.h:139
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
Definition: DTSectColl.cc:290
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:203
DTSectCollPhCand * getDTSectCollPhCand(int ifs, unsigned n) const
Get a Phi Candidate for Sector Collector.
Definition: DTSectColl.cc:358
int sizeTh() const
Return Theta cache size.
Definition: DTSectColl.h:160
void addTSPhi(int step, const DTChambPhSegm *tsmsegm, int ifs, int istat)
Add a TSM candidate (step is TSM step not SC one)
Definition: DTSectColl.cc:209
int sizePh() const
Return Phi cache size.
Definition: DTSectColl.h:151
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:194
DTCache< DTSectCollThSegm, DTSectCollThVector > DTSCThCache
Definition: DTSectColl.h:54
std::vector< DTSectCollPhSegm >::const_iterator endPh() const
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:154
void loadSectColl()
Load a Sector Collector.
Definition: DTSectColl.cc:171
std::vector< DTSectCollThSegm > DTSectCollThVector
Definition: DTSectColl.h:52
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
Definition: DTSectColl.cc:419
static const int NTSPSC
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
Definition: DTSectColl.cc:396
int nTracksPh() const
Return the number of output Phi tracks.
Definition: DTSectColl.h:136
std::vector< DTSectCollThSegm >::const_iterator beginTh() const
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:157
unsigned nCandPh(int ifs) const
Return the number of Phi input tracks (first/second)
Definition: DTSectColl.cc:407
std::vector< DTSectCollThSegm >::const_iterator endTh() const
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:163
unsigned nCandTh() const
Return the number of Theta input tracks.
Definition: DTSectColl.cc:417
void addTSTheta(int step, const DTChambThSegm *tsmsegm, int istat)
Add a TS Theta candidate (step is TSTheta step not sc one)
Definition: DTSectColl.cc:250
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:193
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
DTSectCollThCand * getDTSectCollThCand(unsigned n) const
Get a Candidate for Sector Collector.
Definition: DTSectColl.cc:374
static const int NDTSC
Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector.
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
Definition: DTSectColl.h:69
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
Definition: DTSectColl.cc:116
std::vector< DTSectCollPhSegm > DTSectCollPhVector
Definition: DTSectColl.h:28
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
Definition: DTSectColl.cc:454
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
Definition: DTSectColl.cc:385
const DTConfigSectColl * _config
Definition: DTSectColl.h:188
void clearCache()
Local position in chamber of a trigger-data object.
Definition: DTSectColl.h:172
void runSectColl()
Run Sector Collector.
Definition: DTSectColl.cc:306
DTSectColl(DTSectCollId id)
Constructor.
Definition: DTSectColl.cc:47
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:200
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTSectColl.cc:106
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
Definition: DTSectColl.cc:443
void localClear()
Local Clear.
Definition: DTSectColl.cc:79
step
Definition: StallMonitor.cc:83
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
Definition: DTSectColl.h:72
void clearCache()
Clear cache vector.
Definition: DTCache.h:47
static const int NTSTSC
Constants: number of TSTheta/TSPhi in input to Sector Collector.
std::vector< DTSectCollPhSegm >::const_iterator beginPh() const
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:148