1 #ifndef ALIITSDDLMODULEMAPSDD_H
2 #define ALIITSDDLMODULEMAPSDD_H
3 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////
10 // Class to store SDD DDL mapping in the OCDB //
11 // Origin: F.Prino, Torino, prino@to.infn.it //
13 ///////////////////////////////////////////////////////////////////
16 #include<AliITSgeomTGeo.h>
19 class AliITSDDLModuleMapSDD : public TObject {
23 AliITSDDLModuleMapSDD();
24 AliITSDDLModuleMapSDD(Char_t *ddlmapfile);
25 virtual ~AliITSDDLModuleMapSDD(){};
28 void SetDec07part1Map();
29 void SetDec07part2Map();
32 void SetDDLMapElement(Int_t iDDL, Int_t iChan, Int_t iMod){fDDLModuleMap[iDDL][iChan]=iMod;}
33 void SetDDLMap(AliITSDDLModuleMapSDD* ddlmap);
34 void ReadDDLModuleMap(Char_t *ddlmapfile);
36 Int_t GetModuleNumber(UInt_t iDDL, UInt_t iChan) const {return fDDLModuleMap[iDDL][iChan];}
37 void FindInDDLMap(Int_t modIndex, Int_t &iDDL, Int_t &iCarlos) const;
38 void FindInDDLMap(Int_t lay, Int_t lad, Int_t det, Int_t &iDDL, Int_t &iCarlos) const {
39 FindInDDLMap(AliITSgeomTGeo::GetModuleIndex(lay,lad,det),iDDL,iCarlos);
41 static Int_t GetNDDLs(){return kDDLsNumber;}
42 static Int_t GetNModPerDDL(){return kModulesPerDDL;}
45 void PrintDDLMap() const ;
49 enum {kDDLsNumber = 24}; // number of DDLs in SDD
50 enum {kModulesPerDDL = 12}; // number of modules in each DDL
52 Int_t fDDLModuleMap[kDDLsNumber][kModulesPerDDL]; // mapping DDL/module -> module number
54 ClassDef(AliITSDDLModuleMapSDD,1);