#include <CosmicHitTripletGeneratorFromLayerTriplet.h>
Definition at line 17 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
CosmicHitTripletGeneratorFromLayerTriplet::CosmicHitTripletGeneratorFromLayerTriplet | ( | const LayerWithHits * | inner, |
const LayerWithHits * | middle, | ||
const LayerWithHits * | outer, | ||
const edm::EventSetup & | iSetup | ||
) |
Definition at line 17 of file CosmicHitTripletGeneratorFromLayerTriplet.cc.
References edm::EventSetup::get(), edm::ESHandle< T >::product(), and patCandidatesForDimuonsSequences_cff::tracker.
Referenced by clone().
: TTRHbuilder(0),trackerGeometry(0), //theLayerCache(*layerCache), theOuterLayer(outer),theMiddleLayer(middle), theInnerLayer(inner) { edm::ESHandle<TrackerGeometry> tracker; iSetup.get<TrackerDigiGeometryRecord>().get(tracker); trackerGeometry = tracker.product(); }
virtual CosmicHitTripletGeneratorFromLayerTriplet::~CosmicHitTripletGeneratorFromLayerTriplet | ( | ) | [inline, virtual] |
Definition at line 27 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
{ }
virtual CosmicHitTripletGeneratorFromLayerTriplet* CosmicHitTripletGeneratorFromLayerTriplet::clone | ( | void | ) | const [inline, virtual] |
Definition at line 33 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
References CosmicHitTripletGeneratorFromLayerTriplet().
{ return new CosmicHitTripletGeneratorFromLayerTriplet(*this); }
virtual void CosmicHitTripletGeneratorFromLayerTriplet::hitTriplets | ( | const TrackingRegion & | ar, |
OrderedHitTriplets & | ap, | ||
const edm::Event & | ev, | ||
const edm::EventSetup & | iSetup | ||
) | [inline, virtual] |
Implements HitTripletGenerator.
Definition at line 31 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
{}
void CosmicHitTripletGeneratorFromLayerTriplet::hitTriplets | ( | const TrackingRegion & | ar, |
OrderedHitTriplets & | ap, | ||
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from HitTripletGenerator.
Definition at line 30 of file CosmicHitTripletGeneratorFromLayerTriplet.cc.
References abs, edm::EventSetup::get(), LayerWithHits::layer(), LayerWithHits::recHits(), AlCaHLTBitMon_QueryRunRegistry::string, theInnerLayer, theMiddleLayer, and theOuterLayer.
{ if (theInnerLayer->recHits().empty()) return; if (theMiddleLayer->recHits().empty()) return; if (theOuterLayer->recHits().empty()) return; float radius1 =dynamic_cast<const BarrelDetLayer*>(theInnerLayer->layer())->specificSurface().radius(); float radius2 =dynamic_cast<const BarrelDetLayer*>(theMiddleLayer->layer())->specificSurface().radius(); float radius3 =dynamic_cast<const BarrelDetLayer*>(theOuterLayer->layer())->specificSurface().radius(); bool seedfromoverlaps=((std::abs(radius1-radius2)<0.1)|| (std::abs(radius3-radius2)<0.1))? true : false; std::vector<const TrackingRecHit*>::const_iterator ohh; std::vector<const TrackingRecHit*>::const_iterator mhh; std::vector<const TrackingRecHit*>::const_iterator ihh; std::string builderName = "WithTrackAngle"; edm::ESHandle<TransientTrackingRecHitBuilder> builder; iSetup.get<TransientRecHitRecord>().get(builderName, builder); if(!seedfromoverlaps){ for(ohh=theOuterLayer->recHits().begin();ohh!=theOuterLayer->recHits().end();ohh++){ TkHitPairsCachedHit oh= builder->build(*ohh); for(mhh=theMiddleLayer->recHits().begin();mhh!=theMiddleLayer->recHits().end();mhh++){ TkHitPairsCachedHit mh= builder->build(*mhh); float z_diff =mh->globalPosition().z()-oh->globalPosition().z(); float midy=mh->globalPosition().y(); float outy=oh->globalPosition().y(); float midx=mh->globalPosition().x(); float outx=oh->globalPosition().x(); float dxdy=std::abs((outx-midx)/(outy-midy)); if((std::abs(z_diff)<30) && (outy*midy>0) &&(dxdy<2)) { for(ihh=theInnerLayer->recHits().begin();ihh!=theInnerLayer->recHits().end();ihh++){ TkHitPairsCachedHit ih= builder->build(*ihh); float z_diff =mh->globalPosition().z()-ih->globalPosition().z(); float inny=ih->globalPosition().y(); float innx=ih->globalPosition().x(); float dxdy=std::abs((innx-midx)/(inny-midy)); if ((std::abs(z_diff)<30) && (inny*midy>0) &&(dxdy<2)&&(!seedfromoverlaps)) { result.push_back( OrderedHitTriplet(ih,mh,oh) ); } } } } } } else { for(ohh=theOuterLayer->recHits().begin();ohh!=theOuterLayer->recHits().end();ohh++){ TkHitPairsCachedHit oh= builder->build(*ohh); for(mhh=theMiddleLayer->recHits().begin();mhh!=theMiddleLayer->recHits().end();mhh++){ TkHitPairsCachedHit mh= builder->build(*mhh); float z_diff =mh->globalPosition().z()-oh->globalPosition().z(); float midy=mh->globalPosition().y(); float outy=oh->globalPosition().y(); float midx=mh->globalPosition().x(); float outx=oh->globalPosition().x(); float dxdy=std::abs((outx-midx)/(outy-midy)); float DeltaR=oh->globalPosition().perp()-mh->globalPosition().perp(); if((std::abs(z_diff)<18) && (std::abs(oh->globalPosition().phi()-mh->globalPosition().phi())<0.05) &&(DeltaR<0)&&(dxdy<2)){ for(ihh=theInnerLayer->recHits().begin();ihh!=theInnerLayer->recHits().end();ihh++){ TkHitPairsCachedHit ih= builder->build(*ihh); float z_diff =mh->globalPosition().z()-ih->globalPosition().z(); float inny=ih->globalPosition().y(); float innx=ih->globalPosition().x(); float dxdy=std::abs((innx-midx)/(inny-midy)); if ((std::abs(z_diff)<30) && (inny*midy>0) &&(dxdy<2)) { result.push_back( OrderedHitTriplet(ih,mh,oh)); } } } } } } }
void CosmicHitTripletGeneratorFromLayerTriplet::init | ( | const HitPairGenerator & | pairs, |
const std::vector< const LayerWithHits * > & | layers | ||
) | [inline] |
Definition at line 36 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
{}
const LayerWithHits* CosmicHitTripletGeneratorFromLayerTriplet::innerLayer | ( | ) | const [inline] |
Definition at line 38 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
References theInnerLayer.
{ return theInnerLayer; }
const LayerWithHits* CosmicHitTripletGeneratorFromLayerTriplet::middleLayer | ( | ) | const [inline] |
Definition at line 39 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
References theMiddleLayer.
{ return theMiddleLayer; }
const LayerWithHits* CosmicHitTripletGeneratorFromLayerTriplet::outerLayer | ( | ) | const [inline] |
Definition at line 40 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
References theOuterLayer.
{ return theOuterLayer; }
const DetLayer* CosmicHitTripletGeneratorFromLayerTriplet::innerlay [private] |
Definition at line 48 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
const DetLayer* CosmicHitTripletGeneratorFromLayerTriplet::middlelay [private] |
Definition at line 50 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
const DetLayer* CosmicHitTripletGeneratorFromLayerTriplet::outerlay [private] |
Definition at line 49 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
const LayerWithHits* CosmicHitTripletGeneratorFromLayerTriplet::theInnerLayer [private] |
Definition at line 47 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
Referenced by hitTriplets(), and innerLayer().
const LayerWithHits* CosmicHitTripletGeneratorFromLayerTriplet::theMiddleLayer [private] |
Definition at line 46 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
Referenced by hitTriplets(), and middleLayer().
const LayerWithHits* CosmicHitTripletGeneratorFromLayerTriplet::theOuterLayer [private] |
Definition at line 45 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
Referenced by hitTriplets(), and outerLayer().
Definition at line 44 of file CosmicHitTripletGeneratorFromLayerTriplet.h.
const TransientTrackingRecHitBuilder* CosmicHitTripletGeneratorFromLayerTriplet::TTRHbuilder [private] |
Definition at line 43 of file CosmicHitTripletGeneratorFromLayerTriplet.h.