1 /////////////////////////////////////////////////////////////////////
2 // Author: Henrik Tydesjo //
4 // This class is used to store Fast-OR noise values in OCDB. //
5 // One value per pixel chip. //
6 // The values are the probability that a pixel chip will generate //
7 // a fast-OR signal independently (originating from noise). //
9 /////////////////////////////////////////////////////////////////////
11 #include "AliITSFONoiseSPD.h"
13 AliITSFONoiseSPD::AliITSFONoiseSPD() :
16 // default constructor, sets all noise values to 0%
19 //______________________________________________________________________
20 AliITSFONoiseSPD::AliITSFONoiseSPD(const AliITSFONoiseSPD& foNoi) :
23 // copy constructor, copy the array values from input object
24 for (UInt_t eq=0; eq<20; eq++) {
25 for (UInt_t hs=0; hs<6; hs++) {
26 for (UInt_t chip=0; chip<10; chip++) {
27 fChipNoise[eq][hs][chip] = foNoi.fChipNoise[eq][hs][chip];
32 //______________________________________________________________________
33 AliITSFONoiseSPD::~AliITSFONoiseSPD() {}
34 //______________________________________________________________________
35 void AliITSFONoiseSPD::ResetValues() {
36 // set all noise values to 0%
37 for (UInt_t eq=0; eq<20; eq++) {
38 for (UInt_t hs=0; hs<6; hs++) {
39 for (UInt_t chip=0; chip<10; chip++) {
40 fChipNoise[eq][hs][chip] = 0;
45 //______________________________________________________________________
46 AliITSFONoiseSPD& AliITSFONoiseSPD::operator=(const AliITSFONoiseSPD& foNoi) {
47 // assignment operator
49 for (UInt_t eq=0; eq<20; eq++) {
50 for (UInt_t hs=0; hs<6; hs++) {
51 for (UInt_t chip=0; chip<10; chip++) {
52 fChipNoise[eq][hs][chip] = foNoi.fChipNoise[eq][hs][chip];
59 //______________________________________________________________________
60 void AliITSFONoiseSPD::SetChipNoise(UInt_t eq, UInt_t hs, UInt_t chip, Float_t value) {
61 // set a chip noise value
63 Error("AliITSFONoiseSPD::SetChipNoise", "eq (%d) out of bounds.",eq);
67 Error("AliITSFONoiseSPD::SetChipNoise", "hs (%d) out of bounds.",hs);
71 Error("AliITSFONoiseSPD::SetChipNoise", "chip (%d) out of bounds.",chip);
75 fChipNoise[eq][hs][chip] = value;
77 //______________________________________________________________________
78 Float_t AliITSFONoiseSPD::GetChipNoise(UInt_t eq, UInt_t hs, UInt_t chip) const {
79 // get a chip noise value
81 Error("AliITSFONoiseSPD::GetChipNoise", "eq (%d) out of bounds.",eq);
85 Error("AliITSFONoiseSPD::GetChipNoise", "hs (%d) out of bounds.",hs);
89 Error("AliITSFONoiseSPD::GetChipNoise", "chip (%d) out of bounds.",chip);
93 return fChipNoise[eq][hs][chip];