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 
58  public:
59 
61  //DTSectColl(edm::ParameterSet& sc_pset);
63 
65  ~DTSectColl() override;
66 
68  void setConfig(const DTConfigManager *conf);
69 
71  inline DTTSPhi* getTSPhi(int istat) const { return _tsphi[istat-1]; }
72 
74  inline DTTSTheta* getTSTheta(int istat) const { return _tstheta[istat-1]; }
75 
77  inline const DTConfigSectColl* config() const { return _config; }
78 
79  // non-const methods
80 
81 /* //! Add a TSM candidate to the Sect Coll, ifs is first/second track flag */
82 /* void addCandPh(DTSectCollPhCand* cand); */
83 
84 /* //! Add a TS Theta candidate to the Sect Coll, ifs is first/second track flag */
85 /* void addCandTh(DTSectCollThCand* cand); */
86 
87 /* //! Set a flag to skip sort2 */
88 /* void ignoreSecondTrack() { _ignoreSecondTrack=1; } */
89 
91  void localClear();
92 
94  void loadSectColl();
95 
97  void addTSPhi(int step, const DTChambPhSegm* tsmsegm, int ifs, int istat);
98 
100  void addTSTheta(int step, const DTChambThSegm* tsmsegm, int istat);
101 
103  void addTU(DTSCTrigUnit* tru);
104 
106  DTSC* getDTSC(int step, int istat) const;
107 
109  void runSectColl();
110 
112  DTSectCollPhCand* getDTSectCollPhCand(int ifs, unsigned n) const;
113 
115  DTSectCollThCand* getDTSectCollThCand(unsigned n) const;
116 
117  // const methods
118 
120  DTSectCollPhCand* getTrackPh(int n) const ;
121 
123  DTSectCollThCand* getTrackTh(int n) const ;
124 
126  unsigned nCandPh(int ifs) const;
127 
129  unsigned nCandTh() const;
130 
132  int nSegmPh(int step);
133 
135  int nSegmTh(int step);
136 
138  inline int nTracksPh() const { return _outcand_ph.size(); }
139 
141  inline int nTracksTh() const { return _outcand_th.size(); }
142 
144  const DTSectCollPhSegm* SectCollPhSegment(int step, unsigned n);
145 
147  const DTSectCollThSegm* SectCollThSegment(int step);
148 
150  std::vector<DTSectCollPhSegm>::const_iterator beginPh() { return DTSCPhCache::_cache.begin(); }
151 
153  int sizePh() { return DTSCPhCache::_cache.size(); }
154 
156  std::vector<DTSectCollPhSegm>::const_iterator endPh() { return DTSCPhCache::_cache.end(); }
157 
159  std::vector<DTSectCollThSegm>::const_iterator beginTh() { return DTSCThCache::_cache.begin(); }
160 
162  int sizeTh() { return DTSCThCache::_cache.size(); }
163 
165  std::vector<DTSectCollThSegm>::const_iterator endTh() { return DTSCThCache::_cache.end(); }
166 
168  // LocalPoint LocalPosition(const DTTrigData*) const;
169 
171  // LocalVector LocalDirection(const DTTrigData*) const;
172 
175 
177  void reconstruct() override { loadSectColl(); runSectColl(); }
178 
181 
182  private:
183 
184  // Configuration
186 
187  // SC Id
189 
192 
193  // SM: new sector collector
195 
196  // input data Phi
197  std::vector<DTSectCollPhCand*> _incand_ph[2];
198 
199  // output data Phi
200  std::vector<DTSectCollPhCand*> _outcand_ph;
201 
202  // input data Theta
203  std::vector<DTSectCollThCand*> _incand_th;
204 
205  // output data Theta
206  std::vector<DTSectCollThCand*> _outcand_th;
207 
208 };
209 #endif
int sizePh()
Return Phi cache size.
Definition: DTSectColl.h:153
int nTracksPh() const
Return the number of output Phi tracks.
Definition: DTSectColl.h:138
my_collection _cache
Definition: DTCache.h:56
void reconstruct() override
Load Trigger Units triggers and run Sector Collector algorithm.
Definition: DTSectColl.h:177
DTSectCollThCand * getDTSectCollThCand(unsigned n) const
Get a Candidate for Sector Collector.
Definition: DTSectColl.cc:419
std::vector< DTSectCollPhSegm >::const_iterator endPh()
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:156
DTSectCollId _sectcollid
Definition: DTSectColl.h:188
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
Definition: DTSectColl.cc:448
DTSectCollId SectCollId()
Return the Sector Collector Id.
Definition: DTSectColl.h:180
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:203
Definition: DTSC.h:42
static const int NSTEPF
Definition: DTConfig.h:36
~DTSectColl() override
Destructor.
Definition: DTSectColl.cc:66
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:206
int sizeTh()
Return Theta cache size.
Definition: DTSectColl.h:162
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
Definition: DTSectColl.cc:497
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:200
unsigned nCandTh() const
Return the number of Theta input tracks.
Definition: DTSectColl.cc:476
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:230
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:194
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:191
unsigned nCandPh(int ifs) const
Return the number of Phi input tracks (first/second)
Definition: DTSectColl.cc:463
void loadSectColl()
Load a Sector Collector.
Definition: DTSectColl.cc:188
std::vector< DTSectCollThSegm > DTSectCollThVector
Definition: DTSectColl.h:52
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
Definition: DTSectColl.cc:483
static const int NTSPSC
void addTSTheta(int step, const DTChambThSegm *tsmsegm, int istat)
Add a TS Theta candidate (step is TSTheta step not sc one)
Definition: DTSectColl.cc:274
DTCache< DTSectCollPhSegm, DTSectCollPhVector > DTSCPhCache
Definition: DTSectColl.h:53
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:190
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
int nTracksTh() const
Return the number of output Theta tracks.
Definition: DTSectColl.h:141
static const int NDTSC
Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector.
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
Definition: DTSectColl.cc:434
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
Definition: DTSectColl.cc:128
std::vector< DTSectCollThSegm >::const_iterator beginTh()
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:159
std::vector< DTSectCollPhSegm > DTSectCollPhVector
Definition: DTSectColl.h:28
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
Definition: DTSectColl.cc:526
DTCache< DTSectCollThSegm, DTSectCollThVector > DTSCThCache
Definition: DTSectColl.h:54
std::vector< DTSectCollThSegm >::const_iterator endTh()
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:165
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
Definition: DTSectColl.cc:319
const DTConfigSectColl * _config
Definition: DTSectColl.h:185
const DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:77
void clearCache()
Local position in chamber of a trigger-data object.
Definition: DTSectColl.h:174
void runSectColl()
Run Sector Collector.
Definition: DTSectColl.cc:339
DTSectColl(DTSectCollId id)
Constructor.
Definition: DTSectColl.cc:48
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:197
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTSectColl.cc:114
std::vector< DTSectCollPhSegm >::const_iterator beginPh()
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:150
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
Definition: DTSectColl.cc:512
void localClear()
Local Clear.
Definition: DTSectColl.cc:84
step
DTSectCollPhCand * getDTSectCollPhCand(int ifs, unsigned n) const
Get a Phi Candidate for Sector Collector.
Definition: DTSectColl.cc:400
void clearCache()
Clear cache vector.
Definition: DTCache.h:49
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
Definition: DTSectColl.h:71
static const int NTSTSC
Constants: number of TSTheta/TSPhi in input to Sector Collector.
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
Definition: DTSectColl.h:74