source: trunk/MagicSoft/Mars/mtemp/mpisa/triggerdisplay/MMcTriggerLvl2.h@ 5138

Last change on this file since 5138 was 4918, checked in by galante, 20 years ago
*** empty log message ***
File size: 3.8 KB
Line 
1#ifndef MARS_MMcTriggerLvl2
2#define MARS_MMcTriggerLvl2
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7
8#ifndef MARS_MParContainer
9#include "MParContainer.h"
10#endif
11
12class MMcTrig;
13class MMcEvt;
14class MGeomCamMagic;
15class MGeomCam;
16class MGeomPix;
17
18class MMcTriggerLvl2 : public MParContainer, public MCamEvent
19{
20 private:
21
22 // Global trigger variables related to the geometry and trigger structures are here defined.
23 // FIXME! this is a temporary solution: these variables should be defined in a GeomTrg class
24
25 static const Int_t fNumPixCell = 36; // Number of pixels in one cell
26
27 static const Int_t gsNCells = 19;
28 static const Int_t gsNTrigPixels = 397;
29 static const Int_t gsNPixInCell = 36;
30 static const Int_t gsNLutInCell = 3;
31 static const Int_t gsNPixInLut = 12;
32 Int_t fPixels[gsNPixInCell][gsNCells];
33 static const Int_t gsPixelsInCell[gsNPixInCell][gsNCells];
34 static const Int_t gsPixelsInLut[gsNLutInCell][gsNPixInLut];
35 // Array with flag for triggered pixels. 1st idx:pixels in trigger cell; 2nd idx:trigger cell number
36
37 Int_t fFiredPixel[gsNTrigPixels]; // Array with flag for triggered pixel. idx: pixel id
38
39 Int_t fMaxCell; // Cell with maximum number of fired pixels
40
41 Int_t fLutPseudoSize; // number of compact pixels in one lut
42 Int_t fPseudoSize; // Multiplicity of the cluster identified by the L2T
43 Int_t fSizeBiggerCell; // Number of fired pixel in bigger cell
44 Int_t fCompactNN; //Number of NN pixels that define a compact pixel
45 Int_t fCompactPixel[gsNTrigPixels]; //Array with flag for compact pixels
46 Int_t fCluster_pix[gsNTrigPixels]; //Array with pixel in cluster
47 Double_t fEnergy; // Energy of the shower
48 Int_t fTriggerPattern; // x-NN compact trigger pattern;
49 Int_t fCellPseudoSize; // number of compact pixels in one cell
50 // Int_t fCellCompactPixels[fNumPixCell]; // Array with compact pixels in cell
51
52 MMcTrig *fMcTrig;
53 MGeomCam *fGeomCam;
54
55
56 Int_t CalcBiggerFiredCell();
57 Int_t CalcBiggerLutPseudoSize();
58 void CalcPseudoSize();
59 Int_t CalcCellPseudoSize();
60 Int_t CalcBiggerCellPseudoSize();
61 Int_t GetCellCompactPixel(int cell, MGeomCam *fCam);
62
63 void SetNewCamera(MGeomCam *geom) {fGeomCam = geom;}
64
65 public:
66
67 MMcTriggerLvl2(const char* name = NULL, const char* title = NULL);
68 ~MMcTriggerLvl2();
69
70 virtual void Calc();
71 virtual void Print(Option_t *opt="") const;
72
73 void SetLv1(MMcTrig *trig = NULL);
74 void SetPixelFired(Int_t pixel, Int_t fired=1);
75 void SetCompactNN(Int_t neighpix) {fCompactNN=neighpix;}
76
77 Int_t GetPseudoSize() const {return fPseudoSize;}
78 Int_t GetLutPseudoSize() const {return fLutPseudoSize;}
79 Int_t GetSizeBiggerCell() const {return fSizeBiggerCell;}
80 Int_t GetCompactNN() const {return fCompactNN;}
81 Int_t GetCellPseudoSize() const {return fCellPseudoSize;}
82 Int_t GetMaxCell() const {return (fMaxCell+1);} // Returns
83 // cell with maximum number of compact pixels
84 Int_t GetCellNumberFired(int cell);
85 Int_t GetLutCompactPixel(int cell, int lut);
86 void CalcCompactPixels(MGeomCam *fCam);
87 void CalcTriggerPattern(MGeomCam *fCam);
88
89 const Int_t* GetPixelsInCell() const { return &(**gsPixelsInCell);}
90 const Int_t* GetPixelsInLut() const { return &(**gsPixelsInLut);}
91
92 Int_t GetTriggerPattern() const {return fTriggerPattern;}
93
94 void GetEnergy(MMcEvt *fMcEvt = NULL);
95 Double_t GetEnergy() const {return fEnergy;}
96
97 Bool_t IsPixelInCell(Int_t pixel, Int_t cell);
98 Bool_t IsPixelInTrigger(Int_t pixel) const;
99
100 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
101 void DrawPixelContent(Int_t num) const;
102
103
104 ClassDef(MMcTriggerLvl2,0) // Container for 2nd Level Trigger selection parameters
105 };
106
107#endif
108
Note: See TracBrowser for help on using the repository browser.