CMS 3D CMS Logo

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) override
 
void setBField (const MagneticField *field) override
 
 ~MuonSeedFinder () override
 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

Uses SteppingHelixPropagator

Author
R. Wilkinson

Definition at line 22 of file MuonSeedFinder.h.

Constructor & Destructor Documentation

◆ MuonSeedFinder()

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

Constructor.

Definition at line 18 of file MuonSeedFinder.cc.

18  : theBarrel(), theOverlap(), theEndcap() {
19  // FIXME put it in a pSet
20  // theMinMomentum = pset.getParameter<double>("EndCapSeedMinPt"); //3.0
21  theMinMomentum = 3.0;
26 }

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

◆ ~MuonSeedFinder()

MuonSeedFinder::~MuonSeedFinder ( )
inlineoverride

Destructor.

Definition at line 28 of file MuonSeedFinder.h.

28 { delete thePtExtractor; }

References MuonSeedVFinder::thePtExtractor.

Member Function Documentation

◆ analyze()

void MuonSeedFinder::analyze ( ) const
private

◆ computePt()

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

◆ seeds()

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

Implements MuonSeedVFinder.

Definition at line 35 of file MuonSeedFinder.cc.

36  {
37  const std::string metname = "Muon|RecoMuon|MuonSeedFinder";
38 
39  // MuonDumper debug;
40 
41  unsigned int num_bar = 0;
42  for (MuonRecHitContainer::const_iterator iter = hits.begin(); iter != hits.end(); iter++) {
43  if ((*iter)->isDT()) {
44  theBarrel.add(*iter);
45  theOverlap.add(*iter);
46  num_bar++;
47  }
48  }
49 
50  unsigned int num_endcap = 0;
51  for (MuonRecHitContainer::const_iterator iter = hits.begin(); iter != hits.end(); iter++) {
52  if ((*iter)->isCSC() || (*iter)->isME0()) {
53  theEndcap.add(*iter);
54  theOverlap.add(*iter);
55  ++num_endcap;
56  }
57  }
58 
59  // don't do dim-2 seeds in the overlap
60  if (num_bar > 1 || (num_bar == 1 && (num_endcap == 0 || theBarrel.firstRecHit()->dimension() == 4))) {
61  LogDebug(metname) << "Barrel Seeds " << num_bar << endl;
62  result.push_back(theBarrel.seed());
63  }
64 
65  if (num_endcap > 1 || (num_endcap == 1 && num_bar == 0)) {
66  LogDebug(metname) << "Endcap Seeds " << num_endcap << endl;
67  result.push_back(theEndcap.seed());
68  }
69 
70  if (num_bar > 0 && num_endcap > 0) {
71  LogTrace(metname) << "Overlap Seed" << endl;
72  std::vector<TrajectorySeed> overlapSeeds = theOverlap.seeds();
73  result.insert(result.end(), overlapSeeds.begin(), overlapSeeds.end());
74  }
75 
76  theBarrel.clear();
77  theOverlap.clear();
78  theEndcap.clear();
79 }

References MuonSeedFromRecHits::add(), MuonSeedFromRecHits::clear(), MuonSeedFromRecHits::firstRecHit(), hfClusterShapes_cfi::hits, LogDebug, LogTrace, metname, mps_fire::result, MuonCSCSeedFromRecHits::seed(), MuonDTSeedFromRecHits::seed(), MuonOverlapSeedFromRecHits::seeds(), AlCaHLTBitMon_QueryRunRegistry::string, theBarrel, theEndcap, and theOverlap.

◆ setBField()

void MuonSeedFinder::setBField ( const MagneticField field)
overridevirtual

Implements MuonSeedVFinder.

Definition at line 28 of file MuonSeedFinder.cc.

28  {
29  theField = field;
30  theBarrel.setBField(field);
31  theOverlap.setBField(field);
32  theEndcap.setBField(field);
33 }

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

Member Data Documentation

◆ theBarrel

MuonDTSeedFromRecHits MuonSeedFinder::theBarrel
private

Definition at line 46 of file MuonSeedFinder.h.

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

◆ theEndcap

MuonCSCSeedFromRecHits MuonSeedFinder::theEndcap
private

Definition at line 48 of file MuonSeedFinder.h.

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

◆ theField

const MagneticField* MuonSeedFinder::theField
private

Definition at line 44 of file MuonSeedFinder.h.

Referenced by setBField().

◆ theMinMomentum

float MuonSeedFinder::theMinMomentum
private

Definition at line 43 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder().

◆ theOverlap

MuonOverlapSeedFromRecHits MuonSeedFinder::theOverlap
private

Definition at line 47 of file MuonSeedFinder.h.

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

hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
MuonOverlapSeedFromRecHits::seeds
std::vector< TrajectorySeed > seeds() const
Definition: MuonOverlapSeedFromRecHits.cc:15
MuonSeedFromRecHits::setPtExtractor
void setPtExtractor(const MuonSeedPtExtractor *extractor)
Definition: MuonSeedFromRecHits.h:25
MuonSeedFromRecHits::firstRecHit
MuonTransientTrackingRecHit::ConstMuonRecHitPointer firstRecHit() const
Definition: MuonSeedFromRecHits.h:28
MuonSeedPtExtractor
Definition: MuonSeedPtExtractor.h:16
MuonSeedFinder::theMinMomentum
float theMinMomentum
Definition: MuonSeedFinder.h:43
MuonSeedFromRecHits::setBField
void setBField(const MagneticField *field)
Definition: MuonSeedFromRecHits.h:24
MuonSeedFinder::theEndcap
MuonCSCSeedFromRecHits theEndcap
Definition: MuonSeedFinder.h:48
MuonCSCSeedFromRecHits::seed
virtual TrajectorySeed seed() const
Definition: MuonCSCSeedFromRecHits.cc:17
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
MuonSeedFromRecHits::clear
void clear()
Definition: MuonSeedFromRecHits.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonSeedFinder::theField
const MagneticField * theField
Definition: MuonSeedFinder.h:44
MuonSeedFinder::theBarrel
MuonDTSeedFromRecHits theBarrel
Definition: MuonSeedFinder.h:46
mps_fire.result
result
Definition: mps_fire.py:311
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
MuonSeedVFinder::thePtExtractor
MuonSeedPtExtractor * thePtExtractor
Definition: MuonSeedVFinder.h:30
MuonSeedFinder::theOverlap
MuonOverlapSeedFromRecHits theOverlap
Definition: MuonSeedFinder.h:47
MuonDTSeedFromRecHits::seed
virtual TrajectorySeed seed() const
Definition: MuonDTSeedFromRecHits.cc:27
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40
MuonSeedFromRecHits::add
void add(MuonTransientTrackingRecHit::MuonRecHitPointer hit)
Definition: MuonSeedFromRecHits.h:27