]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/AliVZEROTriggerSimulator.h
Update
[u/mrichter/AliRoot.git] / VZERO / AliVZEROTriggerSimulator.h
CommitLineData
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
20class AliVZEROLogicalSignal;\r
21class TTree;\r
22class TClonesArray;\r
23\r
24class AliVZEROTriggerSimulator : public TObject {\r
25public:\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
67 \r
68private:\r
69 // Private methods\r
90c0f772 70 AliVZEROTriggerSimulator(const AliVZEROTriggerSimulator &/*triggerSim*/);\r
71 AliVZEROTriggerSimulator& operator= (const AliVZEROTriggerSimulator & /*triggerSim*/);\r
a08520b8 72 AliVZEROTriggerData * LoadTriggerData() const ;\r
73 void GenerateBBWindows();\r
74 void GenerateBGWindows();\r
75 \r
76 // Members\r
e370cdfe 77 AliVZEROLogicalSignal * fBBGate[AliVZEROTriggerData::kNCIUBoards]; // BB Observation window\r
78 AliVZEROLogicalSignal * fBBLatch[AliVZEROTriggerData::kNCIUBoards]; // BB Latch window\r
79 AliVZEROLogicalSignal * fBBReset[AliVZEROTriggerData::kNCIUBoards]; // BB Reset Window\r
a08520b8 80 \r
e370cdfe 81 AliVZEROLogicalSignal * fBGGate[AliVZEROTriggerData::kNCIUBoards]; // BG Observation window\r
82 AliVZEROLogicalSignal * fBGLatch[AliVZEROTriggerData::kNCIUBoards]; // BG Latch Window\r
83 AliVZEROLogicalSignal * fBGReset[AliVZEROTriggerData::kNCIUBoards]; // BG Reset Window\r
a08520b8 84\r
85 AliVZEROTriggerData *fTriggerData; // Object holding the trigger configuration parameters\r
86 \r
e370cdfe 87 TTree* fDigitsTree; //Pointer to VZERO digit tree\r
88 TClonesArray* fDigits; //Pointer to VZERO digit array\r
a08520b8 89 \r
e370cdfe 90 Bool_t fBBFlags[64]; // Individual BB Flags\r
91 Bool_t fBGFlags[64]; // Individual BG Flags\r
5978520a 92 Float_t fCharges[64]; // Individual Charge\r
a08520b8 93 \r
e370cdfe 94 UShort_t fTriggerWord; // Word holding the 16 triggers return by the FEE\r
a08520b8 95 \r
5978520a 96 ClassDef( AliVZEROTriggerSimulator, 2 ) \r
a08520b8 97\r
98};\r
99\r
100\r
101#endif // ALIVZEROTRIGGERSIMULATOR_H\r
90c0f772 102\r
e370cdfe 103\r