17 : trackingParticlePtr_(tpPtr),
18 index_in_vTPs_(index_in_vTPs),
25 theta_(tpPtr->
theta()),
26 tanLambda_(1. /
tan(theta_)),
28 vx_(tpPtr->vertex().x()),
29 vy_(tpPtr->vertex().y()),
30 vz_(tpPtr->vertex().z()),
31 d0_(vx_ *
sin(phi0_) - vy_ *
cos(phi0_)),
32 z0_(vz_ - (vx_ *
cos(phi0_) + vy_ *
sin(phi0_)) * tanLambda_)
34 const vector<SimTrack>& vst = tpPtr->g4Tracks();
46 for (
const Stub&
s : vStubs) {
47 for (
const TP* tp_i :
s.assocTPs()) {
48 if (tp_i->index() == this->
index())
62 constexpr
bool useOnlyInTimeParticles =
false;
63 constexpr
bool useOnlyTPfromPhysicsCollisionFalse =
false;
68 constexpr std::array<int, 5> genPdgIdsAllUnsigned = {{11, 13, 211, 321, 2212}};
69 vector<int> genPdgIdsAll;
70 for (
const int& iPdg : genPdgIdsAllUnsigned) {
71 genPdgIdsAll.push_back(iPdg);
72 genPdgIdsAll.push_back(-iPdg);
77 constexpr
float ptMinScale = 0.7;
79 constexpr
double ptMax = 9.9e9;
80 const float etaExtra = 0.2;
82 constexpr
double fixedVertRcut = 10.;
83 constexpr
double fixedVertZcut = 35.;
92 useOnlyTPfromPhysicsCollisionFalse,
93 useOnlyInTimeParticles,
106 constexpr
bool useOnlyInTimeParticles =
true;
107 constexpr
bool useOnlyTPfromPhysicsCollision =
true;
108 constexpr
double ptMax = 9.9e9;
116 useOnlyTPfromPhysicsCollision,
117 useOnlyInTimeParticles,
168 double ptOfNearestJet = -1;
170 reco::GenJetCollection::const_iterator iterGenJet;
171 for (iterGenJet = genJets->begin(); iterGenJet != genJets->end(); ++iterGenJet) {
175 constexpr
float minPt = 30.0;
176 constexpr
float maxEta = 2.5;
181 if (deltaR < minDR) {
183 ptOfNearestJet = myJet.
pt();
189 constexpr
float cutDR = 0.4;
double genMaxAbsEta() const
int event() const
get the contents of the subdetector field (should be protected?)
void fillNearestJetInfo(const reco::GenJetCollection *genJets)
double pt() const final
transverse momentum
double houghMinPt() const
float dphi(float rad) const
unsigned int index() const
double genMaxVertR() const
Sin< T >::type sin(const T &t)
std::vector< GenJet > GenJetCollection
collection of GenJet objects
tuple trackingParticleSelector
Geom::Theta< T > theta() const
double genMaxVertZ() const
TrackingParticlePtr trackingParticlePtr_
const std::vector< double > & etaRegions() const
int bunchCrossing() const
get the detector field from this detid
Cos< T >::type cos(const T &t)
pdgId_(cfg.getParameter< std::vector< int > >("matchPDGId"))
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
Jets made from MC generator particles.
const Settings * settings_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
float trkZAtStub(const Stub *stub) const
unsigned int genMinStubLayers() const
unsigned int countLayers(const Settings *settings, const std::vector< const Stub * > &stubs, bool disableReducedLayerID=false, bool onlyPS=false)
void fillTruth(const std::list< Stub > &vStubs)
double phi() const final
momentum azimuthal angle
const std::vector< int > & genPdgIds() const
std::vector< const Stub * > assocStubs_
float trkPhiAtStub(const Stub *stub) const
float trkRAtStub(const Stub *stub) const
double eta() const final
momentum pseudorapidity