end-of-line normalization
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / dNdPt / AlidNdPt.cxx
index 32259b4..7b62581 100644 (file)
-/**************************************************************************\r
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
- *                                                                        *\r
- * Author: The ALICE Off-line Project.                                    *\r
- * Contributors are mentioned in the code where appropriate.              *\r
- *                                                                        *\r
- * Permission to use, copy, modify and distribute this software and its   *\r
- * documentation strictly for non-commercial purposes is hereby granted   *\r
- * without fee, provided that the above copyright notice appears in all   *\r
- * copies and that both the copyright notice and this permission notice   *\r
- * appear in the supporting documentation. The authors make no claims     *\r
- * about the suitability of this software for any purpose. It is          *\r
- * provided "as is" without express or implied warranty.                  *\r
- **************************************************************************/\r
- // last change: 2013-06-13 by M.Knichel\r
-\r
-#include "AliESDtrackCuts.h"  \r
-#include "AlidNdPtEventCuts.h"\r
-#include "AlidNdPtAcceptanceCuts.h"\r
-#include "AliPhysicsSelection.h"\r
-#include "AlidNdPtBackgroundCuts.h"\r
-#include "AlidNdPt.h"\r
-\r
-using namespace std;\r
-\r
-ClassImp(AlidNdPt)\r
-\r
-//_____________________________________________________________________________\r
-AlidNdPt::AlidNdPt(): TNamed()\r
-, fdNdPtEventCuts(0)\r
-, fdNdPtAcceptanceCuts(0)\r
-, fdNdPtRecAcceptanceCuts(0)\r
-, fMultAcceptanceCuts(0)\r
-, fEsdTrackCuts(0)\r
-, fMultTrackCuts(0)\r
-, fUseMCInfo(kFALSE)\r
-, fAnalysisMode(AlidNdPtHelper::kTPC) \r
-, fTrigger(AliTriggerAnalysis::kMB1) \r
-, fTriggerClass(0) \r
-, fParticleMode(AlidNdPtHelper::kAllPart) \r
-, fPhysicsSelection(0)\r
-, fdNdPtBackgroundCuts(0)\r
-, fAnalyseOutput(kFALSE)\r
-, fMergeTHnSparse(kTRUE)\r
-, fTriggerMask(AliVEvent::kMB)\r
-{\r
-  // default constructor\r
-}\r
-\r
-//_____________________________________________________________________________\r
-AlidNdPt::AlidNdPt(Char_t* name, Char_t* title): TNamed(name,title)\r
-, fdNdPtEventCuts(0)\r
-, fdNdPtAcceptanceCuts(0)\r
-, fdNdPtRecAcceptanceCuts(0)\r
-, fMultAcceptanceCuts(0)\r
-, fEsdTrackCuts(0)\r
-, fMultTrackCuts(0)\r
-, fUseMCInfo(kFALSE)\r
-, fAnalysisMode(AlidNdPtHelper::kTPC) \r
-, fTrigger(AliTriggerAnalysis::kMB1) \r
-, fTriggerClass(0) \r
-, fParticleMode(AlidNdPtHelper::kAllPart) \r
-, fPhysicsSelection(0)\r
-, fdNdPtBackgroundCuts(0)\r
-, fAnalyseOutput(kFALSE)\r
-, fMergeTHnSparse(kTRUE)\r
-, fTriggerMask(AliVEvent::kMB)\r
-{\r
-  // constructor\r
-}\r
-\r
-AlidNdPt::AlidNdPt(const AlidNdPt&): TNamed()\r
-, fdNdPtEventCuts(0)\r
-, fdNdPtAcceptanceCuts(0)\r
-, fdNdPtRecAcceptanceCuts(0)\r
-, fMultAcceptanceCuts(0)\r
-, fEsdTrackCuts(0)\r
-, fMultTrackCuts(0)\r
-, fUseMCInfo(kFALSE)\r
-, fAnalysisMode(AlidNdPtHelper::kTPC) \r
-, fTrigger(AliTriggerAnalysis::kMB1) \r
-, fTriggerClass(0) \r
-, fParticleMode(AlidNdPtHelper::kAllPart) \r
-, fPhysicsSelection(0)\r
-, fdNdPtBackgroundCuts(0)\r
-, fAnalyseOutput(kFALSE)\r
-, fMergeTHnSparse(kTRUE)\r
-, fTriggerMask(AliVEvent::kMB)\r
-{\r
-  // not implemented\r
-}\r
-\r
-AlidNdPt& AlidNdPt::operator=(const AlidNdPt&)\r
-{\r
-  // not implemented\r
-  return *this;\r
-}\r
-\r
-//_____________________________________________________________________________\r
-AlidNdPt::~AlidNdPt() {\r
-  // destructor\r
-  if(fdNdPtEventCuts) delete fdNdPtEventCuts; fdNdPtEventCuts=NULL; \r
-  if(fdNdPtAcceptanceCuts) delete fdNdPtAcceptanceCuts; fdNdPtAcceptanceCuts=NULL;\r
-  if(fMultAcceptanceCuts) delete fMultAcceptanceCuts; fMultAcceptanceCuts=NULL;\r
-  if(fdNdPtRecAcceptanceCuts) delete fdNdPtRecAcceptanceCuts; fdNdPtRecAcceptanceCuts=NULL;  \r
-  if(fEsdTrackCuts) delete fEsdTrackCuts; fEsdTrackCuts=NULL;\r
-  if(fMultTrackCuts) delete fMultTrackCuts; fMultTrackCuts=NULL;\r
-  if(fPhysicsSelection) delete fPhysicsSelection; fPhysicsSelection=NULL;\r
-  if(fdNdPtBackgroundCuts) delete fdNdPtBackgroundCuts; fdNdPtBackgroundCuts=NULL;\r
-}\r
-\r
-//_____________________________________________________________________________\r
-Double_t * AlidNdPt::CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax) {\r
-  // retun pointer to the array with log axis\r
-  // it is user responsibility to delete the array\r
\r
-  Double_t logxmin = TMath::Log10(xmin);\r
-  Double_t logxmax = TMath::Log10(xmax);\r
-  Double_t binwidth = (logxmax-logxmin)/nbins;\r
-  \r
-  Double_t *xbins =  new Double_t[nbins+1];\r
-\r
-  xbins[0] = xmin;\r
-  for (Int_t i=1;i<=nbins;i++) {\r
-    xbins[i] = xmin + TMath::Power(10,logxmin+i*binwidth);\r
-  }\r
-\r
-return xbins;\r
-}\r
-//_____________________________________________________________________________\r
-\r
-Double_t* AlidNdPt::CloneArray(Int_t n, Double_t* source)\r
-{\r
-    if (!source || n==0) return 0;\r
-    Double_t* dest = new Double_t[n];\r
-    for (Int_t i=0; i<n ; i++) { dest[i] = source[i]; }\r
-    return dest;\r
-}\r
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+ // last change: 2013-06-13 by M.Knichel
+
+#include "AliESDtrackCuts.h"  
+#include "AlidNdPtEventCuts.h"
+#include "AlidNdPtAcceptanceCuts.h"
+#include "AliPhysicsSelection.h"
+#include "AlidNdPtBackgroundCuts.h"
+#include "AlidNdPt.h"
+
+using namespace std;
+
+ClassImp(AlidNdPt)
+
+//_____________________________________________________________________________
+AlidNdPt::AlidNdPt(): TNamed()
+, fdNdPtEventCuts(0)
+, fdNdPtAcceptanceCuts(0)
+, fdNdPtRecAcceptanceCuts(0)
+, fMultAcceptanceCuts(0)
+, fEsdTrackCuts(0)
+, fMultTrackCuts(0)
+, fUseMCInfo(kFALSE)
+, fAnalysisMode(AlidNdPtHelper::kTPC) 
+, fTrigger(AliTriggerAnalysis::kMB1) 
+, fTriggerClass(0) 
+, fParticleMode(AlidNdPtHelper::kAllPart) 
+, fPhysicsSelection(0)
+, fdNdPtBackgroundCuts(0)
+, fAnalyseOutput(kFALSE)
+, fMergeTHnSparse(kTRUE)
+, fTriggerMask(AliVEvent::kMB)
+{
+  // default constructor
+}
+
+//_____________________________________________________________________________
+AlidNdPt::AlidNdPt(Char_t* name, Char_t* title): TNamed(name,title)
+, fdNdPtEventCuts(0)
+, fdNdPtAcceptanceCuts(0)
+, fdNdPtRecAcceptanceCuts(0)
+, fMultAcceptanceCuts(0)
+, fEsdTrackCuts(0)
+, fMultTrackCuts(0)
+, fUseMCInfo(kFALSE)
+, fAnalysisMode(AlidNdPtHelper::kTPC) 
+, fTrigger(AliTriggerAnalysis::kMB1) 
+, fTriggerClass(0) 
+, fParticleMode(AlidNdPtHelper::kAllPart) 
+, fPhysicsSelection(0)
+, fdNdPtBackgroundCuts(0)
+, fAnalyseOutput(kFALSE)
+, fMergeTHnSparse(kTRUE)
+, fTriggerMask(AliVEvent::kMB)
+{
+  // constructor
+}
+
+AlidNdPt::AlidNdPt(const AlidNdPt&): TNamed()
+, fdNdPtEventCuts(0)
+, fdNdPtAcceptanceCuts(0)
+, fdNdPtRecAcceptanceCuts(0)
+, fMultAcceptanceCuts(0)
+, fEsdTrackCuts(0)
+, fMultTrackCuts(0)
+, fUseMCInfo(kFALSE)
+, fAnalysisMode(AlidNdPtHelper::kTPC) 
+, fTrigger(AliTriggerAnalysis::kMB1) 
+, fTriggerClass(0) 
+, fParticleMode(AlidNdPtHelper::kAllPart) 
+, fPhysicsSelection(0)
+, fdNdPtBackgroundCuts(0)
+, fAnalyseOutput(kFALSE)
+, fMergeTHnSparse(kTRUE)
+, fTriggerMask(AliVEvent::kMB)
+{
+  // not implemented
+}
+
+AlidNdPt& AlidNdPt::operator=(const AlidNdPt&)
+{
+  // not implemented
+  return *this;
+}
+
+//_____________________________________________________________________________
+AlidNdPt::~AlidNdPt() {
+  // destructor
+  if(fdNdPtEventCuts) delete fdNdPtEventCuts; fdNdPtEventCuts=NULL; 
+  if(fdNdPtAcceptanceCuts) delete fdNdPtAcceptanceCuts; fdNdPtAcceptanceCuts=NULL;
+  if(fMultAcceptanceCuts) delete fMultAcceptanceCuts; fMultAcceptanceCuts=NULL;
+  if(fdNdPtRecAcceptanceCuts) delete fdNdPtRecAcceptanceCuts; fdNdPtRecAcceptanceCuts=NULL;  
+  if(fEsdTrackCuts) delete fEsdTrackCuts; fEsdTrackCuts=NULL;
+  if(fMultTrackCuts) delete fMultTrackCuts; fMultTrackCuts=NULL;
+  if(fPhysicsSelection) delete fPhysicsSelection; fPhysicsSelection=NULL;
+  if(fdNdPtBackgroundCuts) delete fdNdPtBackgroundCuts; fdNdPtBackgroundCuts=NULL;
+}
+
+//_____________________________________________________________________________
+Double_t * AlidNdPt::CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax) {
+  // retun pointer to the array with log axis
+  // it is user responsibility to delete the array
+  Double_t logxmin = TMath::Log10(xmin);
+  Double_t logxmax = TMath::Log10(xmax);
+  Double_t binwidth = (logxmax-logxmin)/nbins;
+  
+  Double_t *xbins =  new Double_t[nbins+1];
+
+  xbins[0] = xmin;
+  for (Int_t i=1;i<=nbins;i++) {
+    xbins[i] = xmin + TMath::Power(10,logxmin+i*binwidth);
+  }
+
+return xbins;
+}
+//_____________________________________________________________________________
+
+Double_t* AlidNdPt::CloneArray(Int_t n, Double_t* source)
+{
+    if (!source || n==0) return 0;
+    Double_t* dest = new Double_t[n];
+    for (Int_t i=0; i<n ; i++) { dest[i] = source[i]; }
+    return dest;
+}