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 
57  const SiStripRecHit2DCollection& collrphi,
58  const SiStripMatchedRecHit2DCollection& collmatched,
60  const edm::EventSetup& iSetup) {
62  if (watchTrackerGeometry_.check(iSetup)) {
65  bl = track->barrelLayers();
66  }
68  iSetup.get<TrackerTopologyRcd>().get(httopo);
69  const TrackerTopology& ttopo = *httopo;
70 
71  for (vector<LayerWithHits*>::const_iterator it = allLayersWithHits.begin(); it != allLayersWithHits.end(); it++) {
72  delete *it;
73  }
74 
75  allLayersWithHits.clear();
76  LogDebug("CosmicSeedFinder") << "Reconstruction for geometry " << _geometry;
77  if (_geometry == "STANDARD" || _geometry == "TECPAIRS_TOBTRIPLETS") {
78  const DetLayer* bl1 = dynamic_cast<DetLayer const*>(bl[10]);
79  const DetLayer* bl2 = dynamic_cast<DetLayer const*>(bl[11]);
80  const DetLayer* bl3 = dynamic_cast<DetLayer const*>(bl[12]);
81  // //LayersWithHits
82  lh1 = new LayerWithHits(bl1, collrphi, ttopo.tobDetIdLayerComparator(4));
83  allLayersWithHits.push_back(lh1);
84  lh2 = new LayerWithHits(bl2, collrphi, ttopo.tobDetIdLayerComparator(5));
85  allLayersWithHits.push_back(lh2);
86  lh3 = new LayerWithHits(bl3, collrphi, ttopo.tobDetIdLayerComparator(6));
87  allLayersWithHits.push_back(lh3);
88  }
89  if (_geometry == "MTCC") {
90  const DetLayer* bl1 = dynamic_cast<DetLayer const*>(bl[0]);
91  const DetLayer* bl2 = dynamic_cast<DetLayer const*>(bl[1]);
92  const DetLayer* bl3 = dynamic_cast<DetLayer const*>(bl[2]);
93  const DetLayer* bl4 = dynamic_cast<DetLayer const*>(bl[3]);
94 
95  lh1 = new LayerWithHits(bl1, collrphi, ttopo.tibDetIdLayerComparator(1));
96  allLayersWithHits.push_back(lh1);
97  lh2 = new LayerWithHits(bl2, collrphi, ttopo.tibDetIdLayerComparator(2));
98  allLayersWithHits.push_back(lh2);
99  lh3 = new LayerWithHits(bl3, collrphi, ttopo.tobDetIdLayerComparator(1));
100  allLayersWithHits.push_back(lh3);
101  lh4 = new LayerWithHits(bl4, collrphi, ttopo.tobDetIdLayerComparator(2));
102  allLayersWithHits.push_back(lh4);
103  }
104 }
CosmicLayerTriplets::lh2
LayerWithHits * lh2
Definition: CosmicLayerTriplets.h:39
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
geometry
ESHandle< TrackerGeometry > geometry
Definition: TkLasBeamFitter.cc:200
CosmicLayerTriplets::_geometry
std::string _geometry
Definition: CosmicLayerTriplets.h:57
TrackerTopology::tobDetIdLayerComparator
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
Definition: TrackerTopology.h:552
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
MessageLogger.h
CosmicLayerTriplets.h
TrackerGeometry.h
CosmicLayerTriplets::bl
std::vector< BarrelDetLayer const * > bl
Definition: CosmicLayerTriplets.h:45
ESHandle.h
DetLayer
Definition: DetLayer.h:21
TrackerTopology::tibDetIdLayerComparator
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
Definition: TrackerTopology.h:544
TrackerTopology
Definition: TrackerTopology.h:16
geometry
Definition: geometry.py:1
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:11
CosmicLayerTriplets::allLayersWithHits
std::vector< LayerWithHits * > allLayersWithHits
Definition: CosmicLayerTriplets.h:47
CosmicLayerTriplets::~CosmicLayerTriplets
~CosmicLayerTriplets()
Definition: CosmicLayerTriplets.cc:50
GeometricSearchTracker.h
TrackerTopology.h
TrackerTopologyRcd.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
CosmicLayerTriplets::watchTrackerGeometry_
edm::ESWatcher< TrackerRecoGeometryRecord > watchTrackerGeometry_
Definition: CosmicLayerTriplets.h:43
SeedLayerPairs.h
edm::ESHandle< GeometricSearchTracker >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackerDigiGeometryRecord.h
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
CosmicLayerTriplets::lh1
LayerWithHits * lh1
Definition: CosmicLayerTriplets.h:38
CosmicLayerTriplets::init
void init(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, std::string geometry, const edm::EventSetup &iSetup)
Definition: CosmicLayerTriplets.cc:56
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
BarrelDetLayer.h
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
edmNew::DetSetVector
Definition: DetSetNew.h:13
CosmicLayerTriplets::layers
std::vector< LayerPairAndLayers > layers()
Definition: CosmicLayerTriplets.cc:17
CosmicLayerTriplets::lh3
LayerWithHits * lh3
Definition: CosmicLayerTriplets.h:40
SeedLayerPairs::LayerPair
std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair
Definition: SeedLayerPairs.h:19
mps_fire.result
result
Definition: mps_fire.py:311
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
CosmicLayerTriplets::lh4
LayerWithHits * lh4
Definition: CosmicLayerTriplets.h:41
CosmicLayerTriplets::LayerPairAndLayers
std::pair< SeedLayerPairs::LayerPair, std::vector< const LayerWithHits * > > LayerPairAndLayers
Definition: CosmicLayerTriplets.h:29
LayerWithHits
Definition: LayerWithHits.h:12