// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
// of new IO (à la PHOS)
// --- ROOT system ---
-
+#include "AliLog.h"
#include "TObject.h"
class TTree;
virtual void SetInput(TTree *digitsTree);
virtual void SetOutput(TTree *clustersTree);
+ virtual void InitParameters() { AliInfo("Overload this method."); }
protected:
{
// ctor with the indication of the file where header Tree and digits Tree are stored
- InitParameters() ;
Init() ;
}
// use this contructor to avoid usage of Init() which uses runloader
// change needed by HLT - MP
- InitParameters() ;
-
// Note for the future: the use on runloader should be avoided or optional at least
// another way is to make Init virtual and protected at least such that the deriving classes can overload
// Init() ;
const AliEMCALRecParam* recParam = AliEMCALReconstructor::GetRecParam();
if(!recParam) {
AliFatal("Reconstruction parameters for EMCAL not set!");
- }
- else {
+ } else {
fECAClusteringThreshold = recParam->GetClusteringThreshold();
fECAW0 = recParam->GetW0();
fMinECut = recParam->GetMinECut();
fToUnfold = recParam->GetUnfold();
if(fToUnfold) AliWarning("Cluster Unfolding ON. Implementing only for eta=0 case!!!");
fECALocMaxCut = recParam->GetLocMaxCut();
-
+
AliDebug(1,Form("Reconstruction parameters: fECAClusteringThreshold=%.3f, fECAW=%.3f, fMinECut=%.3f, fToUnfold=%d, fECALocMaxCut=%.3f",
- fECAClusteringThreshold,fECAW0,fMinECut,fToUnfold,fECALocMaxCut));
+ fECAClusteringThreshold,fECAW0,fMinECut,fToUnfold,fECALocMaxCut));
}
}
Bool_t FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy,
Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
void Init() ;
- void InitParameters() ;
+ void InitParameters();
virtual void MakeUnfolding();
void UnfoldCluster(AliEMCALRecPoint * iniEmc, Int_t Nmax,
#include "AliRawReader.h"
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
-#include "AliEMCALRecParam.h"
#include "AliEMCALGeometry.h"
#include "AliEMCAL.h"
#include "AliEMCALHistoUtilities.h"
: fDebug(kFALSE), fList(0), fGeom(0)
{
// ctor
- InitRecParam();
fgRawUtils = new AliEMCALRawUtils;
fgClusterizer = new AliEMCALClusterizerv1;
fList = AliEMCALHistoUtilities::GetTriggersListOfHists(kTRUE);
}
-//____________________________________________________________________________
-void AliEMCALReconstructor::InitRecParam() const
-{
- // Check if the instance of AliEMCALRecParam exists,
- // if not, get it from OCDB if available, otherwise create a default one
-
- if(!fgkRecParam) {
- fgkRecParam = dynamic_cast<const AliEMCALRecParam*>(AliReconstructor::GetRecoParam(6));
- }
-
- if(!fgkRecParam){
- AliWarning("The Reconstruction parameters for EMCAL nonitialized - Used default one");
- fgkRecParam = new AliEMCALRecParam();
- }
-
-}
-
//____________________________________________________________________________
void AliEMCALReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const
{
AliCodeTimerAuto("")
ReadDigitsArrayFromTree(digitsTree);
-
+ fgClusterizer->InitParameters();
fgClusterizer->SetOutput(clustersTree);
if(fgDigitsArr && fgDigitsArr->GetEntries()) {
//must be done here because, in constructor, option is not yet known
fgRawUtils->SetOption(GetOption());
- fgRawUtils->SetRawFormatHighLowGainFactor(fgkRecParam->GetHighLowGainFactor());
- fgRawUtils->SetRawFormatOrder(fgkRecParam->GetOrderParameter());
- fgRawUtils->SetRawFormatTau(fgkRecParam->GetTau());
- fgRawUtils->SetNoiseThreshold(fgkRecParam->GetNoiseThreshold());
- fgRawUtils->SetNPedSamples(fgkRecParam->GetNPedSamples());
+ fgRawUtils->SetRawFormatHighLowGainFactor(GetRecParam()->GetHighLowGainFactor());
+ fgRawUtils->SetRawFormatOrder(GetRecParam()->GetOrderParameter());
+ fgRawUtils->SetRawFormatTau(GetRecParam()->GetTau());
+ fgRawUtils->SetNoiseThreshold(GetRecParam()->GetNoiseThreshold());
+ fgRawUtils->SetNPedSamples(GetRecParam()->GetNPedSamples());
fgRawUtils->Raw2Digits(rawReader,digitsArr);
//*-- Dmitri Peressounko (SUBATECH & Kurchatov Institute)
// --- ROOT system ---
-
+#include "AliEMCALRecParam.h"
#include "AliReconstructor.h"
#include "AliEMCALTracker.h"
void ReadDigitsArrayFromTree(TTree *digitsTree) const;
- void InitRecParam() const;
-
TList *GetList() {return fList;}
- static const AliEMCALRecParam* GetRecParam(){ return fgkRecParam;}
+ static const AliEMCALRecParam* GetRecParam() {
+ return dynamic_cast<const AliEMCALRecParam*>(AliReconstructor::GetRecoParam(6)); }
+
static TClonesArray* GetDigitsArr() {return fgDigitsArr;}
private:
AliEMCALGeometry *fGeom; // pointer to the EMCAL geometry
static AliEMCALClusterizer* fgClusterizer; // clusterizer
- static const AliEMCALRecParam* fgkRecParam; // reconstruction parameters for EMCAL
+ static const AliEMCALRecParam* fgkRecParam; // reconstruction
+ // parameters for EMCAL
static AliEMCALRawUtils* fgRawUtils; // raw utilities class -
// only need one per reco
static TClonesArray* fgDigitsArr; // Array with EMCAL digits
// and all collections to NULL.
// Output file name is set to a default value.
//
-
- InitParameters();
+ InitParameters();
}
//
//------------------------------------------------------------------------------