CMS 3D CMS Logo

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

#include <L1SimTrack.h>

Public Member Functions

int charge () const
 
double d0 () const
 
double dxy () const
 
double eta () const
 
int eventid () const
 
 L1SimTrack ()
 
 L1SimTrack (int eventid, int trackid, int type, double pt, double eta, double phi, double vx, double vy, double vz)
 
double phi () const
 
double pt () const
 
int trackid () const
 
int type () const
 
double vx () const
 
double vy () const
 
double vz () const
 
void write (std::ofstream &out)
 
void write (std::ostream &out)
 
 ~L1SimTrack ()=default
 

Private Attributes

double eta_
 
int eventid_
 
double phi_
 
double pt_
 
int trackid_
 
int type_
 
double vx_
 
double vy_
 
double vz_
 

Detailed Description

Definition at line 14 of file L1SimTrack.h.

Constructor & Destructor Documentation

◆ L1SimTrack() [1/2]

L1SimTrack::L1SimTrack ( )

Definition at line 7 of file L1SimTrack.cc.

7  {
8  eventid_ = -1;
9  trackid_ = -1;
10 }

◆ L1SimTrack() [2/2]

L1SimTrack::L1SimTrack ( int  eventid,
int  trackid,
int  type,
double  pt,
double  eta,
double  phi,
double  vx,
double  vy,
double  vz 
)

Definition at line 12 of file L1SimTrack.cc.

References PVValHelper::eta, and DiDispStaMuonMonitor_cfi::pt.

13  {
14  eventid_ = eventid;
15  trackid_ = trackid;
16  type_ = type;
17  pt_ = pt;
18  eta_ = eta;
19  phi_ = phi;
20  vx_ = vx;
21  vy_ = vy;
22  vz_ = vz;
23 }
double vy() const
Definition: L1SimTrack.h:30
int eventid() const
Definition: L1SimTrack.h:23
double pt() const
Definition: L1SimTrack.h:26
int type() const
Definition: L1SimTrack.h:25
int trackid() const
Definition: L1SimTrack.h:24
double vz() const
Definition: L1SimTrack.h:31
double vx() const
Definition: L1SimTrack.h:29
double phi() const
Definition: L1SimTrack.h:28
double eta() const
Definition: L1SimTrack.h:27

◆ ~L1SimTrack()

trklet::L1SimTrack::~L1SimTrack ( )
default

Member Function Documentation

◆ charge()

int trklet::L1SimTrack::charge ( void  ) const
inline

Definition at line 34 of file L1SimTrack.h.

References type_.

Referenced by trklet::Stub::Stub().

34  {
35  if (type_ == 11 || type_ == 13 || type_ == -211 || type_ == -321 || type_ == -2212)
36  return -1;
37  return 1;
38  }

◆ d0()

double trklet::L1SimTrack::d0 ( ) const
inline

Definition at line 33 of file L1SimTrack.h.

References dxy().

33 { return -dxy(); }
double dxy() const
Definition: L1SimTrack.h:32

◆ dxy()

double trklet::L1SimTrack::dxy ( ) const
inline

Definition at line 32 of file L1SimTrack.h.

References funct::cos(), phi(), funct::sin(), vx(), and vy().

Referenced by Electron.Electron::cutBasedId(), d0(), and ntupleDataFormat.Track::dxyPull().

32 { return -vx() * sin(phi()) + vy() * cos(phi()); }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double vy() const
Definition: L1SimTrack.h:30
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double vx() const
Definition: L1SimTrack.h:29
double phi() const
Definition: L1SimTrack.h:28

◆ eta()

double trklet::L1SimTrack::eta ( void  ) const
inline

Definition at line 27 of file L1SimTrack.h.

References eta_.

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

27 { return eta_; }

◆ eventid()

int trklet::L1SimTrack::eventid ( ) const
inline

Definition at line 23 of file L1SimTrack.h.

References eventid_.

23 { return eventid_; }

◆ phi()

double trklet::L1SimTrack::phi ( void  ) const
inline

Definition at line 28 of file L1SimTrack.h.

References phi_.

Referenced by Particle.Particle::__str__(), dxy(), and ntupleDataFormat.Track::phiPull().

28 { return phi_; }

◆ pt()

double trklet::L1SimTrack::pt ( ) const
inline

◆ trackid()

int trklet::L1SimTrack::trackid ( ) const
inline

Definition at line 24 of file L1SimTrack.h.

References trackid_.

Referenced by trklet::TrackletEventProcessor::event(), and trklet::Stub::Stub().

24 { return trackid_; }

◆ type()

int trklet::L1SimTrack::type ( ) const
inline

Definition at line 25 of file L1SimTrack.h.

References type_.

Referenced by trklet::TrackletEventProcessor::event().

25 { return type_; }

◆ vx()

double trklet::L1SimTrack::vx ( ) const
inline

Definition at line 29 of file L1SimTrack.h.

References vx_.

Referenced by dxy(), and trklet::TrackletEventProcessor::event().

29 { return vx_; }

◆ vy()

double trklet::L1SimTrack::vy ( ) const
inline

Definition at line 30 of file L1SimTrack.h.

References vy_.

Referenced by dxy(), and trklet::TrackletEventProcessor::event().

30 { return vy_; }

◆ vz()

double trklet::L1SimTrack::vz ( ) const
inline

Definition at line 31 of file L1SimTrack.h.

References vz_.

Referenced by trklet::TrackletEventProcessor::event().

31 { return vz_; }

◆ write() [1/2]

void L1SimTrack::write ( std::ofstream &  out)

Definition at line 25 of file L1SimTrack.cc.

References MillePedeFileConverter_cfg::out.

25  {
26  if (pt_ > -2.0) {
27  out << "SimTrack: " << eventid_ << "\t" << trackid_ << "\t" << type_ << "\t" << pt_ << "\t" << eta_ << "\t" << phi_
28  << "\t" << vx_ << "\t" << vy_ << "\t" << vz_ << "\t" << endl;
29  }
30 }

◆ write() [2/2]

void trklet::L1SimTrack::write ( std::ostream &  out)

Member Data Documentation

◆ eta_

double trklet::L1SimTrack::eta_
private

Definition at line 45 of file L1SimTrack.h.

Referenced by eta().

◆ eventid_

int trklet::L1SimTrack::eventid_
private

Definition at line 41 of file L1SimTrack.h.

Referenced by eventid().

◆ phi_

double trklet::L1SimTrack::phi_
private

Definition at line 46 of file L1SimTrack.h.

Referenced by phi().

◆ pt_

double trklet::L1SimTrack::pt_
private

Definition at line 44 of file L1SimTrack.h.

Referenced by pt().

◆ trackid_

int trklet::L1SimTrack::trackid_
private

Definition at line 42 of file L1SimTrack.h.

Referenced by trackid().

◆ type_

int trklet::L1SimTrack::type_
private

◆ vx_

double trklet::L1SimTrack::vx_
private

Definition at line 47 of file L1SimTrack.h.

Referenced by vx().

◆ vy_

double trklet::L1SimTrack::vy_
private

Definition at line 48 of file L1SimTrack.h.

Referenced by vy().

◆ vz_

double trklet::L1SimTrack::vz_
private

Definition at line 49 of file L1SimTrack.h.

Referenced by vz().