BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
McTrajectory.h
Go to the documentation of this file.
1#ifndef Event_McTrajectory_H
2#define Event_McTrajectory_H 1
3
4#include <iostream>
5#include <vector>
6#include <utility>
7#include "CLHEP/Geometry/Point3D.h"
8#include "GaudiKernel/Kernel.h"
9#include "GaudiKernel/ContainedObject.h"
10#include "GaudiKernel/SmartRefVector.h"
11#include "GaudiKernel/ObjectVector.h"
12#include "GaudiKernel/ObjectList.h"
13#include "McTruth/McParticle.h"
14
15extern const CLID& CLID_McTrajectory;
16
17namespace Event { // NameSpace
18
19class McTrajectory : virtual public ContainedObject {
20 public:
21
22 virtual const CLID& clID() const { return McTrajectory::classID(); }
23 static const CLID& classID() { return CLID_McTrajectory; }
24
27
28 /// Add the 3d points to the trajectory
29 void addPoints(std::vector<Hep3Vector>& points);
30
31 /// Set the pointer to the McParticle
32 void setMcParticle(SmartRef<McParticle> value);
33 void setMcParticle( McParticle* value );
34
35 /// Get the pointer to the McParticle
36 const McParticle* getMcParticle() const;
38
39 /// Get the 3d points
40 std::vector<Hep3Vector>& getPoints(){return m_points;}
41
42 /// get, set charge
43 int getCharge() const { return m_charge; }
44 void setCharge(int charge){ m_charge=charge;}
45
46 private:
47 /// Pointer to McParticle of this trajectory
48 SmartRef<McParticle> m_mcParticle;
49 /// The point of the trajectory
50 std::vector<Hep3Vector> m_points;
51 /// the (redundant?) charge
52 int m_charge;
53
54};
55
56// Definition of all container types of McTrajectory
57//template <class TYPE> class ObjectVector;
58typedef ObjectVector<McTrajectory> McTrajectoryVector;
59typedef ObjectVector<McTrajectory> McTrajectoryCol;
60//template <class TYPE> class ObjectList;
61typedef ObjectList<McTrajectory> McTrajectoryList;
62
63
64}
65
66#endif // Event_McTrajectory_H
67
const CLID & CLID_McTrajectory
int getCharge() const
get, set charge
Definition: McTrajectory.h:43
const McParticle * getMcParticle() const
Get the pointer to the McParticle.
Definition: McTrajectory.cxx:8
void setMcParticle(SmartRef< McParticle > value)
Set the pointer to the McParticle.
void setCharge(int charge)
Definition: McTrajectory.h:44
static const CLID & classID()
Definition: McTrajectory.h:23
virtual const CLID & clID() const
Definition: McTrajectory.h:22
void addPoints(std::vector< Hep3Vector > &points)
Add the 3d points to the trajectory.
std::vector< Hep3Vector > & getPoints()
Get the 3d points.
Definition: McTrajectory.h:40
Definition: Event.h:21
ObjectVector< McTrajectory > McTrajectoryCol
Definition: McTrajectory.h:59
ObjectVector< McTrajectory > McTrajectoryVector
Definition: McTrajectory.h:58
ObjectList< McTrajectory > McTrajectoryList
Definition: McTrajectory.h:61
float charge