#include <StartingLayerFinder.h>
Definition at line 29 of file StartingLayerFinder.h.
typedef FreeTrajectoryState StartingLayerFinder::FTS [private] |
Definition at line 33 of file StartingLayerFinder.h.
typedef std::pair<float, float> StartingLayerFinder::Range [private] |
Definition at line 35 of file StartingLayerFinder.h.
typedef TrajectoryStateOnSurface StartingLayerFinder::TSOS [private] |
Definition at line 34 of file StartingLayerFinder.h.
StartingLayerFinder::StartingLayerFinder | ( | const Propagator * | aPropagator, |
const MeasurementTracker * | tracker | ||
) | [inline] |
Definition at line 39 of file StartingLayerFinder.h.
: thePropagator(aPropagator), theMeasurementTracker(tracker), thePixelLayersValid(false), theFirstPixelBarrelLayer(0), theFirstNegPixelFwdLayer(0), theFirstPosPixelFwdLayer(0) { }
StartingLayerFinder::~StartingLayerFinder | ( | ) | [inline] |
Definition at line 48 of file StartingLayerFinder.h.
{}
void StartingLayerFinder::checkPixelLayers | ( | ) | const [private] |
Definition at line 159 of file StartingLayerFinder.cc.
References GeometricSearchTracker::negPixelForwardLayers(), GeometricSearchTracker::pixelBarrelLayers(), and GeometricSearchTracker::posPixelForwardLayers().
{ if(!thePixelLayersValid) { const GeometricSearchTracker* theGeometricSearchTracker=theMeasurementTracker->geometricSearchTracker(); theFirstPixelBarrelLayer = theGeometricSearchTracker->pixelBarrelLayers().front(); theFirstNegPixelFwdLayer = theGeometricSearchTracker->negPixelForwardLayers(); theFirstPosPixelFwdLayer = theGeometricSearchTracker->posPixelForwardLayers(); thePixelLayersValid = true; } }
const vector< ForwardDetLayer * > StartingLayerFinder::firstNegPixelFwdLayer | ( | ) | const |
Definition at line 149 of file StartingLayerFinder.cc.
{ checkPixelLayers(); return theFirstNegPixelFwdLayer; }
const BarrelDetLayer * StartingLayerFinder::firstPixelBarrelLayer | ( | ) | const |
Definition at line 144 of file StartingLayerFinder.cc.
{ checkPixelLayers(); return theFirstPixelBarrelLayer; }
const vector< ForwardDetLayer * > StartingLayerFinder::firstPosPixelFwdLayer | ( | ) | const |
Definition at line 154 of file StartingLayerFinder.cc.
{ checkPixelLayers(); return theFirstPosPixelFwdLayer; }
const Propagator* StartingLayerFinder::propagator | ( | void | ) | const [inline] |
Definition at line 59 of file StartingLayerFinder.h.
References thePropagator.
{return thePropagator;}
vector< const DetLayer * > StartingLayerFinder::startingLayers | ( | const TrajectorySeed & | aSeed | ) | const |
Definition at line 97 of file StartingLayerFinder.cc.
References GeomDetEnumerators::barrel, PTrajectoryStateOnDet::detId(), TrajectorySeed::direction(), GeomDetEnumerators::endcap, TrajectoryStateOnSurface::freeTrajectoryState(), TrackingRecHit::geographicalId(), DetLayer::location(), TrajectorySeed::nHits(), p1, p2, LargeD0_PixelPairStep_cff::propagator, TrajectorySeed::recHits(), TrajectorySeed::startingState(), GeomDet::surface(), and trajectoryStateTransform::transientState().
{ float dr = 0., dz = 0.; if(propagator()->propagationDirection() != aSeed.direction()) return vector<const DetLayer*>(); if(aSeed.nHits() != 2) return vector<const DetLayer*>(); TrackingRecHitCollection::const_iterator firstHit= aSeed.recHits().first; const TrackingRecHit* recHit1=&(*firstHit); const DetLayer* hit1Layer = theMeasurementTracker->geometricSearchTracker()->detLayer(recHit1->geographicalId()); TrackingRecHitCollection::const_iterator secondHit= aSeed.recHits().second; const TrackingRecHit* recHit2=&(*secondHit); const DetLayer* hit2Layer = theMeasurementTracker->geometricSearchTracker()->detLayer(recHit2->geographicalId()); GeomDetEnumerators::Location p1 = hit1Layer->location(); GeomDetEnumerators::Location p2 = hit2Layer->location(); if(p1 == GeomDetEnumerators::barrel && p2 == GeomDetEnumerators::barrel) { dr = 0.1; dz = 5.; } else if(p1 == GeomDetEnumerators::endcap && p2 == GeomDetEnumerators::endcap) { dr = 5.; dz = 0.1; } else { dr = 0.1; dz = 0.1; } const GeomDet* gdet = theMeasurementTracker->geomTracker()->idToDet( DetId( aSeed.startingState().detId())); TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState( aSeed.startingState(), &(gdet->surface()), thePropagator->magneticField()); FreeTrajectoryState* fts=tsos.freeTrajectoryState(); return startingLayers(*fts, dr, dz); }
vector< const DetLayer * > StartingLayerFinder::startingLayers | ( | const FTS & | aFts, |
float | dr, | ||
float | dz | ||
) | const |
Definition at line 20 of file StartingLayerFinder.cc.
References FreeTrajectoryState::parameters(), position, LargeD0_PixelPairStep_cff::propagator, rangesIntersect(), and z.
{ vector<const DetLayer*> mylayers; mylayers.reserve(3); FTS fastFts(aFts.parameters()); //barrel pixel TSOS pTsos = propagator()->propagate(fastFts, firstPixelBarrelLayer()->surface()); if(pTsos.isValid()) { Range barrZRange(firstPixelBarrelLayer()->position().z() - 0.5*(firstPixelBarrelLayer()->surface().bounds().length()), firstPixelBarrelLayer()->position().z() + 0.5*(firstPixelBarrelLayer()->surface().bounds().length())); Range trajZRange(pTsos.globalPosition().z() - dz, pTsos.globalPosition().z() + dz); if(rangesIntersect(trajZRange, barrZRange)) { mylayers.push_back(firstPixelBarrelLayer()); } } //negative fwd pixel const vector<ForwardDetLayer*> nfwd = firstPosPixelFwdLayer(); for(vector<ForwardDetLayer*>::const_iterator infwd = nfwd.begin(); infwd != nfwd.end(); infwd++) { pTsos = propagator()->propagate(fastFts, (*infwd)->surface()); if(pTsos.isValid()) { Range nfwdRRange((*infwd)->specificSurface().innerRadius(), (*infwd)->specificSurface().outerRadius()); Range trajRRange(pTsos.globalPosition().perp() - dr, pTsos.globalPosition().perp() + dr); if(rangesIntersect(trajRRange, nfwdRRange)) { mylayers.push_back(*infwd); } } } //positive fwd pixel const vector<ForwardDetLayer*> pfwd = firstPosPixelFwdLayer(); for(vector<ForwardDetLayer*>::const_iterator ipfwd = pfwd.begin(); ipfwd != pfwd.end(); ipfwd++) { pTsos = propagator()->propagate(fastFts, (*ipfwd)->surface()); if(pTsos.isValid()) { Range pfwdRRange((*ipfwd)->specificSurface().innerRadius(), (*ipfwd)->specificSurface().outerRadius()); Range trajRRange(pTsos.globalPosition().perp() - dr, pTsos.globalPosition().perp() + dr); if(rangesIntersect(trajRRange, pfwdRRange)) { mylayers.push_back(*ipfwd); } } } return mylayers; }
std::vector<ForwardDetLayer*> StartingLayerFinder::theFirstNegPixelFwdLayer [mutable, private] |
Definition at line 69 of file StartingLayerFinder.h.
BarrelDetLayer* StartingLayerFinder::theFirstPixelBarrelLayer [mutable, private] |
Definition at line 68 of file StartingLayerFinder.h.
std::vector<ForwardDetLayer*> StartingLayerFinder::theFirstPosPixelFwdLayer [mutable, private] |
Definition at line 70 of file StartingLayerFinder.h.
const MeasurementTracker* StartingLayerFinder::theMeasurementTracker [private] |
Definition at line 66 of file StartingLayerFinder.h.
bool StartingLayerFinder::thePixelLayersValid [mutable, private] |
Definition at line 67 of file StartingLayerFinder.h.
const Propagator* StartingLayerFinder::thePropagator [private] |
Definition at line 65 of file StartingLayerFinder.h.
Referenced by propagator().