#include <MuonSeedFromRecHits.h>
Public Member Functions | |
void | add (MuonTransientTrackingRecHit::MuonRecHitPointer hit) |
void | clear () |
TrajectorySeed | createSeed (float ptmean, float sptmean, MuonTransientTrackingRecHit::ConstMuonRecHitPointer last) const |
MuonTransientTrackingRecHit::ConstMuonRecHitPointer | firstRecHit () const |
MuonSeedFromRecHits () | |
unsigned int | nrhit () const |
void | setBField (const MagneticField *field) |
void | setPtExtractor (const MuonSeedPtExtractor *extractor) |
virtual | ~MuonSeedFromRecHits () |
Protected Types | |
typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer | ConstMuonRecHitPointer |
typedef MuonTransientTrackingRecHit::MuonRecHitContainer | MuonRecHitContainer |
typedef MuonTransientTrackingRecHit::MuonRecHitPointer | MuonRecHitPointer |
Protected Attributes | |
const MagneticField * | theField |
const MuonSeedPtExtractor * | thePtExtractor |
MuonTransientTrackingRecHit::MuonRecHitContainer | theRhits |
Generate a seed starting from a list of RecHits
Definition at line 19 of file MuonSeedFromRecHits.h.
typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer MuonSeedFromRecHits::ConstMuonRecHitPointer [protected] |
Definition at line 39 of file MuonSeedFromRecHits.h.
typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonSeedFromRecHits::MuonRecHitContainer [protected] |
Definition at line 37 of file MuonSeedFromRecHits.h.
typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonSeedFromRecHits::MuonRecHitPointer [protected] |
Definition at line 38 of file MuonSeedFromRecHits.h.
MuonSeedFromRecHits::MuonSeedFromRecHits | ( | ) |
Definition at line 35 of file MuonSeedFromRecHits.cc.
: theField(0) { }
virtual MuonSeedFromRecHits::~MuonSeedFromRecHits | ( | ) | [inline, virtual] |
Definition at line 23 of file MuonSeedFromRecHits.h.
{}
void MuonSeedFromRecHits::add | ( | MuonTransientTrackingRecHit::MuonRecHitPointer | hit | ) | [inline] |
Definition at line 28 of file MuonSeedFromRecHits.h.
References theRhits.
Referenced by MuonSeedFinder::seeds().
{ theRhits.push_back(hit); }
void MuonSeedFromRecHits::clear | ( | void | ) | [inline] |
Definition at line 31 of file MuonSeedFromRecHits.h.
References theRhits.
Referenced by MuonSeedFinder::seeds().
{theRhits.clear();}
TrajectorySeed MuonSeedFromRecHits::createSeed | ( | float | ptmean, |
float | sptmean, | ||
MuonTransientTrackingRecHit::ConstMuonRecHitPointer | last | ||
) | const |
Definition at line 41 of file MuonSeedFromRecHits.cc.
References alongMomentum, DeDxDiscriminatorTools::charge(), clone(), debug, error, prof2calltree::l, metname, PV3DBase< T, PVType, FrameType >::perp(), trajectoryStateTransform::persistentState(), edm::OwnVector< T, P >::push_back(), funct::sqr(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, theField, theRhits, and PV3DBase< T, PVType, FrameType >::theta().
Referenced by MuonCSCSeedFromRecHits::createDefaultEndcapSeed(), MuonCSCSeedFromRecHits::makeSeed(), MuonOverlapSeedFromRecHits::makeSeed(), MuonDTSeedFromRecHits::seed(), and ExhaustiveMuonTrajectoryBuilder::trajectories().
{ const std::string metname = "Muon|RecoMuon|MuonSeedFromRecHits"; MuonPatternRecoDumper debug; // FIXME: put it into a parameter set! double theMinMomentum = 3.0; int charge=std::copysign(1,ptmean); // Minimal pt if ( fabs(ptmean) < theMinMomentum ) ptmean = theMinMomentum * charge ; AlgebraicVector t(4); AlgebraicSymMatrix mat(5,0) ; // Fill the LocalTrajectoryParameters LocalPoint segPos=last->localPosition(); GlobalVector mom=last->globalPosition()-GlobalPoint(); GlobalVector polar(GlobalVector::Spherical(mom.theta(), last->globalDirection().phi(), 1.)); polar *=fabs(ptmean)/polar.perp(); LocalVector segDirFromPos=last->det()->toLocal(polar); LocalTrajectoryParameters param(segPos,segDirFromPos, charge); // this perform H.T() * parErr * H, which is the projection of the // the measurement error (rechit rf) to the state error (TSOS rf) // Legenda: // H => is the 4x5 projection matrix // parError the 4x4 parameter error matrix of the RecHit // LogTrace(metname) << "Projection matrix:\n" << last->projectionMatrix(); // LogTrace(metname) << "Error matrix:\n" << last->parametersError(); mat = last->parametersError().similarityT( last->projectionMatrix() ); float p_err = sqr(sptmean/(ptmean*ptmean)); mat[0][0]= p_err; LocalTrajectoryError error(asSMatrix<5>(mat)); // Create the TrajectoryStateOnSurface TrajectoryStateOnSurface tsos(param, error, last->det()->surface(), theField); // The following LogTraces must be moved somewhere else (StandAloneTrajectoryBuilder) // Here the TSOS does not have the magnetic field set, so dumpTSOS causes a crash // (when LogTrace/LogDebug is activated) //LogTrace(metname) << "Trajectory State on Surface before the extrapolation"<<endl; //LogTrace(metname) << debug.dumpTSOS(tsos); // Take the DetLayer on which relies the rechit DetId id = last->geographicalId(); // Segment layer //LogTrace(metname) << "The RecSegment relies on: "<<endl; //LogTrace(metname) << debug.dumpMuonId(id); //LogTrace(metname) << debug.dumpTSOS(tsos); // Transform it in a TrajectoryStateOnSurface PTrajectoryStateOnDet const & seedTSOS = trajectoryStateTransform::persistentState( tsos ,id.rawId()); edm::OwnVector<TrackingRecHit> container; for (unsigned l=0; l<theRhits.size(); l++) { container.push_back( theRhits[l]->hit()->clone() ); } TrajectorySeed theSeed(seedTSOS,container,alongMomentum); return theSeed; }
MuonTransientTrackingRecHit::ConstMuonRecHitPointer MuonSeedFromRecHits::firstRecHit | ( | ) | const [inline] |
Definition at line 29 of file MuonSeedFromRecHits.h.
References theRhits.
Referenced by MuonSeedFinder::seeds().
{ return theRhits.front(); }
unsigned int MuonSeedFromRecHits::nrhit | ( | ) | const [inline] |
Definition at line 30 of file MuonSeedFromRecHits.h.
References theRhits.
{ return theRhits.size(); }
void MuonSeedFromRecHits::setBField | ( | const MagneticField * | field | ) | [inline] |
Definition at line 25 of file MuonSeedFromRecHits.h.
References theField.
Referenced by MuonSeedFinder::setBField().
{theField = field;}
void MuonSeedFromRecHits::setPtExtractor | ( | const MuonSeedPtExtractor * | extractor | ) | [inline] |
Definition at line 26 of file MuonSeedFromRecHits.h.
References thePtExtractor.
Referenced by MuonSeedFinder::MuonSeedFinder().
{thePtExtractor = extractor;}
const MagneticField* MuonSeedFromRecHits::theField [protected] |
Definition at line 42 of file MuonSeedFromRecHits.h.
Referenced by createSeed(), and setBField().
const MuonSeedPtExtractor* MuonSeedFromRecHits::thePtExtractor [protected] |
Definition at line 43 of file MuonSeedFromRecHits.h.
Referenced by MuonDTSeedFromRecHits::computePtWithoutVtx(), MuonDTSeedFromRecHits::computePtWithVtx(), MuonCSCSeedFromRecHits::createDefaultEndcapSeed(), MuonCSCSeedFromRecHits::makeSeed(), MuonOverlapSeedFromRecHits::makeSeed(), and setPtExtractor().
Definition at line 41 of file MuonSeedFromRecHits.h.
Referenced by add(), MuonCSCSeedFromRecHits::analyze(), MuonDTSeedFromRecHits::bestEta(), clear(), MuonDTSeedFromRecHits::computePtWithoutVtx(), MuonDTSeedFromRecHits::computePtWithVtx(), createSeed(), firstRecHit(), MuonCSCSeedFromRecHits::makeDefaultSeed(), MuonCSCSeedFromRecHits::makeSeed(), nrhit(), MuonDTSeedFromRecHits::seed(), MuonCSCSeedFromRecHits::seed(), and MuonOverlapSeedFromRecHits::seeds().