#include <CoreSimTrack.h>
Public Member Functions | |
float | charge () const |
charge | |
CoreSimTrack (int ipart, const math::XYZTLorentzVectorD &p) | |
CoreSimTrack () | |
constructors | |
CoreSimTrack (int ipart, math::XYZVectorD &ip, double ie) | |
EncodedEventId | eventId () const |
const math::XYZTLorentzVectorD & | momentum () const |
particle info... | |
void | setEventId (EncodedEventId e) |
void | setTrackId (unsigned int t) |
unsigned int | trackId () const |
int | type () const |
particle type (HEP PDT convension) | |
Private Member Functions | |
int | chargeValue (const int &) const |
Private Attributes | |
EncodedEventId | eId |
math::XYZTLorentzVectorD | theMomentum |
int | thePID |
unsigned int | tId |
a generic Simulated Track
Definition at line 15 of file CoreSimTrack.h.
CoreSimTrack::CoreSimTrack | ( | ) | [inline] |
CoreSimTrack::CoreSimTrack | ( | int | ipart, |
const math::XYZTLorentzVectorD & | p | ||
) | [inline] |
Definition at line 21 of file CoreSimTrack.h.
: thePID(ipart), theMomentum(p) {}
CoreSimTrack::CoreSimTrack | ( | int | ipart, |
math::XYZVectorD & | ip, | ||
double | ie | ||
) | [inline] |
Definition at line 24 of file CoreSimTrack.h.
References theMomentum.
: thePID(ipart) { theMomentum.SetXYZT( ip.x(), ip.y(), ip.z(), ie ) ; }
float CoreSimTrack::charge | ( | void | ) | const |
charge
Reimplemented in FSimTrack.
Definition at line 3 of file CoreSimTrack.cc.
References chargeValue(), and thePID.
Referenced by pat::GenPlusSimParticleProducer::addGenParticle(), FWSimTrackProxyBuilder::build(), pat::PATGenCandsFromSimTracksProducer::makeGenParticle_(), SimpleL1MuGMTCand::operator=(), TrackCandidateProducer::produce(), MuonSimHitProducer::produce(), TrackingTruthProducer::setTrackingParticle(), SimpleL1MuGMTCand::SimpleL1MuGMTCand(), PropagateToMuon::startingState(), and FastTSGFromPropagation::trackerSeeds().
{ return float(CoreSimTrack::chargeValue(thePID)/3.); }
int CoreSimTrack::chargeValue | ( | const int & | Id | ) | const [private] |
Definition at line 8 of file CoreSimTrack.cc.
References abs.
Referenced by charge().
{ //...Purpose: to give three times the charge for a particle/parton. // ID = particle ID // hepchg = particle charge times 3 int kqa,kq1,kq2,kq3,kqj,irt,kqx,kqn; int hepchg; int ichg[109]={-1,2,-1,2,-1,2,-1,2,0,0,-3,0,-3,0,-3,0, -3,0,0,0,0,0,0,3,0,0,0,0,0,0,3,0,3,6,0,0,3,6,0,0,-1,2,-1,2,-1,2,0,0,0,0, -3,0,-3,0,-3,0,0,0,0,0,-1,2,-1,2,-1,2,0,0,0,0, -3,0,-3,0,-3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //...Initial values. Simple case of direct readout. hepchg=0; kqa=abs(Id); kqn=kqa/1000000000%10; kqx=kqa/1000000%10; kq3=kqa/1000%10; kq2=kqa/100%10; kq1=kqa/10%10; kqj=kqa%10; irt=kqa%10000; //...illegal or ion //...set ion charge to zero - not enough information if(kqa==0 || kqa >= 10000000) { if(kqn==1) {hepchg=0;} } //... direct translation else if(kqa<=100) {hepchg = ichg[kqa-1];} //... deuteron or tritium else if(kqa==100 || kqa==101) {hepchg = -3;} //... alpha or He3 else if(kqa==102 || kqa==104) {hepchg = -6;} //... KS and KL (and undefined) else if(kqj == 0) {hepchg = 0;} //C... direct translation else if(kqx>0 && irt<100) { hepchg = ichg[irt-1]; if(kqa==1000017 || kqa==1000018) {hepchg = 0;} if(kqa==1000034 || kqa==1000052) {hepchg = 0;} if(kqa==1000053 || kqa==1000054) {hepchg = 0;} if(kqa==5100061 || kqa==5100062) {hepchg = 6;} } //...Construction from quark content for heavy meson, diquark, baryon. //...Mesons. else if(kq3==0) { hepchg = ichg[kq2-1]-ichg[kq1-1]; //...Strange or beauty mesons. if((kq2==3) || (kq2==5)) {hepchg = ichg[kq1-1]-ichg[kq2-1];} } else if(kq1 == 0) { //...Diquarks. hepchg = ichg[kq3-1] + ichg[kq2-1]; } else{ //...Baryons hepchg = ichg[kq3-1]+ichg[kq2-1]+ichg[kq1-1]; } //... fix sign of charge if(Id<0 && hepchg!=0) {hepchg = -1*hepchg;} // cout << hepchg<< endl; return hepchg; }
EncodedEventId CoreSimTrack::eventId | ( | ) | const [inline] |
Definition at line 46 of file CoreSimTrack.h.
References eId.
Referenced by TrackingTruthProducer::createTrackingTruth(), and TrackingTruthProducer::setTrackingParticle().
{return eId;}
const math::XYZTLorentzVectorD& CoreSimTrack::momentum | ( | ) | const [inline] |
particle info...
four momentum
Reimplemented in FSimTrack.
Definition at line 36 of file CoreSimTrack.h.
References theMomentum.
Referenced by pat::GenPlusSimParticleProducer::addGenParticle(), ValidationMisalignedTracker::analyze(), TestOutliers::analyze(), FWSimTrackProxyBuilder::build(), FastTSGFromL2Muon::clean(), FastTSGFromIOHit::clean(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeResolutionAndPull(), HTrack::computeTDRResolution(), FBaseSimEvent::fill(), MuonTrackAnalyzer::fillPlots(), ElectronMCTruthFinder::find(), PhotonMCTruthFinder::find(), HTrackAssociator::getFreeTrajectoryState(), TrackDetectorAssociator::getFreeTrajectoryState(), FSimEvent::load(), pat::PATGenCandsFromSimTracksProducer::makeGenParticle_(), MuonIdTruthInfo::matchChi2(), operator<<(), SimpleL1MuGMTCand::operator=(), MuonSimHitProducer::produce(), TrajectorySeedProducer::produce(), TrackClassifier::reconstructionInformation(), FastElectronSeedGenerator::run(), TrackingTruthProducer::setTrackingParticle(), SimpleL1MuGMTCand::SimpleL1MuGMTCand(), PropagateToMuon::startingState(), and MuonTrackAnalyzer::tracksAnalysis().
{ return theMomentum; }
void CoreSimTrack::setEventId | ( | EncodedEventId | e | ) | [inline] |
void CoreSimTrack::setTrackId | ( | unsigned int | t | ) | [inline] |
Definition at line 48 of file CoreSimTrack.h.
References lumiQTWidget::t, and tId.
Referenced by FSimTrack::FSimTrack().
unsigned int CoreSimTrack::trackId | ( | ) | const [inline] |
Definition at line 49 of file CoreSimTrack.h.
References tId.
Referenced by pat::GenPlusSimParticleProducer::addGenParticle(), ElectronMCTruthFinder::find(), pat::PATGenCandsFromSimTracksProducer::findRef(), pat::GenPlusSimParticleProducer::LessById::operator()(), pat::PATGenCandsFromSimTracksProducer::LessById::operator()(), IdSort::operator()(), MuonSimHitProducer::produce(), and TrackingTruthProducer::setTrackingParticle().
{return tId;}
int CoreSimTrack::type | ( | ) | const [inline] |
particle type (HEP PDT convension)
Definition at line 40 of file CoreSimTrack.h.
References thePID.
Referenced by pat::GenPlusSimParticleProducer::addGenParticle(), ValidationMisalignedTracker::analyze(), FWSimTrackProxyBuilder::build(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeTDRResolution(), CalorimetryManager::EMShowerSimulation(), FBaseSimEvent::fill(), TauHadronDecayFilter::filter(), PhotonMCTruthFinder::find(), ElectronMCTruthFinder::find(), FSimTrack::FSimTrack(), HTrackAssociator::getFreeTrajectoryState(), TrackDetectorAssociator::getFreeTrajectoryState(), HcalHitMaker::HcalHitMaker(), CalorimetryManager::HDShowerSimulation(), FSimEvent::load(), pat::PATGenCandsFromSimTracksProducer::makeGenParticle_(), operator<<(), pat::PATGenCandsFromSimTracksProducer::produce(), MuonSimHitProducer::produce(), PFSimParticleProducer::produce(), CalorimetryManager::reconstruct(), TrajectoryManager::reconstruct(), CalorimetryManager::reconstructHCAL(), and TrackingTruthProducer::setTrackingParticle().
{ return thePID;}
EncodedEventId CoreSimTrack::eId [private] |
Definition at line 54 of file CoreSimTrack.h.
Referenced by eventId(), and setEventId().
Definition at line 57 of file CoreSimTrack.h.
Referenced by CoreSimTrack(), and momentum().
int CoreSimTrack::thePID [private] |
Definition at line 56 of file CoreSimTrack.h.
unsigned int CoreSimTrack::tId [private] |
Definition at line 55 of file CoreSimTrack.h.
Referenced by setTrackId(), and trackId().