1 /////////////////////////////////////////////////////////////////////
2 // Author: Henrik Tydesjo //
4 // This class is used to store Fast-OR efficiency values in OCDB. //
5 // One value per pixel chip in this base class (if per column //
6 // accuracy is needed, use AliITSFOEfficiencySPDColumn class). //
7 // The values are the probability that a pixel hit will generate a //
10 /////////////////////////////////////////////////////////////////////
12 #include "AliITSFOEfficiencySPD.h"
14 AliITSFOEfficiencySPD::AliITSFOEfficiencySPD() :
17 // default constructor, puts all efficiency values to 100%
20 //______________________________________________________________________
21 AliITSFOEfficiencySPD::AliITSFOEfficiencySPD(const AliITSFOEfficiencySPD& foEff) :
24 // copy constructor, copy the array values from input object
25 for (UInt_t eq=0; eq<20; eq++) {
26 for (UInt_t hs=0; hs<6; hs++) {
27 for (UInt_t chip=0; chip<10; chip++) {
28 fChipEfficiency[eq][hs][chip] = foEff.fChipEfficiency[eq][hs][chip];
33 //______________________________________________________________________
34 AliITSFOEfficiencySPD::~AliITSFOEfficiencySPD() {}
35 //______________________________________________________________________
36 void AliITSFOEfficiencySPD::ResetValues() {
37 // Set all efficiency values to 100%
38 for (UInt_t eq=0; eq<20; eq++) {
39 for (UInt_t hs=0; hs<6; hs++) {
40 for (UInt_t chip=0; chip<10; chip++) {
41 fChipEfficiency[eq][hs][chip] = 1;
46 //______________________________________________________________________
47 AliITSFOEfficiencySPD& AliITSFOEfficiencySPD::operator=(const AliITSFOEfficiencySPD& foEff) {
48 // assignment operator
50 for (UInt_t eq=0; eq<20; eq++) {
51 for (UInt_t hs=0; hs<6; hs++) {
52 for (UInt_t chip=0; chip<10; chip++) {
53 fChipEfficiency[eq][hs][chip] = foEff.fChipEfficiency[eq][hs][chip];
60 //______________________________________________________________________
61 void AliITSFOEfficiencySPD::SetChipEfficiency(UInt_t eq, UInt_t hs, UInt_t chip, Float_t value) {
62 // set a chip efficiency value
64 Error("AliITSFOEfficiencySPD::SetChipEfficiency", "eq (%d) out of bounds.",eq);
68 Error("AliITSFOEfficiencySPD::SetChipEfficiency", "hs (%d) out of bounds.",hs);
72 Error("AliITSFOEfficiencySPD::SetChipEfficiency", "chip (%d) out of bounds.",chip);
76 fChipEfficiency[eq][hs][chip] = value;
78 //______________________________________________________________________
79 Float_t AliITSFOEfficiencySPD::GetChipEfficiency(UInt_t eq, UInt_t hs, UInt_t chip) const {
80 // get a chip efficiency value
82 Error("AliITSFOEfficiencySPD::GetChipEfficiency", "eq (%d) out of bounds.",eq);
86 Error("AliITSFOEfficiencySPD::GetChipEfficiency", "hs (%d) out of bounds.",hs);
90 Error("AliITSFOEfficiencySPD::GetChipEfficiency", "chip (%d) out of bounds.",chip);
94 return fChipEfficiency[eq][hs][chip];