]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSNoiseMapper.cxx
AliCDBId's in the list of retrieved OCDB parameters in the ESD's user info
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSNoiseMapper.cxx
1  /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project        *
3  * All rights reserved.                                                   *
4  *                                                                        *
5  * Primary Authors: Oystein Djuvsland                                     *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 #include "AliHLTPHOSNoiseMapper.h"
17 #include "AliHLTPHOSBase.h"
18 #include "AliHLTPHOSDigitDataStruct.h"
19 #include "AliHLTPHOSDigitContainerDataStruct.h"
20 #include "AliHLTPHOSConstants.h"
21
22 using namespace std;
23
24 AliHLTPHOSNoiseMapper::AliHLTPHOSNoiseMapper()
25  : AliHLTPHOSBase(),
26  //fChannelArray(0),
27  fNoiseThreshold(10)
28 {
29   for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
30   {
31     for(Int_t z = 0; z < N_ZROWS_MOD; z++)
32     {
33       for(Int_t gain = 0; gain < N_GAINS; gain++)
34       {
35         fChannelArray[x][z][gain] = 0;
36       }
37     }
38   }
39 }
40
41
42 AliHLTPHOSNoiseMapper::~AliHLTPHOSNoiseMapper()
43 {
44 }
45
46
47 void
48 AliHLTPHOSNoiseMapper::MapNoisyChannels(AliHLTPHOSDigitContainerDataStruct *digitContainerPtr)
49 {
50   AliHLTPHOSDigitDataStruct *digitPtr = 0;
51   for(Int_t i = 0; i < digitContainerPtr->fNDigits; i++)
52   {
53     digitPtr = &(digitContainerPtr->fDigitDataStruct[i]);
54     if(digitPtr->fAmplitude > fNoiseThreshold)
55     {
56       fChannelArray[digitPtr->fX][digitPtr->fZ][digitPtr->fGain]++;
57     }
58   }
59 }
60
61 void
62 AliHLTPHOSNoiseMapper::GetChannelArray(Int_t channelArray[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS])
63 {
64   for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
65   {
66     for(Int_t z = 0; z < N_ZROWS_MOD; z++)
67     {
68       for(Int_t gain = 0; gain < N_GAINS; gain++)
69       {
70         channelArray[x][z][gain] = fChannelArray[x][z][gain];
71       }
72     }
73   }
74 }