source: tags/Mars-V2.2/manalysis/MMcTriggerLvl2.h

Last change on this file was 3795, checked in by stamerra, 21 years ago
*** empty log message ***
File size: 3.7 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
34 // Array with flag for triggered pixels. 1st idx:pixels in trigger cell; 2nd idx:trigger cell number
35
36 Int_t fFiredPixel[gsNTrigPixels]; // Array with flag for triggered pixel. idx: pixel id
37 static const Int_t gsPixelsInCell[gsNPixInCell][gsNCells];
38 static const Int_t gsPixelsInLut[gsNLutInCell][gsNPixInLut];
39
40 Int_t fMaxCell; // Cell with maximum number of fired pixels
41
42 Int_t fLutPseudoSize; // number of compact pixels in one lut
43 Int_t fPseudoSize; // Multiplicity of the cluster identified by the L2T
44 Int_t fSizeBiggerCell; // Number of fired pixel in bigger cell
45 Int_t fCompactNN; //Number of NN pixels that define a compact pixel
46 Int_t fCompactPixel[gsNTrigPixels]; //Array with flag for compact pixels
47 Int_t fCluster_pix[gsNTrigPixels]; //Array with pixel in cluster
48 Double_t fEnergy; // Energy of the shower
49 Int_t fTriggerPattern; // x-NN compact trigger pattern;
50 Int_t fCellPseudoSize; // number of compact pixels in one cell
51 // Int_t fCellCompactPixels[fNumPixCell]; // Array with compact pixels in cell
52
53 MMcTrig *fMcTrig;
54 MGeomCam *fGeomCam;
55
56
57 Int_t CalcBiggerFiredCell();
58 Int_t CalcBiggerLutPseudoSize();
59 void CalcPseudoSize();
60 Int_t CalcCellPseudoSize();
61 Int_t CalcBiggerCellPseudoSize();
62 Int_t GetCellCompactPixel(int cell, MGeomCam *fCam);
63
64 void SetNewCamera(MGeomCam *geom) {fGeomCam = geom;}
65
66 public:
67
68 MMcTriggerLvl2(const char* name = NULL, const char* title = NULL);
69 ~MMcTriggerLvl2();
70
71 virtual void Calc();
72 virtual void Print(Option_t *opt="") const;
73
74 void SetLv1(MMcTrig *trig = NULL);
75 void SetPixelFired(Int_t pixel, Int_t fired=1);
76 void SetCompactNN(Int_t neighpix) {fCompactNN=neighpix;}
77
78 Int_t GetPseudoSize() const {return fPseudoSize;}
79 Int_t GetLutPseudoSize() const {return fLutPseudoSize;}
80 Int_t GetSizeBiggerCell() const {return fSizeBiggerCell;}
81 Int_t GetCompactNN() const {return fCompactNN;}
82 Int_t GetCellPseudoSize() const {return fCellPseudoSize;}
83 Int_t GetMaxCell() const {return (fMaxCell+1);} // Returns
84 // cell with maximum number of compact pixels
85 Int_t GetCellNumberFired(int cell);
86 Int_t GetLutCompactPixel(int cell, int lut);
87 void CalcCompactPixels(MGeomCam *fCam);
88 void CalcTriggerPattern(MGeomCam *fCam);
89
90 Int_t GetTriggerPattern() const {return fTriggerPattern;}
91
92 void GetEnergy(MMcEvt *fMcEvt = NULL);
93 Double_t GetEnergy() const {return fEnergy;}
94
95 Bool_t IsPixelInCell(Int_t pixel, Int_t cell);
96 Bool_t IsPixelInTrigger(Int_t pixel) const;
97
98 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
99 void DrawPixelContent(Int_t num) const;
100
101
102 ClassDef(MMcTriggerLvl2,0) // Container for 2nd Level Trigger selection parameters
103 };
104
105#endif
106
Note: See TracBrowser for help on using the repository browser.