CMS 3D CMS Logo

MuonSeedFinder Class Reference

Uses SteppingHelixPropagator. More...

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

Inheritance diagram for MuonSeedFinder:

MuonSeedVFinder

List of all members.

Public Member Functions

 MuonSeedFinder (const edm::ParameterSet &pset)
 Constructor.
void seeds (const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)
virtual void setBField (const MagneticField *field)
virtual ~MuonSeedFinder ()
 Destructor.

Private Member Functions

void analyze () const
float computePt (MuonTransientTrackingRecHit::ConstMuonRecHitPointer muon, const MagneticField *field) const

Private Attributes

MuonDTSeedFromRecHits theBarrel
MuonCSCSeedFromRecHits theEndcap
const MagneticFieldtheField
float theMinMomentum
MuonOverlapSeedFromRecHits theOverlap
MuonSeedPtExtractor thePtExtractor


Detailed Description

Uses SteppingHelixPropagator.

Author:
A. Vitelli - INFN Torino

porting R. Bellan - INFN Torino

Date
2008/09/12 23:09:07
Revision
1.11

Author:
R. Wilkinson
Date
2008/09/12 23:05:47
Revision
1.1

Definition at line 24 of file MuonSeedFinder.h.


Constructor & Destructor Documentation

MuonSeedFinder::MuonSeedFinder ( const edm::ParameterSet pset  ) 

Constructor.

Definition at line 21 of file MuonSeedFinder.cc.

References MuonSeedFromRecHits::setPtExtractor(), theBarrel, theEndcap, theMinMomentum, theOverlap, and thePtExtractor.

00021                                                           :
00022   thePtExtractor(pset),
00023   theBarrel(),
00024   theOverlap(),
00025   theEndcap()
00026 {
00027   
00028   // FIXME put it in a pSet
00029   // theMinMomentum = pset.getParameter<double>("EndCapSeedMinPt");  //3.0
00030   theMinMomentum = 3.0;
00031   theBarrel.setPtExtractor(&thePtExtractor);
00032   theOverlap.setPtExtractor(&thePtExtractor);
00033   theEndcap.setPtExtractor(&thePtExtractor);
00034 
00035 }

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

Destructor.

Definition at line 31 of file MuonSeedFinder.h.

00031 {};


Member Function Documentation

void MuonSeedFinder::analyze (  )  const [private]

float MuonSeedFinder::computePt ( MuonTransientTrackingRecHit::ConstMuonRecHitPointer  muon,
const MagneticField field 
) const [private]

void MuonSeedFinder::seeds ( const MuonTransientTrackingRecHit::MuonRecHitContainer hits,
std::vector< TrajectorySeed > &  result 
) [virtual]

Implements MuonSeedVFinder.

Definition at line 47 of file MuonSeedFinder.cc.

References MuonSeedFromRecHits::add(), MuonSeedFromRecHits::clear(), lat::endl(), iter, LogDebug, LogTrace, MuonDTSeedFromRecHits::seed(), MuonCSCSeedFromRecHits::seed(), MuonOverlapSeedFromRecHits::seeds(), theBarrel, theEndcap, and theOverlap.

00049 {
00050   const std::string metname = "Muon|RecoMuon|MuonSeedFinder";
00051 
00052   //  MuonDumper debug;
00053   theBarrel.clear();
00054   theOverlap.clear();
00055   theEndcap.clear();
00056 
00057   int num_bar = 0;
00058   for ( MuonRecHitContainer::const_iterator iter = hits.begin(); iter!= hits.end(); iter++ ){
00059     if ( (*iter)->isDT() ) {
00060       theBarrel.add(*iter);
00061       theOverlap.add(*iter);
00062       num_bar++;
00063     }
00064   }
00065 
00066   if ( num_bar ) {
00067     LogDebug(metname)
00068       << "Barrel Seeds " << num_bar << endl;
00069     result.push_back(theBarrel.seed());
00070  
00071     //if ( debug ) //2
00072       // cout << result.back().startingState() << endl;
00073       // was
00074       // cout << result.back().freeTrajectoryState() << endl;
00075   }
00076   
00077   
00078 
00079   int num_endcap = 0;
00080   for ( MuonRecHitContainer::const_iterator iter = hits.begin(); iter!= hits.end(); iter++ ){
00081     if ( (*iter)->isCSC() )
00082     {
00083 //std::cout << **iter << std::endl;
00084       theEndcap.add(*iter);
00085       theOverlap.add(*iter);
00086       ++num_endcap;
00087     }
00088   }
00089   if(num_endcap > 1 || (num_endcap==1 && num_bar==0))
00090   {
00091     LogDebug(metname)
00092       << "Endcap Seeds " << num_endcap << endl;
00093     result.push_back(theEndcap.seed());
00094   }
00095 
00096   if(num_bar > 0 && num_endcap > 0)
00097   {
00098     LogTrace(metname) << "Overlap Seed" << endl;
00099     std::vector<TrajectorySeed> overlapSeeds = theOverlap.seeds();
00100     result.insert(result.end(), overlapSeeds.begin(), overlapSeeds.end());
00101   }
00102 
00103 }

void MuonSeedFinder::setBField ( const MagneticField field  )  [virtual]

Implements MuonSeedVFinder.

Definition at line 38 of file MuonSeedFinder.cc.

References MuonSeedFromRecHits::setBField(), theBarrel, theEndcap, theField, and theOverlap.

00039 {
00040   theField = field;
00041   theBarrel.setBField(field);
00042   theOverlap.setBField(field);
00043   theEndcap.setBField(field);
00044 }


Member Data Documentation

MuonDTSeedFromRecHits MuonSeedFinder::theBarrel [private]

Definition at line 51 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder(), seeds(), and setBField().

MuonCSCSeedFromRecHits MuonSeedFinder::theEndcap [private]

Definition at line 53 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder(), seeds(), and setBField().

const MagneticField* MuonSeedFinder::theField [private]

Definition at line 49 of file MuonSeedFinder.h.

Referenced by setBField().

float MuonSeedFinder::theMinMomentum [private]

Definition at line 48 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder().

MuonOverlapSeedFromRecHits MuonSeedFinder::theOverlap [private]

Definition at line 52 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder(), seeds(), and setBField().

MuonSeedPtExtractor MuonSeedFinder::thePtExtractor [private]

Definition at line 45 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder().


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