/* History of cvs commits:
*
- * $Log$
+ * $Log: AliPHOSClusterizerv1.h,v $
+ * Revision 1.54 2007/10/01 20:24:08 kharlov
+ * Memory leaks fixed
+ *
+ * Revision 1.53 2007/08/28 12:55:07 policheh
+ * Loaders removed from the reconstruction code (C.Cheshkov)
+ *
+ * Revision 1.52 2007/08/07 14:16:00 kharlov
+ * Quality assurance added (Yves Schutz)
+ *
+ * Revision 1.51 2007/04/11 11:55:45 policheh
+ * SetDistancesToBadChannels() added.
+ *
* Revision 1.50 2007/03/28 19:18:15 kharlov
* RecPoints recalculation in TSM removed
*
class AliPHOSDigit ;
class AliPHOSDigitizer ;
class AliPHOSGeometry ;
-class AliPHOSCalibData ;
class AliPHOSClusterizerv1 : public AliPHOSClusterizer {
public:
AliPHOSClusterizerv1() ;
- AliPHOSClusterizerv1(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::GetDefaultEventFolderName());
- AliPHOSClusterizerv1(const AliPHOSClusterizerv1 & clu) ;
+ AliPHOSClusterizerv1(AliPHOSGeometry *geom);
virtual ~AliPHOSClusterizerv1() ;
+
+ void InitParameters() ;
virtual Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ;
// Checks if digits are in neighbour cells
- virtual Float_t CalibrateCPV(Int_t amp, Int_t absId) ; // Tranforms CPV Amp to energy
- virtual Float_t CalibrateEMC(Float_t amp, Int_t absId) ; // Tranforms EMC Amp to energy
-
virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfEmcClusters ;
numb[1] = fNumberOfCpvClusters ; }
virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold; }
virtual Float_t GetCpvLocalMaxCut()const { return fCpvLocMaxCut;}
virtual Float_t GetCpvLogWeight()const { return fW0CPV;}
- virtual const char * GetRecPointsBranch() const{ return GetName() ;}
- virtual Int_t GetRecPointsInRun() const {return fRecPointsInRun ;}
+ virtual Float_t GetEcoreRadius()const { return fEcoreRadius;}
+ // virtual const char * GetRecPointsBranch() const{ return GetName() ;}
- virtual void Exec(Option_t *option); // Does the job
+ virtual void Digits2Clusters(Option_t *option);
void Print(const Option_t * = "")const ;
- void SetEmcMinE(Float_t e){fEmcMinE = e ;}
- void SetCpvMinE(Float_t e){fCpvMinE = e ;}
virtual void SetEmcClusteringThreshold(Float_t cluth) { fEmcClusteringThreshold = cluth ; }
virtual void SetEmcLocalMaxCut(Float_t cut) { fEmcLocMaxCut = cut ; }
virtual void SetEmcLogWeight(Float_t w) { fW0 = w ; }
virtual void SetCpvLocalMaxCut(Float_t cut) { fCpvLocMaxCut = cut ; }
virtual void SetCpvLogWeight(Float_t w) { fW0CPV = w ; }
virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold ;}
+ virtual void SetCoreRadius(Float_t coreRadius) { fEcoreRadius = coreRadius ;}
//Switch to "on flyght" mode, without writing to TreeR and file
void SetWriting(Bool_t toWrite = kFALSE){fWrite = toWrite;}
static Double_t ShowerShape(Double_t x, Double_t z) ; // Shape of EM shower used in unfolding;
//class member function (not object member function)
static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
// Chi^2 of the fit. Should be static to be passed to MINUIT
- void Unload() ;
+ // void Unload() ;
virtual const char * Version() const { return "clu-v1"; }
- virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
- { fIsOldRCUFormat = rcuFormat; };
-
protected:
void WriteRecPoints() ;
virtual Bool_t IsInEmc (AliPHOSDigit * digit)const ; // Tells if id digit is in EMC
virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ; // Tells if id digit is in CPV
void CleanDigits(TClonesArray * digits) ;
- void GetCalibrationParameters(void);
void SetDistancesToBadChannels();
-
- AliPHOSClusterizerv1 & operator = (const AliPHOSClusterizerv1 & obj);
-
+ virtual Float_t Calibrate(Float_t amp, Int_t absId) const ; // Tranforms ADC counts to energy
+ virtual Float_t CalibrateT(Float_t amp, Int_t absId) const ; //Tranforms Sample counts to sec.
+
private:
+ AliPHOSClusterizerv1(const AliPHOSClusterizerv1 & clu) ;
+ AliPHOSClusterizerv1 & operator = (const AliPHOSClusterizerv1 & obj);
- const TString BranchName() const ;
-
Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** MaxAt, Float_t * maxAtEnergy,
Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
void Init() ;
- void InitParameters() ;
virtual void MakeUnfolding() ;
void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax,
Bool_t fToUnfold ; // To perform unfolding
Bool_t fWrite ; // Write RecPoints to TreeR
+ Bool_t fDigitsUsed[53760]; //Mark digits as already used in cluster (EMC:5*56*64 ; CPV: 5*56*128)
Int_t fNumberOfEmcClusters ; // number of EMC clusters found
Int_t fNumberOfCpvClusters ; // number of CPV clusters found
- //Calibration parameters
- AliPHOSCalibData * fCalibData ; //! Calibration database if aval.
- Float_t fADCchanelEmc ; // width of one ADC channel in GeV
- Float_t fADCpedestalEmc ; //
- Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais'
- Float_t fADCpedestalCpv ; //
-
Float_t fEmcClusteringThreshold ; // minimum energy to start EMC cluster
Float_t fCpvClusteringThreshold ; // minimum energy to start CPV cluster
- Float_t fEmcMinE ; // minimum energy of digit to be included into cluster
- Float_t fCpvMinE ; // minimum energy of digit to be included into cluster
Float_t fEmcLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation
Float_t fCpvLocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster
Float_t fW0CPV ; // logarithmic weight for the CPV cluster center of gravity calculation
- Int_t fRecPointsInRun ; //! Total number of recpoints in one run
Float_t fEmcTimeGate ; // Maximum time difference between the digits in ont EMC cluster
+ Float_t fEcoreRadius ; // Radius within which the core energy is calculated, in cm
- Bool_t fIsOldRCUFormat; // assume old RCU raw data format
-
- ClassDef(AliPHOSClusterizerv1,4) // Clusterizer implementation version 1
+ ClassDef(AliPHOSClusterizerv1,7) // Clusterizer implementation version 1
};