CMS 3D CMS Logo

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

#include <MuonChi2MeasurementEstimator.h>

Inheritance diagram for MuonChi2MeasurementEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

Public Member Functions

std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
 Chi2 estimator. More...
 
 MuonChi2MeasurementEstimator (double maxChi2, double nSigma=3.)
 Constructor detector indipendent. More...
 
 MuonChi2MeasurementEstimator (double dtMaxChi2, double cscMaxChi2, double rpcMaxChi2, double nSigma)
 Constructor detector dependent. More...
 
- Public Member Functions inherited from Chi2MeasurementEstimatorBase
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
 
template<typename... Args>
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma, float maxDisp, Args &&...args)
 
double chiSquaredCut () const
 
bool estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
double nSigmaCut () const
 
- Public Member Functions inherited from MeasurementEstimator
virtual MeasurementEstimatorclone () const =0
 
float maxSagitta () const
 
 MeasurementEstimator ()
 
 MeasurementEstimator (float maxSag, float minToll, float mpt)
 
float minPt2ForHitRecoveryInGluedDet () const
 
float minTolerance2 () const
 
virtual bool preFilter (const TrajectoryStateOnSurface &, OpaquePayload const &) const
 
virtual ~MeasurementEstimator ()
 

Private Attributes

Chi2MeasurementEstimator theCSCChi2Estimator
 
Chi2MeasurementEstimator theDTChi2Estimator
 
Chi2MeasurementEstimator theRPCChi2Estimator
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
using HitReturnType = std::pair< bool, double >
 
using Local2DVector = Vector2DBase< float, LocalTag >
 
using SurfaceReturnType = bool
 
- Protected Member Functions inherited from Chi2MeasurementEstimatorBase
std::pair< bool, double > returnIt (double est) const
 

Detailed Description

Class to handle different chi2 cut parameters for each muon sub-system. MuonChi2MeasurementEstimator inherits from the Chi2MeasurementEstimatorBase class and uses 3 different estimators.

Author
Giorgia Mila - INFN Torino

Definition at line 15 of file MuonChi2MeasurementEstimator.h.

Constructor & Destructor Documentation

MuonChi2MeasurementEstimator::MuonChi2MeasurementEstimator ( double  maxChi2,
double  nSigma = 3. 
)

Constructor detector indipendent.

Definition at line 18 of file MuonChi2MeasurementEstimator.cc.

Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Chi2MeasurementEstimator theDTChi2Estimator
Chi2MeasurementEstimator theRPCChi2Estimator
Chi2MeasurementEstimator theCSCChi2Estimator
MuonChi2MeasurementEstimator::MuonChi2MeasurementEstimator ( double  dtMaxChi2,
double  cscMaxChi2,
double  rpcMaxChi2,
double  nSigma = 3. 
)

Constructor detector dependent.

Definition at line 24 of file MuonChi2MeasurementEstimator.cc.

29  theDTChi2Estimator(dtMaxChi2, nSigma),
30  theCSCChi2Estimator(cscMaxChi2, nSigma),
31  theRPCChi2Estimator(rpcMaxChi2, nSigma) {}
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Chi2MeasurementEstimator theDTChi2Estimator
Chi2MeasurementEstimator theRPCChi2Estimator
Chi2MeasurementEstimator theCSCChi2Estimator

Member Function Documentation

std::pair< bool, double > MuonChi2MeasurementEstimator::estimate ( const TrajectoryStateOnSurface tsos,
const TrackingRecHit recHit 
) const
overridevirtual

Chi2 estimator.

Implements Chi2MeasurementEstimatorBase.

Definition at line 33 of file MuonChi2MeasurementEstimator.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, Chi2MeasurementEstimator::estimate(), TrackingRecHit::geographicalId(), DetId::Muon, MuonSubdetId::RPC, theCSCChi2Estimator, theDTChi2Estimator, and theRPCChi2Estimator.

34  {
35  DetId id = recHit.geographicalId();
36 
37  // chi2 choise based on recHit provenance
38  if (id.det() == DetId::Muon) {
39  if (id.subdetId() == MuonSubdetId::DT)
40  return theDTChi2Estimator.estimate(tsos, recHit);
41  else if (id.subdetId() == MuonSubdetId::CSC)
42  return theCSCChi2Estimator.estimate(tsos, recHit);
43  else if (id.subdetId() == MuonSubdetId::RPC)
44  return theRPCChi2Estimator.estimate(tsos, recHit);
45  else {
46  edm::LogWarning("Muon|RecoMuon|MuonChi2MeasurementEstimator")
47  << "RecHit with MuonId but not with a SubDetId neither from DT, CSC or rpc. [Use the parameters used for "
48  "DTs]";
49  return theDTChi2Estimator.estimate(tsos, recHit);
50  }
51  } else {
52  edm::LogWarning("Muon|RecoMuon|MuonChi2MeasurementEstimator")
53  << "Rechit with a non-muon det id. [Use the parameters used for DTs]";
54  return theDTChi2Estimator.estimate(tsos, recHit);
55  }
56 }
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Chi2MeasurementEstimator theDTChi2Estimator
Definition: DetId.h:17
static constexpr int RPC
Definition: MuonSubdetId.h:13
Chi2MeasurementEstimator theRPCChi2Estimator
Chi2MeasurementEstimator theCSCChi2Estimator
DetId geographicalId() const
static constexpr int DT
Definition: MuonSubdetId.h:11
Log< level::Warning, false > LogWarning
static constexpr int CSC
Definition: MuonSubdetId.h:12

Member Data Documentation

Chi2MeasurementEstimator MuonChi2MeasurementEstimator::theCSCChi2Estimator
private

Definition at line 28 of file MuonChi2MeasurementEstimator.h.

Referenced by estimate().

Chi2MeasurementEstimator MuonChi2MeasurementEstimator::theDTChi2Estimator
private

Definition at line 27 of file MuonChi2MeasurementEstimator.h.

Referenced by estimate().

Chi2MeasurementEstimator MuonChi2MeasurementEstimator::theRPCChi2Estimator
private

Definition at line 29 of file MuonChi2MeasurementEstimator.h.

Referenced by estimate().