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