]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSModuleDaSSD.h
Code cleanup in AliITSDetTypeRec and vertexers + minor bug fix in AliITSVertexer3D...
[u/mrichter/AliRoot.git] / ITS / AliITSModuleDaSSD.h
CommitLineData
f67db810 1#ifndef ALIITSMODULEDASSD_H
2#define ALIITSMODULEDASSD_H
3
4
223dda26 5/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7/* */
371588bb 8/* $Id$ */
223dda26 9///////////////////////////////////////////////////////////////////////////////
10///
2e2c6def 11/// This class provides storage container ITS SSD module calibration data
223dda26 12/// used by DA.
61a57d07 13/// Date: 18/07/2008
223dda26 14///////////////////////////////////////////////////////////////////////////////
f67db810 15
223dda26 16#include "TObject.h"
c4d90345 17#include "TArrayF.h"
371588bb 18#include "TArrayS.h"
f67db810 19#include "AliITSChannelDaSSD.h"
20
223dda26 21class AliITSNoiseSSD;
2e2c6def 22class AliITSPedestalSSD;
23class AliITSBadChannelsSSD;
223dda26 24
f67db810 25class AliITSModuleDaSSD : public TObject {
26 public :
27 AliITSModuleDaSSD();
28 AliITSModuleDaSSD(const Int_t numberofstrips);
29 AliITSModuleDaSSD(const Int_t numberofstrips, const Long_t eventsnumber);
30 AliITSModuleDaSSD(const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const UShort_t moduleID);
31 AliITSModuleDaSSD(const AliITSModuleDaSSD& module);
32 AliITSModuleDaSSD& operator = (const AliITSModuleDaSSD& module);
33 virtual ~AliITSModuleDaSSD();
34
35 UChar_t GetDdlId() const { return fDdlId; }
36 UChar_t GetAD() const { return fAd; }
37 UChar_t GetADC() const { return fAdc; }
c4d90345 38 Short_t GetModuleId() const { return fModuleId; }
f67db810 39 Int_t GetModuleRorcEquipId() const { return fEquipId; }
40 Int_t GetModuleRorcEquipType() const { return fEquipType; }
41 Int_t GetNumberOfStrips() const { return fNumberOfStrips; }
42 Long_t GetEventsNumber() const { return fEventsNumber; }
c4d90345 43 Float_t* GetCM(const Int_t chipn) const { return chipn < fNumberOfChips ? fCm[chipn].GetArray() : NULL; }
44 Float_t GetCM(const Int_t chipn, const Long_t evn) const;
371588bb 45 TArrayF* GetCM() const { return fCm; }
46 Short_t* GetCMFerom(const Int_t chipn) const { return chipn < fgkChipsPerModule ? fCmFerom[chipn].GetArray() : NULL; }
47 Short_t GetCMFerom(const Int_t chipn, const Long_t evn) const;
48 TArrayS* GetCMFerom() const { return fCmFerom; }
c4d90345 49 Int_t GetNumberOfChips() const { return fNumberOfChips; }
f67db810 50 AliITSChannelDaSSD* GetStrip(const Int_t stripnumber) const
51 { return (fStrips) ? fStrips[stripnumber] : NULL; }
61a57d07 52 UChar_t CheckIfBad(const Int_t stripn) const;
f67db810 53 Bool_t SetEventsNumber(const Long_t eventsnumber);
c4d90345 54 Bool_t SetNumberOfStrips(const Int_t numberofstrips);
55 Bool_t SetNumberOfChips(const Int_t nchips);
56 Bool_t SetModuleIdData (const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const Short_t moduleID);
f67db810 57 void SetModuleFEEId (const UChar_t ddlID, const UChar_t ad, const UChar_t adc);
58 void SetModuleRorcId (const Int_t equipid, const Int_t equiptype);
c4d90345 59 void SetModuleId (const Short_t moduleID) { fModuleId = moduleID; }
f67db810 60 void SetStrip(AliITSChannelDaSSD* strip, const Int_t strID) { if ((fStrips) && (strID <= fNumberOfStrips)) fStrips[strID] = strip; }
c4d90345 61 void SetCM (Float_t* cm, const Int_t chipn) { if (chipn < fNumberOfChips) fCm[chipn].Set(fCm[chipn].GetSize(), cm); }
62 Bool_t SetCM (const Float_t cm, const Int_t chipn, const Int_t evn);
a69c8ba0 63 void DeleteCM () {if (fCm) { delete [] fCm; fNumberOfChips = 0; fCm = NULL; } }
f67db810 64 void DeleteSignal() {if (fStrips) for (Int_t i = 0; i < fNumberOfStrips; i++)
65 if (fStrips[i]) fStrips[i]->DeleteSignal(); fEventsNumber = 0; }
371588bb 66 void SetCMFerom (Short_t* cm, const Int_t chipn) { if (chipn < fgkChipsPerModule) fCmFerom[chipn].Set(fCmFerom[chipn].GetSize(), cm); }
67 Bool_t SetCMFerom (const Short_t cm, const Int_t chipn, const Int_t evn);
68 Bool_t SetCMFeromEventsNumber(const Long_t eventsnumber);
69 void DeleteCMFerom () {if (fCmFerom) { delete [] fCmFerom; fCmFerom = NULL; } }
70
f67db810 71 static Int_t GetStripsPerModuleConst() { return fgkStripsPerModule; }
72 static Int_t GetPNStripsPerModule() { return fgkPNStripsPerModule;}
73 static Int_t GetStripsPerChip() { return fgkStripsPerChip; }
c4d90345 74 static Int_t GetChipsPerModuleConst() { return fgkChipsPerModule; }
f67db810 75
76 protected :
c4d90345 77 static const Int_t fgkStripsPerModule; // Number of strips per SSD module
78 static const Int_t fgkPNStripsPerModule; // Number of N/P strips per SSD module
79 static const Int_t fgkStripsPerChip; // Number of strips per chip HAL25
80 static const UChar_t fgkMaxAdNumber; // MAx SSD FEROM AD number
81 static const UChar_t fgkMaxAdcNumber; // MAx SSD FEROM ADC number
82 static const Int_t fgkChipsPerModule; // Number of HAL25 chips per SSD module
f67db810 83
84 Int_t fEquipId; // required to access to rorc
223dda26 85 Int_t fEquipType; // fEquipType, required to access to rorc
f67db810 86 UChar_t fDdlId; // index of DDL, ITS SSD: 33-48
87 UChar_t fAd; // index of AD module 0-9
88 UChar_t fAdc; // index of ADC module 0-5, 8-13
2e2c6def 89 Short_t fModuleId; // Module number 500-2197
c4d90345 90
91 Int_t fNumberOfStrips; // Number of AliITSChannelDaSSD* allocated
92 AliITSChannelDaSSD **fStrips; //[fNumberOfStrips] Array of *AliITSChannelDaSSD
f67db810 93
c4d90345 94 Int_t fNumberOfChips; // Number of TArrayF objects allocated for CM
95 TArrayF *fCm; //[fNumberOfChips] CM
371588bb 96 TArrayS *fCmFerom; // CM calculated in FEROM
f67db810 97
c4d90345 98 Long_t fEventsNumber; // number of events for fsignal memory allocation
f67db810 99
100 private:
101 Bool_t ForbiddenAdcNumber (const UChar_t adcn) const { return ((adcn == 6) || (adcn == 7)); }
102
61a57d07 103 ClassDef(AliITSModuleDaSSD, 4)
f67db810 104
105};
106
107#endif