CMS 3D CMS Logo

MuonSeedFromRecHits Class Reference

Author:
A.
More...

#include <RecoMuon/MuonSeedGenerator/src/MuonSeedFromRecHits.h>

Inheritance diagram for MuonSeedFromRecHits:

MuonCSCSeedFromRecHits MuonDTSeedFromRecHits MuonOverlapSeedFromRecHits

List of all members.

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 MagneticFieldtheField
const MuonSeedPtExtractorthePtExtractor
MuonTransientTrackingRecHit::MuonRecHitContainer theRhits

Friends

class MuonSeedFinder


Detailed Description

Author:
A.

Vitelli - INFN Torino

Author:
porting R.Bellan - INFN Torino
Generate a seed starting from a list of RecHits make use of TrajectorySeed from CommonDet

Definition at line 24 of file MuonSeedFromRecHits.h.


Member Typedef Documentation

typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer MuonSeedFromRecHits::ConstMuonRecHitPointer [protected]

Definition at line 45 of file MuonSeedFromRecHits.h.

typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonSeedFromRecHits::MuonRecHitContainer [protected]

Definition at line 43 of file MuonSeedFromRecHits.h.

typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonSeedFromRecHits::MuonRecHitPointer [protected]

Definition at line 44 of file MuonSeedFromRecHits.h.


Constructor & Destructor Documentation

MuonSeedFromRecHits::MuonSeedFromRecHits (  ) 

Definition at line 35 of file MuonSeedFromRecHits.cc.

00036 : theField(0)
00037 {
00038 }

virtual MuonSeedFromRecHits::~MuonSeedFromRecHits (  )  [inline, virtual]

Definition at line 28 of file MuonSeedFromRecHits.h.

00028 {}


Member Function Documentation

void MuonSeedFromRecHits::add ( MuonTransientTrackingRecHit::MuonRecHitPointer  hit  )  [inline]

Definition at line 33 of file MuonSeedFromRecHits.h.

References theRhits.

Referenced by MuonSeedFinder::seeds().

00033 { theRhits.push_back(hit); }

void MuonSeedFromRecHits::clear ( void   )  [inline]

Definition at line 36 of file MuonSeedFromRecHits.h.

References theRhits.

Referenced by MuonSeedFinder::seeds().

00036 {theRhits.clear();}

TrajectorySeed MuonSeedFromRecHits::createSeed ( float  ptmean,
float  sptmean,
MuonTransientTrackingRecHit::ConstMuonRecHitPointer  last 
) const

Definition at line 41 of file MuonSeedFromRecHits.cc.

References clone(), debug, MuonPatternRecoDumper::dumpMuonId(), MuonPatternRecoDumper::dumpTSOS(), lat::endl(), error, int, edm::es::l(), LogTrace, oppositeToMomentum, TrajectoryStateTransform::persistentState(), edm::OwnVector< T, P >::push_back(), sqr(), t, theField, theRhits, and PV3DBase< T, PVType, FrameType >::theta().

Referenced by MuonCSCSeedFromRecHits::createDefaultEndcapSeed(), MuonCSCSeedFromRecHits::makeSeed(), MuonOverlapSeedFromRecHits::makeSeed(), MuonOverlapSeedFromRecHits::makeSeed2(), MuonDTSeedFromRecHits::seed(), and MuonCSCSeedFromRecHits::seed().

00044 {
00045   
00046   const std::string metname = "Muon|RecoMuon|MuonSeedFromRecHits";
00047 
00048   MuonPatternRecoDumper debug;
00049 
00050   // FIXME: put it into a parameter set!
00051   double theMinMomentum = 3.0;
00052  
00053   // Minimal pt
00054   if ( fabs(ptmean) < theMinMomentum ) ptmean = theMinMomentum * ptmean/fabs(ptmean) ;
00055 
00056   AlgebraicVector t(4);
00057   AlgebraicSymMatrix mat(5,0) ;
00058 
00059   // Fill the LocalTrajectoryParameters
00060   LocalPoint segPos=last->localPosition();
00061   GlobalVector mom=last->globalPosition()-GlobalPoint();
00062   GlobalVector polar(GlobalVector::Spherical(mom.theta(),
00063                                              last->globalDirection().phi(),
00064                                              1.));
00065   polar *=fabs(ptmean)/polar.perp();
00066   LocalVector segDirFromPos=last->det()->toLocal(polar);
00067   int charge=(int)(ptmean/fabs(ptmean));
00068 
00069   LocalTrajectoryParameters param(segPos,segDirFromPos, charge);
00070 
00071   // this perform H.T() * parErr * H, which is the projection of the 
00072   // the measurement error (rechit rf) to the state error (TSOS rf)
00073   // Legenda:
00074   // H => is the 4x5 projection matrix
00075   // parError the 4x4 parameter error matrix of the RecHit
00076 
00077   // LogTrace(metname) << "Projection matrix:\n" << last->projectionMatrix();
00078   // LogTrace(metname) << "Error matrix:\n" << last->parametersError();
00079 
00080   mat = last->parametersError().similarityT( last->projectionMatrix() );
00081   
00082 
00083   float p_err = sqr(sptmean/(ptmean*ptmean));
00084   mat[0][0]= p_err;
00085   
00086 
00087   LocalTrajectoryError error(mat);
00088   
00089   // Create the TrajectoryStateOnSurface
00090   TrajectoryStateOnSurface tsos(param, error, last->det()->surface(), theField);
00091 
00092   LogTrace(metname) << "Trajectory State on Surface before the extrapolation"<<endl;
00093   LogTrace(metname) << debug.dumpTSOS(tsos);
00094   
00095   // Take the DetLayer on which relies the rechit
00096   DetId id = last->geographicalId();
00097   // Segment layer
00098   LogTrace(metname) << "The RecSegment relies on: "<<endl;
00099   LogTrace(metname) << debug.dumpMuonId(id);
00100   LogTrace(metname) << debug.dumpTSOS(tsos);
00101 
00102   // Transform it in a TrajectoryStateOnSurface
00103   TrajectoryStateTransform tsTransform;
00104   
00105   PTrajectoryStateOnDet *seedTSOS =
00106     tsTransform.persistentState( tsos ,id.rawId());
00107   
00108   edm::OwnVector<TrackingRecHit> container;
00109   for (unsigned l=0; l<theRhits.size(); l++) {
00110       container.push_back( theRhits[l]->hit()->clone() );
00111   }
00112 
00113   TrajectorySeed theSeed(*seedTSOS,container,oppositeToMomentum);
00114 
00115   delete seedTSOS;
00116     
00117   return theSeed;
00118 }

MuonTransientTrackingRecHit::ConstMuonRecHitPointer MuonSeedFromRecHits::firstRecHit (  )  const [inline]

Definition at line 34 of file MuonSeedFromRecHits.h.

References theRhits.

00034 { return theRhits.front(); }

unsigned int MuonSeedFromRecHits::nrhit (  )  const [inline]

Definition at line 35 of file MuonSeedFromRecHits.h.

References theRhits.

00035 { return  theRhits.size(); }

void MuonSeedFromRecHits::setBField ( const MagneticField field  )  [inline]

Definition at line 30 of file MuonSeedFromRecHits.h.

References theField.

Referenced by MuonSeedFinder::setBField().

00030 {theField = field;}

void MuonSeedFromRecHits::setPtExtractor ( const MuonSeedPtExtractor extractor  )  [inline]

Definition at line 31 of file MuonSeedFromRecHits.h.

References thePtExtractor.

Referenced by MuonSeedFinder::MuonSeedFinder().

00031 {thePtExtractor = extractor;}


Friends And Related Function Documentation

friend class MuonSeedFinder [friend]

Definition at line 42 of file MuonSeedFromRecHits.h.


Member Data Documentation

const MagneticField* MuonSeedFromRecHits::theField [protected]

Definition at line 49 of file MuonSeedFromRecHits.h.

Referenced by createSeed(), and setBField().

const MuonSeedPtExtractor* MuonSeedFromRecHits::thePtExtractor [protected]

Definition at line 50 of file MuonSeedFromRecHits.h.

Referenced by MuonCSCSeedFromRecHits::createDefaultEndcapSeed(), MuonCSCSeedFromRecHits::makeSeed(), MuonOverlapSeedFromRecHits::makeSeed2(), and setPtExtractor().

MuonTransientTrackingRecHit::MuonRecHitContainer MuonSeedFromRecHits::theRhits [protected]

Definition at line 48 of file MuonSeedFromRecHits.h.

Referenced by add(), MuonCSCSeedFromRecHits::analyze(), MuonDTSeedFromRecHits::best_cand(), MuonDTSeedFromRecHits::bestEta(), MuonCSCSeedFromRecHits::bestSegment(), clear(), MuonDTSeedFromRecHits::computePtWithoutVtx(), MuonDTSeedFromRecHits::computePtWithVtx(), createSeed(), firstRecHit(), nrhit(), MuonCSCSeedFromRecHits::seed(), and MuonOverlapSeedFromRecHits::seeds().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:48 2009 for CMSSW by  doxygen 1.5.4