new class AliOADBCentrality
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Feb 2011 09:08:54 +0000 (09:08 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Feb 2011 09:08:54 +0000 (09:08 +0000)
OADB/AliOADBCentrality.cxx [new file with mode: 0644]
OADB/AliOADBCentrality.h [new file with mode: 0644]
OADB/CMakelibOADB.pkg
OADB/OADBLinkDef.h

diff --git a/OADB/AliOADBCentrality.cxx b/OADB/AliOADBCentrality.cxx
new file mode 100644 (file)
index 0000000..a0f0d2b
--- /dev/null
@@ -0,0 +1,58 @@
+/**************************************************************************
+ * Copyright(c) 1998-2007, 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.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+//     OADB class for run dependent centrality scaling and 
+//     data for centrality determination
+//     Author: Andreas Morsch, CERN
+//-------------------------------------------------------------------------
+
+
+
+
+#include "AliOADBCentrality.h"
+ClassImp(AliOADBCentrality);
+
+//______________________________________________________________________________
+AliOADBCentrality::AliOADBCentrality() : 
+  TNamed(),
+  fV0MScaleFactor(1.),
+  fSPDScaleFactor(1.),
+  fTPCScaleFactor(1.),
+  f1DHistos(),
+  f2DHistos()
+{
+  // Default constructor
+}
+
+AliOADBCentrality::AliOADBCentrality(char* name) : 
+  TNamed(name, "Centrality Scaling"),
+  fV0MScaleFactor(1.),
+  fSPDScaleFactor(1.),
+  fTPCScaleFactor(1.),
+  f1DHistos(),
+  f2DHistos()
+{
+  // Constructor
+}
+
+
+//______________________________________________________________________________
+AliOADBCentrality::~AliOADBCentrality() 
+{
+  // destructor
+}
diff --git a/OADB/AliOADBCentrality.h b/OADB/AliOADBCentrality.h
new file mode 100644 (file)
index 0000000..aae5a3b
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef AliOADBCentrality_H
+#define AliOADBCentrality_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+//     OADB class for run dependent centrality scaling factors and 
+//     data for centrality determination
+//     Author: Andreas Morsch, CERN
+//-------------------------------------------------------------------------
+
+#include <TNamed.h>
+#include <TList.h>
+#include <TH1F.h>
+#include <TH2F.h>
+
+
+class AliOADBCentrality : public TNamed {
+
+ public :
+  AliOADBCentrality();
+  AliOADBCentrality(char* name);
+  virtual ~AliOADBCentrality();
+  Float_t V0MScaleFactor() const  {return fV0MScaleFactor;}
+  Float_t SPDScaleFactor() const  {return fSPDScaleFactor;}
+  Float_t TPCScaleFactor() const  {return fTPCScaleFactor;}
+  TH1F*   V0hist()         const  {return ((TH1F*) (Hists1D()->FindObject("hmultV0_percentile")));}
+  TH1F*   TPChist()        const  {return ((TH1F*) (Hists1D()->FindObject("hNtracks_percentile")));}
+  TH1F*   SPDhist()        const  {return ((TH1F*) (Hists1D()->FindObject("hNclusters1_percentile")));}
+  TH2F*   ZEMvsZDChist()   const  {return ((TH2F*) (Hists2D()->FindObject("hEzemvsEzdc_all_percentile")));}
+  TList*  Hists1D()        const  {return f1DHistos;}
+  TList*  Hists2D()        const  {return f2DHistos;}
+  void    SetScaleFactors(Float_t v0m, Float_t spd, Float_t tpc)
+      {fV0MScaleFactor = v0m; fSPDScaleFactor = spd; fTPCScaleFactor = tpc;}
+  void    SetHistReferences(TList* l1, TList* l2)
+      {f1DHistos = l1; f2DHistos = l2;}
+ private:
+  AliOADBCentrality(const AliOADBCentrality& cont); 
+  AliOADBCentrality& operator=(const AliOADBCentrality& cont);
+
+ private:
+  Float_t fV0MScaleFactor; // V0  scale factor
+  Float_t fSPDScaleFactor; // SPD scale factor
+  Float_t fTPCScaleFactor; // TPC scale factor
+  TList*    f1DHistos; // Reference to list of 1D Centrality histos 
+  TList*    f2DHistos; // Reference to list of 2D Centrality histos
+  ClassDef(AliOADBCentrality, 1);
+};
+
+#endif
index 446a362..d728656 100644 (file)
@@ -1,5 +1,5 @@
 #-*- Mode: CMake -*-
-set ( SRCS  AliOADBContainer.cxx)
+set ( SRCS  AliOADBContainer.cxx AliOADBCentrality.cxx)
 
 string(REPLACE ".cxx" ".h" HDRS  "${SRCS}")
 
@@ -11,4 +11,4 @@ set ( EXPORT ${HDRS})
 # Install data to destination 
 install (DIRECTORY COMMON PWG1 PWG2 PWG3 PWG4 
          DESTINATION OADB 
-        PATTERN ".svn" EXCLUDE)
\ No newline at end of file
+        PATTERN ".svn" EXCLUDE)
index c37d91a..f85b2d7 100644 (file)
@@ -10,4 +10,5 @@
  
 
 #pragma link C++ class AliOADBContainer+;
+#pragma link C++ class AliOADBCentrality+;
 #endif