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:95
int ichisqrz_
Definition: Track.h:81
double chisqrz() const
Definition: Track.h:67
std::vector< L1TStub > l1stub_
Definition: Track.h:91
double chisqrphi() const
Definition: Track.h:66
double chisqrphi_
Definition: Track.h:83
std::map< int, int > stubID_
Definition: Track.h:90
int ichisqrphi_
Definition: Track.h:80
int hitpattern_
Definition: Track.h:86
int seed_
Definition: Track.h:94
double chisqrz_
Definition: Track.h:84
unsigned int nstubs_
Definition: Track.h:93
constexpr unsigned int N_FITSTUB
Definition: Settings.h:901
int sector_
Definition: Track.h:96
int hitpattern() const
Definition: Track.h:48
int seed() const
Definition: Track.h:49
TrackPars< int > ipars_
Definition: Track.h:79
const std::map< int, int > & stubID() const
Definition: Track.h:41

◆ ~Track()

trklet::Track::~Track ( )
default

Member Function Documentation

◆ chisq()

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

Definition at line 64 of file Track.h.

References chisqrphi_, and chisqrz_.

64 { return chisqrphi_ + chisqrz_; }
double chisqrphi_
Definition: Track.h:83
double chisqrz_
Definition: Track.h:84

◆ chisqrphi()

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

Definition at line 66 of file Track.h.

References chisqrphi_.

66 { return chisqrphi_; }
double chisqrphi_
Definition: Track.h:83

◆ chisqrz()

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

Definition at line 67 of file Track.h.

References chisqrz_.

67 { return chisqrz_; }
double chisqrz_
Definition: Track.h:84

◆ d0()

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

Definition at line 63 of file Track.h.

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

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

◆ duplicate()

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

Definition at line 50 of file Track.h.

References duplicate_.

50 { return duplicate_; }
bool duplicate_
Definition: Track.h:95

◆ eta()

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

Definition at line 59 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().

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

◆ hitpattern()

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

Definition at line 48 of file Track.h.

References hitpattern_.

48 { return hitpattern_; }
int hitpattern_
Definition: Track.h:86

◆ ichisq()

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

Definition at line 39 of file Track.h.

References ichisqrphi_, and ichisqrz_.

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

39 { return ichisqrphi_ + ichisqrz_; }
int ichisqrz_
Definition: Track.h:81
int ichisqrphi_
Definition: Track.h:80

◆ nPSstubs()

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

Definition at line 69 of file Track.h.

References l1stub_, and trklet::N_PSLAYER.

69  {
70  int npsstubs = 0;
71  for (const auto& istub : l1stub_) {
72  if (istub.layer() < N_PSLAYER)
73  npsstubs++;
74  }
75  return npsstubs;
76  }
std::vector< L1TStub > l1stub_
Definition: Track.h:91
constexpr unsigned int N_PSLAYER
Definition: Settings.h:23

◆ pars()

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

Definition at line 37 of file Track.h.

References ipars_.

37 { return ipars_; }
TrackPars< int > ipars_
Definition: Track.h:79

◆ 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:19
double phi0(Settings const &settings) const
Definition: Track.cc:38
int sector_
Definition: Track.h:96
TrackPars< int > ipars_
Definition: Track.h:79

◆ pt()

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

◆ rinv()

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

Definition at line 62 of file Track.h.

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

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

◆ sector()

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

Definition at line 51 of file Track.h.

References sector_.

Referenced by geometryXMLparser.DTAlignable::index().

51 { return sector_; }
int sector_
Definition: Track.h:96

◆ seed()

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

Definition at line 49 of file Track.h.

References seed_.

49 { return seed_; }
int seed_
Definition: Track.h:94

◆ setDuplicate()

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

Definition at line 32 of file Track.h.

References duplicate_, and RemoveAddSevLevel::flag.

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

◆ setSector()

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

Definition at line 33 of file Track.h.

References sector_.

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

33 { sector_ = nsec; }
int sector_
Definition: Track.h:96

◆ setStubIDprefit()

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

Definition at line 35 of file Track.h.

References stubIDprefit(), and stubIDprefit_.

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

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

◆ setStubIDpremerge()

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

Definition at line 34 of file Track.h.

References stubIDpremerge(), and stubIDpremerge_.

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

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

◆ stubID()

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

Definition at line 41 of file Track.h.

References stubID_.

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

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

◆ stubIDprefit()

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

Definition at line 46 of file Track.h.

References stubIDprefit_.

Referenced by setStubIDprefit().

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

◆ stubIDpremerge()

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

Definition at line 45 of file Track.h.

References stubIDpremerge_.

Referenced by setStubIDpremerge().

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

◆ stubs()

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

Definition at line 42 of file Track.h.

References l1stub_.

42 { return l1stub_; }
std::vector< L1TStub > l1stub_
Definition: Track.h:91

◆ tanL()

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

Definition at line 60 of file Track.h.

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

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

◆ z0()

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

Definition at line 61 of file Track.h.

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

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

Member Data Documentation

◆ chisqrphi_

double trklet::Track::chisqrphi_
private

Definition at line 83 of file Track.h.

Referenced by chisq(), and chisqrphi().

◆ chisqrz_

double trklet::Track::chisqrz_
private

Definition at line 84 of file Track.h.

Referenced by chisq(), and chisqrz().

◆ duplicate_

bool trklet::Track::duplicate_
private

Definition at line 95 of file Track.h.

Referenced by duplicate(), and setDuplicate().

◆ hitpattern_

int trklet::Track::hitpattern_
private

Definition at line 86 of file Track.h.

Referenced by hitpattern().

◆ ichisqrphi_

int trklet::Track::ichisqrphi_
private

Definition at line 80 of file Track.h.

Referenced by ichisq().

◆ ichisqrz_

int trklet::Track::ichisqrz_
private

Definition at line 81 of file Track.h.

Referenced by ichisq().

◆ ipars_

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

Definition at line 79 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 91 of file Track.h.

Referenced by nPSstubs(), and stubs().

◆ nstubs_

unsigned int trklet::Track::nstubs_
private

Definition at line 93 of file Track.h.

◆ sector_

int trklet::Track::sector_
private

Definition at line 96 of file Track.h.

Referenced by sector(), and setSector().

◆ seed_

int trklet::Track::seed_
private

Definition at line 94 of file Track.h.

Referenced by seed().

◆ stubID_

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

Definition at line 90 of file Track.h.

Referenced by stubID().

◆ stubIDprefit_

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

Definition at line 89 of file Track.h.

Referenced by setStubIDprefit(), and stubIDprefit().

◆ stubIDpremerge_

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

Definition at line 88 of file Track.h.

Referenced by setStubIDpremerge(), and stubIDpremerge().