CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CosmicLayerPairs Class Reference

#include <CosmicLayerPairs.h>

Inheritance diagram for CosmicLayerPairs:
SeedLayerPairs

Public Member Functions

 CosmicLayerPairs (std::string geometry, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const GeometricSearchTracker &track, const TrackerTopology &ttopo)
 
std::vector< SeedLayerPairs::LayerPairoperator() () override
 
 ~CosmicLayerPairs () override
 
- Public Member Functions inherited from SeedLayerPairs
 SeedLayerPairs ()
 
virtual ~SeedLayerPairs ()
 

Private Member Functions

void init (const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const GeometricSearchTracker &, const TrackerTopology &)
 
std::vector< const TrackingRecHit * > selectTECHit (const SiStripRecHit2DCollection &collrphi, const TrackerTopology &ttopo, int side, int disk)
 
std::vector< const TrackingRecHit * > selectTECHit (const SiStripMatchedRecHit2DCollection &collmatch, const TrackerTopology &ttopo, int side, int disk)
 
std::vector< const TrackingRecHit * > selectTIBHit (const SiStripRecHit2DCollection &collrphi, const TrackerTopology &ttopo, int layer)
 
std::vector< const TrackingRecHit * > selectTIBHit (const SiStripMatchedRecHit2DCollection &collmatch, const TrackerTopology &ttopo, int layer)
 
std::vector< const TrackingRecHit * > selectTOBHit (const SiStripRecHit2DCollection &collrphi, const TrackerTopology &ttopo, int layer)
 
std::vector< const TrackingRecHit * > selectTOBHit (const SiStripMatchedRecHit2DCollection &collmatch, const TrackerTopology &ttopo, int layer)
 

Private Attributes

std::string _geometry
 
std::vector< BarrelDetLayer const * > bl
 
edm::OwnVector< LayerWithHitsCRACKLayerWithHits
 
std::vector< ForwardDetLayer const * > fneg
 
std::vector< ForwardDetLayer const * > fpos
 
edm::OwnVector< LayerWithHitsMTCCLayerWithHits
 
edm::OwnVector< LayerWithHitsTECMinusLayerWithHits
 
edm::OwnVector< LayerWithHitsTECPlusLayerWithHits
 
edm::OwnVector< LayerWithHitsTIBLayerWithHits
 
edm::OwnVector< LayerWithHitsTOBLayerWithHits
 

Additional Inherited Members

- Public Types inherited from SeedLayerPairs
typedef std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair
 

Detailed Description

find all (resonable) pairs of pixel layers

Definition at line 20 of file CosmicLayerPairs.h.

Constructor & Destructor Documentation

◆ CosmicLayerPairs()

CosmicLayerPairs::CosmicLayerPairs ( std::string  geometry,
const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
const GeometricSearchTracker track,
const TrackerTopology ttopo 
)
inline

Definition at line 22 of file CosmicLayerPairs.h.

References init(), and HLT_2023v12_cff::track.

27  : _geometry(geometry) {
28  init(collrphi, collmatched, track, ttopo);
29  };
void init(const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const GeometricSearchTracker &, const TrackerTopology &)
std::string _geometry

◆ ~CosmicLayerPairs()

CosmicLayerPairs::~CosmicLayerPairs ( )
override

Definition at line 236 of file CosmicLayerPairs.cc.

236 {}

Member Function Documentation

◆ init()

void CosmicLayerPairs::init ( const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
const GeometricSearchTracker track,
const TrackerTopology ttopo 
)
private

Definition at line 238 of file CosmicLayerPairs.cc.

References _geometry, bl, CRACKLayerWithHits, fneg, fpos, MTCCLayerWithHits, edm::OwnVector< T, P >::push_back(), selectTECHit(), selectTIBHit(), selectTOBHit(), TECMinusLayerWithHits, TECPlusLayerWithHits, TIBLayerWithHits, TOBLayerWithHits, and HLT_2023v12_cff::track.

Referenced by CosmicLayerPairs().

241  {
243  //std::cout << "about to take barrel" << std::endl;
244  bl = track.barrelLayers();
245  //std::cout << "barrel taken" << std::endl;
246  fpos = track.posTecLayers();
247  //std::cout << "pos forw taken" << std::endl;
248  fneg = track.negTecLayers();
249  //std::cout << "neg forw taken" << std::endl;
250  //isFirstCall=false;
251 
252  if (_geometry ==
253  "MTCC") { //we have to distinguish the MTCC and CRACK case because they have special geometries with different neumbering of layers
254  MTCCLayerWithHits.push_back(new LayerWithHits(bl[0], selectTIBHit(collrphi, ttopo, 1)));
255  MTCCLayerWithHits.push_back(new LayerWithHits(bl[1], selectTIBHit(collrphi, ttopo, 2)));
256  MTCCLayerWithHits.push_back(new LayerWithHits(bl[2], selectTOBHit(collrphi, ttopo, 1)));
257  MTCCLayerWithHits.push_back(new LayerWithHits(bl[3], selectTOBHit(collrphi, ttopo, 2)));
258  return;
259  }
260  if (_geometry == "CRACK") {
261  CRACKLayerWithHits.push_back(new LayerWithHits(bl[6], selectTOBHit(collmatched, ttopo, 7)));
262  CRACKLayerWithHits.push_back(new LayerWithHits(bl[5], selectTOBHit(collmatched, ttopo, 6)));
263  CRACKLayerWithHits.push_back(new LayerWithHits(bl[3], selectTOBHit(collmatched, ttopo, 4)));
264  CRACKLayerWithHits.push_back(new LayerWithHits(bl[2], selectTOBHit(collmatched, ttopo, 3)));
265  CRACKLayerWithHits.push_back(new LayerWithHits(bl[6], selectTOBHit(collrphi, ttopo, 7)));
266  CRACKLayerWithHits.push_back(new LayerWithHits(bl[5], selectTOBHit(collrphi, ttopo, 6)));
267  CRACKLayerWithHits.push_back(new LayerWithHits(bl[3], selectTOBHit(collrphi, ttopo, 4)));
268  CRACKLayerWithHits.push_back(new LayerWithHits(bl[2], selectTOBHit(collrphi, ttopo, 3)));
269  CRACKLayerWithHits.push_back(new LayerWithHits(bl[4], selectTOBHit(collrphi, ttopo, 5)));
270  CRACKLayerWithHits.push_back(new LayerWithHits(bl[1], selectTOBHit(collrphi, ttopo, 2)));
271  CRACKLayerWithHits.push_back(new LayerWithHits(bl[0], selectTOBHit(collrphi, ttopo, 1)));
272  CRACKLayerWithHits.push_back(new LayerWithHits(bl[4], selectTOBHit(collmatched, ttopo, 5)));
273  CRACKLayerWithHits.push_back(new LayerWithHits(bl[1], selectTOBHit(collmatched, ttopo, 2)));
274  CRACKLayerWithHits.push_back(new LayerWithHits(bl[0], selectTOBHit(collmatched, ttopo, 1)));
275  return;
276  }
277 
278  TIBLayerWithHits.push_back(new LayerWithHits(bl[3], selectTIBHit(collrphi, ttopo, 1))); //layer
279  //std::cout << "TIB 0" << std::endl;
280  TIBLayerWithHits.push_back(new LayerWithHits(bl[4], selectTIBHit(collrphi, ttopo, 2)));
281  //std::cout << "TIB 1" << std::endl;
282  TIBLayerWithHits.push_back(new LayerWithHits(bl[5], selectTIBHit(collrphi, ttopo, 3)));
283  //std::cout << "TIB 2" << std::endl;
284  TIBLayerWithHits.push_back(new LayerWithHits(bl[6], selectTIBHit(collrphi, ttopo, 4)));
285  //std::cout << "TIB 3" << std::endl;
286 
287  TOBLayerWithHits.push_back(new LayerWithHits(bl[7], selectTOBHit(collrphi, ttopo, 1)));
288  //std::cout << "TOB 0" << std::endl;
289  TOBLayerWithHits.push_back(new LayerWithHits(bl[8], selectTOBHit(collrphi, ttopo, 2)));
290  //std::cout << "TOB 1" << std::endl;
291  TOBLayerWithHits.push_back(new LayerWithHits(bl[9], selectTOBHit(collrphi, ttopo, 3)));
292  //std::cout << "TOB 2" << std::endl;
293  TOBLayerWithHits.push_back(new LayerWithHits(bl[10], selectTOBHit(collrphi, ttopo, 4)));
294  //std::cout << "TOB 3" << std::endl;
295  TOBLayerWithHits.push_back(new LayerWithHits(bl[11], selectTOBHit(collrphi, ttopo, 5)));
296  //std::cout << "TOB 4" << std::endl;
297  TOBLayerWithHits.push_back(new LayerWithHits(bl[12], selectTOBHit(collrphi, ttopo, 6)));
298  //std::cout << "TOB 5" << std::endl;
299 
300  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[0], selectTECHit(collrphi, ttopo, 2, 1))); //side, disk
301  //std::cout << "wheel 0" << std::endl;
302  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[1], selectTECHit(collrphi, ttopo, 2, 2)));
303  //std::cout << "wheel 1" << std::endl;
304  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[2], selectTECHit(collrphi, ttopo, 2, 3)));
305  //std::cout << "wheel 2" << std::endl;
306  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[3], selectTECHit(collrphi, ttopo, 2, 4)));
307  //std::cout << "wheel 3" << std::endl;
308  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[4], selectTECHit(collrphi, ttopo, 2, 5)));
309  //std::cout << "wheel 4" << std::endl;
310  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[5], selectTECHit(collrphi, ttopo, 2, 6)));
311  //std::cout << "wheel 5" << std::endl;
312  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[6], selectTECHit(collrphi, ttopo, 2, 7)));
313  //std::cout << "wheel 6" << std::endl;
314  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[7], selectTECHit(collrphi, ttopo, 2, 8)));
315  //std::cout << "wheel 7" << std::endl;
316  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[8], selectTECHit(collrphi, ttopo, 2, 9)));
317  //std::cout << "wheel 8" << std::endl;
318 
319  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[0], selectTECHit(collrphi, ttopo, 1, 1))); //side, disk
320  //std::cout << "wheel 0" << std::endl;
321  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[1], selectTECHit(collrphi, ttopo, 1, 2)));
322  //std::cout << "wheel 1" << std::endl;
323  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[2], selectTECHit(collrphi, ttopo, 1, 3)));
324  //std::cout << "wheel 2" << std::endl;
325  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[3], selectTECHit(collrphi, ttopo, 1, 4)));
326  //std::cout << "wheel 3" << std::endl;
327  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[4], selectTECHit(collrphi, ttopo, 1, 5)));
328  //std::cout << "wheel 4" << std::endl;
329  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[5], selectTECHit(collrphi, ttopo, 1, 6)));
330  //std::cout << "wheel 5" << std::endl;
331  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[6], selectTECHit(collrphi, ttopo, 1, 7)));
332  //std::cout << "wheel 6" << std::endl;
333  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[7], selectTECHit(collrphi, ttopo, 1, 8)));
334  //std::cout << "wheel 7" << std::endl;
335  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[8], selectTECHit(collrphi, ttopo, 1, 9)));
336  //std::cout << "wheel 8" << std::endl;
337 }
std::vector< ForwardDetLayer const * > fneg
std::vector< ForwardDetLayer const * > fpos
edm::OwnVector< LayerWithHits > TIBLayerWithHits
edm::OwnVector< LayerWithHits > TOBLayerWithHits
void push_back(D *&d)
Definition: OwnVector.h:326
std::vector< const TrackingRecHit * > selectTECHit(const SiStripRecHit2DCollection &collrphi, const TrackerTopology &ttopo, int side, int disk)
edm::OwnVector< LayerWithHits > MTCCLayerWithHits
edm::OwnVector< LayerWithHits > TECMinusLayerWithHits
edm::OwnVector< LayerWithHits > CRACKLayerWithHits
std::vector< const TrackingRecHit * > selectTOBHit(const SiStripRecHit2DCollection &collrphi, const TrackerTopology &ttopo, int layer)
edm::OwnVector< LayerWithHits > TECPlusLayerWithHits
std::vector< const TrackingRecHit * > selectTIBHit(const SiStripRecHit2DCollection &collrphi, const TrackerTopology &ttopo, int layer)
std::string _geometry
std::vector< BarrelDetLayer const * > bl

◆ operator()()

std::vector< SeedLayerPairs::LayerPair > CosmicLayerPairs::operator() ( )
overridevirtual

Implements SeedLayerPairs.

Definition at line 14 of file CosmicLayerPairs.cc.

References _geometry, CRACKLayerWithHits, Exception, MTCCLayerWithHits, mps_fire::result, TECMinusLayerWithHits, TECPlusLayerWithHits, TIBLayerWithHits, and TOBLayerWithHits.

14  {
15  std::vector<SeedLayerPairs::LayerPair> result;
16 
17  if (_geometry == "STANDARD") {
18  // result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[1], &TIBLayerWithHits[0]));
19  // result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[2], &TIBLayerWithHits[0]));
20 
24 
27 
30 
33 
36 
39 
42 
45 
47 
50 
53 
56 
59 
62 
65 
68 
70 
71  } else if (_geometry == "TECPAIRS_TOBTRIPLETS") {
74 
77 
80 
83 
86 
89 
92 
94 
97 
100 
103 
106 
109 
112 
115 
117 
118  } else if (_geometry == "MTCC") {
121  //IMPORTANT
122  // The seed from overlaps must be at the end
125  } else if (_geometry == "CRACK") {
126  //TODO: clean all this. Now this is a random choice of layers
141  } else if (_geometry == "TIBD+") {
146  } else if (_geometry == "TOB") {
150 
151  } else if (_geometry == "TIBTOB") {
154 
158 
159  } else if (_geometry == "TEC+") {
162 
165 
168 
171 
174 
177 
180 
182 
183  } else if (_geometry == "CkfTIBD+") {
186  } else if (_geometry == "CkfTIBTOB") {
189 
193  } else if (_geometry == "CkfTIF3") {
196 
200 
203 
206 
209 
212 
215 
218 
221 
223 
224  } else if (_geometry == "CkfTOB") {
227 
231  } else {
232  throw cms::Exception("CosmicLayerPairs") << "The geometry " << _geometry << " is not implemented ";
233  }
234  return result;
235 }
edm::OwnVector< LayerWithHits > TIBLayerWithHits
edm::OwnVector< LayerWithHits > TOBLayerWithHits
std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair
edm::OwnVector< LayerWithHits > MTCCLayerWithHits
edm::OwnVector< LayerWithHits > TECMinusLayerWithHits
edm::OwnVector< LayerWithHits > CRACKLayerWithHits
edm::OwnVector< LayerWithHits > TECPlusLayerWithHits
std::string _geometry

◆ selectTECHit() [1/2]

std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTECHit ( const SiStripRecHit2DCollection collrphi,
const TrackerTopology ttopo,
int  side,
int  disk 
)
private

Definition at line 339 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerTopology::tecDetIdWheelComparator().

Referenced by init().

342  {
343  std::vector<const TrackingRecHit *> theChoosedHits;
344  edmNew::copyDetSetRange(collrphi, theChoosedHits, ttopo.tecDetIdWheelComparator(side, disk));
345  return theChoosedHits;
346 }
std::pair< DetId, SameLayerComparator > tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const
void copyDetSetRange(DSTV const &dstv, std::vector< T const *> &v, std::pair< A, B > const &sel)

◆ selectTECHit() [2/2]

std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTECHit ( const SiStripMatchedRecHit2DCollection collmatch,
const TrackerTopology ttopo,
int  side,
int  disk 
)
private

Definition at line 366 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerTopology::tecDetIdWheelComparator().

369  {
370  std::vector<const TrackingRecHit *> theChoosedHits;
371  //std::cout << "in selectTECHit" << std::endl;
372  edmNew::copyDetSetRange(collmatch, theChoosedHits, ttopo.tecDetIdWheelComparator(side, disk));
373  return theChoosedHits;
374 }
std::pair< DetId, SameLayerComparator > tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const
void copyDetSetRange(DSTV const &dstv, std::vector< T const *> &v, std::pair< A, B > const &sel)

◆ selectTIBHit() [1/2]

std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTIBHit ( const SiStripRecHit2DCollection collrphi,
const TrackerTopology ttopo,
int  layer 
)
private

Definition at line 348 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), nano_mu_digi_cff::layer, and TrackerTopology::tibDetIdLayerComparator().

Referenced by init().

350  {
351  std::vector<const TrackingRecHit *> theChoosedHits;
352  //std::cout << "in selectTIBHit" << std::endl;
353  edmNew::copyDetSetRange(collrphi, theChoosedHits, ttopo.tibDetIdLayerComparator(layer));
354  return theChoosedHits;
355 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const *> &v, std::pair< A, B > const &sel)
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const

◆ selectTIBHit() [2/2]

std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTIBHit ( const SiStripMatchedRecHit2DCollection collmatch,
const TrackerTopology ttopo,
int  layer 
)
private

Definition at line 376 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), nano_mu_digi_cff::layer, and TrackerTopology::tibDetIdLayerComparator().

378  {
379  std::vector<const TrackingRecHit *> theChoosedHits;
380  //std::cout << "in selectTIBHit" << std::endl;
381  edmNew::copyDetSetRange(collmatch, theChoosedHits, ttopo.tibDetIdLayerComparator(layer));
382  return theChoosedHits;
383 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const *> &v, std::pair< A, B > const &sel)
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const

◆ selectTOBHit() [1/2]

std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTOBHit ( const SiStripRecHit2DCollection collrphi,
const TrackerTopology ttopo,
int  layer 
)
private

Definition at line 357 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), nano_mu_digi_cff::layer, and TrackerTopology::tobDetIdLayerComparator().

Referenced by init().

359  {
360  std::vector<const TrackingRecHit *> theChoosedHits;
361  //std::cout << "in selectTOBHit" << std::endl;
362  edmNew::copyDetSetRange(collrphi, theChoosedHits, ttopo.tobDetIdLayerComparator(layer));
363  return theChoosedHits;
364 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const *> &v, std::pair< A, B > const &sel)
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const

◆ selectTOBHit() [2/2]

std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTOBHit ( const SiStripMatchedRecHit2DCollection collmatch,
const TrackerTopology ttopo,
int  layer 
)
private

Definition at line 385 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), nano_mu_digi_cff::layer, and TrackerTopology::tobDetIdLayerComparator().

387  {
388  std::vector<const TrackingRecHit *> theChoosedHits;
389  //std::cout << "in selectTOBHit" << std::endl;
390  edmNew::copyDetSetRange(collmatch, theChoosedHits, ttopo.tobDetIdLayerComparator(layer));
391  return theChoosedHits;
392 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const *> &v, std::pair< A, B > const &sel)
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const

Member Data Documentation

◆ _geometry

std::string CosmicLayerPairs::_geometry
private

Definition at line 40 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

◆ bl

std::vector<BarrelDetLayer const *> CosmicLayerPairs::bl
private

Definition at line 42 of file CosmicLayerPairs.h.

Referenced by init().

◆ CRACKLayerWithHits

edm::OwnVector<LayerWithHits> CosmicLayerPairs::CRACKLayerWithHits
private

Definition at line 50 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

◆ fneg

std::vector<ForwardDetLayer const *> CosmicLayerPairs::fneg
private

Definition at line 44 of file CosmicLayerPairs.h.

Referenced by init().

◆ fpos

std::vector<ForwardDetLayer const *> CosmicLayerPairs::fpos
private

Definition at line 43 of file CosmicLayerPairs.h.

Referenced by init().

◆ MTCCLayerWithHits

edm::OwnVector<LayerWithHits> CosmicLayerPairs::MTCCLayerWithHits
private

Definition at line 49 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

◆ TECMinusLayerWithHits

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TECMinusLayerWithHits
private

Definition at line 46 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

◆ TECPlusLayerWithHits

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TECPlusLayerWithHits
private

Definition at line 45 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

◆ TIBLayerWithHits

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TIBLayerWithHits
private

Definition at line 47 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

◆ TOBLayerWithHits

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TOBLayerWithHits
private

Definition at line 48 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().