]>
Commit | Line | Data |
---|---|---|
e9a88722 | 1 | #ifndef ALIPHOSCLUSTERIZERV1_H |
d15a28e7 | 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 | ||
702ab87e | 8 | /* History of cvs commits: |
9 | * | |
10 | * $Log$ | |
44ae287e | 11 | * Revision 1.43 2005/05/28 14:19:04 schutz |
12 | * Compilation warnings fixed by T.P. | |
13 | * | |
702ab87e | 14 | */ |
15 | ||
b2a60966 | 16 | //_________________________________________________________________________ |
17 | // Implementation version 1 of the clusterization algorithm | |
baef0810 | 18 | // Performs clusterization (collects neighbouring active cells) and |
19 | // unfolding of the clusters with several local maxima. | |
20 | // results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints), | |
21 | // PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer | |
b2a60966 | 22 | // |
88cb7938 | 23 | //*-- Author: Yves Schutz (SUBATECH) |
d15a28e7 | 24 | |
25 | // --- ROOT system --- | |
ba898748 | 26 | class TClonesArray ; |
d15a28e7 | 27 | // --- Standard library --- |
28 | ||
29 | // --- AliRoot header files --- | |
30 | ||
31 | #include "AliPHOSClusterizer.h" | |
9a1398dd | 32 | class AliPHOSEmcRecPoint ; |
33 | class AliPHOSDigit ; | |
34 | class AliPHOSDigitizer ; | |
35 | class AliPHOSGeometry ; | |
44ae287e | 36 | class AliPHOSCalibData ; |
d15a28e7 | 37 | |
38 | class AliPHOSClusterizerv1 : public AliPHOSClusterizer { | |
39 | ||
40 | public: | |
41 | ||
9688c1dd | 42 | AliPHOSClusterizerv1() ; |
e191bb57 | 43 | AliPHOSClusterizerv1(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::GetDefaultEventFolderName()); |
a8c47ab6 | 44 | AliPHOSClusterizerv1(const AliPHOSClusterizerv1 & clu) : AliPHOSClusterizer(clu) { |
88cb7938 | 45 | // cpy ctor: no implementation yet |
46 | // requested by the Coding Convention | |
0bc3b8ed | 47 | Fatal("cpy ctor", "not implemented") ; |
48 | } | |
9688c1dd | 49 | virtual ~AliPHOSClusterizerv1() ; |
d15a28e7 | 50 | |
1f96ab2a | 51 | virtual Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; |
9a1398dd | 52 | // Checks if digits are in neighbour cells |
3758d9fc | 53 | |
44ae287e | 54 | virtual Float_t Calibrate(Int_t amp, Int_t absId) ; // Tranforms Amp to energy |
3758d9fc | 55 | |
baef0810 | 56 | virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfEmcClusters ; |
57 | numb[1] = fNumberOfCpvClusters ; } | |
9a1398dd | 58 | |
59 | virtual Float_t GetEmcClusteringThreshold()const{ return fEmcClusteringThreshold;} | |
60 | virtual Float_t GetEmcLocalMaxCut()const { return fEmcLocMaxCut;} | |
61 | virtual Float_t GetEmcLogWeight()const { return fW0;} | |
9688c1dd | 62 | virtual Float_t GetEmcTimeGate() const { return fEmcTimeGate ; } |
9a1398dd | 63 | virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold; } |
64 | virtual Float_t GetCpvLocalMaxCut()const { return fCpvLocMaxCut;} | |
65 | virtual Float_t GetCpvLogWeight()const { return fW0CPV;} | |
fbf811ec | 66 | virtual const char * GetRecPointsBranch() const{ return GetName() ;} |
a01512ba | 67 | virtual Int_t GetRecPointsInRun() const {return fRecPointsInRun ;} |
9a1398dd | 68 | |
eabde521 | 69 | virtual void Exec(Option_t *option); // Does the job |
9a1398dd | 70 | |
702ab87e | 71 | void Print(const Option_t * = "")const ; |
9a1398dd | 72 | |
ba898748 | 73 | void SetEmcMinE(Float_t e){fEmcMinE = e ;} |
74 | void SetCpvMinE(Float_t e){fCpvMinE = e ;} | |
d72dfbc3 | 75 | virtual void SetEmcClusteringThreshold(Float_t cluth) { fEmcClusteringThreshold = cluth ; } |
9a1398dd | 76 | virtual void SetEmcLocalMaxCut(Float_t cut) { fEmcLocMaxCut = cut ; } |
77 | virtual void SetEmcLogWeight(Float_t w) { fW0 = w ; } | |
fbf811ec | 78 | virtual void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate ;} |
ed4205d8 | 79 | virtual void SetCpvClusteringThreshold(Float_t cluth) { fCpvClusteringThreshold = cluth ; } |
9a1398dd | 80 | virtual void SetCpvLocalMaxCut(Float_t cut) { fCpvLocMaxCut = cut ; } |
81 | virtual void SetCpvLogWeight(Float_t w) { fW0CPV = w ; } | |
ba898748 | 82 | virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold ;} |
83 | //Switch to "on flyght" mode, without writing to TreeR and file | |
5d0435dd | 84 | void SetWriting(Bool_t toWrite = kFALSE){fWrite = toWrite;} |
9a1398dd | 85 | static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding; |
86 | //class member function (not object member function) | |
7b7c1533 | 87 | static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ; |
ba898748 | 88 | // Chi^2 of the fit. Should be static to be passed to MINUIT |
88cb7938 | 89 | void Unload() ; |
90 | virtual const char * Version() const { return "clu-v1"; } | |
9a1398dd | 91 | |
1f96ab2a | 92 | protected: |
93 | ||
88cb7938 | 94 | void WriteRecPoints() ; |
1f96ab2a | 95 | virtual void MakeClusters( ) ; |
96 | virtual Bool_t IsInEmc (AliPHOSDigit * digit)const ; // Tells if id digit is in EMC | |
97 | virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ; // Tells if id digit is in CPV | |
ba898748 | 98 | void CleanDigits(TClonesArray * digits) ; |
7b7c1533 | 99 | |
d15a28e7 | 100 | private: |
7b7c1533 | 101 | |
fbf811ec | 102 | const TString BranchName() const ; |
3758d9fc | 103 | void GetCalibrationParameters(void) ; |
104 | ||
a0636361 | 105 | Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** MaxAt, Float_t * maxAtEnergy, |
baef0810 | 106 | Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit |
fbf811ec | 107 | void Init() ; |
108 | void InitParameters() ; | |
9a1398dd | 109 | |
9a1398dd | 110 | virtual void MakeUnfolding() ; |
9a1398dd | 111 | void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax, |
a0636361 | 112 | AliPHOSDigit ** maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package |
9a1398dd | 113 | void PrintRecPoints(Option_t * option) ; |
114 | ||
115 | private: | |
116 | ||
92f521a9 | 117 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
9a1398dd | 118 | |
3758d9fc | 119 | Int_t fEmcCrystals ; // number of EMC cristalls in PHOS |
120 | ||
9a1398dd | 121 | Bool_t fToUnfold ; // To perform unfolding |
ba898748 | 122 | Bool_t fWrite ; // Write RecPoints to TreeR |
9a1398dd | 123 | |
ed4205d8 | 124 | Int_t fNumberOfEmcClusters ; // number of EMC clusters found |
9688c1dd | 125 | Int_t fNumberOfCpvClusters ; // number of CPV clusters found |
7b7c1533 | 126 | |
c2cd5471 | 127 | //Calibration parameters |
44ae287e | 128 | AliPHOSCalibData * fCalibData ; //! Calibration database if aval |
3758d9fc | 129 | Float_t fADCchanelEmc ; // width of one ADC channel in GeV |
88cb7938 | 130 | Float_t fADCpedestalEmc ; // |
3758d9fc | 131 | Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais' |
88cb7938 | 132 | Float_t fADCpedestalCpv ; // |
133 | ||
ba898748 | 134 | Float_t fEmcClusteringThreshold ; // minimum energy to start EMC cluster |
135 | Float_t fCpvClusteringThreshold ; // minimum energy to start CPV cluster | |
136 | Float_t fEmcMinE ; // minimum energy of digit to be included into cluster | |
137 | Float_t fCpvMinE ; // minimum energy of digit to be included into cluster | |
9a1398dd | 138 | Float_t fEmcLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster |
b2a60966 | 139 | Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation |
9a1398dd | 140 | Float_t fCpvLocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster |
d72dfbc3 | 141 | Float_t fW0CPV ; // logarithmic weight for the CPV cluster center of gravity calculation |
2b60655b | 142 | Int_t fRecPointsInRun ; //! Total number of recpoints in one run |
9688c1dd | 143 | Float_t fEmcTimeGate ; // Maximum time difference between the digits in ont EMC cluster |
144 | ||
88cb7938 | 145 | ClassDef(AliPHOSClusterizerv1,3) // Clusterizer implementation version 1 |
d15a28e7 | 146 | |
147 | }; | |
148 | ||
149 | #endif // AliPHOSCLUSTERIZERV1_H |