#include <LayerCollector.h>
Public Member Functions | |
std::vector< const DetLayer * > | allLayers (const FTS &aFts) const |
std::vector< const BarrelDetLayer * > | barrelLayers (const FTS &aFts) const |
float | deltaR () const |
float | deltaZ () const |
const StartingLayerFinder * | finder () const |
std::vector< const ForwardDetLayer * > | forwardLayers (const FTS &aFts) const |
LayerCollector (const Propagator *aPropagator, const StartingLayerFinder *aFinder, float dr, float dz) | |
const Propagator * | propagator () const |
~LayerCollector () | |
Private Types | |
typedef FreeTrajectoryState | FTS |
typedef std::pair< float, float > | Range |
typedef TrajectoryStateOnSurface | TSOS |
Private Member Functions | |
bool | rangesIntersect (const Range &a, const Range &b) const |
Private Attributes | |
float | theDeltaR |
float | theDeltaZ |
const Propagator * | thePropagator |
const StartingLayerFinder * | theStartingLayerFinder |
Class collecting all layers of the tracker.
Definition at line 22 of file LayerCollector.h.
typedef FreeTrajectoryState LayerCollector::FTS [private] |
Definition at line 26 of file LayerCollector.h.
typedef std::pair<float, float> LayerCollector::Range [private] |
Definition at line 28 of file LayerCollector.h.
typedef TrajectoryStateOnSurface LayerCollector::TSOS [private] |
Definition at line 27 of file LayerCollector.h.
LayerCollector::LayerCollector | ( | const Propagator * | aPropagator, |
const StartingLayerFinder * | aFinder, | ||
float | dr, | ||
float | dz | ||
) | [inline] |
Definition at line 32 of file LayerCollector.h.
: thePropagator(aPropagator), theStartingLayerFinder(aFinder), theDeltaR(dr), theDeltaZ(dz) { }
LayerCollector::~LayerCollector | ( | ) | [inline] |
Definition at line 41 of file LayerCollector.h.
{}
Definition at line 6 of file LayerCollector.cc.
References Reference_intrackfit_cff::barrel, deltaR(), Reference_intrackfit_cff::endcap, TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), LargeD0_PixelPairStep_cff::propagator, rangesIntersect(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by ConversionSeedFinder::findLayers().
{ vector<const DetLayer*> myLayers; FTS myFts(aFts.parameters()); vector<const DetLayer*> nextLayers = finder()->startingLayers(myFts, deltaR(), deltaZ()); vector<const DetLayer*> dummy; bool inside = true; while(inside) { inside = false; for(vector<const DetLayer*>::iterator ilay = nextLayers.begin(); ilay != nextLayers.end(); ilay++) { TSOS pTsos = propagator()->propagate(myFts, (**ilay).surface()); if(pTsos.isValid()) { inside = true; if((**ilay).location() == GeomDetEnumerators::barrel) { Range barrZRange((**ilay).position().z() - 0.5*((**ilay).surface().bounds().length()), (**ilay).position().z() + 0.5*((**ilay).surface().bounds().length())); Range trajZRange(pTsos.globalPosition().z() - deltaZ(), pTsos.globalPosition().z() + deltaZ()); if(rangesIntersect(trajZRange, barrZRange)) myLayers.push_back(*ilay); } else if((**ilay).location() == GeomDetEnumerators::endcap) { const ForwardDetLayer* fwd = dynamic_cast<const ForwardDetLayer*>(*ilay); Range fwdRRange((*fwd).specificSurface().innerRadius(), (*fwd).specificSurface().outerRadius()); Range trajRRange(pTsos.globalPosition().perp() - deltaR(), pTsos.globalPosition().perp() + deltaR()); if(rangesIntersect(trajRRange, fwdRRange)) myLayers.push_back(*ilay); } myFts = FTS(pTsos.globalParameters()); nextLayers = (**ilay).nextLayers(*pTsos.freeState(), propagator()->propagationDirection()); break; } } } return myLayers; }
vector< const BarrelDetLayer * > LayerCollector::barrelLayers | ( | const FTS & | aFts | ) | const |
Definition at line 87 of file LayerCollector.cc.
References cond::ecalcond::all.
{ vector<const DetLayer*> all = allLayers(aFts); vector<const BarrelDetLayer*> barrelLayers; for(vector<const DetLayer*>::iterator ilay = all.begin(); ilay != all.end(); ilay++) { if(const BarrelDetLayer* myBarrel = dynamic_cast<const BarrelDetLayer*>(*ilay)) barrelLayers.push_back(myBarrel); } return barrelLayers; }
float LayerCollector::deltaR | ( | ) | const [inline] |
float LayerCollector::deltaZ | ( | ) | const [inline] |
const StartingLayerFinder* LayerCollector::finder | ( | ) | const [inline] |
Definition at line 48 of file LayerCollector.h.
References theStartingLayerFinder.
{return theStartingLayerFinder;}
vector< const ForwardDetLayer * > LayerCollector::forwardLayers | ( | const FTS & | aFts | ) | const |
Definition at line 105 of file LayerCollector.cc.
References cond::ecalcond::all.
{ vector<const DetLayer*> all = allLayers(aFts); vector<const ForwardDetLayer*> fwdLayers; for(vector<const DetLayer*>::iterator ilay = all.begin(); ilay != all.end(); ilay++) { if(const ForwardDetLayer* myFwd = dynamic_cast<const ForwardDetLayer*>(*ilay)) fwdLayers.push_back(myFwd); } return fwdLayers; }
const Propagator* LayerCollector::propagator | ( | void | ) | const [inline] |
float LayerCollector::theDeltaR [private] |
Definition at line 56 of file LayerCollector.h.
Referenced by deltaR().
float LayerCollector::theDeltaZ [private] |
Definition at line 57 of file LayerCollector.h.
Referenced by deltaZ().
const Propagator* LayerCollector::thePropagator [private] |
Definition at line 54 of file LayerCollector.h.
Referenced by propagator().
const StartingLayerFinder* LayerCollector::theStartingLayerFinder [private] |
Definition at line 55 of file LayerCollector.h.
Referenced by finder().