CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
DTSegmentExtendedCand Class Reference

#include <DTSegmentExtendedCand.h>

Inheritance diagram for DTSegmentExtendedCand:
DTSegmentCand

Classes

struct  DTSLRecClusterForFit
 

Public Member Functions

void addClus (const DTSegmentExtendedCand::DTSLRecClusterForFit &clus)
 
std::vector< DTSegmentExtendedCand::DTSLRecClusterForFitclusters () const
 
 DTSegmentExtendedCand (DTSegmentCand *cand)
 
bool good () const override
 
bool isCompatible (const DTSegmentExtendedCand::DTSLRecClusterForFit &clus)
 
unsigned int nHits () const override
 
 ~DTSegmentExtendedCand () override
 
- Public Member Functions inherited from DTSegmentCand
virtual void add (AssPoint newHit)
 add hits to the hit list. More...
 
virtual void add (std::shared_ptr< DTHitPairForFit > hit, DTEnums::DTCellSide code)
 
virtual double chi2 () const
 the chi2 (NOT chi2/NDOF) of the fit More...
 
virtual double chi2ndof () const
 the chi2/NDOF of the fit More...
 
virtual AssPointCont conflictingHitPairs (const DTSegmentCand &seg) const
 
virtual AlgebraicSymMatrix covMatrix () const
 the covariance matrix More...
 
virtual LocalVector direction () const
 
 DTSegmentCand (AssPointCont &hits, const DTSuperLayer *sl)
 Constructor. More...
 
 DTSegmentCand (const AssPointCont &hits, LocalPoint &position, LocalVector &direction, double chi2, const AlgebraicSymMatrix &covMat, const DTSuperLayer *sl)
 
virtual const AssPointConthits () const
 the used hits More...
 
virtual bool hitsShareLayer () const
 
virtual unsigned int NDOF () const
 
virtual int nLayers () const
 number of different layers with hits More...
 
virtual int nSharedHitPairs (const DTSegmentCand &seg) const
 number of shared hit pair with other segment candidate More...
 
 operator DTChamberRecSegment2D * () const
 convert this DTSegmentCand into a DTChamberRecSegment2D More...
 
 operator DTSLRecSegment2D * () const
 convert this DTSegmentCand into a DTRecSegment2D More...
 
virtual bool operator< (const DTSegmentCand &seg) const
 less operator based on nHits and chi2 More...
 
virtual bool operator== (const DTSegmentCand &seg) const
 equality operator based on position, direction, chi2 and nHits More...
 
virtual LocalPoint position () const
 
virtual void removeHit (AssPoint hit)
 remove hit from the candidate More...
 
virtual void setChi2 (double &chi2)
 set chi2 More...
 
virtual void setCovMatrix (AlgebraicSymMatrix &cov)
 set the cov matrix More...
 
virtual void setDirection (LocalVector &dir)
 set direction More...
 
virtual void setPosition (LocalPoint &pos)
 set position More...
 
virtual void sett0 (double &t0)
 set t0 More...
 
const DTSuperLayersuperLayer () const
 the super layer on which relies More...
 
virtual double t0 () const
 the t0 of the segment More...
 
virtual ~DTSegmentCand ()
 Destructor. More...
 

Private Attributes

std::vector< DTSLRecClusterForFittheClus
 

Additional Inherited Members

- Public Types inherited from DTSegmentCand
typedef std::pair< std::shared_ptr< DTHitPairForFit >, DTEnums::DTCellSideAssPoint
 
typedef std::set< AssPoint, AssPointLessZAssPointCont
 
- Static Protected Attributes inherited from DTSegmentCand
static const double chi2max = 20.
 
static const unsigned int nHitsMin = 3
 

Detailed Description

Description:

detailed description

Author
: Stefano Lacaprara - INFN LNL stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t

Modification:

Definition at line 29 of file DTSegmentExtendedCand.h.

Constructor & Destructor Documentation

◆ DTSegmentExtendedCand()

DTSegmentExtendedCand::DTSegmentExtendedCand ( DTSegmentCand cand)
inline

Definition at line 34 of file DTSegmentExtendedCand.h.

34 : DTSegmentCand(*cand), theClus(std::vector<DTSLRecClusterForFit>()) {}
DTSegmentCand(AssPointCont &hits, const DTSuperLayer *sl)
Constructor.
std::vector< DTSLRecClusterForFit > theClus

◆ ~DTSegmentExtendedCand()

DTSegmentExtendedCand::~DTSegmentExtendedCand ( )
inlineoverride

Definition at line 37 of file DTSegmentExtendedCand.h.

37 {}

Member Function Documentation

◆ addClus()

void DTSegmentExtendedCand::addClus ( const DTSegmentExtendedCand::DTSLRecClusterForFit clus)
inline

Definition at line 40 of file DTSegmentExtendedCand.h.

References theClus.

Referenced by DTCombinatorialExtendedPatternReco::extendCandidates().

40 { theClus.push_back(clus); }
std::vector< DTSLRecClusterForFit > theClus

◆ clusters()

std::vector<DTSegmentExtendedCand::DTSLRecClusterForFit> DTSegmentExtendedCand::clusters ( ) const
inline

Definition at line 42 of file DTSegmentExtendedCand.h.

References theClus.

42 { return theClus; }
std::vector< DTSLRecClusterForFit > theClus

◆ good()

bool DTSegmentExtendedCand::good ( ) const
overridevirtual

Reimplemented from DTSegmentCand.

Definition at line 40 of file DTSegmentExtendedCand.cc.

References nano_mu_local_reco_cff::chi2, HLT_2024v14_cff::chi2max, DTSegmentCand::nHits(), and nano_mu_digi_cff::superLayer.

Referenced by DTCombinatorialExtendedPatternReco::buildSegments().

40  {
41  if (superLayer()->id().superLayer() == 2)
42  return DTSegmentCand::nHits() >= nHitsMin && chi2() / NDOF() < chi2max * 2.;
43  return DTSegmentCand::nHits() >= nHitsMin && chi2() / NDOF() < chi2max;
44 }
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:58
const DTSuperLayer * superLayer() const
the super layer on which relies
Definition: DTSegmentCand.h:76
static const unsigned int nHitsMin
static const double chi2max
virtual double chi2() const
the chi2 (NOT chi2/NDOF) of the fit
Definition: DTSegmentCand.h:61
virtual unsigned int NDOF() const
Definition: DTSegmentCand.h:87

◆ isCompatible()

bool DTSegmentExtendedCand::isCompatible ( const DTSegmentExtendedCand::DTSLRecClusterForFit clus)

Definition at line 29 of file DTSegmentExtendedCand.cc.

References funct::abs(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), funct::cos(), DTSegmentExtendedCand::DTSLRecClusterForFit::err, SiStripPI::max, DTSegmentExtendedCand::DTSLRecClusterForFit::pos, position, mathSSE::sqrt(), LocalError::xx(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by DTCombinatorialExtendedPatternReco::extendCandidates().

29  {
30  LocalPoint posAtSL = position() + direction() * (clus.pos.z() - position().z()) / cos(direction().theta());
31  // cout << "pos :" << clus.pos << " posAtSL " << posAtSL << endl;
32  static constexpr float errScaleFact = 10.;
33  static constexpr float minError = 25.; // (cm)
34  // cout << "clus.err.xx() " << clus.err << endl;
35  return std::abs((posAtSL - clus.pos).x()) < max(errScaleFact * sqrt(clus.err.xx()), minError);
36 }
T z() const
Definition: PV3DBase.h:61
virtual LocalPoint position() const
Definition: DTSegmentCand.h:79
virtual LocalVector direction() const
Definition: DTSegmentCand.h:82
T sqrt(T t)
Definition: SSEVec.h:23
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float xx() const
Definition: LocalError.h:22
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72

◆ nHits()

unsigned int DTSegmentExtendedCand::nHits ( void  ) const
overridevirtual

Reimplemented from DTSegmentCand.

Definition at line 38 of file DTSegmentExtendedCand.cc.

References DTSegmentCand::nHits().

Referenced by DTCombinatorialExtendedPatternReco::extendCandidates().

38 { return DTSegmentCand::nHits() + theClus.size(); }
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:58
std::vector< DTSLRecClusterForFit > theClus

Member Data Documentation

◆ theClus

std::vector<DTSLRecClusterForFit> DTSegmentExtendedCand::theClus
private

Definition at line 62 of file DTSegmentExtendedCand.h.

Referenced by addClus(), and clusters().