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

◆ LayerPairAndLayers

Definition at line 29 of file CosmicLayerTriplets.h.

Constructor & Destructor Documentation

◆ CosmicLayerTriplets()

CosmicLayerTriplets::CosmicLayerTriplets ( )
inline

Definition at line 26 of file CosmicLayerTriplets.h.

26 {};

◆ ~CosmicLayerTriplets()

CosmicLayerTriplets::~CosmicLayerTriplets ( )

Definition at line 50 of file CosmicLayerTriplets.cc.

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

References allLayersWithHits.

Member Function Documentation

◆ init()

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.

60  {
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 }

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

Referenced by SeedGeneratorForCosmics::init().

◆ layers()

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

Definition at line 17 of file CosmicLayerTriplets.cc.

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 }

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

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 47 of file CosmicLayerTriplets.h.

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

◆ bl

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

Definition at line 45 of file CosmicLayerTriplets.h.

Referenced by init().

◆ lh1

LayerWithHits* CosmicLayerTriplets::lh1
private

Definition at line 38 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ lh2

LayerWithHits* CosmicLayerTriplets::lh2
private

Definition at line 39 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ lh3

LayerWithHits* CosmicLayerTriplets::lh3
private

Definition at line 40 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ lh4

LayerWithHits* CosmicLayerTriplets::lh4
private

Definition at line 41 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

◆ watchTrackerGeometry_

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

Definition at line 43 of file CosmicLayerTriplets.h.

Referenced by init().

CosmicLayerTriplets::lh2
LayerWithHits * lh2
Definition: CosmicLayerTriplets.h:39
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
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:11713
CosmicLayerTriplets::bl
std::vector< BarrelDetLayer const * > bl
Definition: CosmicLayerTriplets.h:45
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
relativeConstraints.geometry
geometry
Definition: relativeConstraints.py:39
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
CosmicLayerTriplets::allLayersWithHits
std::vector< LayerWithHits * > allLayersWithHits
Definition: CosmicLayerTriplets.h:47
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
CosmicLayerTriplets::watchTrackerGeometry_
edm::ESWatcher< TrackerRecoGeometryRecord > watchTrackerGeometry_
Definition: CosmicLayerTriplets.h:43
edm::ESHandle< GeometricSearchTracker >
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
CosmicLayerTriplets::lh1
LayerWithHits * lh1
Definition: CosmicLayerTriplets.h:38
get
#define get
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