1 ///////////////////////////////////////////////
2 //Author : Indranil Das, SINP, INDIA
3 // Sukalyan Chattopadhyay, SINP, INDIA
6 //Email : indra.das@saha.ac.in
7 // sukalyan.chattopadhyay@saha.ac.in
8 ///////////////////////////////////////////////
10 #ifndef HLTMUONHITRECONSTRUCTOR_H
11 #define HLTMUONHITRECONSTRUCTOR_H
20 // and hand control to the PubSub logging level
29 float fRealX,fRealY,fRealZ;
38 float fRealX,fRealY,fRealZ;
48 typedef map<int,int> BusToDetElem ;
50 class HLTMUONHitReconstructor
53 HLTMUONHitReconstructor();
54 virtual ~HLTMUONHitReconstructor(void);
56 bool LoadLookUpTable(DHLTLut* lookUpTableData, int lookUpTableId);
57 bool SetBusToDetMap(BusToDetElem busToDetElem);
60 bool Run(const int* rawData, int rawDataSize, DHLTRecPoint recHit[], int *nofHit);
62 void SetDCCut(int dcCut) {fDCCut = dcCut;}
63 void SetDebugLevel(int debugLevel) {fDebugLevel = debugLevel;}
64 int GetDebugLevel(){return fDebugLevel;}
65 int GetDEId(int iBusPatch) {return fBusToDetElem[iBusPatch] ;}
67 const int GetLutLine(int iDDL);
69 static const int fgkDetectorId ; // DDL Offset
70 static const int fgkDDLOffSet ; // DDL Offset
71 static const int fgkNofDDL ; // Number of DDL
72 static const int fgkDDLHeaderSize ; // DDL header size
74 HLTMUONHitReconstructor(const HLTMUONHitReconstructor& rhs); // copy constructor
75 HLTMUONHitReconstructor& operator=(const HLTMUONHitReconstructor& rhs); // assignment operator
79 static const int fgkEvenLutSize ; // Size of the LookupTable with event DDLID
80 static const int fgkOddLutSize ; // Size of the LookupTable with odd DDLID
81 static const int fgkLutLine[2]; // nof Line in LookupTable
83 static const int fgkMinIdManuChannel[2]; // Minimum value of idManuChannel in LookupTable
84 static const int fgkMaxIdManuChannel[2]; // Maximum value of idManuChannel in LookupTable
85 static const float fgkHalfPadSize[3]; // pad halflength for the pcb zones
88 int fkBlockHeaderSize ; // Block header size
89 int fkDspHeaderSize ; // DSP header size
90 int fkBuspatchHeaderSize ; // buspatch header size
92 int fDCCut; // DC Cut value
94 DHLTPad* fPadData; // pointer to the array containing the information of each padhits
95 DHLTLut* fLookUpTableData; // pointer to the array of Lookuptable data
97 DHLTRecPoint *fRecPoints; // Reconstructed hits
98 int *fRecPointsCount; // nof reconstructed hit
99 int fMaxRecPointsCount; // max nof reconstructed hit
101 int fCentralCountB, fCentralCountNB; // centeral hits
102 int fIdOffSet,fDDLId; // DDLId and DDL id offset
103 int fDigitPerDDL; // Total nof Digits perDDL
105 int *fDetManuChannelIdList; // pointer to an array of idManuChannel
106 int *fCentralChargeB,*fCentralChargeNB; // pointer to an array of central hit
107 float *fRecX,*fRecY; // pointer to an array of reconstructed hit
108 float *fAvgChargeX,*fAvgChargeY; // average charge on central pad found using CG method
109 int fGetIdTotalData[336][80][2] ; // an array of idManuChannel with argumrnt of centralX,centralY and planeType
110 int fNofFiredDetElem,fMaxFiredPerDetElem[13]; // counter for detector elements that are fired
112 BusToDetElem fBusToDetElem;
114 bool ReadDDL(const int* rawData, int rawDataSize);
115 void FindCentralHits(int minPadId, int maxPadId);
124 #endif // HLTMUONHITRECONSTRUCTOR_H