CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< TrackerRecoGeometryRecord
watchTrackerGeometry_
 

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.

26 {};
CosmicLayerTriplets::~CosmicLayerTriplets ( )

Definition at line 50 of file CosmicLayerTriplets.cc.

References allLayersWithHits.

51 {
52  for(vector<LayerWithHits*>::const_iterator it=allLayersWithHits.begin(); it!=allLayersWithHits.end();it++){
53  delete *it;
54  }
55 }
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 59 of file CosmicLayerTriplets.cc.

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

Referenced by SeedGeneratorForCosmics::init().

63  {
64 
66  if(watchTrackerGeometry_.check(iSetup)){
68  iSetup.get<TrackerRecoGeometryRecord>().get( track );
69  bl=track->barrelLayers();
70  }
72  iSetup.get<TrackerTopologyRcd>().get(httopo);
73  const TrackerTopology& ttopo = *httopo;
74 
75  for(vector<LayerWithHits*>::const_iterator it=allLayersWithHits.begin();
76  it!=allLayersWithHits.end();it++){
77  delete *it;
78  }
79 
80  allLayersWithHits.clear();
81  LogDebug("CosmicSeedFinder") <<"Reconstruction for geometry "<<_geometry;
82  if (_geometry=="STANDARD" || _geometry=="TECPAIRS_TOBTRIPLETS"){
83  const DetLayer* bl1=dynamic_cast<DetLayer const*>(bl[10]);
84  const DetLayer* bl2=dynamic_cast<DetLayer const*>(bl[11]);
85  const DetLayer* bl3=dynamic_cast<DetLayer const*>(bl[12]);
86  // //LayersWithHits
87  lh1=new LayerWithHits(bl1,collrphi,ttopo.tobDetIdLayerComparator(4)); allLayersWithHits.push_back(lh1);
88  lh2=new LayerWithHits(bl2,collrphi,ttopo.tobDetIdLayerComparator(5)); allLayersWithHits.push_back(lh2);
89  lh3=new LayerWithHits(bl3,collrphi,ttopo.tobDetIdLayerComparator(6)); allLayersWithHits.push_back(lh3);
90  }
91  if(_geometry=="MTCC"){
92 
93  const DetLayer* bl1=dynamic_cast<DetLayer const*>(bl[0]);
94  const DetLayer* bl2=dynamic_cast<DetLayer const*>(bl[1]);
95  const DetLayer* bl3=dynamic_cast<DetLayer const*>(bl[2]);
96  const DetLayer* bl4=dynamic_cast<DetLayer const*>(bl[3]);
97 
98  lh1=new LayerWithHits(bl1,collrphi,ttopo.tibDetIdLayerComparator(1)); allLayersWithHits.push_back(lh1);
99  lh2=new LayerWithHits(bl2,collrphi,ttopo.tibDetIdLayerComparator(2)); allLayersWithHits.push_back(lh2);
100  lh3=new LayerWithHits(bl3,collrphi,ttopo.tobDetIdLayerComparator(1)); allLayersWithHits.push_back(lh3);
101  lh4=new LayerWithHits(bl4,collrphi,ttopo.tobDetIdLayerComparator(2)); allLayersWithHits.push_back(lh4);
102  }
103 }
#define LogDebug(id)
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
std::vector< BarrelDetLayer const * > bl
const T & get() const
Definition: EventSetup.h:56
string const
Definition: compareJSON.py:14
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
ESHandle< TrackerGeometry > geometry
edm::ESWatcher< TrackerRecoGeometryRecord > watchTrackerGeometry_
std::vector< LayerWithHits * > allLayersWithHits
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().

18 {
19  vector<LayerPairAndLayers> result;
20 
21  if (_geometry=="STANDARD"){
22  vector<const LayerWithHits*> third;
23  third.push_back(lh3);
24  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh1,lh2),third));
25 
26  }
27  if (_geometry=="TECPAIRS_TOBTRIPLETS"){
28  vector<const LayerWithHits*> third;
29  third.push_back(lh3);
30  result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh1,lh2),third));
31 
32  }
33  if (_geometry=="MTCC"){
34  vector<const LayerWithHits*> third1;
35  vector<const LayerWithHits*> third2;
36  vector<const LayerWithHits*> third3;
37  vector<const LayerWithHits*> third4;
38  third1.clear();third2.clear();third3.clear();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
tuple result
Definition: mps_fire.py:95
std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair

Member Data Documentation

std::string CosmicLayerTriplets::_geometry
private

Definition at line 60 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

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

Definition at line 50 of file CosmicLayerTriplets.h.

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

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

Definition at line 48 of file CosmicLayerTriplets.h.

Referenced by init().

LayerWithHits* CosmicLayerTriplets::lh1
private

Definition at line 41 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

LayerWithHits* CosmicLayerTriplets::lh2
private

Definition at line 42 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

LayerWithHits* CosmicLayerTriplets::lh3
private

Definition at line 43 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

LayerWithHits* CosmicLayerTriplets::lh4
private

Definition at line 44 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

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

Definition at line 46 of file CosmicLayerTriplets.h.

Referenced by init().