]>
Commit | Line | Data |
---|---|---|
a65a7e70 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // last change: 2013-06-13 by M.Knichel | |
16 | ||
17 | #include "AliESDtrackCuts.h" | |
18 | #include "AlidNdPtEventCuts.h" | |
19 | #include "AlidNdPtAcceptanceCuts.h" | |
20 | #include "AliPhysicsSelection.h" | |
21 | #include "AlidNdPtBackgroundCuts.h" | |
22 | #include "AlidNdPt.h" | |
23 | ||
24 | using namespace std; | |
25 | ||
26 | ClassImp(AlidNdPt) | |
27 | ||
28 | //_____________________________________________________________________________ | |
29 | AlidNdPt::AlidNdPt(): TNamed() | |
30 | , fdNdPtEventCuts(0) | |
31 | , fdNdPtAcceptanceCuts(0) | |
32 | , fdNdPtRecAcceptanceCuts(0) | |
33 | , fMultAcceptanceCuts(0) | |
34 | , fEsdTrackCuts(0) | |
35 | , fMultTrackCuts(0) | |
36 | , fUseMCInfo(kFALSE) | |
37 | , fAnalysisMode(AlidNdPtHelper::kTPC) | |
38 | , fTrigger(AliTriggerAnalysis::kMB1) | |
39 | , fTriggerClass(0) | |
40 | , fParticleMode(AlidNdPtHelper::kAllPart) | |
41 | , fPhysicsSelection(0) | |
42 | , fdNdPtBackgroundCuts(0) | |
43 | , fAnalyseOutput(kFALSE) | |
44 | , fMergeTHnSparse(kTRUE) | |
45 | , fTriggerMask(AliVEvent::kMB) | |
46 | { | |
47 | // default constructor | |
48 | } | |
49 | ||
50 | //_____________________________________________________________________________ | |
51 | AlidNdPt::AlidNdPt(Char_t* name, Char_t* title): TNamed(name,title) | |
52 | , fdNdPtEventCuts(0) | |
53 | , fdNdPtAcceptanceCuts(0) | |
54 | , fdNdPtRecAcceptanceCuts(0) | |
55 | , fMultAcceptanceCuts(0) | |
56 | , fEsdTrackCuts(0) | |
57 | , fMultTrackCuts(0) | |
58 | , fUseMCInfo(kFALSE) | |
59 | , fAnalysisMode(AlidNdPtHelper::kTPC) | |
60 | , fTrigger(AliTriggerAnalysis::kMB1) | |
61 | , fTriggerClass(0) | |
62 | , fParticleMode(AlidNdPtHelper::kAllPart) | |
63 | , fPhysicsSelection(0) | |
64 | , fdNdPtBackgroundCuts(0) | |
65 | , fAnalyseOutput(kFALSE) | |
66 | , fMergeTHnSparse(kTRUE) | |
67 | , fTriggerMask(AliVEvent::kMB) | |
68 | { | |
69 | // constructor | |
70 | } | |
71 | ||
72 | AlidNdPt::AlidNdPt(const AlidNdPt&): TNamed() | |
73 | , fdNdPtEventCuts(0) | |
74 | , fdNdPtAcceptanceCuts(0) | |
75 | , fdNdPtRecAcceptanceCuts(0) | |
76 | , fMultAcceptanceCuts(0) | |
77 | , fEsdTrackCuts(0) | |
78 | , fMultTrackCuts(0) | |
79 | , fUseMCInfo(kFALSE) | |
80 | , fAnalysisMode(AlidNdPtHelper::kTPC) | |
81 | , fTrigger(AliTriggerAnalysis::kMB1) | |
82 | , fTriggerClass(0) | |
83 | , fParticleMode(AlidNdPtHelper::kAllPart) | |
84 | , fPhysicsSelection(0) | |
85 | , fdNdPtBackgroundCuts(0) | |
86 | , fAnalyseOutput(kFALSE) | |
87 | , fMergeTHnSparse(kTRUE) | |
88 | , fTriggerMask(AliVEvent::kMB) | |
89 | { | |
90 | // not implemented | |
91 | } | |
92 | ||
93 | AlidNdPt& AlidNdPt::operator=(const AlidNdPt&) | |
94 | { | |
95 | // not implemented | |
96 | return *this; | |
97 | } | |
98 | ||
99 | //_____________________________________________________________________________ | |
100 | AlidNdPt::~AlidNdPt() { | |
101 | // destructor | |
102 | if(fdNdPtEventCuts) delete fdNdPtEventCuts; fdNdPtEventCuts=NULL; | |
103 | if(fdNdPtAcceptanceCuts) delete fdNdPtAcceptanceCuts; fdNdPtAcceptanceCuts=NULL; | |
104 | if(fMultAcceptanceCuts) delete fMultAcceptanceCuts; fMultAcceptanceCuts=NULL; | |
105 | if(fdNdPtRecAcceptanceCuts) delete fdNdPtRecAcceptanceCuts; fdNdPtRecAcceptanceCuts=NULL; | |
106 | if(fEsdTrackCuts) delete fEsdTrackCuts; fEsdTrackCuts=NULL; | |
107 | if(fMultTrackCuts) delete fMultTrackCuts; fMultTrackCuts=NULL; | |
108 | if(fPhysicsSelection) delete fPhysicsSelection; fPhysicsSelection=NULL; | |
109 | if(fdNdPtBackgroundCuts) delete fdNdPtBackgroundCuts; fdNdPtBackgroundCuts=NULL; | |
110 | } | |
111 | ||
112 | //_____________________________________________________________________________ | |
113 | Double_t * AlidNdPt::CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax) { | |
114 | // retun pointer to the array with log axis | |
115 | // it is user responsibility to delete the array | |
116 | ||
117 | Double_t logxmin = TMath::Log10(xmin); | |
118 | Double_t logxmax = TMath::Log10(xmax); | |
119 | Double_t binwidth = (logxmax-logxmin)/nbins; | |
120 | ||
121 | Double_t *xbins = new Double_t[nbins+1]; | |
122 | ||
123 | xbins[0] = xmin; | |
124 | for (Int_t i=1;i<=nbins;i++) { | |
125 | xbins[i] = xmin + TMath::Power(10,logxmin+i*binwidth); | |
126 | } | |
127 | ||
128 | return xbins; | |
129 | } | |
130 | //_____________________________________________________________________________ | |
131 | ||
132 | Double_t* AlidNdPt::CloneArray(Int_t n, Double_t* source) | |
133 | { | |
134 | if (!source || n==0) return 0; | |
135 | Double_t* dest = new Double_t[n]; | |
136 | for (Int_t i=0; i<n ; i++) { dest[i] = source[i]; } | |
137 | return dest; | |
138 | } |