CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CosmicLayerTriplets Class Reference

#include <CosmicLayerTriplets.h>

List of all members.

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
TrackerLayerIdAccessor acc
std::vector< LayerWithHits * > allLayersWithHits
std::vector< BarrelDetLayer * > bl
std::vector< ForwardDetLayer * > fneg
std::vector< ForwardDetLayer * > fpos
bool isFirstCall
LayerWithHitslh1
LayerWithHitslh2
LayerWithHitslh3
LayerWithHitslh4

Detailed Description

find all (resonable) pairs of pixel layers

Definition at line 25 of file CosmicLayerTriplets.h.


Member Typedef Documentation

Definition at line 30 of file CosmicLayerTriplets.h.


Constructor & Destructor Documentation

CosmicLayerTriplets::CosmicLayerTriplets ( ) [inline]

Definition at line 27 of file CosmicLayerTriplets.h.

:isFirstCall(true){};
CosmicLayerTriplets::~CosmicLayerTriplets ( )

Definition at line 51 of file CosmicLayerTriplets.cc.

References allLayersWithHits.

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

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 60 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 TOBLayer*  bl1=dynamic_cast<TOBLayer*>(bl[10]);
    const TOBLayer*  bl2=dynamic_cast<TOBLayer*>(bl[11]);
    const TOBLayer*  bl3=dynamic_cast<TOBLayer*>(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 TIBLayer*  bl1=dynamic_cast<TIBLayer*>(bl[0]);
    const TIBLayer*  bl2=dynamic_cast<TIBLayer*>(bl[1]);
    const TOBLayer*  bl3=dynamic_cast<TOBLayer*>(bl[2]);
    const TOBLayer*  bl4=dynamic_cast<TOBLayer*>(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 18 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;
}

Member Data Documentation

std::string CosmicLayerTriplets::_geometry [private]

Definition at line 64 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

Definition at line 42 of file CosmicLayerTriplets.h.

Referenced by init().

Definition at line 53 of file CosmicLayerTriplets.h.

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

std::vector<BarrelDetLayer*> CosmicLayerTriplets::bl [private]

Definition at line 49 of file CosmicLayerTriplets.h.

Referenced by init().

std::vector<ForwardDetLayer*> CosmicLayerTriplets::fneg [private]

Definition at line 51 of file CosmicLayerTriplets.h.

std::vector<ForwardDetLayer*> CosmicLayerTriplets::fpos [private]

Definition at line 50 of file CosmicLayerTriplets.h.

Definition at line 54 of file CosmicLayerTriplets.h.

Referenced by init().

Definition at line 44 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

Definition at line 45 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

Definition at line 46 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().

Definition at line 47 of file CosmicLayerTriplets.h.

Referenced by init(), and layers().