|
ATLAS Offline Software
|
Go to the documentation of this file.
20 #include "CLHEP/Vector/LorentzVector.h"
45 std::vector<AscObj_TruthPoint*> *
ascObjs;
58 double absmom(
mom.mag());
79 Amg::Transform3D amgTransf(amgtranslation * Amg::RotationMatrix3D::Identity());
88 std::unique_ptr<Trk::TrackParameters>(
pars),
103 if (!trackStateOnSurfaces) {
104 VP1Msg::messageDebug(
"TrackHandle_TruthTrack WARNING: Could not create track due to null TSOS vector");
107 if (trackStateOnSurfaces->
empty()) {
108 VP1Msg::messageDebug(
"TrackHandle_TruthTrack WARNING: Could not create track due to empty TSOS vector");
109 delete trackStateOnSurfaces;
114 delete trackStateOnSurfaces;
119 std::unique_ptr<Trk::TrackStates> sink(trackStateOnSurfaces);
166 bool decayedGenParticle = useGenParticle &&
genParticle->end_vertex();
167 bool useSimHits = !decayedGenParticle && !
simHitList.empty();
169 if (!useGenParticle&&!useSimHits) {
170 VP1Msg::message(
"TrackHandle_TruthTrack ERROR: Track has neither a genparticle or sim. hits!!");
175 VP1Msg::message(
"TrackHandle_TruthTrack ERROR: Could not determine particle charge (pdg="
183 if (useGenParticle) {
186 if (decayedGenParticle) {
199 addPars(trackStateOnSurfaces,
it->second->createTrackParameters());
253 if (
it->second->momentum()>=0) {
254 return (
it->second->momentum()) * (
it->second->momentumDirection());
270 double x(
v->position().x()),
y(
v->position().y());
273 return fabs(
v->position().z())<=
zmax;
303 (*it)->setVisible(
b);
311 ascObjs =
new std::vector<AscObj_TruthPoint*>;
315 vprod=genParticle->production_vertex();
316 vend=genParticle->end_vertex();
318 ascObjs->reserve((vprod?1:0)+(vend?1:simHitList.size()));
325 SimHitList::const_iterator
it,
itE(simHitList.end());
326 for (
it = simHitList.begin();
it !=
itE; ++
it )
331 theclass->registerAssocObject(*
it);
333 (*it)->setVisible(ascObjVis);
JetConstituentVector::iterator iterator
bool isNonUniqueSecondary() const
Contains information about the 'fitter' of this track.
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
bool hasBarCodeZero() const
Imp(TrackHandle_TruthTrack *tc, const SimBarCode &sbc, const SimHitList &shl, HepMC::ConstGenParticlePtr p)
void ensureInitTrkTracks()
TrackHandle_TruthTrack * theclass
std::vector< std::pair< double, SimHitHandleBase * > > SimHitList
void createTrack(Trk::TrackStates *trackStateOnSurfaces)
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
static Trk::TrackParameters * createTrkParamFromDecayVertex(HepMC::ConstGenParticlePtr p, const double &charge)
void visibleStateChanged()
override if need to take action in this case.
static void addPars(Trk::TrackStates *dv, Trk::TrackParameters *pars)
virtual ~TrackHandle_TruthTrack()
virtual double calculateCharge() const
bool hasVertexAtIR(const double &rmaxsq, const double &zmax) const
DataVector< const Trk::TrackStateOnSurface > TrackStates
virtual Amg::Vector3D momentum() const
std::vector< AscObj_TruthPoint * > * ascObjs
Eigen::Affine3d Transform3D
HepMC::ConstGenParticlePtr genParticle
static Trk::Perigee * createTrkPerigeeFromProdVertex(HepMC::ConstGenParticlePtr p, const double &charge)
virtual Trk::ParticleHypothesis extrapolationParticleHypothesis() const
Default implementation of this next method bases hypothesis on pdgCode() and charge():
void setAscObjsVisible(bool)
const GenParticle * ConstGenParticlePtr
represents the track state (measurement, material, fit parameters and quality) at a surface.
TrackHandle_TruthTrack(TrackCollHandleBase *, const SimBarCode &, const SimHitList &, HepMC::ConstGenParticlePtr genPart=nullptr)
static void messageVerbose(const QString &)
Eigen::Matrix< double, 3, 1 > Vector3D
An STL vector of pointers that by default owns its pointed-to elements.
virtual int pdgCode() const
0 means unknown
static void messageDebug(const QString &)
static void message(const QString &, IVP1System *sys=0)
ParametersT< TrackParametersDim, Charged, PlaneSurface > AtaPlane
Eigen::Translation< double, 3 > Translation3D
virtual double calculateCharge() const
virtual Amg::Vector3D momentum() const
QStringList baseInfo() const
const HepMC::GenVertex * ConstGenVertexPtr
void ensureTouchedMuonChambersInitialised() const
bool empty() const noexcept
Returns true if the collection is empty.
HepMcParticleLink::index_type evtIndex() const
static Trk::TrackStateOnSurface * createTSOS(Trk::TrackParameters *pars)
const Trk::Track * provide_pathInfoTrkTrack() const
const Trk::Track * trkTrack
@ Unknown
Track fitter not defined.