source: trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.h@ 2951

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