CMS 3D CMS Logo

MuonSeedFinder.cc
Go to the documentation of this file.
1 
11 
12 using namespace std;
13 
17 
18 MuonSeedFinder::MuonSeedFinder(const edm::ParameterSet& pset) : theBarrel(), theOverlap(), theEndcap() {
19  // FIXME put it in a pSet
20  // theMinMomentum = pset.getParameter<double>("EndCapSeedMinPt"); //3.0
21  theMinMomentum = 3.0;
26 }
27 
29  theField = field;
30  theBarrel.setBField(field);
31  theOverlap.setBField(field);
32  theEndcap.setBField(field);
33 }
34 
36  std::vector<TrajectorySeed>& result) {
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 }
MuonSeedFinder::setBField
void setBField(const MagneticField *field) override
Definition: MuonSeedFinder.cc:28
MuonTransientTrackingRecHit::ConstMuonRecHitPointer
std::shared_ptr< MuonTransientTrackingRecHit const > ConstMuonRecHitPointer
Definition: MuonTransientTrackingRecHit.h:22
MessageLogger.h
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
MuonTransientTrackingRecHit::MuonRecHitContainer
std::vector< MuonRecHitPointer > MuonRecHitContainer
Definition: MuonTransientTrackingRecHit.h:26
ConstMuonRecHitPointer
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
Definition: MuonSeedFinder.cc:15
MuonSeedFromRecHits::setBField
void setBField(const MagneticField *field)
Definition: MuonSeedFromRecHits.h:24
MuonSeedFinder::theEndcap
MuonCSCSeedFromRecHits theEndcap
Definition: MuonSeedFinder.h:48
MuonTransientTrackingRecHit::MuonRecHitPointer
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
Definition: MuonTransientTrackingRecHit.h:21
MuonRecHitPointer
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
Definition: MuonSeedFinder.cc:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonCSCSeedFromRecHits::seed
virtual TrajectorySeed seed() const
Definition: MuonCSCSeedFromRecHits.cc:17
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
MuonSeedFinder.h
MuonSeedFromRecHits::clear
void clear()
Definition: MuonSeedFromRecHits.h:30
MuonRecHitContainer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
Definition: MuonSeedFinder.cc:16
MuonSeedFinder::MuonSeedFinder
MuonSeedFinder(const edm::ParameterSet &pset)
Constructor.
Definition: MuonSeedFinder.cc:18
std
Definition: JetResolutionObject.h:76
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::seeds
void seeds(const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result) override
Definition: MuonSeedFinder.cc:35
MuonSeedFinder::theOverlap
MuonOverlapSeedFromRecHits theOverlap
Definition: MuonSeedFinder.h:47
MagneticField
Definition: MagneticField.h:19
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