CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
MuonOverlapSeedFromRecHits Class Reference

#include <MuonOverlapSeedFromRecHits.h>

Inheritance diagram for MuonOverlapSeedFromRecHits:
MuonSeedFromRecHits

Public Member Functions

bool makeSeed (MuonTransientTrackingRecHit::ConstMuonRecHitPointer barrelHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer endcapHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer bestSegment, TrajectorySeed &result) const
 
 MuonOverlapSeedFromRecHits ()
 
std::vector< TrajectorySeedseeds () const
 
 ~MuonOverlapSeedFromRecHits () override
 
- Public Member Functions inherited from MuonSeedFromRecHits
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 ()
 

Private Member Functions

ConstMuonRecHitPointer bestHit (const MuonRecHitContainer &barrelHits, const MuonRecHitContainer &endcapHits) const
 

Additional Inherited Members

- Protected Types inherited from MuonSeedFromRecHits
typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
 
typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
 
typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
 
- Protected Attributes inherited from MuonSeedFromRecHits
const MagneticFieldtheField
 
const MuonSeedPtExtractorthePtExtractor
 
MuonTransientTrackingRecHit::MuonRecHitContainer theRhits
 

Detailed Description

Definition at line 6 of file MuonOverlapSeedFromRecHits.h.

Constructor & Destructor Documentation

◆ MuonOverlapSeedFromRecHits()

MuonOverlapSeedFromRecHits::MuonOverlapSeedFromRecHits ( )

◆ ~MuonOverlapSeedFromRecHits()

MuonOverlapSeedFromRecHits::~MuonOverlapSeedFromRecHits ( )
inlineoverride

Definition at line 9 of file MuonOverlapSeedFromRecHits.h.

9 {}

Member Function Documentation

◆ bestHit()

MuonTransientTrackingRecHit::ConstMuonRecHitPointer MuonOverlapSeedFromRecHits::bestHit ( const MuonRecHitContainer barrelHits,
const MuonRecHitContainer endcapHits 
) const
private

Definition at line 83 of file MuonOverlapSeedFromRecHits.cc.

References HLT_2023v12_cff::barrelHits, MuonDTSeedFromRecHits::bestBarrelHit(), MuonCSCSeedFromRecHits::bestEndcapHit(), HLT_2023v12_cff::endcapHits, and mps_fire::result.

Referenced by seeds().

85  {
86  MuonDTSeedFromRecHits dtSeeder;
87  MuonCSCSeedFromRecHits cscSeeder;
88 
90  if (barrelHits.size() > endcapHits.size()) {
91  result = dtSeeder.bestBarrelHit(barrelHits);
92  if (result->dimension() == 2)
93  result = cscSeeder.bestEndcapHit(endcapHits);
94  } else {
95  result = cscSeeder.bestEndcapHit(endcapHits);
96  }
97  return result;
98 }
ConstMuonRecHitPointer bestEndcapHit(const MuonRecHitContainer &endcapHits) const
ConstMuonRecHitPointer bestBarrelHit(const MuonRecHitContainer &barrelHits) const
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer

◆ makeSeed()

Definition at line 54 of file MuonOverlapSeedFromRecHits.cc.

References MuonSeedFromRecHits::createSeed(), HiEvtPlane_cfi::maxpt, HiEvtPlane_cfi::minpt, DiDispStaMuonMonitor_cfi::pt, MuonSeedPtExtractor::pT_extract(), RPCpg::pts, mps_fire::result, and MuonSeedFromRecHits::thePtExtractor.

Referenced by seeds().

57  {
58  std::vector<double> pts = thePtExtractor->pT_extract(barrelHit, endcapHit);
59  double minpt = 3.;
60  double pt = pts[0];
61  double sigmapt = pts[1];
62  // if too small, probably an error. Keep trying.
63  if (pt != 0) {
64  if (fabs(pt) > minpt) {
65  double maxpt = 2000.;
66  if (pt > maxpt) {
67  pt = maxpt;
68  sigmapt = maxpt;
69  }
70  if (pt < -maxpt) {
71  pt = -maxpt;
72  sigmapt = maxpt;
73  }
74  }
75 
76  result = createSeed(pt, sigmapt, bestSegment);
77  //std::cout << "OVERLAPFITTED PT " << pt << " dphi " << dphi << " eta " << eta << std::endl;
78  return true;
79  }
80  return false;
81 }
const MuonSeedPtExtractor * thePtExtractor
static const double pts[33]
Definition: Constants.h:30
TrajectorySeed createSeed(float ptmean, float sptmean, MuonTransientTrackingRecHit::ConstMuonRecHitPointer last) const
virtual std::vector< double > pT_extract(MuonTransientTrackingRecHit::ConstMuonRecHitPointer firstHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer secondHit) const

◆ seeds()

std::vector< TrajectorySeed > MuonOverlapSeedFromRecHits::seeds ( ) const

Definition at line 15 of file MuonOverlapSeedFromRecHits.cc.

References HLT_2023v12_cff::barrelHits, bestHit(), mps_fire::end, HLT_2023v12_cff::endcapHits, caHitNtupletGeneratorKernels::good, makeSeed(), mps_fire::result, fileCollector::seed, and MuonSeedFromRecHits::theRhits.

Referenced by MuonSeedFinder::seeds().

15  {
16  std::vector<TrajectorySeed> result;
17  //@@ doesn't handle overlap between ME11 and ME12 correctly
18  // sort by station
20  for (MuonRecHitContainer::const_iterator iter = theRhits.begin(), end = theRhits.end(); iter != end; ++iter) {
21  if ((*iter)->isDT()) {
22  DTChamberId dtId((**iter).geographicalId().rawId());
23  // try not doing seeds that start in DT station 2, if there'as a good single segment seed
24  if (dtId.station() == 1 || (dtId.station() == 2 && (*iter)->dimension() == 2)) {
25  barrelHits.push_back(*iter);
26  }
27  } else {
28  endcapHits.push_back(*iter);
29  }
30  }
31 
33  for (MuonRecHitContainer::const_iterator barrelHitItr = barrelHits.begin(), lastBarrelHit = barrelHits.end();
34  barrelHitItr != lastBarrelHit;
35  ++barrelHitItr) {
36  for (MuonRecHitContainer::const_iterator endcapHitItr = endcapHits.begin(), lastEndcapHit = endcapHits.end();
37  endcapHitItr != lastEndcapHit;
38  ++endcapHitItr) {
40  bool good = makeSeed(*barrelHitItr, *endcapHitItr, bestSegment, seed);
41  if (good)
42  result.push_back(seed);
43  // try just one seed
44  return result;
45  }
46  }
47 
48  //std::cout << "Overlap hits " << barrelHits.size() << " "
49  // << endcapHits.size() << std::endl;
50 
51  return result;
52 }
MuonTransientTrackingRecHit::MuonRecHitContainer theRhits
ConstMuonRecHitPointer bestHit(const MuonRecHitContainer &barrelHits, const MuonRecHitContainer &endcapHits) const
bool makeSeed(MuonTransientTrackingRecHit::ConstMuonRecHitPointer barrelHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer endcapHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer bestSegment, TrajectorySeed &result) const
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer