]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALRawUtils.cxx
added cutoff parameter in z direction to ignore clusters of large z (Gaute)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRawUtils.cxx
index 300afc9c762ac115f4e4045a2b2681ad88c41060..1eb5826c9df1349d160a156bb7959d85b4633fa1 100644 (file)
@@ -69,6 +69,7 @@
 #include "AliEMCALGeometry.h"
 #include "AliEMCALDigitizer.h"
 #include "AliEMCALDigit.h"
+#include "AliEMCAL.h"
 
 ClassImp(AliEMCALRawUtils)
 
@@ -117,6 +118,38 @@ AliEMCALRawUtils::AliEMCALRawUtils()
 
 }
 
+//____________________________________________________________________________
+AliEMCALRawUtils::AliEMCALRawUtils(AliEMCALGeometry *pGeometry)
+  : fHighLowGainFactor(0.), fOrder(0), fTau(0.), fNoiseThreshold(0),
+    fNPedSamples(0), fGeom(pGeometry), fOption("")
+{
+  //
+  // Initialize with the given geometry - constructor required by HLT
+  // HLT does not use/support AliRunLoader(s) instances
+  // This is a minimum intervention solution
+  // Comment by MPloskon@lbl.gov
+  //
+
+  //These are default parameters. 
+  //Can be re-set from without with setter functions 
+  fHighLowGainFactor = 16. ;          // adjusted for a low gain range of 82 GeV (10 bits)
+  fOrder = 2;                         // order of gamma fn
+  fTau = 2.35;                        // in units of timebin, from CERN 2007 testbeam
+  fNoiseThreshold = 3;
+  fNPedSamples = 5;
+
+  //Get Mapping RCU files from the AliEMCALRecParam
+  const TObjArray* maps = AliEMCALRecParam::GetMappings();
+  if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
+
+  for(Int_t i = 0; i < 2; i++) {
+    fMapping[i] = (AliAltroMapping*)maps->At(i);
+  }
+
+  if(!fGeom) AliFatal(Form("Could not get geometry!"));
+
+}
+
 //____________________________________________________________________________
 AliEMCALRawUtils::AliEMCALRawUtils(const AliEMCALRawUtils& rawU)
   : TObject(),
@@ -275,12 +308,6 @@ void AliEMCALRawUtils::Raw2Digits(AliRawReader* reader,TClonesArray *digitsArr)
   // Select EMCAL DDL's;
   reader->Select("EMCAL");
 
-  TString option = GetOption();
-  if (option.Contains("OldRCUFormat"))
-    in.SetOldRCUFormat(kTRUE); // Needed for testbeam data
-  else
-    in.SetOldRCUFormat(kFALSE);
-
   //Updated fitting routine from 2007 beam test takes into account
   //possibility of two peaks in data and selects first one for fitting
   //Also sets some of the starting parameters based on the shape of the