![]() |
![]() |
#include <CosmicTrackingRegion.h>
Inherits TrackingRegionBase.
Public Member Functions | |
virtual HitRZCompatibility * | checkRZ (const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer=0, float lr=0, float gz=0, float dr=0, float dz=0) const |
CosmicTrackingRegion * | clone () const |
CosmicTrackingRegion (const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, float dummy=0.) | |
CosmicTrackingRegion (const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, const edm::ParameterSet &extra) | |
virtual TrackingRegion::Hits | hits (const edm::Event &ev, const edm::EventSetup &es, const ctfseeding::SeedingLayer *layer) const |
std::string | name () const |
virtual | ~CosmicTrackingRegion () |
Private Attributes | |
std::string | measurementTrackerName_ |
A concrete implementation of TrackingRegion. Apart of vertex constraint from TrackingRegion in this implementation the region of interest is further constrainted in phi and eta around the direction of the region
Definition at line 26 of file CosmicTrackingRegion.h.
virtual CosmicTrackingRegion::~CosmicTrackingRegion | ( | ) | [inline, virtual] |
Definition at line 31 of file CosmicTrackingRegion.h.
{ }
CosmicTrackingRegion::CosmicTrackingRegion | ( | const GlobalVector & | dir, |
const GlobalPoint & | vertexPos, | ||
float | ptMin, | ||
float | rVertex, | ||
float | zVertex, | ||
float | deltaEta, | ||
float | deltaPhi, | ||
float | dummy = 0. |
||
) | [inline] |
constructor (symmetric eta and phi margins).
dir - the direction around which region is constructed
the initial direction of the momentum of the particle should be in the range
phi of dir +- deltaPhi
eta of dir +- deltaEta
vertexPos - the position of the vertex (origin) of the of the region.
It is a centre of cylinder constraind with rVertex, zVertex. The track of the particle should cross the cylinder
WARNING: in the current implementaion the vertexPos is supposed to be placed on the beam line, i.e. to be of the form (0,0,float)
ptMin - minimal pt of interest
rVertex - radius of the cylinder around beam line where the tracks of interest should point to.
zVertex - half height of the cylinder around the beam line where the tracks of interest should point to.
deltaEta - allowed deviation of the initial direction of particle in eta in respect to direction of the region
deltaPhi - allowed deviation of the initial direction of particle in phi in respect to direction of the region
Definition at line 56 of file CosmicTrackingRegion.h.
Referenced by clone().
: TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin), rVertex, zVertex), measurementTrackerName_("") { }
CosmicTrackingRegion::CosmicTrackingRegion | ( | const GlobalVector & | dir, |
const GlobalPoint & | vertexPos, | ||
float | ptMin, | ||
float | rVertex, | ||
float | zVertex, | ||
float | deltaEta, | ||
float | deltaPhi, | ||
const edm::ParameterSet & | extra | ||
) | [inline] |
Definition at line 66 of file CosmicTrackingRegion.h.
References edm::ParameterSet::getParameter(), measurementTrackerName_, and AlCaHLTBitMon_QueryRunRegistry::string.
: TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin), rVertex, zVertex) { measurementTrackerName_ = extra.getParameter<std::string>("measurementTrackerName"); }
virtual HitRZCompatibility* CosmicTrackingRegion::checkRZ | ( | const DetLayer * | layer, |
const Hit & | outerHit, | ||
const edm::EventSetup & | iSetup, | ||
const DetLayer * | outerlayer = 0 , |
||
float | lr = 0 , |
||
float | gz = 0 , |
||
float | dr = 0 , |
||
float | dz = 0 |
||
) | const [inline, virtual] |
Definition at line 84 of file CosmicTrackingRegion.h.
{return 0; }
CosmicTrackingRegion* CosmicTrackingRegion::clone | ( | void | ) | const [inline] |
Definition at line 91 of file CosmicTrackingRegion.h.
References CosmicTrackingRegion().
{ return new CosmicTrackingRegion(*this); }
TrackingRegion::Hits CosmicTrackingRegion::hits | ( | const edm::Event & | ev, |
const edm::EventSetup & | es, | ||
const ctfseeding::SeedingLayer * | layer | ||
) | const [virtual] |
Definition at line 26 of file CosmicTrackingRegion.cc.
References alongMomentum, AnalyticalPropagator_cfi::AnalyticalPropagator, newFWLiteAna::build, GeometricSearchDet::compatibleDets(), funct::cos(), ctfseeding::SeedingLayer::detLayer(), dir, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::freeState(), edm::EventSetup::get(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), LogDebug, LayerMeasurements::measurements(), MeasurementTrackerESProducer_cfi::MeasurementTracker, ctfseeding::SeedingLayer::name(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, edm::ESHandle< T >::product(), query::result, makeMuonMisalignmentScenario::rot, funct::sin(), and GeometricSearchDet::surface().
{ //get and name collections //++++++++++++++++++++++++ //tracking region TrackingRegion::Hits result; //detector layer const DetLayer * detLayer = layer->detLayer(); LogDebug("CosmicTrackingRegion") << "Looking at hits on subdet/layer " << layer->name(); EtaPhiMeasurementEstimator est(0.3,0.3); //magnetic field edm::ESHandle<MagneticField> field; es.get<IdealMagneticFieldRecord>().get(field); const MagneticField * magField = field.product(); //region const GlobalPoint vtx = origin(); GlobalVector dir = direction(); LogDebug("CosmicTrackingRegion") <<"The initial region characteristics are:" << "\n" <<" Origin = " << origin() << "\n" <<" Direction = " << direction() << "\n" <<" Eta = " << origin().eta() << "\n" <<" Phi = " << origin().phi(); //trajectory state on surface float phi = dir.phi(); Surface::RotationType rot( sin(phi), -cos(phi), 0, 0, 0, -1, cos(phi), sin(phi), 0); Plane::PlanePointer surface = Plane::build(vtx, rot); FreeTrajectoryState fts( GlobalTrajectoryParameters(vtx, dir, 1, magField) ); TrajectoryStateOnSurface tsos(fts, *surface); LogDebug("CosmicTrackingRegion") << "The state used to find measurement with the measurement tracker is:\n" << tsos; //propagator AnalyticalPropagator prop( magField, alongMomentum); //propagation verification (debug) //++++++++++++++++++++++++++++++++ //creation of the state TrajectoryStateOnSurface stateOnLayer = prop.propagate( *tsos.freeState(), detLayer->surface()); //verification of the state if (stateOnLayer.isValid()){ LogDebug("CosmicTrackingRegion") << "The initial state propagates to the layer surface: \n" << stateOnLayer << "R = " << stateOnLayer.globalPosition().perp() << "\n" << "Eta = " << stateOnLayer.globalPosition().eta() << "\n" << "Phi = " << stateOnLayer.globalPosition().phi(); } else{ LogDebug("CosmicTrackingRegion") << "The initial state does not propagate to the layer surface."; } //number of compatible dets typedef DetLayer::DetWithState DetWithState; vector<DetWithState> compatDets = detLayer->compatibleDets(tsos, prop, est); LogDebug("CosmicTrackingRegion") << "Compatible dets = " << compatDets.size(); //get hits //++++++++ //measurement tracker (find hits) edm::ESHandle<MeasurementTracker> measurementTrackerESH; es.get<CkfComponentsRecord>().get(measurementTrackerName_,measurementTrackerESH); const MeasurementTracker * measurementTracker = measurementTrackerESH.product(); measurementTracker->update(ev); LayerMeasurements lm(measurementTracker); vector<TrajectoryMeasurement> meas = lm.measurements(*detLayer, tsos, prop, est); LogDebug("CosmicTrackingRegion") << "Number of Trajectory measurements = " << meas.size() <<" but the last one is always an invalid hit, by construction."; //trajectory measurement typedef vector<TrajectoryMeasurement>::const_iterator IM; for (IM im = meas.begin(); im != meas.end(); im++) {//loop on measurement tracker TrajectoryMeasurement::ConstRecHitPointer ptrHit = im->recHit(); if (ptrHit->isValid()) { LogDebug("CosmicTrackingRegion") << "Hit found in the region at position: "<<ptrHit->globalPosition(); result.push_back( ptrHit ); }//end if isValid() else LogDebug("CosmicTrackingRegion") << "No valid hit"; }//end loop on measurement tracker //result //++++++ return result; }
std::string CosmicTrackingRegion::name | ( | void | ) | const [inline] |
Definition at line 93 of file CosmicTrackingRegion.h.
{ return "CosmicTrackingRegion"; }
std::string CosmicTrackingRegion::measurementTrackerName_ [private] |
Definition at line 97 of file CosmicTrackingRegion.h.
Referenced by CosmicTrackingRegion().