CMS 3D CMS Logo

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

#include <CosmicLayerTriplets.h>

Public Types

typedef std::pair< SeedLayerPairs::LayerPair, std::vector< const LayerWithHits * > > LayerPairAndLayers
 

Public Member Functions

 CosmicLayerTriplets (std::string geometry, const SiStripRecHit2DCollection &collrphi, const GeometricSearchTracker &track, const TrackerTopology &ttopo)
 
std::vector< LayerPairAndLayerslayers ()
 
 ~CosmicLayerTriplets ()
 

Private Member Functions

void init (const SiStripRecHit2DCollection &collrphi, std::string geometry, const GeometricSearchTracker &track, const TrackerTopology &ttopo)
 

Private Attributes

std::string _geometry
 
std::vector< LayerWithHits * > allLayersWithHits
 
std::vector< BarrelDetLayer const * > bl
 
LayerWithHitslh1
 
LayerWithHitslh2
 
LayerWithHitslh3
 
LayerWithHitslh4
 

Detailed Description

find all (resonable) pairs of pixel layers

Definition at line 23 of file CosmicLayerTriplets.h.

Member Typedef Documentation

◆ LayerPairAndLayers

Definition at line 33 of file CosmicLayerTriplets.h.

Constructor & Destructor Documentation

◆ CosmicLayerTriplets()

CosmicLayerTriplets::CosmicLayerTriplets ( std::string  geometry,
const SiStripRecHit2DCollection collrphi,
const GeometricSearchTracker track,
const TrackerTopology ttopo 
)
inline

Definition at line 25 of file CosmicLayerTriplets.h.

References init(), eostools::move(), and HLT_2022v15_cff::track.

28  {
29  init(collrphi, std::move(geometry), track, ttopo);
30  };
void init(const SiStripRecHit2DCollection &collrphi, std::string geometry, const GeometricSearchTracker &track, const TrackerTopology &ttopo)
def move(src, dest)
Definition: eostools.py:511

◆ ~CosmicLayerTriplets()

CosmicLayerTriplets::~CosmicLayerTriplets ( )

Definition at line 50 of file CosmicLayerTriplets.cc.

References allLayersWithHits.

50  {
51  for (vector<LayerWithHits*>::const_iterator it = allLayersWithHits.begin(); it != allLayersWithHits.end(); it++) {
52  delete *it;
53  }
54 }
std::vector< LayerWithHits * > allLayersWithHits

Member Function Documentation

◆ init()

void CosmicLayerTriplets::init ( const SiStripRecHit2DCollection collrphi,
std::string  geometry,
const GeometricSearchTracker track,
const TrackerTopology ttopo 
)
private

Definition at line 56 of file CosmicLayerTriplets.cc.

References _geometry, allLayersWithHits, bl, runTheMatrix::const, lh1, lh2, lh3, lh4, LogDebug, eostools::move(), TrackerTopology::tibDetIdLayerComparator(), TrackerTopology::tobDetIdLayerComparator(), and HLT_2022v15_cff::track.

Referenced by CosmicLayerTriplets().

59  {
61  bl = track.barrelLayers();
62  for (vector<LayerWithHits*>::const_iterator it = allLayersWithHits.begin(); it != allLayersWithHits.end(); it++) {
63  delete *it;
64  }
65 
66  allLayersWithHits.clear();
67  LogDebug("CosmicSeedFinder") << "Reconstruction for geometry " << _geometry;
68  if (_geometry == "STANDARD" || _geometry == "TECPAIRS_TOBTRIPLETS") {
69  const DetLayer* bl1 = dynamic_cast<DetLayer const*>(bl[10]);
70  const DetLayer* bl2 = dynamic_cast<DetLayer const*>(bl[11]);
71  const DetLayer* bl3 = dynamic_cast<DetLayer const*>(bl[12]);
72  // //LayersWithHits
73  lh1 = new LayerWithHits(bl1, collrphi, ttopo.tobDetIdLayerComparator(4));
74  allLayersWithHits.push_back(lh1);
75  lh2 = new LayerWithHits(bl2, collrphi, ttopo.tobDetIdLayerComparator(5));
76  allLayersWithHits.push_back(lh2);
77  lh3 = new LayerWithHits(bl3, collrphi, ttopo.tobDetIdLayerComparator(6));
78  allLayersWithHits.push_back(lh3);
79  }
80  if (_geometry == "MTCC") {
81  const DetLayer* bl1 = dynamic_cast<DetLayer const*>(bl[0]);
82  const DetLayer* bl2 = dynamic_cast<DetLayer const*>(bl[1]);
83  const DetLayer* bl3 = dynamic_cast<DetLayer const*>(bl[2]);
84  const DetLayer* bl4 = dynamic_cast<DetLayer const*>(bl[3]);
85 
86  lh1 = new LayerWithHits(bl1, collrphi, ttopo.tibDetIdLayerComparator(1));
87  allLayersWithHits.push_back(lh1);
88  lh2 = new LayerWithHits(bl2, collrphi, ttopo.tibDetIdLayerComparator(2));
89  allLayersWithHits.push_back(lh2);
90  lh3 = new LayerWithHits(bl3, collrphi, ttopo.tobDetIdLayerComparator(1));
91  allLayersWithHits.push_back(lh3);
92  lh4 = new LayerWithHits(bl4, collrphi, ttopo.tobDetIdLayerComparator(2));
93  allLayersWithHits.push_back(lh4);
94  }
95 }
std::vector< LayerWithHits * > allLayersWithHits
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
std::vector< BarrelDetLayer const * > bl
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)

◆ layers()

vector< CosmicLayerTriplets::LayerPairAndLayers > CosmicLayerTriplets::layers ( )

Definition at line 17 of file CosmicLayerTriplets.cc.

References _geometry, lh1, lh2, lh3, lh4, mps_fire::result, and trklet::third.

17  {
18  vector<LayerPairAndLayers> result;
19 
20  if (_geometry == "STANDARD") {
21  vector<const LayerWithHits*> third;
22  third.push_back(lh3);
24  }
25  if (_geometry == "TECPAIRS_TOBTRIPLETS") {
26  vector<const LayerWithHits*> third;
27  third.push_back(lh3);
29  }
30  if (_geometry == "MTCC") {
31  vector<const LayerWithHits*> third1;
32  vector<const LayerWithHits*> third2;
33  vector<const LayerWithHits*> third3;
34  vector<const LayerWithHits*> third4;
35  third1.clear();
36  third2.clear();
37  third3.clear();
38  third4.clear();
39  third1.push_back(lh1);
41  third2.push_back(lh1);
43  third3.push_back(lh2);
45  third4.push_back(lh4);
47  }
48  return result;
49 }
std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair
constexpr double third
Definition: Settings.h:42
std::pair< SeedLayerPairs::LayerPair, std::vector< const LayerWithHits * > > LayerPairAndLayers

Member Data Documentation

◆ _geometry

std::string CosmicLayerTriplets::_geometry
private

Definition at line 57 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ allLayersWithHits

std::vector<LayerWithHits *> CosmicLayerTriplets::allLayersWithHits
private

Definition at line 49 of file CosmicLayerTriplets.h.

Referenced by init(), and ~CosmicLayerTriplets().

◆ bl

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

Definition at line 47 of file CosmicLayerTriplets.h.

Referenced by init().

◆ lh1

LayerWithHits* CosmicLayerTriplets::lh1
private

Definition at line 42 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ lh2

LayerWithHits* CosmicLayerTriplets::lh2
private

Definition at line 43 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ lh3

LayerWithHits* CosmicLayerTriplets::lh3
private

Definition at line 44 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ lh4

LayerWithHits* CosmicLayerTriplets::lh4
private

Definition at line 45 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().