]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSEmcCalibrationHistogramProducer.cxx
308317c296aeb9ac270d6b3e65a5ed34008d6362
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSEmcCalibrationHistogramProducer.cxx
1 // $Id$
2
3  /**************************************************************************
4  * This file is property of and copyright by the ALICE HLT Project        * 
5  * All rights reserved.                                                   *
6  *                                                                        *
7  * Primary Authors: Oystein Djuvsland                                     *
8  *                                                                        *
9  * Permission to use, copy, modify and distribute this software and its   *
10  * documentation strictly for non-commercial purposes is hereby granted   *
11  * without fee, provided that the above copyright notice appears in all   *
12  * copies and that both the copyright notice and this permission notice   *
13  * appear in the supporting documentation. The authors make no claims     *
14  * about the suitability of this software for any purpose. It is          * 
15  * provided "as is" without express or implied warranty.                  *
16  **************************************************************************/
17
18 /** 
19  * @file   AliHLTPHOSClusterizer.cxx
20  * @author Oystein Djuvsland
21  * @date 
22  * @brief  Clusterizer for PHOS HLT 
23  */
24
25 // see header file for class documentation
26 // or
27 // refer to README to build package
28 // or
29 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
30
31 #include "AliHLTPHOSEmcCalibrationHistogramProducer.h"
32 #include "AliHLTPHOSBase.h"
33 #include "TH1F.h"
34 #include "TH2I.h"
35 #include "TH2F.h"
36
37 AliHLTPHOSEmcCalibrationHistogramProducer::AliHLTPHOSEmcCalibrationHistogramProducer() :
38   AliHLTPHOSBase()
39   //fChannelEnergyHistogramPtr(0),
40   //fMeanEnergyHistogramPtr(0),
41   //fMaxSignalHistogramPtr(0),
42   //fNHitsHistogramPtr(0),
43   //fLiveChannelHistogramPtr(0),
44   // fBadChannelHistogramPtr(0)
45 {
46   //See header file for documentation
47 }
48
49 AliHLTPHOSEmcCalibrationHistogramProducer::~AliHLTPHOSEmcCalibrationHistogramProducer()
50 {
51   //See header file for documentation
52 }
53
54 void
55 AliHLTPHOSEmcCalibrationHistogramProducer::Reset()
56 {
57   //See header file for documentation
58 }
59
60 void
61 AliHLTPHOSEmcCalibrationHistogramProducer::FillChannelEnergy(Int_t module, Int_t xCol, Int_t zRow, Int_t gain)
62 {
63   //See header file for documentation
64 }
65
66 void
67 AliHLTPHOSEmcCalibrationHistogramProducer::FillRCUEnergies(TH1F* rcuChannelEnergyPtr[][N_ZROWS_RCU][N_GAINS], Int_t module, Int_t rcuX, Int_t rcuZ)
68 {
69   //See header file for documentation
70
71   Char_t histName[128];
72
73   for(UInt_t x = 0; x < N_XCOLUMNS_RCU; x++)
74     {
75       for(UInt_t z = 0; z < N_ZROWS_RCU; z++)
76         {
77           for(UInt_t gain = 0; gain < N_GAINS; gain++)
78             {
79               sprintf(histName, "mod%dcol%drow%dgain%d", module, x, z, gain);
80               *fChannelEnergyHistogramPtr[module][x+rcuX*N_XCOLUMNS_RCU][z+rcuZ*N_ZROWS_RCU][gain] = (TH1F*)rcuChannelEnergyPtr[x][z][gain]->Clone(histName);
81             }
82         }
83     }
84 }
85
86 void
87 AliHLTPHOSEmcCalibrationHistogramProducer::FillBadChannels(TH2F* rcuBadChannelHistPtr[], Int_t module)
88 {
89   //See header file for documentation
90   //TODO!
91 }
92
93 TH1F* 
94 AliHLTPHOSEmcCalibrationHistogramProducer::GetChannelEnergyHistogram(Int_t module, Int_t xCol, Int_t zRow, Int_t gain)
95 {
96   //See header file for documentation
97   return fChannelEnergyHistogramPtr[module][xCol][zRow][gain];
98 }
99
100 TH2F*
101 AliHLTPHOSEmcCalibrationHistogramProducer::GetMeanEnergyHistogram(Int_t module, Int_t gain)
102 {
103   //See header file for documentation
104   for(UInt_t x = 0; x < N_XCOLUMNS_RCU; x++)
105     {
106       for(UInt_t z = 0; z < N_ZROWS_RCU; z++)
107         {
108           fMeanEnergyHistogramPtr->SetBinContent(x, z, fChannelEnergyHistogramPtr[module][x][z][gain]->GetMean());
109         }
110     }
111 }
112
113 TH2F*
114 AliHLTPHOSEmcCalibrationHistogramProducer::GetMaxSignalHistogram(Int_t module, Int_t gain)
115 {
116   //See header file for documentation
117   for(UInt_t x = 0; x < N_XCOLUMNS_RCU; x++)
118     {
119       for(UInt_t z = 0; z < N_ZROWS_RCU; z++)
120         {
121           fMaxSignalHistogramPtr->SetBinContent(x, z, fChannelEnergyHistogramPtr[module][x][z][gain]->GetMaximum());
122         }
123     }
124 }
125
126 TH2I*
127 AliHLTPHOSEmcCalibrationHistogramProducer::GetNHitsHistogram(Int_t module, Int_t gain)
128 {
129   //See header file for documentation
130   for(UInt_t x = 0; x < N_XCOLUMNS_RCU; x++)
131     {
132       for(UInt_t z = 0; z < N_ZROWS_RCU; z++)
133         {
134           // TODO!
135         }
136     }
137 }
138
139 TH2I*
140 AliHLTPHOSEmcCalibrationHistogramProducer::GetLiveChannelHistogram(Int_t module, Int_t gain, Float_t minSignal = 30)
141 {
142   //See header file for documentation
143   //TODO!
144 }
145
146 TH2I*
147 AliHLTPHOSEmcCalibrationHistogramProducer::GetBadChannelHistogram(Int_t module, Int_t gain)
148 {
149   //See header file for documentation
150   //TODO!
151 }
152