Service classes for jet production data.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Jun 2005 09:18:35 +0000 (09:18 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Jun 2005 09:18:35 +0000 (09:18 +0000)
JETAN/AliJetProductionData.cxx [new file with mode: 0644]
JETAN/AliJetProductionData.h [new file with mode: 0644]
JETAN/AliJetProductionDataPDC2004.cxx [new file with mode: 0644]
JETAN/AliJetProductionDataPDC2004.h [new file with mode: 0644]

diff --git a/JETAN/AliJetProductionData.cxx b/JETAN/AliJetProductionData.cxx
new file mode 100644 (file)
index 0000000..7b778e0
--- /dev/null
@@ -0,0 +1,77 @@
+/**************************************************************************
+ * 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.                  *
+ **************************************************************************/
+
+
+//---------------------------------------------------------------------
+// Service class for jet production data 
+// Author: Andreas Morsch
+// andreas.morsch@cern.ch
+//---------------------------------------------------------------------
+
+
+#include "AliJetProductionData.h"
+#include "AliLog.h"
+
+ClassImp(AliJetProductionData)
+////////////////////////////////////////////////////////////////////////
+
+AliJetProductionData::AliJetProductionData() 
+{
+  // Constructor
+    fNbins           = 0;   
+    fPtHardLimits    = 0x0;
+    fRunTitles       = 0x0;
+} 
+
+////////////////////////////////////////////////////////////////////////
+
+AliJetProductionData::~AliJetProductionData()
+{
+  // Destructor
+    delete fPtHardLimits;
+    delete fRunTitles;
+    
+}
+
+void AliJetProductionData::GetPtHardLimits(Int_t bin, Float_t& ptmin, Float_t& ptmax)
+{
+// Get pt_hard limits for given bin
+    if (bin >= 0 && bin < fNbins) {
+       ptmin = fPtHardLimits[bin];
+       ptmax = fPtHardLimits[bin + 1]; 
+    } else {
+       AliFatal("Bin out of range !");
+    }
+}
+
+TString AliJetProductionData::GetRunTitle(Int_t bin)
+{
+    // Get run title for given bin
+    
+    if (bin < 0 || bin >= fNbins) 
+       AliFatal("Bin out of range !");
+    
+    return fRunTitles[bin];
+}
+
+Float_t  AliJetProductionData::GetWeight(Int_t bin)
+{
+    // Get weight for given bin
+      if (bin < 0 || bin >= fNbins) 
+         AliFatal("Bin out of range !");
+      return fWeights[bin];
+}
diff --git a/JETAN/AliJetProductionData.h b/JETAN/AliJetProductionData.h
new file mode 100644 (file)
index 0000000..ee58a84
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef ALIJETPRODUCTIONDATA_H
+#define ALIJETPRODUCTIONDATA_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+//---------------------------------------------------------------------
+// Service class for jet production data 
+// Author: Andreas Morsch
+// andreas.morsch@cern.ch
+//---------------------------------------------------------------------
+
+#include <TObject.h>
+#include <TString.h>
+class AliJetProductionData : public TObject
+{
+ public:
+    AliJetProductionData();
+    ~AliJetProductionData();
+    Int_t   GetNumberOfPtHardBins() const {return fNbins;}
+    void    GetPtHardLimits(Int_t bin, Float_t& ptmin, Float_t& ptmax);
+    TString GetRunTitle(Int_t bin);
+    Float_t GetWeight(Int_t bin);
+ public:         
+    Int_t     fNbins;         // Number of pt_hard bins used in the production
+    Float_t*  fPtHardLimits;  //[fNbins+1]
+    Float_t*  fWeights;       //[fNbins]
+    TString*  fRunTitles;     //[fNbins]
+    
+ private: 
+    ClassDef(AliJetProductionData, 1)
+};
+#endif
diff --git a/JETAN/AliJetProductionDataPDC2004.cxx b/JETAN/AliJetProductionDataPDC2004.cxx
new file mode 100644 (file)
index 0000000..86a9670
--- /dev/null
@@ -0,0 +1,68 @@
+/**************************************************************************
+ * 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.                  *
+ **************************************************************************/
+
+
+//---------------------------------------------------------------------
+// Service class for jet production data 
+// Author: Andreas Morsch
+// andreas.morsch@cern.ch
+//---------------------------------------------------------------------
+
+
+#include "AliJetProductionDataPDC2004.h"
+ClassImp(AliJetProductionDataPDC2004)
+////////////////////////////////////////////////////////////////////////
+
+AliJetProductionDataPDC2004::AliJetProductionDataPDC2004() 
+{
+  // Constructor
+    const Float_t kPthard[13] = 
+       {20., 24., 29., 35., 42., 50., 60., 72., 86., 104., 125., 150., 180.};
+
+    const TString kRunTitle[12] = 
+       {"20-24GeV",  "24-29GeV",   "29-35GeV",   "35-42GeV", "42-50GeV", "50-60GeV", "60-72GeV", "72-86GeV"
+        "86-104GeV", "104-125GeV", "125-150GeV", "150-180GeV"};
+    
+    const Float_t kXsection[12]  =
+       {1.10e-1, 6.00e-2, 2.00e-2, 1.16e-2, 5.33e-3, 2.68e-3, 1.22e-3, 5.26e-4, 2.53e-4, 1.00e-4, 4.44e-5, 1.84e-5};   
+
+    const Float_t kGeneratedOverSelected[12] = 
+       {2.67,   2.68,    2.47,    2.5,    2.3,    2.2,    2.1,    2.0,    1.9,    1.90,    1.7,    1.61};
+    
+           
+    fNbins     = 12;   
+    fPtHardLimits    = new Float_t[fNbins + 1];
+    fRunTitles       = new TString[fNbins];
+    fWeights         = new Float_t[fNbins];
+    Int_t i;
+    
+    for (i = 0; i < fNbins +1; i++) {
+       fPtHardLimits[i] = kPthard[i];
+    }
+
+    for (i = 0; i < fNbins; i++) {
+       fRunTitles[i] = kRunTitle[i];
+       fWeights[i]   = kXsection[i] /  kGeneratedOverSelected[i];
+    }
+} 
+
+////////////////////////////////////////////////////////////////////////
+
+AliJetProductionDataPDC2004::~AliJetProductionDataPDC2004()
+{
+  // Destructor
+}
diff --git a/JETAN/AliJetProductionDataPDC2004.h b/JETAN/AliJetProductionDataPDC2004.h
new file mode 100644 (file)
index 0000000..01caaa1
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef ALIJETPRODUCTIONDATAPDC2004_H
+#define ALIJETPRODUCTIONDATAPDC2004_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+//---------------------------------------------------------------------
+// Service class for jet production data
+// Physics Data Challenge 2004
+// Author: Andreas Morsch
+// andreas.morsch@cern.ch
+//---------------------------------------------------------------------
+#include <AliJetProductionData.h>
+class AliJetProductionDataPDC2004 : public AliJetProductionData
+{
+ public:
+   AliJetProductionDataPDC2004();
+  ~AliJetProductionDataPDC2004();
+ private:
+  ClassDef(AliJetProductionDataPDC2004, 1)
+};
+#endif