CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trklet::Track Class Reference

#include <Track.h>

Public Member Functions

double chisq () const
 
double chisqrphi () const
 
double chisqrz () const
 
double d0 (Settings const &settings) const
 
int duplicate () const
 
double eta (Settings const &settings) const
 
int hitpattern () const
 
int ichisq () const
 
int nPSstubs () const
 
const TrackPars< int > & pars () const
 
double phi0 (Settings const &settings) const
 
double pt (Settings const &settings) const
 
double rinv (Settings const &settings) const
 
int sector () const
 
int seed () const
 
void setDuplicate (bool flag)
 
void setSector (int nsec)
 
void setStubIDprefit (std::vector< std::pair< int, int >> stubIDprefit)
 
void setStubIDpremerge (std::vector< std::pair< int, int >> stubIDpremerge)
 
const std::map< int, int > & stubID () const
 
const std::vector< std::pair< int, int > > & stubIDprefit () const
 
const std::vector< std::pair< int, int > > & stubIDpremerge () const
 
const std::vector< L1TStub > & stubs () const
 
double tanL (Settings const &settings) const
 
 Track (TrackPars< int > ipars, int ichisqrphi, int ichisqrz, double chisqrphi, double chisqrz, int hitpattern, std::map< int, int > stubID, const std::vector< L1TStub > &l1stub, int seed)
 
double z0 (Settings const &settings) const
 
 ~Track ()=default
 

Private Attributes

double chisqrphi_
 
double chisqrz_
 
bool duplicate_
 
int hitpattern_
 
int ichisqrphi_
 
int ichisqrz_
 
TrackPars< int > ipars_
 
std::vector< L1TStubl1stub_
 
unsigned int nstubs_
 
int sector_
 
int seed_
 
std::map< int, int > stubID_
 
std::vector< std::pair< int, int > > stubIDprefit_
 
std::vector< std::pair< int, int > > stubIDpremerge_
 

Detailed Description

Definition at line 18 of file Track.h.

Constructor & Destructor Documentation

◆ Track()

Track::Track ( TrackPars< int >  ipars,
int  ichisqrphi,
int  ichisqrz,
double  chisqrphi,
double  chisqrz,
int  hitpattern,
std::map< int, int >  stubID,
const std::vector< L1TStub > &  l1stub,
int  seed 
)

Definition at line 10 of file Track.cc.

References createfilelist::int, SiStripPI::max, trklet::N_FITSTUB, and fileCollector::seed.

18  {
19  ipars_ = ipars;
20  ichisqrphi_ = ichisqrphi;
21  ichisqrz_ = ichisqrz;
22 
24  chisqrz_ = chisqrz;
25 
27 
28  nstubs_ = std::max((int)l1stub.size(), (int)N_FITSTUB);
29 
30  stubID_ = stubID;
31  l1stub_ = l1stub;
32 
33  seed_ = seed;
34  duplicate_ = false;
35  sector_ = -1;
36 }
bool duplicate_
Definition: Track.h:98
int ichisqrz_
Definition: Track.h:84
double chisqrz() const
Definition: Track.h:70
std::vector< L1TStub > l1stub_
Definition: Track.h:94
double chisqrphi() const
Definition: Track.h:69
double chisqrphi_
Definition: Track.h:86
std::map< int, int > stubID_
Definition: Track.h:93
int ichisqrphi_
Definition: Track.h:83
int hitpattern_
Definition: Track.h:89
int seed_
Definition: Track.h:97
double chisqrz_
Definition: Track.h:87
unsigned int nstubs_
Definition: Track.h:96
constexpr unsigned int N_FITSTUB
Definition: Settings.h:1062
int sector_
Definition: Track.h:99
int hitpattern() const
Definition: Track.h:49
int seed() const
Definition: Track.h:50
TrackPars< int > ipars_
Definition: Track.h:82
const std::map< int, int > & stubID() const
Definition: Track.h:42

◆ ~Track()

trklet::Track::~Track ( )
default

Member Function Documentation

◆ chisq()

double trklet::Track::chisq ( ) const
inline

Definition at line 67 of file Track.h.

References chisqrphi_, and chisqrz_.

67 { return chisqrphi_ + chisqrz_; }
double chisqrphi_
Definition: Track.h:86
double chisqrz_
Definition: Track.h:87

◆ chisqrphi()

double trklet::Track::chisqrphi ( ) const
inline

Definition at line 69 of file Track.h.

References chisqrphi_.

69 { return chisqrphi_; }
double chisqrphi_
Definition: Track.h:86

◆ chisqrz()

double trklet::Track::chisqrz ( ) const
inline

Definition at line 70 of file Track.h.

References chisqrz_.

70 { return chisqrz_; }
double chisqrz_
Definition: Track.h:87

◆ d0()

double trklet::Track::d0 ( Settings const &  settings) const
inline

Definition at line 66 of file Track.h.

References trklet::TrackPars< T >::d0(), ipars_, and trklet::Settings::kd0pars().

66 { return (ipars_.d0() + 0.5) * settings.kd0pars(); }
const T & d0() const
Definition: TrackPars.h:31
TrackPars< int > ipars_
Definition: Track.h:82

◆ duplicate()

int trklet::Track::duplicate ( ) const
inline

Definition at line 51 of file Track.h.

References duplicate_.

51 { return duplicate_; }
bool duplicate_
Definition: Track.h:98

◆ eta()

double trklet::Track::eta ( Settings const &  settings) const
inline

Definition at line 62 of file Track.h.

References ipars_, trklet::Settings::ktpars(), and trklet::TrackPars< T >::t().

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

62 { return (asinh(ipars_.t() + 0.5) * settings.ktpars()); }
const T & t() const
Definition: TrackPars.h:32
TrackPars< int > ipars_
Definition: Track.h:82

◆ hitpattern()

int trklet::Track::hitpattern ( ) const
inline

Definition at line 49 of file Track.h.

References hitpattern_.

49 { return hitpattern_; }
int hitpattern_
Definition: Track.h:89

◆ ichisq()

int trklet::Track::ichisq ( ) const
inline

Definition at line 40 of file Track.h.

References ichisqrphi_, and ichisqrz_.

Referenced by trklet::PurgeDuplicate::execute().

40 { return ichisqrphi_ + ichisqrz_; }
int ichisqrz_
Definition: Track.h:84
int ichisqrphi_
Definition: Track.h:83

◆ nPSstubs()

int trklet::Track::nPSstubs ( ) const
inline

Definition at line 72 of file Track.h.

References l1stub_, and trklet::N_PSLAYER.

72  {
73  int npsstubs = 0;
74  for (const auto& istub : l1stub_) {
75  if (istub.layer() < N_PSLAYER)
76  npsstubs++;
77  }
78  return npsstubs;
79  }
std::vector< L1TStub > l1stub_
Definition: Track.h:94
constexpr unsigned int N_PSLAYER
Definition: Settings.h:27

◆ pars()

const TrackPars<int>& trklet::Track::pars ( ) const
inline

Definition at line 38 of file Track.h.

References ipars_.

38 { return ipars_; }
TrackPars< int > ipars_
Definition: Track.h:82

◆ phi0()

double Track::phi0 ( Settings const &  settings) const

Definition at line 38 of file Track.cc.

References trklet::Settings::dphisectorHG(), trklet::Settings::kphi0pars(), M_PI, trklet::N_SECTOR, phimax, phimin, and reco::reduceRange().

38  {
39  double dphi = 2 * M_PI / N_SECTOR;
40  double dphiHG = 0.5 * settings.dphisectorHG() - M_PI / N_SECTOR;
41  double phimin = sector_ * dphi - dphiHG;
42  double phimax = phimin + dphi + 2 * dphiHG;
43  phimin -= M_PI / N_SECTOR;
44  phimax -= M_PI / N_SECTOR;
47  if (phimin > phimax)
48  phimin -= 2 * M_PI;
49  double phioffset = phimin;
50 
51  double phi0 = ipars_.phi0() * settings.kphi0pars() + phioffset;
53  return phi0;
54 }
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18
const T & phi0() const
Definition: TrackPars.h:30
#define M_PI
constexpr unsigned int N_SECTOR
Definition: Settings.h:23
double phi0(Settings const &settings) const
Definition: Track.cc:38
int sector_
Definition: Track.h:99
TrackPars< int > ipars_
Definition: Track.h:82

◆ pt()

double trklet::Track::pt ( Settings const &  settings) const
inline

◆ rinv()

double trklet::Track::rinv ( Settings const &  settings) const
inline

Definition at line 65 of file Track.h.

References ipars_, trklet::Settings::krinvpars(), and trklet::TrackPars< T >::rinv().

65 { return (ipars_.rinv() + 0.5) * settings.krinvpars(); }
const T & rinv() const
Definition: TrackPars.h:29
TrackPars< int > ipars_
Definition: Track.h:82

◆ sector()

int trklet::Track::sector ( void  ) const
inline

Definition at line 52 of file Track.h.

References sector_.

Referenced by geometryXMLparser.DTAlignable::index().

52 { return sector_; }
int sector_
Definition: Track.h:99

◆ seed()

int trklet::Track::seed ( ) const
inline

Definition at line 50 of file Track.h.

References seed_.

50 { return seed_; }
int seed_
Definition: Track.h:97

◆ setDuplicate()

void trklet::Track::setDuplicate ( bool  flag)
inline

Definition at line 33 of file Track.h.

References duplicate_, and RemoveAddSevLevel::flag.

◆ setSector()

void trklet::Track::setSector ( int  nsec)
inline

Definition at line 34 of file Track.h.

References sector_.

Referenced by trklet::PurgeDuplicate::execute().

34 { sector_ = nsec; }
int sector_
Definition: Track.h:99

◆ setStubIDprefit()

void trklet::Track::setStubIDprefit ( std::vector< std::pair< int, int >>  stubIDprefit)
inline

Definition at line 36 of file Track.h.

References stubIDprefit(), and stubIDprefit_.

Referenced by trklet::PurgeDuplicate::execute().

std::vector< std::pair< int, int > > stubIDprefit_
Definition: Track.h:92
const std::vector< std::pair< int, int > > & stubIDprefit() const
Definition: Track.h:47

◆ setStubIDpremerge()

void trklet::Track::setStubIDpremerge ( std::vector< std::pair< int, int >>  stubIDpremerge)
inline

Definition at line 35 of file Track.h.

References stubIDpremerge(), and stubIDpremerge_.

Referenced by trklet::PurgeDuplicate::execute().

std::vector< std::pair< int, int > > stubIDpremerge_
Definition: Track.h:91
const std::vector< std::pair< int, int > > & stubIDpremerge() const
Definition: Track.h:46

◆ stubID()

const std::map<int, int>& trklet::Track::stubID ( ) const
inline

Definition at line 42 of file Track.h.

References stubID_.

Referenced by trklet::PurgeDuplicate::execute().

42 { return stubID_; }
std::map< int, int > stubID_
Definition: Track.h:93

◆ stubIDprefit()

const std::vector<std::pair<int, int> >& trklet::Track::stubIDprefit ( ) const
inline

Definition at line 47 of file Track.h.

References stubIDprefit_.

Referenced by setStubIDprefit().

47 { return stubIDprefit_; }
std::vector< std::pair< int, int > > stubIDprefit_
Definition: Track.h:92

◆ stubIDpremerge()

const std::vector<std::pair<int, int> >& trklet::Track::stubIDpremerge ( ) const
inline

Definition at line 46 of file Track.h.

References stubIDpremerge_.

Referenced by setStubIDpremerge().

46 { return stubIDpremerge_; }
std::vector< std::pair< int, int > > stubIDpremerge_
Definition: Track.h:91

◆ stubs()

const std::vector<L1TStub>& trklet::Track::stubs ( ) const
inline

Definition at line 43 of file Track.h.

References l1stub_.

43 { return l1stub_; }
std::vector< L1TStub > l1stub_
Definition: Track.h:94

◆ tanL()

double trklet::Track::tanL ( Settings const &  settings) const
inline

Definition at line 63 of file Track.h.

References ipars_, trklet::Settings::ktpars(), and trklet::TrackPars< T >::t().

63 { return (ipars_.t() + 0.5) * settings.ktpars(); }
const T & t() const
Definition: TrackPars.h:32
TrackPars< int > ipars_
Definition: Track.h:82

◆ z0()

double trklet::Track::z0 ( Settings const &  settings) const
inline

Definition at line 64 of file Track.h.

References ipars_, trklet::Settings::kz0pars(), and trklet::TrackPars< T >::z0().

64 { return (ipars_.z0() + 0.5) * settings.kz0pars(); }
const T & z0() const
Definition: TrackPars.h:33
TrackPars< int > ipars_
Definition: Track.h:82

Member Data Documentation

◆ chisqrphi_

double trklet::Track::chisqrphi_
private

Definition at line 86 of file Track.h.

Referenced by chisq(), and chisqrphi().

◆ chisqrz_

double trklet::Track::chisqrz_
private

Definition at line 87 of file Track.h.

Referenced by chisq(), and chisqrz().

◆ duplicate_

bool trklet::Track::duplicate_
private

Definition at line 98 of file Track.h.

Referenced by duplicate(), and setDuplicate().

◆ hitpattern_

int trklet::Track::hitpattern_
private

Definition at line 89 of file Track.h.

Referenced by hitpattern().

◆ ichisqrphi_

int trklet::Track::ichisqrphi_
private

Definition at line 83 of file Track.h.

Referenced by ichisq().

◆ ichisqrz_

int trklet::Track::ichisqrz_
private

Definition at line 84 of file Track.h.

Referenced by ichisq().

◆ ipars_

TrackPars<int> trklet::Track::ipars_
private

Definition at line 82 of file Track.h.

Referenced by d0(), eta(), pars(), pt(), rinv(), tanL(), and z0().

◆ l1stub_

std::vector<L1TStub> trklet::Track::l1stub_
private

Definition at line 94 of file Track.h.

Referenced by nPSstubs(), and stubs().

◆ nstubs_

unsigned int trklet::Track::nstubs_
private

Definition at line 96 of file Track.h.

◆ sector_

int trklet::Track::sector_
private

Definition at line 99 of file Track.h.

Referenced by sector(), and setSector().

◆ seed_

int trklet::Track::seed_
private

Definition at line 97 of file Track.h.

Referenced by seed().

◆ stubID_

std::map<int, int> trklet::Track::stubID_
private

Definition at line 93 of file Track.h.

Referenced by stubID().

◆ stubIDprefit_

std::vector<std::pair<int, int> > trklet::Track::stubIDprefit_
private

Definition at line 92 of file Track.h.

Referenced by setStubIDprefit(), and stubIDprefit().

◆ stubIDpremerge_

std::vector<std::pair<int, int> > trklet::Track::stubIDpremerge_
private

Definition at line 91 of file Track.h.

Referenced by setStubIDpremerge(), and stubIDpremerge().