1 | #ifndef __MMcTrigHeader__
|
---|
2 | #define __MMcTrigHeader__
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #include "MTriggerDefine.h"
|
---|
9 | #include "Mdefine.h"
|
---|
10 |
|
---|
11 | class MMcTrigHeader : public MParContainer{
|
---|
12 | private:
|
---|
13 |
|
---|
14 | Short_t fTopology ; // Topology of the trigger
|
---|
15 | // 0 = N-1 neighbours of one pixel
|
---|
16 | // 1 = N neighbours
|
---|
17 | // 2 = N closed pack
|
---|
18 | Short_t fMultiplicity ; // Pixel multiplicity of trigger configuration
|
---|
19 | Float_t fThreshold[CAMERA_PIXELS] ; // Threshold for trigger
|
---|
20 | UInt_t fTrigPattern[2]; // Used to inddentify with
|
---|
21 | // RawEvt::Trigger Pattern identification
|
---|
22 | Float_t fTrigShape ; // a number that indicate the shape type of
|
---|
23 | // the signal
|
---|
24 | // = 0 --> a gaussian
|
---|
25 | Float_t fAmplTrig ; // the amplitude of the trigger in mV
|
---|
26 | Float_t fFwhmTrig ; // the width of the signal in nsec
|
---|
27 | Float_t fOverlapingTime;// Minimum coincidence time
|
---|
28 | Float_t fGateLeng; // the length of the digital signal if analog
|
---|
29 | // signal is above threshold
|
---|
30 | Float_t fElecNoiseTrig; // The width of the gaussian noise is that times
|
---|
31 | // the amplitude of the single phe response
|
---|
32 | // for the trigger
|
---|
33 |
|
---|
34 | public:
|
---|
35 | MMcTrigHeader() ;
|
---|
36 |
|
---|
37 | ~MMcTrigHeader();
|
---|
38 |
|
---|
39 | void Print(Option_t *opt=NULL) const;
|
---|
40 |
|
---|
41 | void SetTopology(Short_t nTop) {
|
---|
42 | fTopology=nTop;
|
---|
43 | }
|
---|
44 |
|
---|
45 | void SetMultiplicity(Short_t nMul) {
|
---|
46 | fMultiplicity=nMul;
|
---|
47 | }
|
---|
48 |
|
---|
49 | void SetThreshold(Float_t fthr[]){
|
---|
50 | int i;
|
---|
51 | for(i=0;i<CAMERA_PIXELS;i++){
|
---|
52 | fThreshold[i]=fthr[i];
|
---|
53 | }
|
---|
54 | }
|
---|
55 |
|
---|
56 | void SetTrigPattern (UInt_t upi, UInt_t loi){
|
---|
57 |
|
---|
58 | if (upi==loi==0) {
|
---|
59 | fTrigPattern[0]= (UInt_t) fThreshold[0];
|
---|
60 | fTrigPattern[1]= (UInt_t) (100*fMultiplicity+fTopology);
|
---|
61 | }
|
---|
62 | else {
|
---|
63 | fTrigPattern[0]=upi;
|
---|
64 | fTrigPattern[1]=loi;
|
---|
65 | }
|
---|
66 | }
|
---|
67 |
|
---|
68 | void SetShape(Float_t shape){
|
---|
69 | fTrigShape=shape;
|
---|
70 | }
|
---|
71 |
|
---|
72 | void SetAmplitud(Float_t amp){
|
---|
73 | fAmplTrig=amp;
|
---|
74 | }
|
---|
75 |
|
---|
76 | void SetFwhm(Float_t fwhm){
|
---|
77 | fFwhmTrig=fwhm;
|
---|
78 | }
|
---|
79 |
|
---|
80 | void SetOverlap(Float_t overlap){
|
---|
81 | fOverlapingTime=overlap;
|
---|
82 | }
|
---|
83 |
|
---|
84 | void SetGate(Float_t gate){
|
---|
85 | fGateLeng=gate;
|
---|
86 | }
|
---|
87 |
|
---|
88 | void SetElecNoise( Float_t elecnoise){
|
---|
89 | fElecNoiseTrig = elecnoise;
|
---|
90 | }
|
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 | Short_t GetMultiplicity() { return fMultiplicity; }
|
---|
95 |
|
---|
96 | Float_t GetMeanThreshold()
|
---|
97 | {
|
---|
98 | int i;
|
---|
99 | Float_t sum = 0., trigpix = 0.;
|
---|
100 | for(i=0;i<CAMERA_PIXELS;i++)
|
---|
101 | {
|
---|
102 | if (fThreshold[i] < 1.e6 && fThreshold[i] > 0.)
|
---|
103 | {
|
---|
104 | sum += fThreshold[i];
|
---|
105 | trigpix += 1.;
|
---|
106 | }
|
---|
107 | }
|
---|
108 |
|
---|
109 | return (sum / trigpix);
|
---|
110 | }
|
---|
111 |
|
---|
112 |
|
---|
113 | ClassDef(MMcTrigHeader, 2) //Stores Montecarlo Information which describes the used trigger
|
---|
114 |
|
---|
115 | };
|
---|
116 |
|
---|
117 | #endif
|
---|
118 |
|
---|