Changeset 396 for trunk/MagicSoft/Simulation/Detector/include-MFadc
- Timestamp:
- 05/11/00 16:31:20 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx
r378 r396 33 33 // set up the response shape 34 34 // 35 Int_t i ;35 Int_t i,j ; 36 36 37 37 Float_t sigma ; … … 72 72 used [i] = FALSE ; 73 73 } 74 75 // 76 // set tha values of FADC slices that would be read after trigger to zero 77 // 78 79 for (i=0; i <CAMERA_PIXELS; i++){ 80 for (j=0; j<FADC_SLICES;j++){ 81 output[i][j]=0; 82 } 83 } 84 74 85 } 75 86 … … 79 90 // set all values of the signals to zero 80 91 // 81 Int_t i ;92 Int_t i,j ; 82 93 83 94 for ( i =0 ; i <CAMERA_PIXELS ; i++ ) { 84 95 used [i] = FALSE ; 85 96 } 97 // 98 // set tha values of FADC slices that would be read after trigger to zero 99 // 100 101 for (i=0; i <CAMERA_PIXELS; i++){ 102 for (j=0; j<FADC_SLICES;j++){ 103 output[i][j]=0; 104 } 105 } 86 106 } 87 107 … … 158 178 for ( Int_t i = 0 ; i < CAMERA_PIXELS; i++) { 159 179 if ( used [i] == TRUE ) { 160 161 180 for ( Int_t is=0 ; is< SLICES_MFADC ; is++ ) { 162 181 163 182 sig[i][is] += GenElec->Gaus(0., 2.) ; 183 164 184 } 165 185 } … … 203 223 Float_t t ; 204 224 205 t = time - 10. ; // to show also the start of the pulse before the 206 // the trigger time 225 (0 > time - TIME_BEFORE_TRIGGER)? t=0: t=(time-TIME_BEFORE_TRIGGER) ; // to show also the start of the pulse before the trigger time 207 226 208 227 if ( t < 0. ) { … … 235 254 } 236 255 237 256 void MFadc::TriggeredFadc(Float_t time) { 257 258 // 259 // first of all we subtract from the time a offset (8 ns) 260 // 261 262 Float_t t ; 263 264 (0>time-TIME_BEFORE_TRIGGER)? t=0: t=(time-TIME_BEFORE_TRIGGER) ; // to show also the start of the pulse before the trigger time 265 266 if ( t < 0. ) { 267 cout << " WARNING!! FROM MFADC::SCAN(t) " << endl ; 268 exit (776) ; 269 } 270 271 // 272 // calculate the first slice to write out 273 // 274 275 Int_t iFirstSlice ; 276 Int_t i; 277 278 iFirstSlice = (Int_t) ( t / WIDTH_FADC_TIMESLICE ) ; 279 280 for ( Int_t ip=0; ip<CAMERA_PIXELS; ip++ ) { 281 282 if ( used[ip] == kTRUE ) { 283 i=0; 284 for ( Int_t is=iFirstSlice ; is < (iFirstSlice+FADC_SLICES); is++ ) { 285 output[ip][i++]=(UChar_t) sig[ip][is]; 286 } 287 288 } 289 } 290 } 238 291 239 292 void MFadc::ShowSignal (MMcEvt *McEvt, Float_t trigTime) { … … 310 363 } 311 364 312 313 365 Float_t MFadc::GetFadcSignal(Int_t pixel, Int_t slice){ 366 367 // It returns the analog signal for a given pixel and a given FADC 368 // time slice which would be read. 369 370 return (output[pixel][slice]); 371 } 372 373
Note:
See TracChangeset
for help on using the changeset viewer.