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