CMS 3D CMS Logo

List of all members | Public Types | Public 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 ()
 
void init (const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, std::string geometry, const edm::EventSetup &iSetup)
 
std::vector< LayerPairAndLayerslayers ()
 
 ~CosmicLayerTriplets ()
 

Private Attributes

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

Detailed Description

find all (resonable) pairs of pixel layers

Definition at line 24 of file CosmicLayerTriplets.h.

Member Typedef Documentation

Definition at line 29 of file CosmicLayerTriplets.h.

Constructor & Destructor Documentation

CosmicLayerTriplets::CosmicLayerTriplets ( )
inline

Definition at line 26 of file CosmicLayerTriplets.h.

References ~CosmicLayerTriplets().

26 {};
CosmicLayerTriplets::~CosmicLayerTriplets ( )

Definition at line 50 of file CosmicLayerTriplets.cc.

References allLayersWithHits.

Referenced by CosmicLayerTriplets().

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

void CosmicLayerTriplets::init ( const SiStripRecHit2DCollection collstereo,
const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
std::string  geometry,
const edm::EventSetup iSetup 
)

Definition at line 56 of file CosmicLayerTriplets.cc.

References _geometry, allLayersWithHits, GeometricSearchTracker::barrelLayers(), bl, edm::ESWatcher< T >::check(), watchdog::const, geometry, edm::EventSetup::get(), lh1, lh2, lh3, lh4, LogDebug, TrackerTopology::tibDetIdLayerComparator(), TrackerTopology::tobDetIdLayerComparator(), HLT_2018_cff::track, and watchTrackerGeometry_.

Referenced by SeedGeneratorForCosmics::init().

60  {
62  if (watchTrackerGeometry_.check(iSetup)) {
64  iSetup.get<TrackerRecoGeometryRecord>().get(track);
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 }
#define LogDebug(id)
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
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
ESHandle< TrackerGeometry > geometry
T get() const
Definition: EventSetup.h:73
edm::ESWatcher< TrackerRecoGeometryRecord > watchTrackerGeometry_
std::vector< BarrelDetLayer const * > const & barrelLayers() const
vector< CosmicLayerTriplets::LayerPairAndLayers > CosmicLayerTriplets::layers ( )

Definition at line 17 of file CosmicLayerTriplets.cc.

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

Referenced by CosmicHitTripletGenerator::CosmicHitTripletGenerator().

17  {
18  vector<LayerPairAndLayers> result;
19 
20  if (_geometry == "STANDARD") {
21  vector<const LayerWithHits*> third;
22  third.push_back(lh3);
23  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh1, lh2), third));
24  }
25  if (_geometry == "TECPAIRS_TOBTRIPLETS") {
26  vector<const LayerWithHits*> third;
27  third.push_back(lh3);
28  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh1, lh2), third));
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);
40  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh3, lh2), third1));
41  third2.push_back(lh1);
42  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh2, lh1), third2));
43  third3.push_back(lh2);
44  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh3, lh2), third3));
45  third4.push_back(lh4);
46  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh2, lh3), third4));
47  }
48  return result;
49 }
std::pair< SeedLayerPairs::LayerPair, std::vector< const LayerWithHits * > > LayerPairAndLayers
std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair

Member Data Documentation

std::string CosmicLayerTriplets::_geometry
private

Definition at line 57 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

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

Definition at line 47 of file CosmicLayerTriplets.h.

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

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

Definition at line 45 of file CosmicLayerTriplets.h.

Referenced by init().

LayerWithHits* CosmicLayerTriplets::lh1
private

Definition at line 38 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

LayerWithHits* CosmicLayerTriplets::lh2
private

Definition at line 39 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

LayerWithHits* CosmicLayerTriplets::lh3
private

Definition at line 40 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

LayerWithHits* CosmicLayerTriplets::lh4
private

Definition at line 41 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

edm::ESWatcher<TrackerRecoGeometryRecord> CosmicLayerTriplets::watchTrackerGeometry_
private

Definition at line 43 of file CosmicLayerTriplets.h.

Referenced by init().