CbmRoot
CbmEbMCEvent.h
Go to the documentation of this file.
1 
6 #ifndef CbmEbMCEvent_H
7 #define CbmEbMCEvent_H
8 
9 #include <vector>
10 
11 using std::vector;
12 
13 class CbmEbMCEvent {
14 public:
16  : fMCEventId(-1)
17  , fRecoEvents()
18  , fMCTrackId(0)
20  , fRecoTrackId(0) {};
21 
23  if (fRecoEvents.size() > 0) return 1;
24  if (fRecoEvents.size() == 0) return 0;
25  return 0;
26  }
27  int NClones() {
28  if (fRecoEvents.size() > 1) {
29  return fRecoEvents.size() - 1;
30  } else {
31  return 0;
32  }
33  }
34  void SetReconstructable(bool isReconstructable) {
35  fIsReconstructable = isReconstructable;
36  }
37  void SetId(int mcEvId) { fMCEventId = mcEvId; }
38 
39  vector<int>& GetMCTrackIds() { return fMCTrackId; }
40  int NMCTracks() const { return fMCTrackId.size(); }
41  int& GetId() { return fMCEventId; }
42  bool IsReconstructable() const { return fIsReconstructable; }
43  vector<int>& GetRecoTrackIds() { return fRecoTrackId; }
44 
45  void AddRecoEvent(int iEvent) { fRecoEvents.push_back(iEvent); }
46 
47  const vector<int>& GetRecoEvents() const { return fRecoEvents; }
48 
49 private:
51  vector<int> fRecoEvents;
52  vector<int> fMCTrackId;
54  vector<int> fRecoTrackId;
55 };
56 
57 #endif
CbmEbMCEvent::SetId
void SetId(int mcEvId)
Definition: CbmEbMCEvent.h:37
CbmEbMCEvent::CbmEbMCEvent
CbmEbMCEvent()
Definition: CbmEbMCEvent.h:15
CbmEbMCEvent::fMCTrackId
vector< int > fMCTrackId
Definition: CbmEbMCEvent.h:52
CbmEbMCEvent::GetRecoTrackIds
vector< int > & GetRecoTrackIds()
Definition: CbmEbMCEvent.h:43
CbmEbMCEvent::GetId
int & GetId()
Definition: CbmEbMCEvent.h:41
CbmEbMCEvent::fRecoTrackId
vector< int > fRecoTrackId
Definition: CbmEbMCEvent.h:54
CbmEbMCEvent::NMCTracks
int NMCTracks() const
Definition: CbmEbMCEvent.h:40
CbmEbMCEvent::IsReconstructable
bool IsReconstructable() const
Definition: CbmEbMCEvent.h:42
CbmEbMCEvent::fMCEventId
int fMCEventId
Definition: CbmEbMCEvent.h:50
CbmEbMCEvent::fIsReconstructable
bool fIsReconstructable
Definition: CbmEbMCEvent.h:53
CbmEbMCEvent::SetReconstructable
void SetReconstructable(bool isReconstructable)
Definition: CbmEbMCEvent.h:34
CbmEbMCEvent::AddRecoEvent
void AddRecoEvent(int iEvent)
Definition: CbmEbMCEvent.h:45
CbmEbMCEvent::NClones
int NClones()
Definition: CbmEbMCEvent.h:27
CbmEbMCEvent::GetRecoEvents
const vector< int > & GetRecoEvents() const
Definition: CbmEbMCEvent.h:47
CbmEbMCEvent::GetMCTrackIds
vector< int > & GetMCTrackIds()
Definition: CbmEbMCEvent.h:39
CbmEbMCEvent::fRecoEvents
vector< int > fRecoEvents
Definition: CbmEbMCEvent.h:51
CbmEbMCEvent::IsReconstructed
int IsReconstructed()
Definition: CbmEbMCEvent.h:22
CbmEbMCEvent
Definition: CbmEbMCEvent.h:13