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
DTSCPhCache
DTCache< DTSectCollPhSegm, DTSectCollPhVector > DTSCPhCache
Definition: DTSectColl.h:53
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DTConfigSectColl
Definition: DTConfigSectColl.h:37
step
step
Definition: StallMonitor.cc:94
DTSectColl::_config
const DTConfigSectColl * _config
Definition: DTSectColl.h:188
DTSectColl
Definition: DTSectColl.h:56
DTSectColl::beginPh
std::vector< DTSectCollPhSegm >::const_iterator beginPh() const
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:148
DTSectColl::getDTSC
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
Definition: DTSectColl.cc:290
DTSectCollPhCand
Definition: DTSectCollPhCand.h:32
DTSectColl::setConfig
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTSectColl.cc:106
DTConfigSectColl::NTSPSC
static const int NTSPSC
Definition: DTConfigSectColl.h:40
DTSectColl::_incand_th
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:206
DTSectColl::loadSectColl
void loadSectColl()
Load a Sector Collector.
Definition: DTSectColl.cc:171
DTSectColl::localClear
void localClear()
Local Clear.
Definition: DTSectColl.cc:79
DTConfig::NSTEPL
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
DTSectCollId.h
DTConfig::NSTEPF
static const int NSTEPF
Definition: DTConfig.h:35
DTSCThCache
DTCache< DTSectCollThSegm, DTSectCollThVector > DTSCThCache
Definition: DTSectColl.h:54
DTConfigManager.h
DTSectCollThSegm
Definition: DTSectCollThSegm.h:38
DTSectColl::~DTSectColl
~DTSectColl() override
Destructor.
Definition: DTSectColl.cc:65
DTTSPhi
Definition: DTTSPhi.h:53
DTSectColl::endPh
std::vector< DTSectCollPhSegm >::const_iterator endPh() const
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:154
DTSectColl::getDTSectCollPhCand
DTSectCollPhCand * getDTSectCollPhCand(int ifs, unsigned n) const
Get a Phi Candidate for Sector Collector.
Definition: DTSectColl.cc:358
DTSectColl::addTU
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
Definition: DTSectColl.cc:116
DTSectColl::_tsc
DTSC * _tsc[DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:197
DTSectColl::addTSPhi
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
DTSectColl::reconstruct
void reconstruct() override
Load Trigger Units triggers and run Sector Collector algorithm.
Definition: DTSectColl.h:178
DTConfigSectColl::NDTSC
static const int NDTSC
Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector.
Definition: DTConfigSectColl.h:43
DTCache::_cache
my_collection _cache
Definition: DTCache.h:53
DTSectColl::addTSTheta
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
DTChambThSegm
Definition: DTChambThSegm.h:39
DTSectCollThVector
std::vector< DTSectCollThSegm > DTSectCollThVector
Definition: DTSectColl.h:52
DTSectCollId
Definition: DTSectCollId.h:18
DTSectColl::nCandPh
unsigned nCandPh(int ifs) const
Return the number of Phi input tracks (first/second)
Definition: DTSectColl.cc:407
DTSectColl::SectCollThSegment
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
Definition: DTSectColl.cc:454
DTSectCollThSegm.h
DTSectCollPhSegm.h
DTSectColl::getDTSectCollThCand
DTSectCollThCand * getDTSectCollThCand(unsigned n) const
Get a Candidate for Sector Collector.
Definition: DTSectColl.cc:374
DTSectCollPhVector
std::vector< DTSectCollPhSegm > DTSectCollPhVector
Definition: DTSectColl.h:28
DTSectColl::sizePh
int sizePh() const
Return Phi cache size.
Definition: DTSectColl.h:151
DTSectColl::nSegmPh
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
Definition: DTSectColl.cc:419
DTSectColl::_tstheta
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:194
DTSectColl::nSegmTh
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
Definition: DTSectColl.cc:431
DTSectColl::beginTh
std::vector< DTSectCollThSegm >::const_iterator beginTh() const
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:157
DTSectColl::SectCollId
DTSectCollId SectCollId()
Return the Sector Collector Id.
Definition: DTSectColl.h:184
DTSectColl::nTracksTh
int nTracksTh() const
Return the number of output Theta tracks.
Definition: DTSectColl.h:139
DTSectColl::getTSPhi
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
Definition: DTSectColl.h:69
DTSC
Definition: DTSC.h:41
DTCache::clearCache
void clearCache()
Clear cache vector.
Definition: DTCache.h:47
DTSectColl::endTh
std::vector< DTSectCollThSegm >::const_iterator endTh() const
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:163
DTSectCollPhSegm
Definition: DTSectCollPhSegm.h:39
DTSectColl::clearCache
void clearCache()
Local position in chamber of a trigger-data object.
Definition: DTSectColl.h:172
DTSectColl::_tsphi
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:193
DTConfigManager
Definition: DTConfigManager.h:49
DTSCTrigUnit
Definition: DTSCTrigUnit.h:50
DTConfigSectColl::NTSTSC
static const int NTSTSC
Constants: number of TSTheta/TSPhi in input to Sector Collector.
Definition: DTConfigSectColl.h:40
DTSectColl::DTSectColl
DTSectColl(DTSectCollId id)
Constructor.
Definition: DTSectColl.cc:47
DTSectColl::getTrackPh
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
Definition: DTSectColl.cc:385
DTSectCollThCand
Definition: DTSectCollThCand.h:31
DTSectColl::getTrackTh
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
Definition: DTSectColl.cc:396
DTCache
Definition: DTCache.h:23
DTSectColl::_sectcollid
DTSectCollId _sectcollid
Definition: DTSectColl.h:191
DTTrigGeom
Definition: DTTrigGeom.h:41
DTTracoTrigData
Definition: DTTracoTrigData.h:37
DTChambPhSegm
Definition: DTChambPhSegm.h:41
DTSectColl::SectCollPhSegment
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
Definition: DTSectColl.cc:443
DTSectColl::nTracksPh
int nTracksPh() const
Return the number of output Phi tracks.
Definition: DTSectColl.h:136
DTSectColl::getTSTheta
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
Definition: DTSectColl.h:72
DTSectColl::nCandTh
unsigned nCandTh() const
Return the number of Theta input tracks.
Definition: DTSectColl.cc:417
DTSectCollThCand.h
DTSectCollPhCand.h
ParameterSet.h
DTSectColl::runSectColl
void runSectColl()
Run Sector Collector.
Definition: DTSectColl.cc:306
DTSectColl::_outcand_ph
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:203
DTSectColl::sizeTh
int sizeTh() const
Return Theta cache size.
Definition: DTSectColl.h:160
DTTSTheta
Definition: DTTSTheta.h:44
DTSectColl::_outcand_th
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:209
DTSectColl::_incand_ph
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:200
DTSectColl::config
const DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:75
DTCache.h