1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
5 * Primary Authors: Oystein Djuvsland *
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 **************************************************************************/
16 #include "AliHLTPHOSNoiseMapper.h"
17 #include "AliHLTPHOSBase.h"
18 #include "AliHLTPHOSDigitDataStruct.h"
19 #include "AliHLTPHOSDigitContainerDataStruct.h"
20 #include "AliHLTPHOSConstants.h"
24 AliHLTPHOSNoiseMapper::AliHLTPHOSNoiseMapper()
29 for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
31 for(Int_t z = 0; z < N_ZROWS_MOD; z++)
33 for(Int_t gain = 0; gain < N_GAINS; gain++)
35 fChannelArray[x][z][gain] = 0;
42 AliHLTPHOSNoiseMapper::~AliHLTPHOSNoiseMapper()
48 AliHLTPHOSNoiseMapper::MapNoisyChannels(AliHLTPHOSDigitContainerDataStruct *digitContainerPtr)
50 AliHLTPHOSDigitDataStruct *digitPtr = 0;
51 for(Int_t i = 0; i < digitContainerPtr->fNDigits; i++)
53 digitPtr = &(digitContainerPtr->fDigitDataStruct[i]);
54 if(digitPtr->fAmplitude > fNoiseThreshold)
56 fChannelArray[digitPtr->fX][digitPtr->fZ][digitPtr->fGain]++;
62 AliHLTPHOSNoiseMapper::GetChannelArray(Int_t channelArray[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS])
64 for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
66 for(Int_t z = 0; z < N_ZROWS_MOD; z++)
68 for(Int_t gain = 0; gain < N_GAINS; gain++)
70 channelArray[x][z][gain] = fChannelArray[x][z][gain];