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 ( )

Definition at line 14 of file MuonOverlapSeedFromRecHits.cc.

MuonOverlapSeedFromRecHits::~MuonOverlapSeedFromRecHits ( )
inlineoverride

Member Function Documentation

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

Definition at line 104 of file MuonOverlapSeedFromRecHits.cc.

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

Referenced by seeds(), and ~MuonOverlapSeedFromRecHits().

107 {
108  MuonDTSeedFromRecHits dtSeeder;
109  MuonCSCSeedFromRecHits cscSeeder;
110 
112  if(barrelHits.size() > endcapHits.size())
113  {
114  result = dtSeeder.bestBarrelHit(barrelHits);
115  if (result->dimension() == 2) result = cscSeeder.bestEndcapHit(endcapHits);
116  }
117  else
118  {
119  result = cscSeeder.bestEndcapHit(endcapHits);
120  }
121  return result;
122 }
ConstMuonRecHitPointer bestBarrelHit(const MuonRecHitContainer &barrelHits) const
ConstMuonRecHitPointer bestEndcapHit(const MuonRecHitContainer &endcapHits) const
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer

Definition at line 72 of file MuonOverlapSeedFromRecHits.cc.

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

Referenced by seeds(), and ~MuonOverlapSeedFromRecHits().

76 {
77  std::vector<double> pts = thePtExtractor->pT_extract(barrelHit, endcapHit);
78  double minpt = 3.;
79  double pt = pts[0];
80  double sigmapt = pts[1];
81  // if too small, probably an error. Keep trying.
82  if(pt != 0) {
83  if(fabs(pt) > minpt)
84  {
85  double maxpt = 2000.;
86  if(pt > maxpt) {
87  pt = maxpt;
88  sigmapt = maxpt;
89  }
90  if(pt < -maxpt) {
91  pt = -maxpt;
92  sigmapt = maxpt;
93  }
94  }
95 
96  result = createSeed(pt, sigmapt, bestSegment);
97  //std::cout << "OVERLAPFITTED PT " << pt << " dphi " << dphi << " eta " << eta << std::endl;
98  return true;
99  }
100  return false;
101 }
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
std::vector< TrajectorySeed > MuonOverlapSeedFromRecHits::seeds ( ) const

Definition at line 22 of file MuonOverlapSeedFromRecHits.cc.

References cosmicBasicClusters_cfi::barrelHits, bestHit(), end, cosmicBasicClusters_cfi::endcapHits, makeSeed(), mps_fire::result, SurveyInfoScenario_cff::seed, and MuonSeedFromRecHits::theRhits.

Referenced by MuonSeedFinder::seeds(), and ~MuonOverlapSeedFromRecHits().

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