]>
Commit | Line | Data |
---|---|---|
483b0559 | 1 | #ifndef ALIEMCALCLUSTERIZERV1_H |
2 | #define ALIEMCALCLUSTERIZERV1_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
9 | // Implementation version 1 of the clusterization algorithm | |
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 | |
14 | // | |
15 | //*-- Author: Yves Schutz (SUBATECH) | |
16 | ||
17 | // --- ROOT system --- | |
18 | ||
19 | // --- Standard library --- | |
20 | ||
21 | // --- AliRoot header files --- | |
22 | ||
23 | #include "AliEMCALClusterizer.h" | |
24 | class AliEMCALTowerRecPoint ; | |
25 | class AliEMCALDigit ; | |
26 | class AliEMCALDigitizer ; | |
27 | class AliEMCALGeometry ; | |
28 | ||
29 | ||
30 | class AliEMCALClusterizerv1 : public AliEMCALClusterizer { | |
31 | ||
32 | public: | |
33 | ||
34 | AliEMCALClusterizerv1() ; | |
35 | AliEMCALClusterizerv1(const char * headerFile, const char * name = "Default"); | |
36 | virtual ~AliEMCALClusterizerv1() ; | |
37 | ||
38 | virtual Int_t AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const ; | |
39 | // Checks if digits are in neighbour cells | |
40 | ||
ef305168 | 41 | const TString BranchName() const ; |
483b0559 | 42 | virtual Float_t Calibrate(Int_t amp, Bool_t inpresho)const ; // Tranforms Amp to energy |
43 | ||
44 | virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfTowerClusters ; | |
45 | numb[1] = fNumberOfPreShoClusters ; } | |
46 | ||
47 | virtual Float_t GetEmcClusteringThreshold()const{ return fTowerClusteringThreshold;} | |
48 | virtual Float_t GetEmcLocalMaxCut()const { return fTowerLocMaxCut;} | |
49 | virtual Float_t GetEmcLogWeight()const { return fW0;} | |
50 | virtual Float_t GetTimeGate() const { return fTimeGate ; } | |
51 | virtual Float_t GetCpvClusteringThreshold()const{ return fPreShoClusteringThreshold; } | |
52 | virtual Float_t GetCpvLocalMaxCut()const { return fPreShoLocMaxCut;} | |
53 | virtual Float_t GetCpvLogWeight()const { return fW0CPV;} | |
54 | virtual char * GetRecPointsBranch() const { return (char*) fRecPointsBranchTitle.Data() ;} | |
55 | virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;} | |
56 | virtual char * GetDigitsBranch() const { return (char*) fDigitsBranchTitle.Data() ;} | |
57 | ||
58 | void Exec(Option_t *option); // Does the job | |
59 | ||
60 | virtual void Print(Option_t * option)const ; | |
61 | ||
62 | virtual void SetTowerClusteringThreshold(Float_t cluth) { fTowerClusteringThreshold = cluth ; } | |
63 | virtual void SetTowerLocalMaxCut(Float_t cut) { fTowerLocMaxCut = cut ; } | |
64 | virtual void SetTowerLogWeight(Float_t w) { fW0 = w ; } | |
65 | virtual void SetTimeGate(Float_t gate) { fTimeGate = gate ;} | |
66 | virtual void SetPreShoClusteringThreshold(Float_t cluth) { fPreShoClusteringThreshold = cluth ; } | |
67 | virtual void SetPreShoLocalMaxCut(Float_t cut) { fPreShoLocMaxCut = cut ; } | |
68 | virtual void SetPreShoLogWeight(Float_t w) { fW0CPV = w ; } | |
69 | virtual void SetDigitsBranch(const char * title) { fDigitsBranchTitle = title ;} | |
70 | virtual void SetRecPointsBranch(const char *title){fRecPointsBranchTitle = title; } | |
71 | virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;} | |
72 | static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding; | |
73 | //class member function (not object member function) | |
74 | static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ; | |
75 | // Chi^2 of the fit. Should be static to be passes to MINUIT | |
76 | virtual const char * Version() const { return "clu-v1" ; } | |
77 | ||
78 | protected: | |
79 | ||
80 | void WriteRecPoints(Int_t event) ; | |
81 | virtual void MakeClusters( ) ; | |
82 | virtual Bool_t IsInTower (AliEMCALDigit * digit)const ; // Tells if id digit is in Tower | |
83 | virtual Bool_t IsInPreShower (AliEMCALDigit * digit)const ; // Tells if id digit is in PreShower | |
84 | ||
85 | ||
86 | private: | |
87 | ||
88 | void GetCalibrationParameters(void) ; | |
89 | ||
a0636361 | 90 | Bool_t FindFit(AliEMCALTowerRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy, |
483b0559 | 91 | Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit |
92 | void Init() ; | |
839828a6 | 93 | void InitParameters() ; |
483b0559 | 94 | |
95 | virtual void MakeUnfolding() ; | |
96 | void UnfoldCluster(AliEMCALTowerRecPoint * iniEmc,Int_t Nmax, | |
a0636361 | 97 | AliEMCALDigit ** maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package |
483b0559 | 98 | void PrintRecPoints(Option_t * option) ; |
99 | ||
100 | private: | |
101 | ||
ef305168 | 102 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
483b0559 | 103 | TString fHeaderFileName ; // name of the file which contains gAlice, Tree headers etc. |
104 | TString fDigitsBranchTitle ; // name of the file, where digits branch is stored | |
105 | TString fRecPointsBranchTitle ; // name of the file, where RecPoints branchs are stored | |
106 | ||
107 | Int_t fNTowers ; // number of Towers in EMCAL | |
108 | ||
109 | Bool_t fToUnfold ; // To perform unfolding | |
110 | ||
111 | Int_t fNumberOfTowerClusters ; // number of Tower clusters found | |
112 | Int_t fNumberOfPreShoClusters ; // number of PreShower clusters found | |
113 | ||
114 | Float_t fADCchannelTower ; // width of one ADC channel for Tower (GeV) | |
115 | Float_t fADCpedestalTower ; // pedestal of ADC for Tower (GeV) | |
116 | Float_t fADCchannelPreSho ; // width of one ADC channel for Pre Shower (GeV) | |
117 | Float_t fADCpedestalPreSho ; // pedestal of ADC for PreShower (GeV) | |
118 | ||
119 | Float_t fTowerClusteringThreshold ; // minimum energy to include a EMC digit in a cluster | |
120 | Float_t fPreShoClusteringThreshold ; // minimum energy to include a CPV digit in a cluster | |
121 | Float_t fTowerLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster | |
122 | Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation | |
123 | Float_t fPreShoLocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster | |
124 | Float_t fW0CPV ; // logarithmic weight for the CPV cluster center of gravity calculation | |
125 | Int_t fRecPointsInRun ; //! Total number of recpoints in one run | |
126 | Float_t fTimeGate ; // Maximum time difference between the digits in ont EMC cluster | |
127 | ||
128 | ClassDef(AliEMCALClusterizerv1,1) // Clusterizer implementation version 1 | |
129 | ||
130 | }; | |
131 | ||
132 | #endif // AliEMCALCLUSTERIZERV1_H |