]>
Commit | Line | Data |
---|---|---|
27393898 | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoCutMonitorParticlePID - the cut monitor for particles to study // | |
4 | // various aspects of the PID determination // | |
5 | // // | |
6 | //////////////////////////////////////////////////////////////////////////////// | |
7 | #include "AliFemtoCutMonitorParticlePID.h" | |
8 | #include "AliFemtoModelHiddenInfo.h" | |
9 | #include <TH1D.h> | |
10 | #include <TH2D.h> | |
11 | #include <TList.h> | |
12 | #include <TMath.h> | |
13 | ||
14 | AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(): | |
15 | fTPCdEdx(0) | |
16 | { | |
17 | // Default constructor | |
18 | fTPCdEdx = new TH2D("TPCdEdx", "TPC dEdx vs momentum", 190, 0.1, 2.0, 500, 0.0, 500.0); | |
19 | } | |
20 | ||
21 | AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const char *aName): | |
22 | AliFemtoCutMonitor(), | |
23 | fTPCdEdx(0) | |
24 | { | |
25 | // Normal constructor | |
26 | char name[200]; | |
27 | snprintf(name, 200, "TPCdEdx%s", aName); | |
28 | fTPCdEdx = new TH2D(name, "TPC dEdx vs. momentum", 190, 0.1, 2.0, 500, 0.0, 500.0); | |
29 | } | |
30 | ||
31 | AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const AliFemtoCutMonitorParticlePID &aCut): | |
32 | AliFemtoCutMonitor(), | |
33 | fTPCdEdx(0) | |
34 | { | |
35 | // copy constructor | |
36 | if (fTPCdEdx) delete fTPCdEdx; | |
37 | fTPCdEdx = new TH2D(*aCut.fTPCdEdx); | |
38 | } | |
39 | ||
40 | AliFemtoCutMonitorParticlePID::~AliFemtoCutMonitorParticlePID() | |
41 | { | |
42 | // Destructor | |
43 | delete fTPCdEdx; | |
44 | } | |
45 | ||
46 | AliFemtoCutMonitorParticlePID& AliFemtoCutMonitorParticlePID::operator=(const AliFemtoCutMonitorParticlePID& aCut) | |
47 | { | |
48 | // assignment operator | |
49 | if (this == &aCut) | |
50 | return *this; | |
51 | ||
52 | if (fTPCdEdx) delete fTPCdEdx; | |
53 | fTPCdEdx = new TH2D(*aCut.fTPCdEdx); | |
54 | ||
55 | return *this; | |
56 | } | |
57 | ||
58 | AliFemtoString AliFemtoCutMonitorParticlePID::Report(){ | |
59 | // Prepare report from the execution | |
60 | string stemp = "*** AliFemtoCutMonitorParticlePID report"; | |
61 | AliFemtoString returnThis = stemp; | |
62 | return returnThis; | |
63 | } | |
64 | ||
65 | void AliFemtoCutMonitorParticlePID::Fill(const AliFemtoTrack* aTrack) | |
66 | { | |
67 | // Fill in the monitor histograms with the values from the current track | |
68 | float tMom = aTrack->P().Mag(); | |
69 | float tdEdx = aTrack->TPCsignal(); | |
70 | ||
71 | fTPCdEdx->Fill(tMom, tdEdx); | |
72 | } | |
73 | ||
74 | void AliFemtoCutMonitorParticlePID::Write() | |
75 | { | |
76 | // Write out the relevant histograms | |
77 | fTPCdEdx->Write(); | |
78 | } | |
79 | ||
80 | TList *AliFemtoCutMonitorParticlePID::GetOutputList() | |
81 | { | |
82 | TList *tOutputList = new TList(); | |
83 | tOutputList->Add(fTPCdEdx); | |
84 | ||
85 | return tOutputList; | |
86 | } |