- Timestamp:
- 03/13/00 09:12:26 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx
r363 r373 1 #ifndef __MTrigger__ 2 #define __MTrigger__ 1 #ifndef __MTrigger__ 2 #define __MTrigger__ 3 4 #define CASE_SHOW 0 5 #define CASE_NSB 1 6 #define CASE_STAR 2 3 7 4 8 // class MTrigger … … 6 10 // implemented by Harald Kornmayer 7 11 // 8 // This is a class to simulate the trigger. 9 // It assumes a special response of the PMT for one single Photo-electron. 10 // 12 // This is a class to simulate the trigger. 13 // It assumes a special response of the PMT for one single Photo-electron. 14 // 11 15 // 12 16 // 13 17 #include <iostream.h> 14 #include <math.h> 18 #include <math.h> 15 19 16 20 #include "TROOT.h" … … 19 23 #include "TH1.h" 20 24 21 #include "Mdefine.h" 25 #include "Mdefine.h" 22 26 #include "MMcEvt.h" 23 27 24 28 #include "MTriggerDefine.h" 25 29 30 26 31 //========== 27 32 // MTrigger 28 33 // 29 // The simulation of the Trigger for MonteCarlo Events is using this 34 // The simulation of the Trigger for MonteCarlo Events is using this 30 35 // class. So all methods concerning the trigger should be done inside this 31 // class. 36 // class. 32 37 // 33 38 // For a better understanding of the behavior of the trigger is here small … … 37 42 // We now from the camera program (This is the surrounding of the class 38 43 // MTrigger.) that one photo electron leaves at time t the photo cathode 39 // of the pixel number iPix). 44 // of the pixel number iPix). 40 45 // 41 46 // At the end of the PMT, the preamp, the optical fiber transmission we 42 // get a signal of a given shape. After some discussion with Eckart the 43 // standard response function looks like this : 44 // 45 // It is a gaussian Signal with a given FWHM. 47 // get a signal of a given shape. After some discussion with Eckart the 48 // standard response function looks like this : 49 // 50 // It is a gaussian Signal with a given FWHM. 46 51 // 47 52 // So whenever a photo electron leaves the photo cathod, on has to add 48 // the standard response function to the analog signal of the pixel. 53 // the standard response function to the analog signal of the pixel. 49 54 // 50 // Each pixel of the camera has such an summed-up analog signal. It may 51 // look like this picture: 55 // Each pixel of the camera has such an summed-up analog signal. It may 56 // look like this picture: 52 57 // 53 58 // 54 59 // This is the input of the discriminator for the pixels. The output of 55 60 // the discriminator is a digital signal. The response of the diskriminator 56 // is not fixed at the moment. There are discussion about this topic. 61 // is not fixed at the moment. There are discussion about this topic. 57 62 // 58 63 // At the moment the response is very simple. Whenever the analog signal 59 // is crossing a defined threshold from below to above, a digital signal 60 // with a given length is created. 64 // is crossing a defined threshold from below to above, a digital signal 65 // with a given length is created. 61 66 // 62 // No wone can start with the simulation of different trigger levels.67 // No one can start with the simulation of different trigger levels. 63 68 // 64 69 // The TriggerLevelZero is a very easy one. It is just looking if there … … 66 71 // a TriggerLevelZero signal is created. 67 72 // 68 // The TriggerLevelOne is implemented now. This isbe a kind of next73 // The TriggerLevelOne is not implemented now. This will be a kind of next 69 74 // neighbour condition (i.e. four neigbouring analog signals at the same 70 75 // time, but this requests at least four digital signals at level ON, what 71 // is equivalent with a TriggerLevelZero. 76 // is equivalent with a TriggerLevelZero. 72 77 // 73 78 // … … 76 81 private: 77 82 // 78 // then for all pixels the shape of all the analog signals 83 // then for all pixels the shape of all the analog signals 79 84 // 80 85 Bool_t used [TRIGGER_PIXELS] ; // a boolean to indicated if the pixels is used in this event 81 Int_t nphot[TRIGGER_PIXELS]; // count the photo electrons per pixel (NSB phe are not counted) 86 Int_t nphotshow[TRIGGER_PIXELS]; // count the photo electrons per pixel coming from showers 87 Int_t nphotnsb[TRIGGER_PIXELS]; // count the photo electrons per pixel coming from NSB 88 Int_t nphotstar[TRIGGER_PIXELS]; // count the photo electrons per pixel coming from stars 82 89 83 90 Float_t *a_sig[TRIGGER_PIXELS] ; // the analog signal for pixels … … 96 103 Float_t sum_d_sig[TRIGGER_TIME_SLICES] ; 97 104 98 99 105 // 100 106 // first the data for the response function … … 103 109 Float_t ampl_resp ; // amplitude of the phe_response function (in mV) 104 110 Float_t sing_resp[ RESPONSE_SLICES ] ; // the shape of the phe_response function 111 Float_t peak_time ; // the time from the start of the response function to the maximum peak 105 112 106 113 TH1F *histPmt ; … … 112 119 // 113 120 114 Float_t chan_thres ; // the threshold (in mV) for each individuel pixels121 Float_t chan_thres[TRIGGER_PIXELS] ; // the threshold (in mV) for each individuel pixels 115 122 Float_t gate_leng ; // the length of the digital signal if analog signal is above threshold 116 123 117 124 Float_t trigger_multi ; // Number of Pixels requested for a Trigger 118 125 Int_t trigger_geometry ; // 0 means a pixel with trigger_multi-1 neighbours 126 // 1 means trigger_multi neighbours 127 // 2 means trigger_multi closed neighbours 119 128 // 120 129 // The lookup table for the next neighbours … … 128 137 129 138 Int_t nZero ; // how many ZeroLevel Trigger in one Event 130 Int_t SlicesZero[5] ; // Times Slices at which the ZeroLevel Triggers occur139 Bool_t SlicesZero[TRIGGER_TIME_SLICES] ; // Times Slices at which the ZeroLevel Triggers occur 131 140 132 141 Int_t nFirst ; // how many FirstLevel Trigger in one Event … … 136 145 Int_t SlicesSecond[5] ; // Times Slices at which the SecondLevel Triggers occur 137 146 147 private: 138 148 149 Float_t Fill( Int_t, Float_t, Int_t ) ; 150 151 Bool_t PassNextNeighbour( Bool_t m[], Bool_t *n) ; 152 139 153 public: 140 154 … … 145 159 void Reset() ; 146 160 147 Float_t Fill ( Int_t, Float_t ) ;161 Float_t FillShow( Int_t, Float_t ) ; 148 162 149 163 Float_t FillNSB( Int_t, Float_t ) ; 150 164 165 Float_t FillStar( Int_t, Float_t ) ; 166 151 167 void ElecNoise() ; 152 168 153 Int_t Diskriminate() ; 169 void SetResponseShape(); 170 171 void ReadParam(char name[]); 172 173 void Diskriminate() ; 174 175 void ShowSignal (MMcEvt *McEvt) ; 176 177 Int_t ZeroLevel() ; 154 178 155 179 Int_t FirstLevel() ; 156 157 Bool_t PassNextNeighbour( Bool_t m[] ) ;158 159 void ShowSignal (MMcEvt *McEvt) ;160 180 161 181 Float_t GetFirstLevelTime( Int_t il ) ;
Note:
See TracChangeset
for help on using the changeset viewer.