1 #ifndef ALIHLTMUONHITRECONSTRUCTOR_H
2 #define ALIHLTMUONHITRECONSTRUCTOR_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////
9 //Author : Indranil Das, SINP, INDIA
10 // Sukalyan Chattopadhyay, SINP, INDIA
13 //Email : indra.das@saha.ac.in
14 // sukalyan.chattopadhyay@saha.ac.in
15 ///////////////////////////////////////////////
26 #include <AliHLTLogging.h>
30 typedef map<int,int> BusToDetElem ;
32 struct AliHLTMUONRecHitStruct;
35 class AliHLTMUONHitReconstructor : public AliHLTLogging
40 int fIdManuChannel; // Manu channel address
41 int fIX,fIY; // The X,Y number of the pad.
42 float fRealX,fRealY,fRealZ; // The real coordinate of the pad.
43 int fPlane,fPcbZone; // The plane and PCB zone ID numbers.
47 int fDetElemId; // The detector element ID of the pad.
48 int fBuspatchId; // The bus patch ID number for the pad.
49 int fIdManuChannel; // The Manu channel address.
50 int fIX,fIY; // The X,Y number of the pad.
51 float fRealX,fRealY,fRealZ; // The real coordinate of the pad.
52 int fPlane,fPcbZone; // The plane and PCB zone ID numbers.
53 int fCharge; // The charge measured on the pad.
57 AliHLTMUONHitReconstructor();
58 virtual ~AliHLTMUONHitReconstructor(void);
60 bool LoadLookUpTable(DHLTLut* lookUpTableData, int lookUpTableId);
61 bool SetBusToDetMap(BusToDetElem busToDetElem);
64 bool Run(int* rawData, int *rawDataSize, AliHLTMUONRecHitStruct recHit[], int *nofHit);
66 void SetDCCut(int dcCut) {fDCCut = dcCut;}
67 void SetDebugLevel(int debugLevel) {fDebugLevel = debugLevel;}
68 int GetDebugLevel() const {return fDebugLevel;}
69 int GetDEId(int iBusPatch) {return fBusToDetElem[iBusPatch] ;}
71 int GetLutLine(int iDDL) const;
73 static int GetkDetectorId() { return fgkDetectorId; }
74 static int GetkDDLOffSet() { return fgkDDLOffSet; }
75 static int GetkNofDDL() { return fgkNofDDL; }
76 static int GetkDDLHeaderSize() { return fgkDDLHeaderSize; }
79 static const int fgkDetectorId ; // DDL Offset
80 static const int fgkDDLOffSet ; // DDL Offset
81 static const int fgkNofDDL ; // Number of DDL
82 static const int fgkDDLHeaderSize ; // DDL header size
84 AliHLTMUONHitReconstructor(const AliHLTMUONHitReconstructor& rhs); // copy constructor
85 AliHLTMUONHitReconstructor& operator=(const AliHLTMUONHitReconstructor& rhs); // assignment operator
89 static const int fgkEvenLutSize ; // Size of the LookupTable with event DDLID
90 static const int fgkOddLutSize ; // Size of the LookupTable with odd DDLID
91 static const int fgkLutLine[2]; // nof Line in LookupTable
93 static const int fgkMinIdManuChannel[2]; // Minimum value of idManuChannel in LookupTable
94 static const int fgkMaxIdManuChannel[2]; // Maximum value of idManuChannel in LookupTable
95 static const float fgkHalfPadSize[3]; // pad halflength for the pcb zones
98 int fkBlockHeaderSize ; // Block header size
99 int fkDspHeaderSize ; // DSP header size
100 int fkBuspatchHeaderSize ; // buspatch header size
102 int fDCCut; // DC Cut value
104 DHLTPad* fPadData; // pointer to the array containing the information of each padhits
105 DHLTLut* fLookUpTableData; // pointer to the array of Lookuptable data
107 AliHLTMUONRecHitStruct *fRecPoints; // Reconstructed hits
108 int *fRecPointsCount; // nof reconstructed hit
109 int fMaxRecPointsCount; // max nof reconstructed hit
111 int fCentralCountB, fCentralCountNB; // centeral hits
112 int fIdOffSet,fDDLId; // DDLId and DDL id offset
113 int fDigitPerDDL; // Total nof Digits perDDL
115 int *fDetManuChannelIdList; // pointer to an array of idManuChannel
116 int *fCentralChargeB,*fCentralChargeNB; // pointer to an array of central hit
117 float *fRecX,*fRecY; // pointer to an array of reconstructed hit
118 float *fAvgChargeX,*fAvgChargeY; // average charge on central pad found using CG method
119 int fGetIdTotalData[336][80][2] ; // an array of idManuChannel with argumrnt of centralX,centralY and planeType
120 int fNofFiredDetElem,fMaxFiredPerDetElem[13]; // counter for detector elements that are fired
122 BusToDetElem fBusToDetElem; // Mapping between bus address and detector element ID.
124 bool ReadDDL(int* rawData, int *rawDataSize);
125 void FindCentralHits(int minPadId, int maxPadId);
130 //ClassDef(AliHLTMUONHitReconstructor,0)
134 #endif // ALIHLTMUONHITRECONSTRUCTOR_H