CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonSeedFinder Class Reference

#include <MuonSeedFinder.h>

Inheritance diagram for MuonSeedFinder:
MuonSeedVFinder

Public Member Functions

 MuonSeedFinder (const edm::ParameterSet &pset)
 Constructor. More...
 
void seeds (const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)
 
virtual void setBField (const MagneticField *field)
 
virtual ~MuonSeedFinder ()
 Destructor. More...
 
- Public Member Functions inherited from MuonSeedVFinder
void setBeamSpot (const GlobalVector &gv)
 
virtual ~MuonSeedVFinder ()
 

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
 

Additional Inherited Members

- Protected Attributes inherited from MuonSeedVFinder
MuonSeedPtExtractorthePtExtractor
 

Detailed Description

Uses SteppingHelixPropagator

Author
A. Vitelli - INFN Torino
porting R. Bellan - INFN Torino
Date:
2010/08/10 20:08:06
Revision:
1.12

Uses SteppingHelixPropagator

Author
R. Wilkinson
Date:
2010/08/10 20:05:22
Revision:
1.3

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 MuonSeedVFinder::thePtExtractor.

21  :
22  theBarrel(),
23  theOverlap(),
24  theEndcap()
25 {
26 
27  // FIXME put it in a pSet
28  // theMinMomentum = pset.getParameter<double>("EndCapSeedMinPt"); //3.0
29  theMinMomentum = 3.0;
34 
35 }
MuonOverlapSeedFromRecHits theOverlap
MuonSeedPtExtractor * thePtExtractor
void setPtExtractor(const MuonSeedPtExtractor *extractor)
MuonCSCSeedFromRecHits theEndcap
MuonDTSeedFromRecHits theBarrel
virtual MuonSeedFinder::~MuonSeedFinder ( )
inlinevirtual

Destructor.

Definition at line 31 of file MuonSeedFinder.h.

References MuonSeedVFinder::thePtExtractor.

31 {delete thePtExtractor;}
MuonSeedPtExtractor * thePtExtractor

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(), MuonSeedFromRecHits::firstRecHit(), LogDebug, LogTrace, metname, MuonCSCSeedFromRecHits::seed(), MuonDTSeedFromRecHits::seed(), MuonOverlapSeedFromRecHits::seeds(), theBarrel, theEndcap, and theOverlap.

49 {
50  const std::string metname = "Muon|RecoMuon|MuonSeedFinder";
51 
52  // MuonDumper debug;
53 
54  unsigned int num_bar = 0;
55  for ( MuonRecHitContainer::const_iterator iter = hits.begin(); iter!= hits.end(); iter++ ){
56  if ( (*iter)->isDT() ) {
57  theBarrel.add(*iter);
58  theOverlap.add(*iter);
59  num_bar++;
60  }
61  }
62 
63  unsigned int num_endcap = 0;
64  for ( MuonRecHitContainer::const_iterator iter = hits.begin(); iter!= hits.end(); iter++ ){
65  if ( (*iter)->isCSC() )
66  {
67 //std::cout << **iter << std::endl;
68  theEndcap.add(*iter);
69  theOverlap.add(*iter);
70  ++num_endcap;
71  }
72  }
73 
74  // don't do dim-2 seeds in the overlap
75  if ( num_bar >1 || (num_bar==1 && (num_endcap==0 || theBarrel.firstRecHit()->dimension() == 4))) {
76  LogDebug(metname)
77  << "Barrel Seeds " << num_bar << endl;
78  result.push_back(theBarrel.seed());
79 
80  }
81 
82  if(num_endcap > 1 || (num_endcap==1 && num_bar==0))
83  {
84  LogDebug(metname)
85  << "Endcap Seeds " << num_endcap << endl;
86  result.push_back(theEndcap.seed());
87  }
88 
89  if(num_bar > 0 && num_endcap > 0)
90  {
91  LogTrace(metname) << "Overlap Seed" << endl;
92  std::vector<TrajectorySeed> overlapSeeds = theOverlap.seeds();
93  result.insert(result.end(), overlapSeeds.begin(), overlapSeeds.end());
94  }
95 
96  theBarrel.clear();
97  theOverlap.clear();
98  theEndcap.clear();
99 
100 
101 }
#define LogDebug(id)
virtual TrajectorySeed seed() const
const std::string metname
MuonTransientTrackingRecHit::ConstMuonRecHitPointer firstRecHit() const
MuonOverlapSeedFromRecHits theOverlap
tuple result
Definition: query.py:137
#define LogTrace(id)
virtual TrajectorySeed seed() const
void add(MuonTransientTrackingRecHit::MuonRecHitPointer hit)
std::vector< TrajectorySeed > seeds() const
MuonCSCSeedFromRecHits theEndcap
MuonDTSeedFromRecHits theBarrel
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.

39 {
40  theField = field;
41  theBarrel.setBField(field);
42  theOverlap.setBField(field);
43  theEndcap.setBField(field);
44 }
MuonOverlapSeedFromRecHits theOverlap
void setBField(const MagneticField *field)
const MagneticField * theField
MuonCSCSeedFromRecHits theEndcap
MuonDTSeedFromRecHits theBarrel

Member Data Documentation

MuonDTSeedFromRecHits MuonSeedFinder::theBarrel
private

Definition at line 50 of file MuonSeedFinder.h.

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

MuonCSCSeedFromRecHits MuonSeedFinder::theEndcap
private

Definition at line 52 of file MuonSeedFinder.h.

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

const MagneticField* MuonSeedFinder::theField
private

Definition at line 48 of file MuonSeedFinder.h.

Referenced by setBField().

float MuonSeedFinder::theMinMomentum
private

Definition at line 47 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder().

MuonOverlapSeedFromRecHits MuonSeedFinder::theOverlap
private

Definition at line 51 of file MuonSeedFinder.h.

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