#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< LayerPairAndLayers > | layers () |
~CosmicLayerTriplets () | |
Private Attributes | |
std::string | _geometry |
TrackerLayerIdAccessor | acc |
std::vector< LayerWithHits * > | allLayersWithHits |
std::vector< BarrelDetLayer * > | bl |
std::vector< ForwardDetLayer * > | fneg |
std::vector< ForwardDetLayer * > | fpos |
bool | isFirstCall |
LayerWithHits * | lh1 |
LayerWithHits * | lh2 |
LayerWithHits * | lh3 |
LayerWithHits * | lh4 |
find all (resonable) pairs of pixel layers
Definition at line 23 of file CosmicLayerTriplets.h.
typedef std::pair<SeedLayerPairs::LayerPair, std::vector<const LayerWithHits*> > CosmicLayerTriplets::LayerPairAndLayers |
Definition at line 28 of file CosmicLayerTriplets.h.
CosmicLayerTriplets::CosmicLayerTriplets | ( | ) | [inline] |
Definition at line 25 of file CosmicLayerTriplets.h.
:isFirstCall(true){};
CosmicLayerTriplets::~CosmicLayerTriplets | ( | ) |
Definition at line 50 of file CosmicLayerTriplets.cc.
References allLayersWithHits.
{ for(vector<LayerWithHits*>::const_iterator it=allLayersWithHits.begin(); it!=allLayersWithHits.end();it++){ delete *it; } }
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, acc, allLayersWithHits, bl, geometry, edm::EventSetup::get(), isFirstCall, lh1, lh2, lh3, lh4, LogDebug, TrackerLayerIdAccessor::stripTIBLayer(), and TrackerLayerIdAccessor::stripTOBLayer().
Referenced by SeedGeneratorForCosmics::init().
{ _geometry=geometry; if(isFirstCall){ edm::ESHandle<GeometricSearchTracker> track; iSetup.get<TrackerRecoGeometryRecord>().get( track ); bl=track->barrelLayers(); isFirstCall=false; } for(vector<LayerWithHits*>::const_iterator it=allLayersWithHits.begin(); it!=allLayersWithHits.end();it++){ delete *it; } allLayersWithHits.clear(); LogDebug("CosmicSeedFinder") <<"Reconstruction for geometry "<<_geometry; if (_geometry=="STANDARD" || _geometry=="TECPAIRS_TOBTRIPLETS"){ const DetLayer* bl1=dynamic_cast<DetLayer*>(bl[10]); const DetLayer* bl2=dynamic_cast<DetLayer*>(bl[11]); const DetLayer* bl3=dynamic_cast<DetLayer*>(bl[12]); // //LayersWithHits lh1=new LayerWithHits(bl1,collrphi,acc.stripTOBLayer(4)); allLayersWithHits.push_back(lh1); lh2=new LayerWithHits(bl2,collrphi,acc.stripTOBLayer(5)); allLayersWithHits.push_back(lh2); lh3=new LayerWithHits(bl3,collrphi,acc.stripTOBLayer(6)); allLayersWithHits.push_back(lh3); } if(_geometry=="MTCC"){ const DetLayer* bl1=dynamic_cast<DetLayer*>(bl[0]); const DetLayer* bl2=dynamic_cast<DetLayer*>(bl[1]); const DetLayer* bl3=dynamic_cast<DetLayer*>(bl[2]); const DetLayer* bl4=dynamic_cast<DetLayer*>(bl[3]); lh1=new LayerWithHits(bl1,collrphi,acc.stripTIBLayer(1)); allLayersWithHits.push_back(lh1); lh2=new LayerWithHits(bl2,collrphi,acc.stripTIBLayer(2)); allLayersWithHits.push_back(lh2); lh3=new LayerWithHits(bl3,collrphi,acc.stripTOBLayer(1)); allLayersWithHits.push_back(lh3); lh4=new LayerWithHits(bl4,collrphi,acc.stripTOBLayer(2)); allLayersWithHits.push_back(lh4); } }
vector< CosmicLayerTriplets::LayerPairAndLayers > CosmicLayerTriplets::layers | ( | ) |
Definition at line 17 of file CosmicLayerTriplets.cc.
References _geometry, lh1, lh2, lh3, lh4, and query::result.
Referenced by CosmicHitTripletGenerator::CosmicHitTripletGenerator().
{ vector<LayerPairAndLayers> result; if (_geometry=="STANDARD"){ vector<const LayerWithHits*> third; third.push_back(lh3); result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh1,lh2),third)); } if (_geometry=="TECPAIRS_TOBTRIPLETS"){ vector<const LayerWithHits*> third; third.push_back(lh3); result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh1,lh2),third)); } if (_geometry=="MTCC"){ vector<const LayerWithHits*> third1; vector<const LayerWithHits*> third2; vector<const LayerWithHits*> third3; vector<const LayerWithHits*> third4; third1.clear();third2.clear();third3.clear();third4.clear(); third1.push_back(lh1); result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh3,lh2),third1)); third2.push_back(lh1); result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh2,lh1),third2)); third3.push_back(lh2); result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh3,lh2),third3)); third4.push_back(lh4); result.push_back(LayerPairAndLayers(SeedLayerPairs::LayerPair(lh2,lh3),third4)); } return result; }
std::string CosmicLayerTriplets::_geometry [private] |
Definition at line 62 of file CosmicLayerTriplets.h.
Definition at line 40 of file CosmicLayerTriplets.h.
Referenced by init().
std::vector<LayerWithHits*> CosmicLayerTriplets::allLayersWithHits [private] |
Definition at line 51 of file CosmicLayerTriplets.h.
Referenced by init(), and ~CosmicLayerTriplets().
std::vector<BarrelDetLayer*> CosmicLayerTriplets::bl [private] |
Definition at line 47 of file CosmicLayerTriplets.h.
Referenced by init().
std::vector<ForwardDetLayer*> CosmicLayerTriplets::fneg [private] |
Definition at line 49 of file CosmicLayerTriplets.h.
std::vector<ForwardDetLayer*> CosmicLayerTriplets::fpos [private] |
Definition at line 48 of file CosmicLayerTriplets.h.
bool CosmicLayerTriplets::isFirstCall [private] |
Definition at line 52 of file CosmicLayerTriplets.h.
Referenced by init().
LayerWithHits* CosmicLayerTriplets::lh1 [private] |
Definition at line 42 of file CosmicLayerTriplets.h.
LayerWithHits* CosmicLayerTriplets::lh2 [private] |
Definition at line 43 of file CosmicLayerTriplets.h.
LayerWithHits* CosmicLayerTriplets::lh3 [private] |
Definition at line 44 of file CosmicLayerTriplets.h.
LayerWithHits* CosmicLayerTriplets::lh4 [private] |
Definition at line 45 of file CosmicLayerTriplets.h.