#include <SeedGeneratorForCRack.h>
Public Types | |
typedef TrajectoryStateOnSurface | TSOS |
Public Member Functions | |
void | init (const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c) |
void | run (TrajectorySeedCollection &, const edm::EventSetup &c) |
SeedGeneratorForCRack (const edm::ParameterSet &conf) | |
void | seeds (TrajectorySeedCollection &output, const edm::EventSetup &c, const TrackingRegion ®ion) |
virtual | ~SeedGeneratorForCRack () |
Private Attributes | |
std::string | builderName |
edm::ParameterSet | conf_ |
std::string | geometry |
OrderedHitPairs | HitPairs |
edm::ESHandle< MagneticField > | magfield |
float | multipleScatteringFactor |
GlobalTrackingRegion | region |
double | seedMomentum |
float | seedpt |
CosmicHitPairGenerator * | thePairGenerator |
PropagatorWithMaterial * | thePropagatorAl |
PropagatorWithMaterial * | thePropagatorOp |
KFUpdator * | theUpdator |
edm::ESHandle< TrackerGeometry > | tracker |
const TransientTrackingRecHitBuilder * | TTTRHBuilder |
Definition at line 21 of file SeedGeneratorForCRack.h.
Definition at line 23 of file SeedGeneratorForCRack.h.
SeedGeneratorForCRack::SeedGeneratorForCRack | ( | const edm::ParameterSet & | conf | ) |
Definition at line 31 of file SeedGeneratorForCRack.cc.
References builderName, conf_, geometry, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), multipleScatteringFactor, ptmin, region, seedMomentum, and seedpt.
: conf_(conf) { float ptmin=conf_.getParameter<double>("ptMin"); float originradius=conf_.getParameter<double>("originRadius"); float halflength=conf_.getParameter<double>("originHalfLength"); float originz=conf_.getParameter<double>("originZPosition"); seedpt = conf_.getParameter<double>("SeedPt"); builderName = conf_.getParameter<std::string>("TTRHBuilder"); geometry=conf_.getUntrackedParameter<std::string>("GeometricStructure","STANDARD"); region=GlobalTrackingRegion(ptmin,originradius, halflength,originz); multipleScatteringFactor=conf_.getUntrackedParameter<double>("multipleScatteringFactor", 1.0); seedMomentum =conf_.getUntrackedParameter<double>("SeedMomentum",1); edm::LogInfo("SeedGeneratorForCRack")<<" PtMin of track is "<<ptmin<< " The Radius of the cylinder for seeds is "<<originradius <<"cm" << " The set Seed Momentum" << seedpt; }
virtual SeedGeneratorForCRack::~SeedGeneratorForCRack | ( | ) | [inline, virtual] |
Definition at line 25 of file SeedGeneratorForCRack.h.
{};
void SeedGeneratorForCRack::init | ( | const SiStripRecHit2DCollection & | collstereo, |
const SiStripRecHit2DCollection & | collrphi, | ||
const SiStripMatchedRecHit2DCollection & | collmatched, | ||
const edm::EventSetup & | c | ||
) |
Definition at line 6 of file SeedGeneratorForCRack.cc.
References alongMomentum, builderName, geometry, edm::EventSetup::get(), CosmicHitPairGenerator::hitPairs(), HitPairs, CosmicLayerPairs::init(), LogDebug, magfield, oppositeToMomentum, edm::ESHandle< T >::product(), region, OrderedHitPairs::size(), thePairGenerator, thePropagatorAl, thePropagatorOp, theUpdator, tracker, and TTTRHBuilder.
Referenced by CRackSeedGenerator::produce().
{ iSetup.get<IdealMagneticFieldRecord>().get(magfield); iSetup.get<TrackerDigiGeometryRecord>().get(tracker); thePropagatorAl= new PropagatorWithMaterial(alongMomentum,0.1057,&(*magfield) ); thePropagatorOp= new PropagatorWithMaterial(oppositeToMomentum,0.1057,&(*magfield) ); theUpdator= new KFUpdator(); // get the transient builder edm::ESHandle<TransientTrackingRecHitBuilder> theBuilder; iSetup.get<TransientRecHitRecord>().get(builderName,theBuilder); TTTRHBuilder = theBuilder.product(); CosmicLayerPairs cosmiclayers(geometry); cosmiclayers.init(collstereo,collrphi,collmatched,iSetup); thePairGenerator=new CosmicHitPairGenerator(cosmiclayers,iSetup); HitPairs.clear(); thePairGenerator->hitPairs(region,HitPairs,iSetup); LogDebug("CosmicSeedFinder") <<"Initialized with " << HitPairs.size() << " hit pairs" << std::endl; }
void SeedGeneratorForCRack::run | ( | TrajectorySeedCollection & | output, |
const edm::EventSetup & | c | ||
) |
Definition at line 50 of file SeedGeneratorForCRack.cc.
References region, seeds(), thePairGenerator, thePropagatorAl, thePropagatorOp, and theUpdator.
Referenced by CRackSeedGenerator::produce().
{ seeds(output,iSetup,region); delete thePairGenerator; delete thePropagatorAl; delete thePropagatorOp; delete theUpdator; }
void SeedGeneratorForCRack::seeds | ( | TrajectorySeedCollection & | output, |
const edm::EventSetup & | c, | ||
const TrackingRegion & | region | ||
) |
Definition at line 58 of file SeedGeneratorForCRack.cc.
References alongMomentum, TransientTrackingRecHitBuilder::build(), clone(), HitPairs, i, SurfaceOrientation::inner, TrajectoryStateOnSurface::isValid(), LogDebug, magfield, multipleScatteringFactor, oppositeToMomentum, SurfaceOrientation::outer, trajectoryStateTransform::persistentState(), PropagatorWithMaterial::propagate(), edm::OwnVector< T, P >::push_back(), TrajectoryStateOnSurface::rescaleError(), seedMomentum, OrderedHitPairs::size(), thePropagatorOp, theUpdator, tracker, TTTRHBuilder, Vector3DBase< T, FrameTag >::unit(), KFUpdator::update(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by run().
{ for(unsigned int is=0;is<HitPairs.size();is++){ GlobalPoint inner = tracker->idToDet((*(HitPairs[is].inner())).geographicalId())->surface().toGlobal((*(HitPairs[is].inner())).localPosition()); GlobalPoint outer = tracker->idToDet((*(HitPairs[is].outer())).geographicalId())->surface().toGlobal((*(HitPairs[is].outer())).localPosition()); LogDebug("CosmicSeedFinder") <<"inner point of the seed "<<inner <<" outer point of the seed "<<outer; TransientTrackingRecHit::ConstRecHitPointer inrhit=TTTRHBuilder->build(HitPairs[is].inner()->hit()); TransientTrackingRecHit::ConstRecHitPointer outrhit = TTTRHBuilder->build(HitPairs[is].outer()->hit()); edm::OwnVector<TrackingRecHit> hits; hits.push_back(HitPairs[is].outer()->hit()->clone()); for (int i=0;i<2;i++){ //FIRST STATE IS CALCULATED CONSIDERING THAT THE CHARGE CAN BE POSITIVE OR NEGATIVE int predsign=(2*i)-1; if((outer.y()-inner.y())>0){ GlobalVector momentum = GlobalVector(inner-outer); momentum = momentum.unit()*seedMomentum; GlobalTrajectoryParameters Gtp(inner, momentum, predsign, &(*magfield)); AlgebraicSymMatrix55 errMatrix = ROOT::Math::SMatrixIdentity(); TSOS innerState = TSOS(Gtp, CurvilinearTrajectoryError(errMatrix), tracker->idToDet((HitPairs[is].inner()->hit())->geographicalId())->surface()); const TSOS innerUpdated = theUpdator->update(innerState, *inrhit); //Cosmic Seed update inner... LogDebug("CosmicSeedFinder") << " FirstTSOS " << innerUpdated; //First propagation const TSOS outerState = thePropagatorOp->propagate(innerUpdated, tracker->idToDet((*(HitPairs[is].outer())).geographicalId())->surface()); if ( outerState.isValid()) { LogDebug("CosmicSeedFinder") <<"outerState "<<outerState; TSOS outerUpdated= theUpdator->update( outerState,*outrhit); //fudge factor for multiple scattering outerUpdated.rescaleError( multipleScatteringFactor); if ( outerUpdated.isValid()) { LogDebug("CosmicSeedFinder") <<"outerUpdated "<<outerUpdated; PTrajectoryStateOnDet PTraj= trajectoryStateTransform::persistentState(outerUpdated, (*(HitPairs[is].outer())).geographicalId().rawId()); output.push_back(TrajectorySeed(PTraj,hits,alongMomentum)); }else edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first update failed "; }else edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first propagation failed "; } else{ GlobalVector momentum= GlobalVector(outer-inner); momentum=momentum.unit()*seedMomentum; GlobalTrajectoryParameters Gtp(inner, momentum, predsign, &(*magfield)); AlgebraicSymMatrix55 errMatrix = ROOT::Math::SMatrixIdentity(); TSOS innerState = TSOS(Gtp, CurvilinearTrajectoryError(errMatrix), tracker->idToDet((HitPairs[is].inner()->hit())->geographicalId())->surface()); const TSOS innerUpdated = theUpdator->update(innerState, *inrhit); LogDebug("CosmicSeedFinder") << " FirstTSOS "<< innerState; //First propagation const TSOS outerState = thePropagatorOp->propagate(innerUpdated, tracker->idToDet((*(HitPairs[is].outer())).geographicalId())->surface()); if ( outerState.isValid()) { LogDebug("CosmicSeedFinder") <<"outerState "<<outerState; TSOS outerUpdated = theUpdator->update( outerState,*outrhit); //fudge factor for multiple scattering outerUpdated.rescaleError( multipleScatteringFactor); if ( outerUpdated.isValid()) { LogDebug("CosmicSeedFinder") <<"outerUpdated "<<outerUpdated; PTrajectoryStateOnDet PTraj= trajectoryStateTransform::persistentState(outerUpdated,(*(HitPairs[is].outer())).geographicalId().rawId()); output.push_back(TrajectorySeed(PTraj,hits,oppositeToMomentum)); }else edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first update failed "; }else edm::LogWarning("CosmicSeedFinder") << " SeedForCosmics first propagation failed "; } } } }
std::string SeedGeneratorForCRack::builderName [private] |
Definition at line 49 of file SeedGeneratorForCRack.h.
Referenced by init(), and SeedGeneratorForCRack().
Definition at line 39 of file SeedGeneratorForCRack.h.
Referenced by SeedGeneratorForCRack().
std::string SeedGeneratorForCRack::geometry [private] |
Definition at line 50 of file SeedGeneratorForCRack.h.
Referenced by init(), and SeedGeneratorForCRack().
Definition at line 52 of file SeedGeneratorForCRack.h.
Definition at line 42 of file SeedGeneratorForCRack.h.
float SeedGeneratorForCRack::multipleScatteringFactor [private] |
Definition at line 53 of file SeedGeneratorForCRack.h.
Referenced by SeedGeneratorForCRack(), and seeds().
Definition at line 40 of file SeedGeneratorForCRack.h.
Referenced by init(), run(), and SeedGeneratorForCRack().
double SeedGeneratorForCRack::seedMomentum [private] |
Definition at line 54 of file SeedGeneratorForCRack.h.
Referenced by SeedGeneratorForCRack(), and seeds().
float SeedGeneratorForCRack::seedpt [private] |
Definition at line 51 of file SeedGeneratorForCRack.h.
Referenced by SeedGeneratorForCRack().
Definition at line 41 of file SeedGeneratorForCRack.h.
Definition at line 46 of file SeedGeneratorForCRack.h.
Definition at line 47 of file SeedGeneratorForCRack.h.
KFUpdator* SeedGeneratorForCRack::theUpdator [private] |
Definition at line 45 of file SeedGeneratorForCRack.h.
Definition at line 43 of file SeedGeneratorForCRack.h.
const TransientTrackingRecHitBuilder* SeedGeneratorForCRack::TTTRHBuilder [private] |
Definition at line 48 of file SeedGeneratorForCRack.h.