-- modified cut analysis for Pb-Pb
[u/mrichter/AliRoot.git] / PWG0 / dNdPt / AlidNdPt.cxx
CommitLineData
0aaa8b91 1/**************************************************************************\r
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
3 * *\r
4 * Author: The ALICE Off-line Project. *\r
5 * Contributors are mentioned in the code where appropriate. *\r
6 * *\r
7 * Permission to use, copy, modify and distribute this software and its *\r
8 * documentation strictly for non-commercial purposes is hereby granted *\r
9 * without fee, provided that the above copyright notice appears in all *\r
10 * copies and that both the copyright notice and this permission notice *\r
11 * appear in the supporting documentation. The authors make no claims *\r
12 * about the suitability of this software for any purpose. It is *\r
13 * provided "as is" without express or implied warranty. *\r
14 **************************************************************************/\r
68f10917 15 // last change: 2011-04-04 by M.Knichel\r
0aaa8b91 16\r
17#include "AliESDtrackCuts.h" \r
18#include "AlidNdPtEventCuts.h"\r
19#include "AlidNdPtAcceptanceCuts.h"\r
d269b0e6 20#include "AliPhysicsSelection.h"\r
7f7dd416 21#include "AlidNdPtBackgroundCuts.h"\r
0aaa8b91 22#include "AlidNdPt.h"\r
23\r
24using namespace std;\r
25\r
26ClassImp(AlidNdPt)\r
27\r
28//_____________________________________________________________________________\r
29AlidNdPt::AlidNdPt(): TNamed()\r
30, fdNdPtEventCuts(0)\r
31, fdNdPtAcceptanceCuts(0)\r
68f10917 32, fdNdPtRecAcceptanceCuts(0)\r
0aaa8b91 33, fEsdTrackCuts(0)\r
34, fUseMCInfo(kFALSE)\r
35, fAnalysisMode(AlidNdPtHelper::kTPC) \r
70fdd197 36, fTrigger(AliTriggerAnalysis::kMB1) \r
985bdfd5 37, fTriggerClass(0) \r
847e74b2 38, fParticleMode(AlidNdPtHelper::kAllPart) \r
d269b0e6 39, fPhysicsSelection(0)\r
7f7dd416 40, fdNdPtBackgroundCuts(0)\r
0aaa8b91 41{\r
42 // default constructor\r
43}\r
44\r
45//_____________________________________________________________________________\r
46AlidNdPt::AlidNdPt(Char_t* name, Char_t* title): TNamed(name,title)\r
47, fdNdPtEventCuts(0)\r
48, fdNdPtAcceptanceCuts(0)\r
68f10917 49, fdNdPtRecAcceptanceCuts(0)\r
0aaa8b91 50, fEsdTrackCuts(0)\r
51, fUseMCInfo(kFALSE)\r
52, fAnalysisMode(AlidNdPtHelper::kTPC) \r
70fdd197 53, fTrigger(AliTriggerAnalysis::kMB1) \r
985bdfd5 54, fTriggerClass(0) \r
847e74b2 55, fParticleMode(AlidNdPtHelper::kAllPart) \r
d269b0e6 56, fPhysicsSelection(0)\r
7f7dd416 57, fdNdPtBackgroundCuts(0)\r
0aaa8b91 58{\r
59 // constructor\r
60}\r
61\r
154caed0 62AlidNdPt::AlidNdPt(const AlidNdPt&): TNamed()\r
63, fdNdPtEventCuts(0)\r
64, fdNdPtAcceptanceCuts(0)\r
68f10917 65, fdNdPtRecAcceptanceCuts(0)\r
154caed0 66, fEsdTrackCuts(0)\r
67, fUseMCInfo(kFALSE)\r
68, fAnalysisMode(AlidNdPtHelper::kTPC) \r
69, fTrigger(AliTriggerAnalysis::kMB1) \r
70, fTriggerClass(0) \r
71, fParticleMode(AlidNdPtHelper::kAllPart) \r
72, fPhysicsSelection(0)\r
73, fdNdPtBackgroundCuts(0)\r
74{\r
75 // not implemented\r
76}\r
77\r
78AlidNdPt& AlidNdPt::operator=(const AlidNdPt&)\r
79{\r
80 // not implemented\r
81 return *this;\r
82}\r
83\r
0aaa8b91 84//_____________________________________________________________________________\r
d269b0e6 85AlidNdPt::~AlidNdPt() {\r
0aaa8b91 86 // destructor\r
87 if(fdNdPtEventCuts) delete fdNdPtEventCuts; fdNdPtEventCuts=NULL; \r
88 if(fdNdPtAcceptanceCuts) delete fdNdPtAcceptanceCuts; fdNdPtAcceptanceCuts=NULL;\r
68f10917 89 if(fdNdPtRecAcceptanceCuts) delete fdNdPtRecAcceptanceCuts; fdNdPtRecAcceptanceCuts=NULL; \r
0aaa8b91 90 if(fEsdTrackCuts) delete fEsdTrackCuts; fEsdTrackCuts=NULL;\r
d269b0e6 91 if(fPhysicsSelection) delete fPhysicsSelection; fPhysicsSelection=NULL;\r
7f7dd416 92 if(fdNdPtBackgroundCuts) delete fdNdPtBackgroundCuts; fdNdPtBackgroundCuts=NULL;\r
0aaa8b91 93}\r
10360c58 94\r
95//_____________________________________________________________________________\r
96Double_t * AlidNdPt::CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax) {\r
97 // retun pointer to the array with log axis\r
98 // it is user responsibility to delete the array\r
99 \r
100 Double_t logxmin = TMath::Log10(xmin);\r
101 Double_t logxmax = TMath::Log10(xmax);\r
102 Double_t binwidth = (logxmax-logxmin)/nbins;\r
103 \r
104 Double_t *xbins = new Double_t[nbins+1];\r
105\r
106 xbins[0] = xmin;\r
107 for (Int_t i=1;i<=nbins;i++) {\r
108 xbins[i] = xmin + TMath::Power(10,logxmin+i*binwidth);\r
109 }\r
110\r
111return xbins;\r
112}\r