Lines getting the matched track moved to a method in AliCalorimeterUtils. Lines copie...
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / AliFemtoCutMonitorTrackTPCchiNdof.cxx
CommitLineData
f9210de7 1////////////////////////////////////////////////////////////////////////////////
2/// ///
3/// AliFemtoCutMonitorTrackTPCchiNdof - the cut monitor for tracks to study ///
4/// the number of TPC clusters distribution. ///
5/// ///
6////////////////////////////////////////////////////////////////////////////////
7#include "AliFemtoCutMonitorTrackTPCchiNdof.h"
8#include "AliFemtoModelHiddenInfo.h"
9#include "AliFemtoEvent.h"
10#include <TH1D.h>
11#include <TH2D.h>
12#include <TList.h>
13
14
15AliFemtoCutMonitorTrackTPCchiNdof::AliFemtoCutMonitorTrackTPCchiNdof():
16 fTrTPCchiNdof(0)
17{
18 // Default constructor
19 fTrTPCchiNdof = new TH1D("TrTPCchiNdof", "Track TPC Clusters", 5001, -0.5, 5000.5);
20}
21
22AliFemtoCutMonitorTrackTPCchiNdof::AliFemtoCutMonitorTrackTPCchiNdof(const char *aName):
23 AliFemtoCutMonitor(),
24 fTrTPCchiNdof(0)
25{
26 // Normal constructor
27 char name[200];
28 snprintf(name, 200, "TrTPCchiNdof%s", aName);
29 fTrTPCchiNdof = new TH1D(name, "Track TPC Clusters", 5001, -0.5, 5000.5);
30}
31
32AliFemtoCutMonitorTrackTPCchiNdof::AliFemtoCutMonitorTrackTPCchiNdof(const AliFemtoCutMonitorTrackTPCchiNdof &aCut):
33 AliFemtoCutMonitor(),
34 fTrTPCchiNdof(0)
35{
36 // copy constructor
37 if (fTrTPCchiNdof) delete fTrTPCchiNdof;
38 fTrTPCchiNdof = new TH1D(*aCut.fTrTPCchiNdof);
39}
40
41AliFemtoCutMonitorTrackTPCchiNdof::~AliFemtoCutMonitorTrackTPCchiNdof()
42{
43 // Destructor
44 delete fTrTPCchiNdof;
45}
46
47AliFemtoCutMonitorTrackTPCchiNdof& AliFemtoCutMonitorTrackTPCchiNdof::operator=(const AliFemtoCutMonitorTrackTPCchiNdof& aCut)
48{
49 // assignment operator
50 if (this == &aCut)
51 return *this;
52
53 if (fTrTPCchiNdof) delete fTrTPCchiNdof;
54 fTrTPCchiNdof = new TH1D(*aCut.fTrTPCchiNdof);
55
56 return *this;
57}
58
59AliFemtoString AliFemtoCutMonitorTrackTPCchiNdof::Report(){
60 // Prepare report from the execution
61 string stemp = "*** AliFemtoCutMonitorTrackTPCchiNdof report";
62 AliFemtoString returnThis = stemp;
63 return returnThis;
64}
65
66void AliFemtoCutMonitorTrackTPCchiNdof::Fill(const AliFemtoTrack* aTrack)
67{
68 // Fill in the monitor histograms with the values from the current track
69 if (aTrack->TPCncls() > 0) {
70 fTrTPCchiNdof->Fill(aTrack->TPCchi2()/aTrack->TPCncls());
71 }
72}
73
74void AliFemtoCutMonitorTrackTPCchiNdof::Write()
75{
76 // Write out the relevant histograms
77 fTrTPCchiNdof->Write();
78}
79
80TList *AliFemtoCutMonitorTrackTPCchiNdof::GetOutputList()
81{
82 TList *tOutputList = new TList();
83 tOutputList->Add(fTrTPCchiNdof);
84
85 return tOutputList;
86}
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104