CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CoreSimTrack Class Reference

#include <CoreSimTrack.h>

Inheritance diagram for CoreSimTrack:
SimTrack FSimTrack

Public Member Functions

float charge () const
 charge More...
 
 CoreSimTrack ()
 constructors More...
 
 CoreSimTrack (int ipart, const math::XYZTLorentzVectorD &p)
 
 CoreSimTrack (int ipart, math::XYZVectorD &ip, double ie)
 
EncodedEventId eventId () const
 
const math::XYZTLorentzVectorDmomentum () const
 
void setEventId (EncodedEventId e)
 
void setTrackId (unsigned int t)
 
unsigned int trackId () const
 
int type () const
 particle type (HEP PDT convension) More...
 

Private Attributes

EncodedEventId eId
 
math::XYZTLorentzVectorD theMomentum
 
int thePID
 
unsigned int tId
 

Detailed Description

Definition at line 9 of file CoreSimTrack.h.

Constructor & Destructor Documentation

CoreSimTrack::CoreSimTrack ( )
inline

constructors

Definition at line 14 of file CoreSimTrack.h.

14 : tId(0), thePID(0) {}
unsigned int tId
Definition: CoreSimTrack.h:39
CoreSimTrack::CoreSimTrack ( int  ipart,
const math::XYZTLorentzVectorD p 
)
inline

Definition at line 15 of file CoreSimTrack.h.

15  :
16  tId(0), thePID(ipart), theMomentum(p) {}
unsigned int tId
Definition: CoreSimTrack.h:39
math::XYZTLorentzVectorD theMomentum
Definition: CoreSimTrack.h:41
CoreSimTrack::CoreSimTrack ( int  ipart,
math::XYZVectorD ip,
double  ie 
)
inline

Definition at line 18 of file CoreSimTrack.h.

References theMomentum.

18  :
19  tId(0), thePID(ipart)
20  { theMomentum.SetXYZT( ip.x(), ip.y(), ip.z(), ie ) ; }
unsigned int tId
Definition: CoreSimTrack.h:39
math::XYZTLorentzVectorD theMomentum
Definition: CoreSimTrack.h:41

Member Function Documentation

float CoreSimTrack::charge ( void  ) const

charge

Definition at line 18 of file CoreSimTrack.cc.

References funct::abs(), chg, and thePID.

Referenced by TrackingTruthAccumulator::accumulateEvent(), pat::GenPlusSimParticleProducer::addGenParticle(), FWSimTrackProxyBuilder::build(), pat::PATGenCandsFromSimTracksProducer::makeGenParticle_(), SimpleL1MuGMTCand::operator=(), TrackCandidateProducer::produce(), MuonSimHitProducer::produce(), SimpleL1MuGMTCand::SimpleL1MuGMTCand(), PropagateToMuon::startingState(), and FastTSGFromPropagation::trackerSeeds().

18  {
19  float hepchg = 0;
20  if(thePID != 0) {
21  int kqa = std::abs(thePID);
22  if(kqa < 10000000) {
23  //... direct translation
24  if(kqa<=100) {hepchg = chg[kqa-1];}
25  //... deuteron or tritium
26  else if(kqa==100 || kqa==101) {hepchg = -1;}
27  //... alpha or He3
28  else if(kqa==102 || kqa==104) {hepchg = -2;}
29  else if(kqa%10 != 0) {
30  int kqx=kqa/1000000%10;
31  int kq3=kqa/1000%10;
32  int kq2=kqa/100%10;
33  int kq1=kqa/10%10;
34  int irt=kqa%10000;
35  if(kqx>0 && irt<100) {
36  hepchg = chg[irt-1];
37  if(kqa==5100061 || kqa==5100062) {hepchg = 2;}
38  } else if(kq3==0) {
39  // Construction from quark content for heavy meson,
40  // diquark, baryon, mesons.
41  hepchg = chg[kq2-1]-chg[kq1-1];
42  //...Strange or beauty mesons.
43  if((kq2==3) || (kq2==5)) {hepchg = chg[kq1-1]-chg[kq2-1];}
44  } else if(kq1 == 0) {
45  //...Diquarks.
46  hepchg = chg[kq3-1] + chg[kq2-1];
47  } else {
48  //...Baryons
49  hepchg = chg[kq3-1]+chg[kq2-1]+chg[kq1-1];
50  }
51  }
52  //... fix sign of charge
53  if(thePID<0) {hepchg = -hepchg;}
54  }
55  }
56  return hepchg;
57 }
const float chg[109]
Definition: CoreSimTrack.cc:5
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
EncodedEventId CoreSimTrack::eventId ( ) const
inline

Definition at line 31 of file CoreSimTrack.h.

References eId.

Referenced by TrackingTruthAccumulator::accumulateEvent().

31 {return eId;}
EncodedEventId eId
Definition: CoreSimTrack.h:38
const math::XYZTLorentzVectorD& CoreSimTrack::momentum ( ) const
inline
void CoreSimTrack::setEventId ( EncodedEventId  e)
inline

Definition at line 30 of file CoreSimTrack.h.

References alignCSCRings::e, and eId.

30 {eId=e;}
EncodedEventId eId
Definition: CoreSimTrack.h:38
void CoreSimTrack::setTrackId ( unsigned int  t)
inline

Definition at line 33 of file CoreSimTrack.h.

References edmStreamStallGrapher::t, and tId.

Referenced by FSimTrack::FSimTrack().

unsigned int CoreSimTrack::trackId ( ) const
inline
int CoreSimTrack::type ( ) const
inline

Member Data Documentation

EncodedEventId CoreSimTrack::eId
private

Definition at line 38 of file CoreSimTrack.h.

Referenced by eventId(), and setEventId().

math::XYZTLorentzVectorD CoreSimTrack::theMomentum
private

Definition at line 41 of file CoreSimTrack.h.

Referenced by CoreSimTrack(), and momentum().

int CoreSimTrack::thePID
private

Definition at line 40 of file CoreSimTrack.h.

Referenced by charge(), and type().

unsigned int CoreSimTrack::tId
private

Definition at line 39 of file CoreSimTrack.h.

Referenced by setTrackId(), and trackId().