source: releases/Mars.2014.05.26/mmc/MMcTrigHeader.hxx@ 18288

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