]>
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 | ||
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 | ||
9688c1dd | 34 | AliPHOSClusterizerv1() ; |
8a91f010 | 35 | AliPHOSClusterizerv1(const char * headerFile, const char * name = "Default"); |
9688c1dd | 36 | virtual ~AliPHOSClusterizerv1() ; |
d15a28e7 | 37 | |
1f96ab2a | 38 | virtual Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; |
9a1398dd | 39 | // Checks if digits are in neighbour cells |
3758d9fc | 40 | |
41 | virtual Float_t Calibrate(Int_t amp, Int_t absId)const ; // Tranforms Amp to energy | |
42 | ||
baef0810 | 43 | virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfEmcClusters ; |
44 | numb[1] = fNumberOfCpvClusters ; } | |
9a1398dd | 45 | |
46 | virtual Float_t GetEmcClusteringThreshold()const{ return fEmcClusteringThreshold;} | |
47 | virtual Float_t GetEmcLocalMaxCut()const { return fEmcLocMaxCut;} | |
48 | virtual Float_t GetEmcLogWeight()const { return fW0;} | |
9688c1dd | 49 | virtual Float_t GetEmcTimeGate() const { return fEmcTimeGate ; } |
9a1398dd | 50 | virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold; } |
51 | virtual Float_t GetCpvLocalMaxCut()const { return fCpvLocMaxCut;} | |
52 | virtual Float_t GetCpvLogWeight()const { return fW0CPV;} | |
9688c1dd | 53 | virtual char * GetRecPointsBranch() const { return (char*) fRecPointsBranchTitle.Data() ;} |
54 | virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;} | |
55 | virtual char * GetDigitsBranch() const { return (char*) fDigitsBranchTitle.Data() ;} | |
9a1398dd | 56 | |
57 | void Exec(Option_t *option); // Does the job | |
58 | ||
59 | virtual void Print(Option_t * option)const ; | |
60 | ||
d72dfbc3 | 61 | virtual void SetEmcClusteringThreshold(Float_t cluth) { fEmcClusteringThreshold = cluth ; } |
9a1398dd | 62 | virtual void SetEmcLocalMaxCut(Float_t cut) { fEmcLocMaxCut = cut ; } |
63 | virtual void SetEmcLogWeight(Float_t w) { fW0 = w ; } | |
9688c1dd | 64 | virtual void SetEmcTimeGate(Float_t gate) {fEmcTimeGate = gate ;} |
ed4205d8 | 65 | virtual void SetCpvClusteringThreshold(Float_t cluth) { fCpvClusteringThreshold = cluth ; } |
9a1398dd | 66 | virtual void SetCpvLocalMaxCut(Float_t cut) { fCpvLocMaxCut = cut ; } |
67 | virtual void SetCpvLogWeight(Float_t w) { fW0CPV = w ; } | |
f035f6ce | 68 | virtual void SetDigitsBranch(const char * title) { fDigitsBranchTitle = title ;} |
69 | virtual void SetRecPointsBranch(const char *title){fRecPointsBranchTitle = title; } | |
9a1398dd | 70 | virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;} |
9a1398dd | 71 | static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding; |
72 | //class member function (not object member function) | |
7b7c1533 | 73 | static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ; |
74 | // Chi^2 of the fit. Should be static to be passes to MINUIT | |
75 | virtual const char * Version() const { return "clu-v1" ; } | |
9a1398dd | 76 | |
1f96ab2a | 77 | protected: |
78 | ||
79 | void WriteRecPoints(Int_t event) ; | |
80 | virtual void MakeClusters( ) ; | |
81 | virtual Bool_t IsInEmc (AliPHOSDigit * digit)const ; // Tells if id digit is in EMC | |
82 | virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ; // Tells if id digit is in CPV | |
83 | ||
7b7c1533 | 84 | |
d15a28e7 | 85 | private: |
7b7c1533 | 86 | |
3758d9fc | 87 | void GetCalibrationParameters(void) ; |
88 | ||
9a1398dd | 89 | Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, int * MaxAt, Float_t * maxAtEnergy, |
baef0810 | 90 | Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit |
9a1398dd | 91 | void Init() ; |
92 | ||
9a1398dd | 93 | virtual void MakeUnfolding() ; |
9a1398dd | 94 | void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax, |
95 | int * maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package | |
9a1398dd | 96 | void PrintRecPoints(Option_t * option) ; |
97 | ||
98 | private: | |
99 | ||
100 | TString fHeaderFileName ; // name of the file which contains gAlice, Tree headers etc. | |
101 | TString fDigitsBranchTitle ; // name of the file, where digits branch is stored | |
102 | TString fRecPointsBranchTitle ; // name of the file, where RecPoints branchs are stored | |
103 | ||
3758d9fc | 104 | Int_t fEmcCrystals ; // number of EMC cristalls in PHOS |
105 | ||
9a1398dd | 106 | Bool_t fToUnfold ; // To perform unfolding |
107 | ||
ed4205d8 | 108 | Int_t fNumberOfEmcClusters ; // number of EMC clusters found |
9688c1dd | 109 | Int_t fNumberOfCpvClusters ; // number of CPV clusters found |
7b7c1533 | 110 | |
3758d9fc | 111 | Float_t fADCchanelEmc ; // width of one ADC channel in GeV |
112 | Float_t fADCpedestalEmc ; // | |
113 | Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais' | |
114 | Float_t fADCpedestalCpv ; // | |
9a1398dd | 115 | |
b2a60966 | 116 | Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster |
ed4205d8 | 117 | Float_t fCpvClusteringThreshold ; // minimum energy to include a CPV digit in a cluster |
9a1398dd | 118 | Float_t fEmcLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster |
b2a60966 | 119 | Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation |
9a1398dd | 120 | Float_t fCpvLocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster |
d72dfbc3 | 121 | Float_t fW0CPV ; // logarithmic weight for the CPV cluster center of gravity calculation |
2b60655b | 122 | Int_t fRecPointsInRun ; //! Total number of recpoints in one run |
9688c1dd | 123 | Float_t fEmcTimeGate ; // Maximum time difference between the digits in ont EMC cluster |
124 | ||
ed4205d8 | 125 | ClassDef(AliPHOSClusterizerv1,1) // Clusterizer implementation version 1 |
d15a28e7 | 126 | |
127 | }; | |
128 | ||
129 | #endif // AliPHOSCLUSTERIZERV1_H |