]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSChannelStatus.h
Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / ITS / AliITSChannelStatus.h
CommitLineData
4a60ccc4 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 */
5
6a0fdcbd 6/* $Id$ */
4a60ccc4 7
8/////////////////////////////////////////////////////////////////////
9// //
10// Class for bad channel treatment in the tracker //
11// Stores 1 status bit for each SPD pixel and SDD anode: //
12// 0 = bad channel //
13// 1 = good channel //
14// Dead and noisy channels are read from AliITSCalibration objects //
15// Origin: F.Prino, Torino, prino@to.infn.it //
16// //
17/////////////////////////////////////////////////////////////////////
18
19#include <TObject.h>
20#include <TBits.h>
4a60ccc4 21
27199d86 22class TString;
cfe39822 23class AliCDBManager;
24class AliITSDetTypeRec;
27199d86 25
4a60ccc4 26class AliITSChannelStatus : public TObject {
27
28 public:
29 AliITSChannelStatus();
27199d86 30 AliITSChannelStatus(TString config);
4a60ccc4 31 AliITSChannelStatus(AliCDBManager *cdb);
04c81913 32 AliITSChannelStatus(const AliITSDetTypeRec *dtrec);
4a60ccc4 33 AliITSChannelStatus(const AliITSChannelStatus& cstatus);
34 AliITSChannelStatus& operator=(const AliITSChannelStatus& cstatus);
35 virtual ~AliITSChannelStatus();
36
37 void SetChannelStatus(Bool_t cstatus, Int_t imod, Int_t iz, Int_t ix=0);
38
39 Bool_t GetChannelStatus(Int_t imod, Int_t iz, Int_t ix=0) const;
23197852 40
b0702f40 41 Bool_t AnyBadInRoad(Int_t imod, Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax) const;
42 Float_t FractionOfBadInRoad(Int_t imod, Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax) const;
23197852 43
4a60ccc4 44 Int_t GetNSPDChannels()const {return fSPDChannelStatus->GetNbits();}
45 Int_t GetNSDDChannels()const {return fSDDChannelStatus->GetNbits();}
6a0fdcbd 46 Int_t GetNSSDChannels()const {return fSSDChannelStatus->GetNbits();}
23197852 47
4a60ccc4 48 protected:
27199d86 49 void CreateArrays();
4a60ccc4 50 void InitDefaults();
27199d86 51 void InitFromOCDB(const TObjArray* deadArrSPD, const TObjArray* /* deadSparseArrSPD */, const TObjArray* noisArrSPD, const TObjArray* calArrSDD, const TObjArray* noisArrSSD);
4a60ccc4 52 Bool_t CheckBounds(Int_t imod, Int_t iz, Int_t ix=0) const;
b0702f40 53 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;
54 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;
6a0fdcbd 55 Bool_t GetSSDLimits(Int_t layer, Float_t zlocmin, Float_t zlocmax, Float_t xlocmin, Float_t xlocmax, Int_t& iPmin, Int_t& iPmax, Int_t& iNmin, Int_t& iNmax) const;
4a60ccc4 56 enum {kSPDModules=240};
57 enum {kSPDNpzPerModule=160};
58 enum {kSPDNpxPerModule=256};
59 enum {kSDDModules=260};
60 enum {kSDDAnodesPerModule=512};
6a0fdcbd 61 enum {kSSDFirstModule=500};
62 enum {kSSDMaxModLay5=1247};
63 enum {kSSDModules=1698};
64 enum {kSSDStripsPerModule=1536};
65 enum {kSSDStripsPerSide=768};
4a60ccc4 66
67 TBits *fSPDChannelStatus; // bit map with status of SPD channels
68 TBits *fSDDChannelStatus; // bit map with status of SDD channels
6a0fdcbd 69 TBits *fSSDChannelStatus; // bit map with status of SSD channels
4a60ccc4 70
6a0fdcbd 71 ClassDef(AliITSChannelStatus,2);
4a60ccc4 72};
73#endif
6a0fdcbd 74