]>
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 | // |
88cb7938 | 15 | //*-- Author: Yves Schutz (SUBATECH) |
d15a28e7 | 16 | |
17 | // --- ROOT system --- | |
88cb7938 | 18 | |
d15a28e7 | 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 ; | |
88cb7938 | 28 | class AliPHOSCalibrationDB ; |
d15a28e7 | 29 | |
30 | class AliPHOSClusterizerv1 : public AliPHOSClusterizer { | |
31 | ||
32 | public: | |
33 | ||
9688c1dd | 34 | AliPHOSClusterizerv1() ; |
88cb7938 | 35 | AliPHOSClusterizerv1(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::fgkDefaultEventFolderName); |
a8c47ab6 | 36 | AliPHOSClusterizerv1(const AliPHOSClusterizerv1 & clu) : AliPHOSClusterizer(clu) { |
88cb7938 | 37 | // cpy ctor: no implementation yet |
38 | // requested by the Coding Convention | |
0bc3b8ed | 39 | Fatal("cpy ctor", "not implemented") ; |
40 | } | |
9688c1dd | 41 | virtual ~AliPHOSClusterizerv1() ; |
d15a28e7 | 42 | |
1f96ab2a | 43 | virtual Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; |
9a1398dd | 44 | // Checks if digits are in neighbour cells |
3758d9fc | 45 | |
46 | virtual Float_t Calibrate(Int_t amp, Int_t absId)const ; // Tranforms Amp to energy | |
47 | ||
baef0810 | 48 | virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfEmcClusters ; |
49 | numb[1] = fNumberOfCpvClusters ; } | |
9a1398dd | 50 | |
51 | virtual Float_t GetEmcClusteringThreshold()const{ return fEmcClusteringThreshold;} | |
52 | virtual Float_t GetEmcLocalMaxCut()const { return fEmcLocMaxCut;} | |
53 | virtual Float_t GetEmcLogWeight()const { return fW0;} | |
9688c1dd | 54 | virtual Float_t GetEmcTimeGate() const { return fEmcTimeGate ; } |
9a1398dd | 55 | virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold; } |
56 | virtual Float_t GetCpvLocalMaxCut()const { return fCpvLocMaxCut;} | |
57 | virtual Float_t GetCpvLogWeight()const { return fW0CPV;} | |
fbf811ec | 58 | virtual const char * GetRecPointsBranch() const{ return GetName() ;} |
59 | virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;} | |
9a1398dd | 60 | |
eabde521 | 61 | virtual void Exec(Option_t *option); // Does the job |
9a1398dd | 62 | |
88cb7938 | 63 | void Print()const ; |
9a1398dd | 64 | |
d72dfbc3 | 65 | virtual void SetEmcClusteringThreshold(Float_t cluth) { fEmcClusteringThreshold = cluth ; } |
9a1398dd | 66 | virtual void SetEmcLocalMaxCut(Float_t cut) { fEmcLocMaxCut = cut ; } |
67 | virtual void SetEmcLogWeight(Float_t w) { fW0 = w ; } | |
fbf811ec | 68 | virtual void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate ;} |
ed4205d8 | 69 | virtual void SetCpvClusteringThreshold(Float_t cluth) { fCpvClusteringThreshold = cluth ; } |
9a1398dd | 70 | virtual void SetCpvLocalMaxCut(Float_t cut) { fCpvLocMaxCut = cut ; } |
71 | virtual void SetCpvLogWeight(Float_t w) { fW0CPV = w ; } | |
88cb7938 | 72 | virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold ;} |
9a1398dd | 73 | static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding; |
74 | //class member function (not object member function) | |
7b7c1533 | 75 | static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ; |
76 | // Chi^2 of the fit. Should be static to be passes to MINUIT | |
88cb7938 | 77 | void Unload() ; |
78 | virtual const char * Version() const { return "clu-v1"; } | |
9a1398dd | 79 | |
1f96ab2a | 80 | protected: |
81 | ||
88cb7938 | 82 | void WriteRecPoints() ; |
1f96ab2a | 83 | virtual void MakeClusters( ) ; |
84 | virtual Bool_t IsInEmc (AliPHOSDigit * digit)const ; // Tells if id digit is in EMC | |
85 | virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ; // Tells if id digit is in CPV | |
86 | ||
7b7c1533 | 87 | |
d15a28e7 | 88 | private: |
7b7c1533 | 89 | |
fbf811ec | 90 | const TString BranchName() const ; |
3758d9fc | 91 | void GetCalibrationParameters(void) ; |
92 | ||
a0636361 | 93 | Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** MaxAt, Float_t * maxAtEnergy, |
baef0810 | 94 | Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit |
fbf811ec | 95 | void Init() ; |
96 | void InitParameters() ; | |
9a1398dd | 97 | |
9a1398dd | 98 | virtual void MakeUnfolding() ; |
9a1398dd | 99 | void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax, |
a0636361 | 100 | AliPHOSDigit ** maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package |
9a1398dd | 101 | void PrintRecPoints(Option_t * option) ; |
102 | ||
103 | private: | |
104 | ||
92f521a9 | 105 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
9a1398dd | 106 | |
3758d9fc | 107 | Int_t fEmcCrystals ; // number of EMC cristalls in PHOS |
108 | ||
9a1398dd | 109 | Bool_t fToUnfold ; // To perform unfolding |
110 | ||
ed4205d8 | 111 | Int_t fNumberOfEmcClusters ; // number of EMC clusters found |
9688c1dd | 112 | Int_t fNumberOfCpvClusters ; // number of CPV clusters found |
7b7c1533 | 113 | |
c2cd5471 | 114 | //Calibration parameters |
88cb7938 | 115 | AliPHOSCalibrationDB * fCalibrationDB ; //! Calibration database if aval |
3758d9fc | 116 | Float_t fADCchanelEmc ; // width of one ADC channel in GeV |
88cb7938 | 117 | Float_t fADCpedestalEmc ; // |
3758d9fc | 118 | Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais' |
88cb7938 | 119 | Float_t fADCpedestalCpv ; // |
120 | ||
b2a60966 | 121 | Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster |
ed4205d8 | 122 | Float_t fCpvClusteringThreshold ; // minimum energy to include a CPV digit in a cluster |
9a1398dd | 123 | Float_t fEmcLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster |
b2a60966 | 124 | Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation |
9a1398dd | 125 | Float_t fCpvLocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster |
d72dfbc3 | 126 | Float_t fW0CPV ; // logarithmic weight for the CPV cluster center of gravity calculation |
2b60655b | 127 | Int_t fRecPointsInRun ; //! Total number of recpoints in one run |
9688c1dd | 128 | Float_t fEmcTimeGate ; // Maximum time difference between the digits in ont EMC cluster |
129 | ||
88cb7938 | 130 | ClassDef(AliPHOSClusterizerv1,3) // Clusterizer implementation version 1 |
d15a28e7 | 131 | |
132 | }; | |
133 | ||
134 | #endif // AliPHOSCLUSTERIZERV1_H |