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< const 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< const 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< const L1TStub * > l1stub_
 
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< const L1TStub * > &  l1stub,
int  seed 
)

Definition at line 10 of file Track.cc.

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 }

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

◆ ~Track()

trklet::Track::~Track ( )
default

Member Function Documentation

◆ chisq()

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

Definition at line 64 of file Track.h.

64 { return chisqrphi_ + chisqrz_; }

References chisqrphi_, and chisqrz_.

◆ chisqrphi()

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

Definition at line 66 of file Track.h.

66 { return chisqrphi_; }

References chisqrphi_.

◆ chisqrz()

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

Definition at line 67 of file Track.h.

67 { return chisqrz_; }

References chisqrz_.

◆ d0()

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

Definition at line 63 of file Track.h.

63 { return ipars_.d0() * settings.kd0pars(); }

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

◆ duplicate()

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

Definition at line 50 of file Track.h.

50 { return duplicate_; }

References duplicate_.

◆ eta()

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

Definition at line 59 of file Track.h.

59 { return asinh(ipars_.t() * settings.ktpars()); }

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

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

◆ hitpattern()

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

Definition at line 48 of file Track.h.

48 { return hitpattern_; }

References hitpattern_.

◆ ichisq()

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

Definition at line 39 of file Track.h.

39 { return ichisqrphi_ + ichisqrz_; }

References ichisqrphi_, and ichisqrz_.

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

◆ nPSstubs()

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

Definition at line 69 of file Track.h.

69  {
70  int npsstubs = 0;
71  for (auto istub : l1stub_) {
72  if (istub->layer() < N_PSLAYER)
73  npsstubs++;
74  }
75  return npsstubs;
76  }

References l1stub_, and trklet::N_PSLAYER.

◆ pars()

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

Definition at line 37 of file Track.h.

37 { return ipars_; }

References ipars_.

◆ phi0()

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

Definition at line 38 of file Track.cc.

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 }

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

◆ 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.

62 { return ipars_.rinv() * settings.krinvpars(); }

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

◆ sector()

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

Definition at line 51 of file Track.h.

51 { return sector_; }

References sector_.

Referenced by geometryXMLparser.DTAlignable::index().

◆ seed()

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

Definition at line 49 of file Track.h.

49 { return seed_; }

References seed_.

◆ setDuplicate()

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

Definition at line 32 of file Track.h.

32 { duplicate_ = flag; }

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.

33 { sector_ = nsec; }

References sector_.

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

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

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

◆ stubID()

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

Definition at line 41 of file Track.h.

41 { return stubID_; }

References stubID_.

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

◆ stubIDprefit()

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

Definition at line 46 of file Track.h.

46 { return stubIDprefit_; }

References stubIDprefit_.

Referenced by setStubIDprefit().

◆ stubIDpremerge()

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

Definition at line 45 of file Track.h.

45 { return stubIDpremerge_; }

References stubIDpremerge_.

Referenced by setStubIDpremerge().

◆ stubs()

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

Definition at line 42 of file Track.h.

42 { return l1stub_; }

References l1stub_.

◆ tanL()

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

Definition at line 60 of file Track.h.

60 { return ipars_.t() * settings.ktpars(); }

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

◆ z0()

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

Definition at line 61 of file Track.h.

61 { return ipars_.z0() * settings.kz0pars(); }

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

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

trklet::Track::chisqrphi_
double chisqrphi_
Definition: Track.h:83
trklet::N_PSLAYER
constexpr unsigned int N_PSLAYER
Definition: Settings.h:21
trklet::Track::nstubs_
unsigned int nstubs_
Definition: Track.h:93
trklet::Track::stubID
const std::map< int, int > & stubID() const
Definition: Track.h:41
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
trklet::Track::chisqrphi
double chisqrphi() const
Definition: Track.h:66
trklet::TrackPars::t
const T & t() const
Definition: TrackPars.h:32
trklet::TrackPars::d0
const T & d0() const
Definition: TrackPars.h:31
trklet::N_SECTOR
constexpr unsigned int N_SECTOR
Definition: Settings.h:17
trklet::Track::seed
int seed() const
Definition: Track.h:49
trklet::Track::stubIDprefit_
std::vector< std::pair< int, int > > stubIDprefit_
Definition: Track.h:89
trklet::Track::chisqrz
double chisqrz() const
Definition: Track.h:67
trklet::N_FITSTUB
constexpr unsigned int N_FITSTUB
Definition: Settings.h:735
trklet::Track::stubIDprefit
const std::vector< std::pair< int, int > > & stubIDprefit() const
Definition: Track.h:46
trklet::Track::duplicate_
bool duplicate_
Definition: Track.h:95
trklet::Track::seed_
int seed_
Definition: Track.h:94
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
trklet::Track::phi0
double phi0(Settings const &settings) const
Definition: Track.cc:38
createfilelist.int
int
Definition: createfilelist.py:10
trklet::Track::hitpattern_
int hitpattern_
Definition: Track.h:86
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trklet::TrackPars::z0
const T & z0() const
Definition: TrackPars.h:33
trklet::TrackPars::rinv
const T & rinv() const
Definition: TrackPars.h:29
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
trklet::Track::l1stub_
std::vector< const L1TStub * > l1stub_
Definition: Track.h:91
trklet::Track::stubID_
std::map< int, int > stubID_
Definition: Track.h:90
trklet::Track::hitpattern
int hitpattern() const
Definition: Track.h:48
trklet::Track::ichisqrz_
int ichisqrz_
Definition: Track.h:81
trklet::Track::stubIDpremerge_
std::vector< std::pair< int, int > > stubIDpremerge_
Definition: Track.h:88
trklet::Track::ichisqrphi_
int ichisqrphi_
Definition: Track.h:80
trklet::Track::chisqrz_
double chisqrz_
Definition: Track.h:84
trklet::Track::ipars_
TrackPars< int > ipars_
Definition: Track.h:79
trklet::TrackPars::phi0
const T & phi0() const
Definition: TrackPars.h:30
trklet::Track::stubIDpremerge
const std::vector< std::pair< int, int > > & stubIDpremerge() const
Definition: Track.h:45
trklet::Track::sector_
int sector_
Definition: Track.h:96
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
reco::reduceRange
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18