]>
Commit | Line | Data |
---|---|---|
00114ecb | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoCutMonitorEventMult - the cut monitor for particles to study // | |
4 | // the difference between reconstructed and true momentum // | |
5 | // // | |
6 | //////////////////////////////////////////////////////////////////////////////// | |
7 | #include "AliFemtoCutMonitorEventMult.h" | |
8 | #include "AliFemtoModelHiddenInfo.h" | |
9 | #include "AliFemtoEvent.h" | |
10 | #include <TH1D.h> | |
11 | #include <TH2D.h> | |
12 | #include <TList.h> | |
13 | ||
14 | AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(): | |
73695088 | 15 | fEvMult(0), |
e2b7a66d | 16 | fNormEvMult(0), |
17 | fSPDMult(0) | |
00114ecb | 18 | { |
19 | // Default constructor | |
20 | fEvMult = new TH1D("EvMult", "Event Multiplicity", 5001, -0.5, 5000.5); | |
21 | } | |
22 | ||
23 | AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const char *aName): | |
24 | AliFemtoCutMonitor(), | |
73695088 | 25 | fEvMult(0), |
e2b7a66d | 26 | fNormEvMult(0), |
27 | fSPDMult(0) | |
00114ecb | 28 | { |
29 | // Normal constructor | |
30 | char name[200]; | |
31 | snprintf(name, 200, "EvMult%s", aName); | |
32 | fEvMult = new TH1D(name, "Event Multiplicity", 5001, -0.5, 5000.5); | |
73695088 | 33 | |
34 | snprintf(name, 200, "NormEvMult%s", aName); | |
35 | fNormEvMult = new TH1D(name, "Normalized Event Multiplicity", 5001, -0.5, 5000.5); | |
e2b7a66d | 36 | |
37 | snprintf(name, 200, "SPDEvMult%s", aName); | |
38 | fSPDMult = new TH1D(name, "SPD Tracklet Multiplicity", 5001, -0.5, 5000.5); | |
00114ecb | 39 | } |
40 | ||
41 | AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonitorEventMult &aCut): | |
42 | AliFemtoCutMonitor(), | |
73695088 | 43 | fEvMult(0), |
e2b7a66d | 44 | fNormEvMult(0), |
45 | fSPDMult(0) | |
00114ecb | 46 | { |
47 | // copy constructor | |
48 | if (fEvMult) delete fEvMult; | |
49 | fEvMult = new TH1D(*aCut.fEvMult); | |
73695088 | 50 | |
51 | if (fNormEvMult) delete fNormEvMult; | |
52 | fNormEvMult = new TH1D(*aCut.fNormEvMult); | |
e2b7a66d | 53 | |
54 | if (fSPDMult) delete fSPDMult; | |
55 | fSPDMult = new TH1D(*aCut.fSPDMult); | |
00114ecb | 56 | } |
57 | ||
58 | AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult() | |
59 | { | |
60 | // Destructor | |
61 | delete fEvMult; | |
73695088 | 62 | delete fNormEvMult; |
e2b7a66d | 63 | delete fSPDMult; |
00114ecb | 64 | } |
65 | ||
66 | AliFemtoCutMonitorEventMult& AliFemtoCutMonitorEventMult::operator=(const AliFemtoCutMonitorEventMult& aCut) | |
67 | { | |
68 | // assignment operator | |
69 | if (this == &aCut) | |
70 | return *this; | |
71 | ||
72 | if (fEvMult) delete fEvMult; | |
73 | fEvMult = new TH1D(*aCut.fEvMult); | |
74 | ||
73695088 | 75 | if (fNormEvMult) delete fNormEvMult; |
76 | fNormEvMult = new TH1D(*aCut.fNormEvMult); | |
77 | ||
e2b7a66d | 78 | if (fSPDMult) delete fSPDMult; |
79 | fSPDMult = new TH1D(*aCut.fSPDMult); | |
80 | ||
00114ecb | 81 | return *this; |
82 | } | |
83 | ||
84 | AliFemtoString AliFemtoCutMonitorEventMult::Report(){ | |
85 | // Prepare report from the execution | |
86 | string stemp = "*** AliFemtoCutMonitorEventMult report"; | |
87 | AliFemtoString returnThis = stemp; | |
88 | return returnThis; | |
89 | } | |
90 | ||
91 | void AliFemtoCutMonitorEventMult::Fill(const AliFemtoEvent* aEvent) | |
92 | { | |
93 | // Fill in the monitor histograms with the values from the current track | |
94 | fEvMult->Fill(aEvent->NumberOfTracks()); | |
73695088 | 95 | fNormEvMult->Fill(aEvent->UncorrectedNumberOfPrimaries()); |
e2b7a66d | 96 | fSPDMult->Fill(aEvent->SPDMultiplicity()); |
00114ecb | 97 | } |
98 | ||
99 | void AliFemtoCutMonitorEventMult::Write() | |
100 | { | |
101 | // Write out the relevant histograms | |
102 | fEvMult->Write(); | |
73695088 | 103 | fNormEvMult->Write(); |
e2b7a66d | 104 | fSPDMult->Write(); |
00114ecb | 105 | } |
106 | ||
107 | TList *AliFemtoCutMonitorEventMult::GetOutputList() | |
108 | { | |
109 | TList *tOutputList = new TList(); | |
110 | tOutputList->Add(fEvMult); | |
73695088 | 111 | tOutputList->Add(fNormEvMult); |
e2b7a66d | 112 | tOutputList->Add(fSPDMult); |
00114ecb | 113 | return tOutputList; |
114 | } |