Line data Source code
1 : #ifndef ALIPHOSTRIGGERRAWDIGIPRODUCER_H
2 : #define ALIPHOSTRIGGERRAWDIGIPRODUCER_H
3 : /* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : class AliPHOSTriggerRawReader;
7 : class AliPHOSTriggerParameters;
8 : class AliRawReader;
9 : class AliCaloRawStreamV3;
10 :
11 : #include "TString.h"
12 : #include "TClonesArray.h"
13 :
14 : #include <vector>
15 :
16 : class AliPHOSTriggerRawDigiProducer
17 : {
18 : public:
19 :
20 : AliPHOSTriggerRawDigiProducer();
21 : AliPHOSTriggerRawDigiProducer(AliRawReader *rawReader);
22 :
23 : virtual ~AliPHOSTriggerRawDigiProducer();
24 :
25 : void ProcessEvent(TClonesArray* tdigits);
26 :
27 : void ProcessL0(TClonesArray* tdigits);
28 : void ProcessL1(TClonesArray* tdigits);
29 :
30 : void GetGammaPatchXY(Int_t itru, Int_t ieta, Int_t iphi, Int_t& x, Int_t& y);
31 : void GetL1GammaPatchModuleXZ(Int_t itru, Int_t xglob, Int_t yglob, Int_t& module, Int_t& x, Int_t& z);
32 :
33 8 : void SetTriggerParameters(AliPHOSTriggerParameters* parameters) {fParameters = parameters;}
34 16 : void SetAnalyseModule(int mod, bool analyse = true) {fModules[mod] = analyse;}
35 :
36 : static int Get2x2Max(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int xIdx, int zIdx);
37 : static int Get2x2Signal(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int xIdx, int zIdx, int timeBin);
38 : static int Get4x4Max(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int TRURow, int branch, int xIdx, int zIdx);
39 : static int Get4x4Signal(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int TRURow, int branch, int xIdx, int zIdx, int timeBin);
40 :
41 : static bool Is2x2Active(AliPHOSTriggerRawReader*, int mod, int xIdx, int zIdx);
42 : static bool Is2x2Active(AliPHOSTriggerRawReader*, int mod, int xIdx, int zIdx, int timeBin);
43 :
44 : const static int kNMods = 5; // number of PHOS modules
45 : const static int kNTRURows = 4; // number of TRU rows
46 : const static int kNBranches = 2; // number of branches
47 : const static int kN2x2X = 32; // (=64/2) Number of 2x2 in X direction
48 : const static int kN2x2Z = 28; // (=56/2) Number of 2x2 in Z direction
49 : const static Int_t kN2x2XPrTRURow = 8; // (=64/2/4) Number of 2x2 pr. row
50 : const static Int_t kN2x2ZPrBranch = 14; // (=56/2/2) Number of 2x2 pr. branch
51 : const static Int_t kN4x4XPrTRURow = 7; // (=64/2/4 -1) Number of 4x4 pr. row
52 : const static Int_t kN4x4ZPrBranch = 13; // (=56/2/2) -1 Number of 4x4 pr. branch
53 : const static int kNTRUTimeBins = 128; // number of TRU time bins
54 : const static int kNDefaultNEMCTimeBins = 62;
55 :
56 : private:
57 : AliPHOSTriggerRawDigiProducer(const AliPHOSTriggerRawDigiProducer &tdp); // not implemented
58 : AliPHOSTriggerRawDigiProducer& operator= (const AliPHOSTriggerRawDigiProducer &tdp); // not implemented
59 :
60 : protected:
61 : std::vector<bool> fModules; // , per module: should analyser analyse module
62 : UShort_t fSaturationThreshold;
63 : AliPHOSTriggerParameters* fParameters;
64 :
65 : private:
66 : AliRawReader * fRawReader; //! Raw data reader
67 : AliCaloRawStreamV3 * fRawStream; //! Calorimeter decoder of ALTRO format
68 : AliPHOSTriggerRawReader * fTriggerReader; //! TriggerRawReader
69 : static const Int_t fgkSTUDDL = 20; //! DDL ID of the PHOS STU
70 :
71 22 : ClassDef(AliPHOSTriggerRawDigiProducer,3)
72 : };
73 :
74 : #endif
|