]>
Commit | Line | Data |
---|---|---|
d15a28e7 | 1 | #ifndef ALIPHOSCLUSTERIZERV1_H |
2 | #define ALIPHOSCLUSTERIZERV1_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6ad0bfa0 | 6 | /* $Id$ */ |
7 | ||
b2a60966 | 8 | //_________________________________________________________________________ |
9 | // Implementation version 1 of the clusterization algorithm | |
baef0810 | 10 | // Performs clusterization (collects neighbouring active cells) and |
11 | // unfolding of the clusters with several local maxima. | |
12 | // results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints), | |
13 | // PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer | |
b2a60966 | 14 | // |
15 | //*-- Author: Yves Schutz (SUBATECH) | |
d15a28e7 | 16 | |
17 | // --- ROOT system --- | |
18 | ||
19 | // --- Standard library --- | |
20 | ||
21 | // --- AliRoot header files --- | |
22 | ||
23 | #include "AliPHOSClusterizer.h" | |
9a1398dd | 24 | class AliPHOSEmcRecPoint ; |
25 | class AliPHOSDigit ; | |
26 | class AliPHOSDigitizer ; | |
27 | class AliPHOSGeometry ; | |
d15a28e7 | 28 | |
29 | ||
30 | class AliPHOSClusterizerv1 : public AliPHOSClusterizer { | |
31 | ||
32 | public: | |
33 | ||
34 | AliPHOSClusterizerv1() ; // ctor | |
8a91f010 | 35 | AliPHOSClusterizerv1(const char * headerFile, const char * name = "Default"); |
9a1398dd | 36 | virtual ~AliPHOSClusterizerv1(){} // dtor |
d15a28e7 | 37 | |
9a1398dd | 38 | Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; |
39 | // Checks if digits are in neighbour cells | |
baef0810 | 40 | virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfEmcClusters ; |
41 | numb[1] = fNumberOfCpvClusters ; } | |
9a1398dd | 42 | |
43 | virtual Float_t GetEmcClusteringThreshold()const{ return fEmcClusteringThreshold;} | |
44 | virtual Float_t GetEmcLocalMaxCut()const { return fEmcLocMaxCut;} | |
45 | virtual Float_t GetEmcLogWeight()const { return fW0;} | |
46 | virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold; } | |
47 | virtual Float_t GetCpvLocalMaxCut()const { return fCpvLocMaxCut;} | |
48 | virtual Float_t GetCpvLogWeight()const { return fW0CPV;} | |
2b60655b | 49 | virtual Float_t GetPpsdClusteringThreshold() const { return fPpsdClusteringThreshold; } |
50 | virtual char * GetRecPointsBranch() const { return (char*) fRecPointsBranchTitle.Data() ;} | |
51 | virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;} | |
52 | virtual char * GetDigitsBranch() const { return (char*) fDigitsBranchTitle.Data() ;} | |
9a1398dd | 53 | |
54 | void Exec(Option_t *option); // Does the job | |
55 | ||
56 | virtual void Print(Option_t * option)const ; | |
57 | ||
d72dfbc3 | 58 | virtual void SetEmcClusteringThreshold(Float_t cluth) { fEmcClusteringThreshold = cluth ; } |
9a1398dd | 59 | virtual void SetEmcLocalMaxCut(Float_t cut) { fEmcLocMaxCut = cut ; } |
60 | virtual void SetEmcLogWeight(Float_t w) { fW0 = w ; } | |
ed4205d8 | 61 | virtual void SetCpvClusteringThreshold(Float_t cluth) { fCpvClusteringThreshold = cluth ; } |
9a1398dd | 62 | virtual void SetCpvLocalMaxCut(Float_t cut) { fCpvLocMaxCut = cut ; } |
63 | virtual void SetCpvLogWeight(Float_t w) { fW0CPV = w ; } | |
64 | virtual void SetPpsdClusteringThreshold(Float_t cluth) { fPpsdClusteringThreshold = cluth ; } | |
f035f6ce | 65 | virtual void SetDigitsBranch(const char * title) { fDigitsBranchTitle = title ;} |
66 | virtual void SetRecPointsBranch(const char *title){fRecPointsBranchTitle = title; } | |
9a1398dd | 67 | virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;} |
9a1398dd | 68 | static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding; |
69 | //class member function (not object member function) | |
7b7c1533 | 70 | static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ; |
71 | // Chi^2 of the fit. Should be static to be passes to MINUIT | |
72 | virtual const char * Version() const { return "clu-v1" ; } | |
9a1398dd | 73 | |
7b7c1533 | 74 | |
d15a28e7 | 75 | private: |
7b7c1533 | 76 | |
9a1398dd | 77 | virtual Float_t Calibrate(Int_t amp)const { return (amp-fPedestal)/fSlope ;} // Tranforms Amp to energy |
78 | Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, int * MaxAt, Float_t * maxAtEnergy, | |
baef0810 | 79 | Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit |
9a1398dd | 80 | void Init() ; |
81 | ||
82 | virtual Bool_t IsInEmc (AliPHOSDigit * digit)const ; // Tells if id digit is in EMC | |
83 | virtual Bool_t IsInPpsd(AliPHOSDigit * digit)const ; // Tells if id digit is in PPSD | |
84 | virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ; // Tells if id digit is in CPV | |
85 | ||
86 | virtual void MakeClusters( ) ; | |
87 | virtual void MakeUnfolding() ; | |
7b7c1533 | 88 | Bool_t ReadDigits(Int_t event) ; |
9a1398dd | 89 | void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax, |
90 | int * maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package | |
7b7c1533 | 91 | void WriteRecPoints(Int_t event) ; |
9a1398dd | 92 | void PrintRecPoints(Option_t * option) ; |
93 | ||
94 | private: | |
95 | ||
96 | TString fHeaderFileName ; // name of the file which contains gAlice, Tree headers etc. | |
97 | TString fDigitsBranchTitle ; // name of the file, where digits branch is stored | |
98 | TString fRecPointsBranchTitle ; // name of the file, where RecPoints branchs are stored | |
99 | ||
9a1398dd | 100 | Bool_t fToUnfold ; // To perform unfolding |
101 | ||
9a1398dd | 102 | |
ed4205d8 | 103 | Int_t fNumberOfEmcClusters ; // number of EMC clusters found |
9a1398dd | 104 | Int_t fNumberOfCpvClusters ; // number of CPV+PPSD clusters found |
7b7c1533 | 105 | |
9a1398dd | 106 | Float_t fPedestal ; // Calibration parameters |
107 | Float_t fSlope ; // read from Digitizer | |
108 | ||
b2a60966 | 109 | Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster |
b2a60966 | 110 | Float_t fPpsdClusteringThreshold ; // minimum energy to include a PPSD digit in a cluster |
ed4205d8 | 111 | Float_t fCpvClusteringThreshold ; // minimum energy to include a CPV digit in a cluster |
9a1398dd | 112 | Float_t fEmcLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster |
b2a60966 | 113 | Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation |
9a1398dd | 114 | Float_t fCpvLocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster |
d72dfbc3 | 115 | Float_t fW0CPV ; // logarithmic weight for the CPV cluster center of gravity calculation |
2b60655b | 116 | Int_t fRecPointsInRun ; //! Total number of recpoints in one run |
117 | ||
ed4205d8 | 118 | ClassDef(AliPHOSClusterizerv1,1) // Clusterizer implementation version 1 |
d15a28e7 | 119 | |
120 | }; | |
121 | ||
122 | #endif // AliPHOSCLUSTERIZERV1_H |