1 #ifndef ALIITSCHANNELSTATUS_H
2 #define ALIITSCHANNELSTATUS_H
3 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 /////////////////////////////////////////////////////////////////////
10 // Class for bad channel treatment in the tracker //
11 // Stores 1 status bit for each SPD pixel and SDD anode: //
13 // 1 = good channel //
14 // Dead and noisy channels are read from AliITSCalibration objects //
15 // Origin: F.Prino, Torino, prino@to.infn.it //
17 /////////////////////////////////////////////////////////////////////
21 #include "AliCDBManager.h"
22 #include "AliITSDetTypeRec.h"
24 class AliITSChannelStatus : public TObject {
27 AliITSChannelStatus();
28 AliITSChannelStatus(AliCDBManager *cdb);
29 AliITSChannelStatus(const AliITSDetTypeRec *dtrec);
30 AliITSChannelStatus(const AliITSChannelStatus& cstatus);
31 AliITSChannelStatus& operator=(const AliITSChannelStatus& cstatus);
32 virtual ~AliITSChannelStatus();
34 void SetChannelStatus(Bool_t cstatus, Int_t imod, Int_t iz, Int_t ix=0);
36 Bool_t GetChannelStatus(Int_t imod, Int_t iz, Int_t ix=0) const;
38 Bool_t AnyBadInRoad(Int_t imod, Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax) const;
39 Float_t FractionOfBadInRoad(Int_t imod, Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax) const;
41 Int_t GetNSPDChannels()const {return fSPDChannelStatus->GetNbits();}
42 Int_t GetNSDDChannels()const {return fSDDChannelStatus->GetNbits();}
46 void InitFromOCDB(TObjArray* deadArrSPD, TObjArray* noisArrSPD, TObjArray* calArrSDD);
47 Bool_t CheckBounds(Int_t imod, Int_t iz, Int_t ix=0) const;
48 Bool_t GetSPDLimits(Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax, Int_t& izmin, Int_t& izmax, Int_t& ixmin, Int_t& ixmax) const;
49 Bool_t GetSDDLimits(Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax, Int_t& izmin, Int_t& izmax, Int_t& izmin2, Int_t& izmax2) const;
50 enum {kSPDModules=240};
51 enum {kSPDNpzPerModule=160};
52 enum {kSPDNpxPerModule=256};
53 enum {kSDDModules=260};
54 enum {kSDDAnodesPerModule=512};
56 TBits *fSPDChannelStatus; // bit map with status of SPD channels
57 TBits *fSDDChannelStatus; // bit map with status of SDD channels
59 ClassDef(AliITSChannelStatus,1);