1 #ifndef AliHLTMUONTRIGGERRECONSTRUCTOR_H
2 #define AliHLTMUONTRIGGERRECONSTRUCTOR_H
3 /**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * All rights reserved. *
8 * Indranil Das <indra.das@saha.ac.in> *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
21 /**********************************************************************
22 Created on : 16/05/2007
23 Purpose : This class is supposed to read the trigger DDL files and
24 give the output AliHLTMUONTriggerRecordStruct
25 Author : Indranil Das, HEP Division, SINP
26 Email : indra.das@saha.ac.in | indra.ehep@gmail.com
27 **********************************************************************/
32 #include <AliHLTLogging.h>
33 #include "AliHLTMUONTriggerRecordsBlockStruct.h"
34 #include "AliHLTMUONHitReconstructor.h"
35 #include "AliMUONTriggerCrateStore.h"
37 class AliHLTMUONTriggerReconstructor : public AliHLTLogging
42 AliHLTMUONTriggerReconstructor();
43 virtual ~AliHLTMUONTriggerReconstructor();
45 bool LoadLookUpTable(AliHLTMUONHitReconstructor::DHLTLut* lookUpTableData, int lookUpTableId);
47 //bool Run(int iEvent, int iDDL, AliHLTMUONTriggerRecordStruct trigRecord, int *nofTrigRec); // for Reading using rawreader
48 bool Run(int *rawData, int *rawDataSize, AliHLTMUONTriggerRecordStruct trigRecord[], int *nofTrigRec);
50 int GetLutLine(){return fgkLutLine ;}
52 static int GetkDetectorId() { return fgkDetectorId; }
53 static int GetkDDLOffSet() { return fgkDDLOffSet; }
54 static int GetkNofDDL() { return fgkNofDDL; }
55 static int GetkDDLHeaderSize() { return fgkDDLHeaderSize; }
58 static const int fgkDetectorId ; // DDL Offset
59 static const int fgkDDLOffSet ; // DDL Offset
60 static const int fgkNofDDL ; // Number of DDL
61 static const int fgkDDLHeaderSize ; // DDL header size
65 AliHLTMUONTriggerReconstructor(const AliHLTMUONTriggerReconstructor& rhs); // copy constructor
66 AliHLTMUONTriggerReconstructor& operator=(const AliHLTMUONTriggerReconstructor& rhs); // assignment operator
70 static const int fgkEvenLutSize ; // Size of the LookupTable with event DDLID
71 static const int fgkOddLutSize ; // Size of the LookupTable with odd DDLID
72 static const int fgkLutLine; // nof Line in LookupTable
74 static const int fgkMinIdManuChannel[2]; // Minimum value of idManuChannel in LookupTable
75 static const int fgkMaxIdManuChannel[2]; // Maximum value of idManuChannel in LookupTable
76 static const float fgkHalfPadSizeXB[3]; // pad halflength for the pcb zones
77 static const float fgkHalfPadSizeYNB[2]; // pad halflength for the pcb zones
79 static const int fgkDetElem; // nof Detection element per DDL
82 AliHLTMUONHitReconstructor::DHLTPad* fPadData; // pointer to the array containing the information of each padhits
83 AliHLTMUONHitReconstructor::DHLTLut* fLookUpTableData; // pointer to the array of Lookuptable data
85 AliHLTMUONTriggerRecordStruct *fRecPoints; // Reconstructed hits
86 int *fRecPointsCount; // nof reconstructed hit
87 int fMaxRecPointsCount; // max nof reconstructed hit
88 int fDigitPerDDL; // Total nof Digits perDDL
91 int fGetIdTotalData[104][64][2] ; // an array of idManuChannel with argumrnt of centralX,centralY and planeType
92 int fNofFiredDetElem,*fMaxFiredPerDetElem; // counter for detector elements that are fired
93 int *fDetManuChannelIdList; // pointer to an array of idManuChannel
94 int *fCentralChargeB,*fCentralChargeNB; // pointer to an array of central hit
100 AliMUONTriggerCrateStore* fCrateManager;
102 bool MergeTrigHits(int minPadId, int maxPadId);
103 bool FindTrigHits() ;
105 bool ReadDDL(int *rawData, int *rawDataSize);
106 bool Pattern2Pad(int nBoard, TArrayS* xyPattern, vector<AliHLTMUONHitReconstructor::DHLTPad>& padList);
110 #endif // AliHLTMUONTRIGGERRECONSTRUCTOR_H