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