ATLAS Offline Software
Loading...
Searching...
No Matches
TrackHandle_FatrasTruthTrack.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//
6// ////////////////////////////////////////////////////////////////
7// // //
8// // Implementation of class TrackHandle_FatrasTruthTrack //
9// // //
10// // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11// // Initial version: March 2008 //
12// // //
13// ////////////////////////////////////////////////////////////////
14//
15// #include "VP1TrackSystems/TrackHandle_FatrasTruthTrack.h"
16// #include "FatrasEvent/TrackParticleState.h"
17// #include "FatrasEvent/TruthAssociation.h"
18// #include "AtlasHepMC/GenParticle.h"
19//
20// //____________________________________________________________________
21// class TrackHandle_FatrasTruthTrack::Imp {
22// public:
23// Imp (const Fatras::TrackParticleState* s) : state(s) {}
24// const Fatras::TrackParticleState* state;
25// };
26//
27// //____________________________________________________________________
28// TrackHandle_FatrasTruthTrack::TrackHandle_FatrasTruthTrack(TrackCollHandleBase* ch,const Fatras::TrackParticleState* state)
29// : TrackHandle_TrkTrack(ch,&(state->associatedTrack())), d(new Imp(state))
30// {
31// }
32//
33// //____________________________________________________________________
34// QStringList TrackHandle_FatrasTruthTrack::clicked() const
35// {
36// QStringList l;
37// l << "Fatras Truth Trk::Track";
38// QStringList l2 = TrackHandle_TrkTrack::clicked();
39// if (l2.count()>1) {
40// l << "Track information:";
41// for(int i = 1; i < l2.count(); ++i)
42// l << l2.at(i);//we ignore the first line.
43// }
44// l << "Truth information:";
45// l << "pdgCode = "+QString::number(pdgCode());
46// return l;
47//
48// //NB: For printing, note the TruthAssociation has method:
49// // const AssociationType associationType() const;
50// // enum AssociationType { direct = 0,
51// // decay = 1,
52// // brem = 2,
53// // conversion = 3 };
54//
55// }
56//
57// //____________________________________________________________________
58// Amg::Vector3D TrackHandle_FatrasTruthTrack::momentum() const
59// {
60// return TrackHandle_TrkTrack::momentum();//FIXME: HERE SINCE NEXT LINE CRASHES FOR SECONDARIES!!!
61// //return d->state->momentum();
62// }
63//
64// //____________________________________________________________________
65// const Amg::Vector3D * TrackHandle_FatrasTruthTrack::startPoint() const
66// {
67// return &(d->state->position());
68// }
69//
70// //____________________________________________________________________
71// int TrackHandle_FatrasTruthTrack::pdgCode() const
72// {
73// Fatras::TruthAssociation * ta = d->state->truthAssociation();
74// if (!ta)
75// return 0;
76// const HepMC::GenParticle* gp = ta->genParticle();
77// return gp ? gp->pdg_id() : 0;
78// }
79//
80// //____________________________________________________________________
81// double TrackHandle_FatrasTruthTrack::calculateCharge() const
82// {
83// return TrackHandle_TrkTrack::calculateCharge();//FIXME: HERE SINCE NEXT LINE CRASHES FOR SECONDARIES!!!
84// return d->state->charge();
85// }
86//
87// //____________________________________________________________________
88// Trk::ParticleHypothesis TrackHandle_FatrasTruthTrack::extrapolationParticleHypothesis() const
89// {
90// return d->state->particleHypothesis();
91// }