Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
ExpEvent.cxx
1/*
2 * DetectedEvent.cxx
3 *
4 * Created on: 10 kwi 2017
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "ExpEvent.h"
11
12#include "DataFormat.h"
13
14#include <TLorentzVector.h>
15#include <TVector3.h>
16
17namespace Hal {
18 ExpEvent::ExpEvent() : Event(), fRunInfoId(0), fEventTrigger(0), fNTofTracks(0) {
19 fVertexError = new TLorentzVector();
20 fMagField = new TVector3;
21 }
22
23 ExpEvent::ExpEvent(const ExpEvent& other) : Event(other) {
24 fRunInfoId = other.fRunInfoId;
25 fEventTrigger = other.fEventTrigger;
26 fVertexError = new TLorentzVector(*other.fVertexError);
27 fMagField = new TVector3(*other.fMagField);
28 fNTofTracks = other.fNTofTracks;
29 }
30
31 ExpEvent::ExpEvent(TString track_class, TString v0_class, TString xi_class) :
32 Event(track_class, v0_class, xi_class), fRunInfoId(0), fEventTrigger(0), fNTofTracks(0) {
33 fVertexError = new TLorentzVector();
34 fMagField = new TVector3;
35 }
36
37 void ExpEvent::ShallowCopyEvent(Event* event) {
38 Event::ShallowCopyEvent(event);
39 ExpEvent* ev = (ExpEvent*) event;
40 fRunInfoId = ev->fRunInfoId;
41 fEventTrigger = ev->fEventTrigger;
42 *fVertexError = *ev->fVertexError;
43 *fMagField = *ev->fMagField;
44 fNTofTracks = ev->GetNTofTracks();
45 }
46
47 Float_t ExpEvent::GetFieldVal(Int_t fieldID) const {
48 switch (fieldID) {
49 case DataFieldID::Event::EExp::kTofTracksNo: return fNTofTracks; break;
50 default: return Event::GetFieldVal(fieldID); break;
51 }
52 }
53
54 TString ExpEvent::GetFieldName(Int_t fieldID) const {
55 switch (fieldID) {
56 case DataFieldID::Event::EExp::kTofTracksNo: return "N_{TOF tracks} [N]"; break;
57 default: return Event::GetFieldName(fieldID); break;
58 }
59 }
60
61 ExpEvent::~ExpEvent() {
62 if (fVertexError) {
63 delete fVertexError;
64 delete fMagField;
65 }
66 }
67
68 ExpEventHelix::ExpEventHelix(TString track_class, TString v0_class) : ExpEvent(track_class, v0_class) {}
69
70 ExpEventHelix::ExpEventHelix() : ExpEvent() {}
71
72 ExpEventHelix::ExpEventHelix(const ExpEventHelix& other) : ExpEvent(other) {}
73
74 ExpEventHelix::~ExpEventHelix() {}
75} // namespace Hal
Int_t GetNTofTracks() const
Definition ExpEvent.h:38