CbmRoot
NicaCbmMCEventInterface.h
Go to the documentation of this file.
1 /*
2  * NicaCbmMCEventInterface.h
3  *
4  * Created on: 20 wrz 2018
5  * Author: Daniel Wielanek
6  * E-mail: daniel.wielanek@gmail.com
7  * Warsaw University of Technology, Faculty of Physics
8  */
9 #ifndef BMN_NICA_BMN_FORMAT_MC_NICACBMMCEVENTINTERFACE_H_
10 #define BMN_NICA_BMN_FORMAT_MC_NICACBMMCEVENTINTERFACE_H_
11 
12 #include "FairMCEventHeader.h"
13 #include "NicaMCEventInterface.h"
14 #include <TClonesArray.h>
15 
16 class NicaCbmMCEvent;
17 class NicaCbmMCEventInterface : public NicaMCEventInterface {
18  friend class NicaCbmMCEvent;
19 
20 protected:
21  FairMCEventHeader* fEvent;
22  TClonesArray* fCbmTracks;
23  virtual void ConnectToTree();
24 
25 public:
27  virtual Int_t GetTotalTrackNo() const {
28  return fCbmTracks->GetEntriesFast();
29  };
30  virtual void Register(Bool_t write);
31  virtual void Clear(Option_t* opt = "");
32  virtual void Compress(Int_t* map, Int_t map_size);
33  virtual void CopyData(NicaEventInterface* s);
34  virtual void
35  CopyAndCompress(NicaEventInterface* s, Int_t* map, Int_t map_size);
36  virtual void FillTrackInterface(NicaTrackInterface* track, Int_t index);
37  virtual TObject* GetRawEventPointer() const { return fEvent; };
38  virtual TObject* GetRawTrackPointer(Int_t index) const {
39  return fCbmTracks->UncheckedAt(index);
40  }
41  virtual NicaTrackInterface* GetTrackInterface() const;
43  virtual void SetVertex(Double_t x, Double_t y, Double_t z) {
44  fEvent->SetVertex(x, y, z);
45  };
46  virtual void SetPhi(Double_t /*phi*/, Double_t /*phi_error*/) {};
47  virtual void SetB(Double_t /*b*/) {};
48  virtual Double_t GetB() const { return 0; };
49  virtual Double_t GetPhi() const { return 0; };
50  virtual Double_t GetPhiError() const { return 0; };
51  virtual TLorentzVector GetVertex() const;
52  virtual ~NicaCbmMCEventInterface();
53  ClassDef(NicaCbmMCEventInterface, 1)
54 };
55 
56 #endif /* BMN_NICA_BMN_FORMAT_MC_NICACBMMCEVENTINTERFACE_H_ */
NicaCbmMCEventInterface::FillTrackInterface
virtual void FillTrackInterface(NicaTrackInterface *track, Int_t index)
Definition: NicaCbmMCEventInterface.cxx:90
NicaCbmMCEvent
Definition: NicaCbmMCEvent.h:13
NicaCbmMCEventInterface::~NicaCbmMCEventInterface
virtual ~NicaCbmMCEventInterface()
Definition: NicaCbmMCEventInterface.cxx:107
NicaCbmMCEventInterface::Register
virtual void Register(Bool_t write)
Definition: NicaCbmMCEventInterface.cxx:19
NicaCbmMCEventInterface::fEvent
FairMCEventHeader * fEvent
Definition: NicaCbmMCEventInterface.h:21
NicaCbmMCEventInterface::GetB
virtual Double_t GetB() const
Definition: NicaCbmMCEventInterface.h:48
NicaCbmMCEventInterface::CopyAndCompress
virtual void CopyAndCompress(NicaEventInterface *s, Int_t *map, Int_t map_size)
Definition: NicaCbmMCEventInterface.cxx:68
NicaCbmMCEventInterface::GetRawTrackPointer
virtual TObject * GetRawTrackPointer(Int_t index) const
Definition: NicaCbmMCEventInterface.h:38
NicaCbmMCEventInterface::GetRawEventPointer
virtual TObject * GetRawEventPointer() const
Definition: NicaCbmMCEventInterface.h:37
NicaCbmMCEventInterface::GetTrackInterface
virtual NicaTrackInterface * GetTrackInterface() const
Definition: NicaCbmMCEventInterface.cxx:95
NicaCbmMCEventInterface::SetVertex
virtual void SetVertex(Double_t x, Double_t y, Double_t z)
Definition: NicaCbmMCEventInterface.h:43
NicaCbmMCEventInterface::ConnectToTree
virtual void ConnectToTree()
Definition: NicaCbmMCEventInterface.cxx:114
NicaCbmMCEventInterface::GetPhi
virtual Double_t GetPhi() const
Definition: NicaCbmMCEventInterface.h:49
NicaCbmMCEventInterface::GetTotalTrackNo
virtual Int_t GetTotalTrackNo() const
Definition: NicaCbmMCEventInterface.h:27
NicaCbmMCEventInterface::NicaCbmMCEventInterface
NicaCbmMCEventInterface()
Definition: NicaCbmMCEventInterface.cxx:14
NicaCbmMCEventInterface::Compress
virtual void Compress(Int_t *map, Int_t map_size)
Definition: NicaCbmMCEventInterface.cxx:33
NicaCbmMCEventInterface::CopyData
virtual void CopyData(NicaEventInterface *s)
Definition: NicaCbmMCEventInterface.cxx:45
NicaCbmMCEventInterface::SetPhi
virtual void SetPhi(Double_t, Double_t)
Definition: NicaCbmMCEventInterface.h:46
NicaCbmMCEventInterface::Clear
virtual void Clear(Option_t *opt="")
Definition: NicaCbmMCEventInterface.cxx:31
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
NicaCbmMCEventInterface
Definition: NicaCbmMCEventInterface.h:17
NicaCbmMCEventInterface::fCbmTracks
TClonesArray * fCbmTracks
Definition: NicaCbmMCEventInterface.h:22
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
NicaCbmMCEventInterface::GetVertex
virtual TLorentzVector GetVertex() const
Definition: NicaCbmMCEventInterface.cxx:99
NicaCbmMCEventInterface::SetB
virtual void SetB(Double_t)
Definition: NicaCbmMCEventInterface.h:47
NicaCbmMCEventInterface::GetPhiError
virtual Double_t GetPhiError() const
Definition: NicaCbmMCEventInterface.h:50