]>
Commit | Line | Data |
---|---|---|
a08520b8 | 1 | #ifndef ALIVZEROTRIGGERSIMULATOR_H\r |
2 | #define ALIVZEROTRIGGERSIMULATOR_H\r | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights\r | |
4 | * reserved. \r | |
5 | *\r | |
6 | * See cxx source for full Copyright notice \r | |
7 | */\r | |
e370cdfe | 8 | // \r |
9 | // Class AliVZEROTriggerSimulator\r | |
10 | // ------------------------------\r | |
11 | // Simulate the VZERO Trigger response\r | |
12 | // Use FEE parameters stored in Database\r | |
13 | // Can work on real data or in simulation\r | |
14 | //\r | |
a08520b8 | 15 | \r |
16 | #include <TObject.h>\r | |
17 | \r | |
18 | #include "AliVZEROTriggerData.h"\r | |
19 | \r | |
20 | class AliVZEROLogicalSignal;\r | |
21 | class TTree;\r | |
22 | class TClonesArray;\r | |
23 | \r | |
24 | class AliVZEROTriggerSimulator : public TObject {\r | |
25 | public:\r | |
26 | AliVZEROTriggerSimulator();\r | |
27 | AliVZEROTriggerSimulator(TTree * digitsTree, TClonesArray* digits);\r | |
28 | ~AliVZEROTriggerSimulator();\r | |
a08520b8 | 29 | \r |
30 | AliVZEROTriggerData * GetTriggerData() const {return fTriggerData;};\r | |
31 | \r | |
32 | Bool_t GetBBAandBBC() const {return (fTriggerWord & 0x1);};\r | |
33 | Bool_t GetBBAorBBC() const {return (fTriggerWord>>1 & 0x1);};\r | |
34 | Bool_t GetBGAandBBC() const {return (fTriggerWord>>2 & 0x1);};\r | |
35 | Bool_t GetBGA() const {return (fTriggerWord>>3 & 0x1);};\r | |
36 | Bool_t GetBGCandBBA() const {return (fTriggerWord>>4 & 0x1);};\r | |
37 | Bool_t GetBGC() const {return (fTriggerWord>>5 & 0x1);};\r | |
38 | Bool_t GetCTA1andCTC1() const {return (fTriggerWord>>6 & 0x1);};\r | |
39 | Bool_t GetCTA1orCTC1() const {return (fTriggerWord>>7 & 0x1);};\r | |
40 | Bool_t GetCTA2andCTC2() const {return (fTriggerWord>>8 & 0x1);};\r | |
41 | Bool_t GetCTA2orCTC2() const {return (fTriggerWord>>9 & 0x1);};\r | |
42 | Bool_t GetMTAandMTC() const {return (fTriggerWord>>10 & 0x1);};\r | |
43 | Bool_t GetMTAorMTC() const {return (fTriggerWord>>11 & 0x1);};\r | |
44 | Bool_t GetBBA() const {return (fTriggerWord>>12 & 0x1);};\r | |
45 | Bool_t GetBBC() const {return (fTriggerWord>>13 & 0x1);};\r | |
46 | Bool_t GetBGAorBGC() const {return (fTriggerWord>>14 & 0x1);};\r | |
47 | Bool_t GetBeamGas() const {return (fTriggerWord>>15 & 0x1);};\r | |
48 | \r | |
49 | void SetBBAandBBC() { (fTriggerWord += 0x1);};\r | |
50 | void SetBBAorBBC() { (fTriggerWord += 0x1<<1);};\r | |
51 | void SetBGAandBBC() { (fTriggerWord += 0x1<<2);};\r | |
52 | void SetBGA() { (fTriggerWord += 0x1<<3);};\r | |
53 | void SetBGCandBBA() { (fTriggerWord += 0x1<<4);};\r | |
54 | void SetBGC() { (fTriggerWord += 0x1<<5);};\r | |
55 | void SetCTA1andCTC1() { (fTriggerWord += 0x1<<6);};\r | |
56 | void SetCTA1orCTC1() { (fTriggerWord += 0x1<<7);};\r | |
57 | void SetCTA2andCTC2() { (fTriggerWord += 0x1<<8);};\r | |
58 | void SetCTA2orCTC2() { (fTriggerWord += 0x1<<9);};\r | |
59 | void SetMTAandMTC() { (fTriggerWord += 0x1<<10);};\r | |
60 | void SetMTAorMTC() { (fTriggerWord += 0x1<<11);}; \r | |
61 | void SetBBA() { (fTriggerWord += 0x1<<12);};\r | |
62 | void SetBBC() { (fTriggerWord += 0x1<<13);};\r | |
63 | void SetBGAorBGC() { (fTriggerWord += 0x1<<14);};\r | |
64 | void SetBeamGas() { (fTriggerWord += 0x1<<15);};\r | |
65 | \r | |
66 | void Run();\r | |
0109b682 | 67 | virtual void Print(Option_t* /* opt */) const;\r |
a08520b8 | 68 | \r |
69 | private:\r | |
70 | // Private methods\r | |
90c0f772 | 71 | AliVZEROTriggerSimulator(const AliVZEROTriggerSimulator &/*triggerSim*/);\r |
72 | AliVZEROTriggerSimulator& operator= (const AliVZEROTriggerSimulator & /*triggerSim*/);\r | |
a08520b8 | 73 | AliVZEROTriggerData * LoadTriggerData() const ;\r |
26918303 | 74 | void LoadClockOffset();\r |
a08520b8 | 75 | void GenerateBBWindows();\r |
76 | void GenerateBGWindows();\r | |
0109b682 | 77 | Bool_t AreGatesOpen() const;\r |
a08520b8 | 78 | \r |
79 | // Members\r | |
e370cdfe | 80 | AliVZEROLogicalSignal * fBBGate[AliVZEROTriggerData::kNCIUBoards]; // BB Observation window\r |
81 | AliVZEROLogicalSignal * fBBLatch[AliVZEROTriggerData::kNCIUBoards]; // BB Latch window\r | |
82 | AliVZEROLogicalSignal * fBBReset[AliVZEROTriggerData::kNCIUBoards]; // BB Reset Window\r | |
a08520b8 | 83 | \r |
e370cdfe | 84 | AliVZEROLogicalSignal * fBGGate[AliVZEROTriggerData::kNCIUBoards]; // BG Observation window\r |
85 | AliVZEROLogicalSignal * fBGLatch[AliVZEROTriggerData::kNCIUBoards]; // BG Latch Window\r | |
86 | AliVZEROLogicalSignal * fBGReset[AliVZEROTriggerData::kNCIUBoards]; // BG Reset Window\r | |
a08520b8 | 87 | \r |
88 | AliVZEROTriggerData *fTriggerData; // Object holding the trigger configuration parameters\r | |
26918303 | 89 | Float_t fClockOffset[AliVZEROTriggerData::kNCIUBoards]; // TDC clock offset including roll-over, trig count and L0->L1 delay\r |
a08520b8 | 90 | \r |
e370cdfe | 91 | TTree* fDigitsTree; //Pointer to VZERO digit tree\r |
92 | TClonesArray* fDigits; //Pointer to VZERO digit array\r | |
a08520b8 | 93 | \r |
e370cdfe | 94 | Bool_t fBBFlags[64]; // Individual BB Flags\r |
95 | Bool_t fBGFlags[64]; // Individual BG Flags\r | |
5978520a | 96 | Float_t fCharges[64]; // Individual Charge\r |
a08520b8 | 97 | \r |
e370cdfe | 98 | UShort_t fTriggerWord; // Word holding the 16 triggers return by the FEE\r |
a08520b8 | 99 | \r |
26918303 | 100 | ClassDef( AliVZEROTriggerSimulator, 3 ) \r |
a08520b8 | 101 | \r |
102 | };\r | |
103 | \r | |
104 | \r | |
105 | #endif // ALIVZEROTRIGGERSIMULATOR_H\r | |
90c0f772 | 106 | \r |
e370cdfe | 107 | \r |