// Author: Boris Polichtchouk.
// --- AliRoot header files ---
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
+#include "AliLog.h"
#include "AliPHOSRecoParam.h"
ClassImp(AliPHOSRecoParam)
+TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings
+
//-----------------------------------------------------------------------------
-AliPHOSRecoParam::AliPHOSRecoParam() : TNamed(),
- fClusteringThreshold(9999),fLocMaxCut(9999),fMinE(9999),fW0(9999),
- fSubtractPedestals(kTRUE),fDecoderVersion("")
+AliPHOSRecoParam::AliPHOSRecoParam() :
+ AliDetectorRecoParam(),
+ fEMCClusteringThreshold(0.2),
+ fEMCLocMaxCut(0.03),
+ fEMCRawDigitThreshold(2),
+ fEMCMinE(0.012),
+ fEMCW0(4.5),
+ fEMCSampleQualityCut(1.),
+ fEMCEcoreRadius(3.),
+ fEMCEcore2ESD(kFALSE),
+ fEMCSubtractPedestals(kTRUE),
+ fEMCUnfold(kTRUE),
+ fEMCEnergyCorrectionOn(kTRUE),
+ fEMCDecoderVersion(""),
+ fGlobalAltroOffset(0),
+ fGlobalAltroThreshold(0),
+ fCPVClusteringThreshold(0.0),
+ fCPVLocMaxCut(0.03),
+ fCPVMinE(0.0),
+ fCPVW0(4.0),
+ fCPVUnfold(kTRUE)
{
//Default constructor.
}
//-----------------------------------------------------------------------------
-AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& recoParam):
- TNamed(recoParam),fClusteringThreshold(recoParam.fClusteringThreshold),
- fLocMaxCut(recoParam.fLocMaxCut),fMinE(recoParam.fMinE),fW0(recoParam.fW0),
- fSubtractPedestals(recoParam.fSubtractPedestals),fDecoderVersion(recoParam.fDecoderVersion)
+AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ):
+ AliDetectorRecoParam(),
+ fEMCClusteringThreshold(0.2),
+ fEMCLocMaxCut(0.03),
+ fEMCRawDigitThreshold(2),
+ fEMCMinE(0.012),
+ fEMCW0(4.5),
+ fEMCSampleQualityCut(1.),
+ fEMCEcoreRadius(3.),
+ fEMCEcore2ESD(kFALSE),
+ fEMCSubtractPedestals(kTRUE),
+ fEMCUnfold(kTRUE),
+ fEMCEnergyCorrectionOn(kTRUE),
+ fEMCDecoderVersion(""),
+ fGlobalAltroOffset(0),
+ fGlobalAltroThreshold(0),
+ fCPVClusteringThreshold(0.0),
+ fCPVLocMaxCut(0.03),
+ fCPVMinE(0.0),
+ fCPVW0(4.0),
+ fCPVUnfold(kTRUE)
{
//Copy constructor.
}
//Assignment operator.
if(this != &recoParam) {
- fClusteringThreshold = recoParam.fClusteringThreshold;
- fLocMaxCut = recoParam.fLocMaxCut;
- fMinE = recoParam.fMinE;
- fW0 = recoParam.fW0;
- fSubtractPedestals = recoParam.fSubtractPedestals;
- fDecoderVersion=recoParam.fDecoderVersion ;
+ fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold;
+ fEMCLocMaxCut = recoParam.fEMCLocMaxCut;
+ fEMCRawDigitThreshold = recoParam.fEMCRawDigitThreshold;
+ fEMCMinE = recoParam.fEMCMinE;
+ fEMCW0 = recoParam.fEMCW0;
+ fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut;
+ fEMCEcoreRadius = recoParam.fEMCEcoreRadius;
+ fEMCEcore2ESD = recoParam.fEMCEcore2ESD;
+ fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals;
+ fEMCUnfold = recoParam.fEMCUnfold;
+ fEMCEnergyCorrectionOn = recoParam.fEMCEnergyCorrectionOn;
+ fEMCDecoderVersion = recoParam.fEMCDecoderVersion;
+ fGlobalAltroOffset = recoParam.fGlobalAltroOffset;
+ fGlobalAltroThreshold = recoParam.fGlobalAltroThreshold;
+ fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold;
+ fCPVLocMaxCut = recoParam.fCPVLocMaxCut;
+ fCPVMinE = recoParam.fCPVMinE;
+ fCPVW0 = recoParam.fCPVW0;
+ fCPVUnfold = recoParam.fCPVUnfold;
}
return *this;
}
+//-----------------------------------------------------------------------------
+void AliPHOSRecoParam::Print(Option_t * /*option*/) const
+{
+ AliDebug(2,Form("PHOS reconstruction parameters:\n"
+ "\tEMCClusteringThreshold = %f\n"
+ "\tEMCLocMaxCut = %f\n"
+ "\tEMCRawDigitThreshold = %f\n"
+ "\tEMCMinE = %f\n"
+ "\tEMCW0 = %f\n"
+ "\tEMCSampleQualityCut = %f\n"
+ "\tEMCEcoreRadius = %f\n"
+ "\tEMCEcore2ESD = %d\n"
+ "\tEMCSubtractPedestals = %d\n"
+ "\tEMCUnfold = %d\n"
+ "\tEMCEnergyCorrectionOn = %d\n"
+ "\tEMCDecoderVersion = \"%s\"\n"
+ "\tGlobalAltroOffset = %d",
+ "\tGlobalAltroThreshold = %d",
+ fEMCClusteringThreshold,
+ fEMCLocMaxCut,
+ fEMCRawDigitThreshold,
+ fEMCMinE,
+ fEMCW0,
+ fEMCSampleQualityCut,
+ fEMCEcoreRadius,
+ fEMCEcore2ESD,
+ fEMCSubtractPedestals,
+ fEMCUnfold,
+ fEMCEnergyCorrectionOn,
+ fEMCDecoderVersion.Data(),
+ fGlobalAltroOffset,
+ fGlobalAltroThreshold));
+
+}
+
+//-----------------------------------------------------------------------------
+AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters()
+{
+ //Default parameters for the reconstruction
+
+ AliPHOSRecoParam* params = new AliPHOSRecoParam();
+ return params;
+}
+
+//-----------------------------------------------------------------------------
+const TObjArray* AliPHOSRecoParam::GetMappings()
+{
+ //Returns array of AliAltroMappings for RCU0..RCU3.
+ //If not found, read it from OCDB.
+
+ //Quick check as follows:
+ // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ // root [1] AliCDBManager::Instance()->SetRun(1);
+ // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings();
+ // root [3] maps->Print();
+
+ if(fgkMaps) return fgkMaps;
+
+ AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
+ if(entry)
+ fgkMaps = (TObjArray*)entry->GetObject();
+
+ return fgkMaps;
+
+}