#include <ConversionSeedFinder.h>
Definition at line 50 of file ConversionSeedFinder.h.
ConversionSeedFinder::ConversionSeedFinder | ( | ) |
ConversionSeedFinder::ConversionSeedFinder | ( | const edm::ParameterSet & | config | ) |
Definition at line 15 of file ConversionSeedFinder.cc.
References edm::ParameterSet::getParameter(), LogDebug, and theMeasurementTrackerName_.
: conf_(config), theUpdator_() { LogDebug("ConversionSeedFinder") << " CTOR " << "\n"; theMeasurementTrackerName_=config.getParameter<std::string>("MeasurementTrackerName"); }
virtual ConversionSeedFinder::~ConversionSeedFinder | ( | ) | [inline, virtual] |
Definition at line 58 of file ConversionSeedFinder.h.
{}
void ConversionSeedFinder::clear | ( | void | ) | [inline] |
Definition at line 77 of file ConversionSeedFinder.h.
References theSeeds_.
Referenced by ConversionTrackCandidateProducer::produce().
{ theSeeds_.clear(); }
void ConversionSeedFinder::findLayers | ( | ) | const [protected] |
Definition at line 65 of file ConversionSeedFinder.cc.
References alongMomentum, DeDxDiscriminatorTools::charge(), reco::BeamSpot::position(), theBeamSpot_, and trackStateFromClusters().
Referenced by InOutConversionSeedFinder::makeSeeds(), and OutInConversionSeedFinder::makeSeeds().
{ int charge; //List the DetLayers crossed by a straight line from the centre of the //detector to the supercluster position // GlobalPoint vertex(0.,0.,0.); GlobalPoint vertex(theBeamSpot_.position().x(),theBeamSpot_.position().y(),theBeamSpot_.position().z()); charge=-1; FreeTrajectoryState theStraightLineFTS = trackStateFromClusters(charge, vertex, alongMomentum, 1.); findLayers( theStraightLineFTS ); }
void ConversionSeedFinder::findLayers | ( | const FreeTrajectoryState & | fts | ) | const [protected] |
Definition at line 124 of file ConversionSeedFinder.cc.
References LayerCollector::allLayers(), alongMomentum, getMeasurementTracker(), i, printLayer(), theLayerList_, and theMF_.
{ theLayerList_.clear(); StraightLinePropagator prop( &(*theMF_), alongMomentum); StartingLayerFinder starter(&prop, this->getMeasurementTracker() ); LayerCollector collector(&prop, &starter, 5., 5.); theLayerList_ = collector.allLayers(traj); for(unsigned int i = 0; i < theLayerList_.size(); ++i) { printLayer(i); } }
const MeasurementTracker* ConversionSeedFinder::getMeasurementTracker | ( | ) | const [inline] |
Definition at line 71 of file ConversionSeedFinder.h.
References theMeasurementTracker_.
Referenced by InOutConversionSeedFinder::completeSeed(), OutInConversionSeedFinder::completeSeed(), findLayers(), InOutConversionSeedFinder::findSeeds(), setEvent(), and OutInConversionSeedFinder::startSeed().
{return theMeasurementTracker_;}
std::vector<const DetLayer*> const& ConversionSeedFinder::layerList | ( | ) | const [inline] |
Definition at line 67 of file ConversionSeedFinder.h.
References theLayerList_.
Referenced by InOutConversionSeedFinder::completeSeed(), InOutConversionSeedFinder::fillClusterSeeds(), InOutConversionSeedFinder::findSeeds(), and OutInConversionSeedFinder::startSeed().
{ return theLayerList_;}
virtual void ConversionSeedFinder::makeSeeds | ( | const edm::Handle< edm::View< reco::CaloCluster > > & | allBc | ) | const [pure virtual] |
Implemented in InOutConversionSeedFinder, and OutInConversionSeedFinder.
void ConversionSeedFinder::printLayer | ( | int | i | ) | const [protected] |
Definition at line 148 of file ConversionSeedFinder.cc.
References Reference_intrackfit_cff::barrel, i, DetLayer::location(), and theLayerList_.
Referenced by InOutConversionSeedFinder::completeSeed(), InOutConversionSeedFinder::fillClusterSeeds(), and findLayers().
{ const DetLayer * layer = theLayerList_[i]; if (layer->location() == GeomDetEnumerators::barrel ) { // const BarrelDetLayer * barrelLayer = dynamic_cast<const BarrelDetLayer*>(layer); //float r = barrelLayer->specificSurface().radius(); // std::cout << " barrel layer radius " << r << " " << barrelLayer->specificSurface().bounds().length()/2. << "\n"; } else { // const ForwardDetLayer * forwardLayer = dynamic_cast<const ForwardDetLayer*>(layer); // float z = fabs(forwardLayer->surface().position().z()); // std::cout << " forward layer position " << z << " " << forwardLayer->specificSurface().innerRadius() << " " << forwardLayer->specificSurface().outerRadius() << "\n"; } }
TrajectorySeedCollection& ConversionSeedFinder::seeds | ( | ) | [inline] |
Definition at line 65 of file ConversionSeedFinder.h.
References theSeeds_.
Referenced by ConversionTrackCandidateProducer::buildCollections().
{ return theSeeds_;}
virtual void ConversionSeedFinder::setCandidate | ( | float | e, |
GlobalPoint | pos | ||
) | const [inline, virtual] |
Definition at line 66 of file ConversionSeedFinder.h.
References pos, theSCenergy_, and theSCPosition_.
Referenced by ConversionTrackCandidateProducer::buildCollections().
{ theSCenergy_=e; theSCPosition_= pos; }
void ConversionSeedFinder::setEvent | ( | const edm::Event & | e | ) |
Definition at line 27 of file ConversionSeedFinder.cc.
References MeasurementTracker::geomTracker(), edm::Event::getByLabel(), getMeasurementTracker(), theBeamSpot_, theMeasurementTracker_, theTrackerGeom_, and MeasurementTracker::update().
Referenced by ConversionTrackCandidateProducer::produce().
{ theMeasurementTracker_->update(evt); theTrackerGeom_= this->getMeasurementTracker()->geomTracker(); //get the BeamSpot edm::Handle<reco::BeamSpot> recoBeamSpotHandle; evt.getByLabel("offlineBeamSpot",recoBeamSpotHandle); theBeamSpot_ = *recoBeamSpotHandle; }
void ConversionSeedFinder::setEventSetup | ( | const edm::EventSetup & | es | ) |
Initialize EventSetup objects at each event.
Definition at line 41 of file ConversionSeedFinder.cc.
References edm::EventSetup::get(), edm::ESHandle< T >::product(), theGeomSearchTracker_, theMeasurementTracker_, theMeasurementTrackerName_, theMF_, thePropagatorAlongMomentum_, and thePropagatorOppositeToMomentum_.
Referenced by ConversionTrackCandidateProducer::setEventSetup().
{ es.get<TrackerRecoGeometryRecord>().get( theGeomSearchTracker_); es.get<IdealMagneticFieldRecord>().get( theMF_ ); edm::ESHandle<MeasurementTracker> measurementTrackerHandle; es.get<CkfComponentsRecord>().get(theMeasurementTrackerName_,measurementTrackerHandle); theMeasurementTracker_ = measurementTrackerHandle.product(); edm::ESHandle<Propagator> propagatorAlongMomHandle; es.get<TrackingComponentsRecord>().get("alongMomElePropagator",propagatorAlongMomHandle); thePropagatorAlongMomentum_ = &(*propagatorAlongMomHandle); edm::ESHandle<Propagator> propagatorOppoToMomHandle; es.get<TrackingComponentsRecord>().get("oppositeToMomElePropagator",propagatorOppoToMomHandle); thePropagatorOppositeToMomentum_ = &(*propagatorOppoToMomHandle); }
void ConversionSeedFinder::setMeasurementTracker | ( | const MeasurementTracker * | tracker | ) | const [inline] |
Definition at line 70 of file ConversionSeedFinder.h.
{ ; }
FreeTrajectoryState ConversionSeedFinder::trackStateFromClusters | ( | int | aCharge, |
const GlobalPoint & | gpOrigine, | ||
PropagationDirection | dir, | ||
float | scaleFactor | ||
) | const [protected] |
Definition at line 81 of file ConversionSeedFinder.cc.
References alongMomentum, m, PV3DBase< T, PVType, FrameType >::perp(), mathSSE::sqrt(), theMF_, theSCenergy_, theSCPosition_, PV3DBase< T, PVType, FrameType >::theta(), Vector3DBase< T, FrameTag >::unit(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by findLayers(), and OutInConversionSeedFinder::startSeed().
{ double caloEnergy = theSCenergy_ * scaleFactor ; GlobalVector radiusCalo = theSCPosition_ - theOrigin ; GlobalVector momentumWithoutCurvature = radiusCalo.unit() * caloEnergy; GlobalTrajectoryParameters gtp; if(dir == alongMomentum) { gtp = GlobalTrajectoryParameters(theOrigin, momentumWithoutCurvature, charge, &(*theMF_) ) ; } else { gtp = GlobalTrajectoryParameters(theSCPosition_, momentumWithoutCurvature, charge, &(*theMF_) ) ; } // now create error matrix // dpos = 4mm/sqrt(E), dtheta = move vertex by 1sigma float dpos = 0.4/sqrt(theSCenergy_); dpos *= 2.; float dphi = dpos/theSCPosition_.perp(); // float dp = 0.03 * sqrt(theCaloEnergy); // float dp = theCaloEnergy / sqrt(12.); // for fun float theta1 = theSCPosition_.theta(); float theta2 = atan2(double(theSCPosition_.perp()), theSCPosition_.z()-5.5); float dtheta = theta1 - theta2; AlgebraicSymMatrix55 m; m[0][0] = 1.; m[1][1] = dpos*dpos ; m[2][2] = dpos*dpos ; m[3][3] = dphi*dphi ; m[4][4] = dtheta * dtheta ; FreeTrajectoryState fts(gtp, CurvilinearTrajectoryError(m)) ; return fts ; }
edm::ParameterSet ConversionSeedFinder::conf_ [protected] |
Reimplemented in InOutConversionSeedFinder, and OutInConversionSeedFinder.
Definition at line 84 of file ConversionSeedFinder.h.
PropagationDirection ConversionSeedFinder::dir_ [protected] |
Definition at line 111 of file ConversionSeedFinder.h.
float ConversionSeedFinder::theBCEnergy_ [mutable, protected] |
Definition at line 119 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::makeSeeds(), and OutInConversionSeedFinder::makeTrackState().
GlobalPoint ConversionSeedFinder::theBCPosition_ [mutable, protected] |
Definition at line 118 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::makeEstimator(), OutInConversionSeedFinder::makeSeeds(), and OutInConversionSeedFinder::makeTrackState().
reco::BeamSpot ConversionSeedFinder::theBeamSpot_ [protected] |
Definition at line 124 of file ConversionSeedFinder.h.
Referenced by findLayers(), OutInConversionSeedFinder::makeTrackState(), and setEvent().
Definition at line 107 of file ConversionSeedFinder.h.
Referenced by setEventSetup().
std::vector<const DetLayer *> ConversionSeedFinder::theLayerList_ [mutable, protected] |
Definition at line 116 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::completeSeed(), findLayers(), layerList(), and printLayer().
const MeasurementTracker* ConversionSeedFinder::theMeasurementTracker_ [protected] |
Definition at line 102 of file ConversionSeedFinder.h.
Referenced by getMeasurementTracker(), setEvent(), and setEventSetup().
std::string ConversionSeedFinder::theMeasurementTrackerName_ [protected] |
Definition at line 101 of file ConversionSeedFinder.h.
Referenced by ConversionSeedFinder(), and setEventSetup().
edm::ESHandle<MagneticField> ConversionSeedFinder::theMF_ [protected] |
Definition at line 106 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::createSeedFTS(), findLayers(), OutInConversionSeedFinder::makeTrackState(), setEventSetup(), and trackStateFromClusters().
const Propagator* ConversionSeedFinder::thePropagatorAlongMomentum_ [protected] |
Definition at line 121 of file ConversionSeedFinder.h.
Referenced by InOutConversionSeedFinder::createSeed(), InOutConversionSeedFinder::findSeeds(), setEventSetup(), and OutInConversionSeedFinder::startSeed().
const Propagator* ConversionSeedFinder::thePropagatorOppositeToMomentum_ [protected] |
Definition at line 122 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::fillClusterSeeds(), setEventSetup(), and OutInConversionSeedFinder::startSeed().
reco::CaloCluster* ConversionSeedFinder::theSC_ [mutable, protected] |
Definition at line 112 of file ConversionSeedFinder.h.
float ConversionSeedFinder::theSCenergy_ [mutable, protected] |
Definition at line 113 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::createSeedFTS(), setCandidate(), and trackStateFromClusters().
GlobalPoint ConversionSeedFinder::theSCPosition_ [mutable, protected] |
Definition at line 98 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::createSeedFTS(), OutInConversionSeedFinder::fixPointRadius(), OutInConversionSeedFinder::makeSeeds(), setCandidate(), and trackStateFromClusters().
TrajectorySeedCollection ConversionSeedFinder::theSeeds_ [mutable, protected] |
Definition at line 97 of file ConversionSeedFinder.h.
Referenced by clear(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), InOutConversionSeedFinder::makeSeeds(), OutInConversionSeedFinder::makeSeeds(), and seeds().
const TrackingGeometry* ConversionSeedFinder::theTrackerGeom_ [protected] |
Definition at line 103 of file ConversionSeedFinder.h.
Referenced by InOutConversionSeedFinder::fillClusterSeeds(), and setEvent().
KFUpdator ConversionSeedFinder::theUpdator_ [protected] |
Definition at line 110 of file ConversionSeedFinder.h.
Referenced by OutInConversionSeedFinder::createSeed(), and InOutConversionSeedFinder::createSeed().