CMS 3D CMS Logo

CosmicLayerTriplets.cc
Go to the documentation of this file.
4 
6 
12 
15 
16 using std::vector;
17 vector<CosmicLayerTriplets::LayerPairAndLayers> CosmicLayerTriplets::layers() {
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 }
51  for (vector<LayerWithHits*>::const_iterator it = allLayersWithHits.begin(); it != allLayersWithHits.end(); it++) {
52  delete *it;
53  }
54 }
55 
59  const TrackerTopology& ttopo) {
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::pair< const LayerWithHits *, const LayerWithHits * > LayerPair
std::vector< LayerWithHits * > allLayersWithHits
constexpr double third
Definition: Settings.h:42
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
std::vector< LayerPairAndLayers > layers()
std::vector< BarrelDetLayer const * > bl
void init(const SiStripRecHit2DCollection &collrphi, std::string geometry, const GeometricSearchTracker &track, const TrackerTopology &ttopo)
std::pair< SeedLayerPairs::LayerPair, std::vector< const LayerWithHits * > > LayerPairAndLayers
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)