CMS 3D CMS Logo

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

#include <SLHCEvent.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 16 of file SLHCEvent.h.

Constructor & Destructor Documentation

◆ L1SimTrack() [1/2]

L1SimTrack::L1SimTrack ( )

Definition at line 8 of file SLHCEvent.cc.

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

◆ 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 13 of file SLHCEvent.cc.

14  {
15  eventid_ = eventid;
16  trackid_ = trackid;
17  type_ = type;
18  pt_ = pt;
19  eta_ = eta;
20  phi_ = phi;
21  vx_ = vx;
22  vy_ = vy;
23  vz_ = vz;
24 }

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

◆ ~L1SimTrack()

trklet::L1SimTrack::~L1SimTrack ( )
default

Member Function Documentation

◆ charge()

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

Definition at line 36 of file SLHCEvent.h.

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

References type_.

◆ d0()

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

Definition at line 35 of file SLHCEvent.h.

35 { return -dxy(); }

References dxy().

◆ dxy()

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

Definition at line 34 of file SLHCEvent.h.

34 { return -vx() * sin(phi()) + vy() * cos(phi()); }

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

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

◆ eta()

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

Definition at line 29 of file SLHCEvent.h.

29 { return eta_; }

References eta_.

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

◆ eventid()

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

Definition at line 25 of file SLHCEvent.h.

25 { return eventid_; }

References eventid_.

◆ phi()

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

Definition at line 30 of file SLHCEvent.h.

30 { return phi_; }

References phi_.

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

◆ pt()

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

◆ trackid()

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

Definition at line 26 of file SLHCEvent.h.

26 { return trackid_; }

References trackid_.

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

◆ type()

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

Definition at line 27 of file SLHCEvent.h.

27 { return type_; }

References type_.

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

◆ vx()

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

Definition at line 31 of file SLHCEvent.h.

31 { return vx_; }

References vx_.

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

◆ vy()

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

Definition at line 32 of file SLHCEvent.h.

32 { return vy_; }

References vy_.

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

◆ vz()

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

Definition at line 33 of file SLHCEvent.h.

33 { return vz_; }

References vz_.

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

◆ write() [1/2]

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

Definition at line 26 of file SLHCEvent.cc.

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

References MillePedeFileConverter_cfg::out.

◆ write() [2/2]

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

Member Data Documentation

◆ eta_

double trklet::L1SimTrack::eta_
private

Definition at line 47 of file SLHCEvent.h.

Referenced by eta().

◆ eventid_

int trklet::L1SimTrack::eventid_
private

Definition at line 43 of file SLHCEvent.h.

Referenced by eventid().

◆ phi_

double trklet::L1SimTrack::phi_
private

Definition at line 48 of file SLHCEvent.h.

Referenced by phi().

◆ pt_

double trklet::L1SimTrack::pt_
private

Definition at line 46 of file SLHCEvent.h.

Referenced by pt().

◆ trackid_

int trklet::L1SimTrack::trackid_
private

Definition at line 44 of file SLHCEvent.h.

Referenced by trackid().

◆ type_

int trklet::L1SimTrack::type_
private

◆ vx_

double trklet::L1SimTrack::vx_
private

Definition at line 49 of file SLHCEvent.h.

Referenced by vx().

◆ vy_

double trklet::L1SimTrack::vy_
private

Definition at line 50 of file SLHCEvent.h.

Referenced by vy().

◆ vz_

double trklet::L1SimTrack::vz_
private

Definition at line 51 of file SLHCEvent.h.

Referenced by vz().

trklet::L1SimTrack::vy_
double vy_
Definition: SLHCEvent.h:50
trklet::L1SimTrack::vy
double vy() const
Definition: SLHCEvent.h:32
trklet::L1SimTrack::type
int type() const
Definition: SLHCEvent.h:27
trklet::L1SimTrack::type_
int type_
Definition: SLHCEvent.h:45
trklet::L1SimTrack::vz
double vz() const
Definition: SLHCEvent.h:33
trklet::L1SimTrack::eventid_
int eventid_
Definition: SLHCEvent.h:43
trklet::L1SimTrack::vz_
double vz_
Definition: SLHCEvent.h:51
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
trklet::L1SimTrack::trackid
int trackid() const
Definition: SLHCEvent.h:26
trklet::L1SimTrack::eventid
int eventid() const
Definition: SLHCEvent.h:25
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
trklet::L1SimTrack::phi_
double phi_
Definition: SLHCEvent.h:48
trklet::L1SimTrack::dxy
double dxy() const
Definition: SLHCEvent.h:34
trklet::L1SimTrack::eta_
double eta_
Definition: SLHCEvent.h:47
trklet::L1SimTrack::phi
double phi() const
Definition: SLHCEvent.h:30
trklet::L1SimTrack::trackid_
int trackid_
Definition: SLHCEvent.h:44
trklet::L1SimTrack::pt
double pt() const
Definition: SLHCEvent.h:28
trklet::L1SimTrack::eta
double eta() const
Definition: SLHCEvent.h:29
trklet::L1SimTrack::pt_
double pt_
Definition: SLHCEvent.h:46
trklet::L1SimTrack::vx_
double vx_
Definition: SLHCEvent.h:49
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::L1SimTrack::vx
double vx() const
Definition: SLHCEvent.h:31