Changeset 5319 for trunk/MagicSoft/Simulation/Detector
- Timestamp:
- 10/26/04 15:04:42 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.h
r5290 r5319 19 19 //= 20 20 //= $RCSfile: camera.h,v $ 21 //= $Revision: 1.2 4$21 //= $Revision: 1.25 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2004-10- 19 10:35:05$23 //= $Date: 2004-10-26 14:03:00 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 356 356 class MFadc *fadc, int *itotnphe, float *nphe, 357 357 int *nphot, int ict, float lambda, float sigma_lambda, 358 float phot_per_pix, float sigma_time, int selected_pixel); 358 float phot_per_pix, float sigma_time, int selected_pixel, 359 float fadc_jitter); 359 360 360 361 … … 368 369 /* 369 370 *$Log: not supported by cvs2svn $ 371 *Revision 1.24 2004/10/19 10:35:05 moralejo 372 **** empty log message *** 373 * 370 374 *Revision 1.23 2004/10/13 17:05:05 moralejo 371 375 **** empty log message *** -
trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx
r5248 r5319 920 920 921 921 // 922 // Here the slices to write out are calculated. Warning: the digitalization 923 // is NOT done here (it is already done in MFadc::Fill). This procedure only 924 // selects which FADC slices to write out, out of those contained in the sig[][] 925 // array. 926 // 927 928 // 922 929 // calculate the first slice to write out, according to trigger time: 923 930 // -
trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.cxx
r5248 r5319 74 74 // 75 75 76 fwhm_resp = RESPONSE_FWHM 77 ampl_resp = RESPONSE_AMPLITUDE 76 fwhm_resp = RESPONSE_FWHM; 77 ampl_resp = RESPONSE_AMPLITUDE; 78 78 79 79 overlaping_time = TRIGGER_OVERLAPING; 80 80 81 threshold = CHANNEL_THRESHOLD 82 83 84 gate_leng = TRIGGER_GATE 85 trigger_multi = TRIGGER_MULTI 86 trigger_geometry = TRIGGER_GEOM 81 threshold = CHANNEL_THRESHOLD; 82 83 84 gate_leng = TRIGGER_GATE; 85 trigger_multi = TRIGGER_MULTI; 86 trigger_geometry = TRIGGER_GEOM; 87 87 88 88 // … … 234 234 235 235 236 // 237 // the amplitude of one single photo electron is not a constant. 238 // There exists a measured distribution from Razmik. This distribution 239 // is used to simulate the noise of the amplitude. 240 // For this a histogramm (histPmt) is created and filled with the 241 // values. 242 // 243 244 histPmt = new TH1F ("histPmt","Noise of PMT", 40, 0., 40.) ; 245 246 Stat_t ValRazmik[41] = { 0., 2.14, 2.06, 2.05, 2.05, 2.06, 2.07, 2.08, 2.15, 247 2.27, 2.40, 2.48, 2.55, 2.50, 2.35, 2.20, 2.10, 248 1.90, 1.65, 1.40, 1.25, 1.00, 0.80, 0.65, 0.50, 249 0.35, 0.27, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 250 0.08, 0.06, 0.04, 0.02, 0.01, 0.005,0.003, 0.001} ; 251 252 histMean = histPmt->GetMean() ; 253 254 for (i=0;i<41;i++){ 255 histPmt->SetBinContent(i,ValRazmik[i]); 256 } 257 258 histMean = histPmt->GetMean() ; 236 // Initialize histogram histPmt which represents the distribution of amplitudes 237 // of the PMT response to a single photpelectron. 238 239 InitGainFluctuations(); 240 259 241 260 242 // … … 481 463 peak_time = ( (Float_t) imax ) / ( (Float_t) TRIG_SLICES_PER_NSEC ) ; 482 464 483 // 484 // the amplitude of one single photo electron is not a constant. 485 // There exists a measured distribution from Razmik. This distribution 486 // is used to simulate the noise of the amplitude. 487 // For this a histogramm (histPmt) is created and filled with the 488 // values. 489 // 490 465 466 // Initialize histogram histPmt which represents the distribution of amplitudes 467 // of the PMT response to a single photpelectron. 468 469 InitGainFluctuations(); 470 471 // 472 // Change name of histogram (tag with CT id) to avoid confusion in the case of 473 // multi-telescope simulations. 474 // 491 475 char histname[32]; 492 476 sprintf(histname, "histPmt_%d", ct_id); 493 histPmt = new TH1F (histname,"Noise of PMT", 40, 0., 40.) ; 494 495 Stat_t ValRazmik[41] = { 0., 2.14, 2.06, 2.05, 2.05, 2.06, 2.07, 2.08, 2.15, 496 2.27, 2.40, 2.48, 2.55, 2.50, 2.35, 2.20, 2.10, 497 1.90, 1.65, 1.40, 1.25, 1.00, 0.80, 0.65, 0.50, 498 0.35, 0.27, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 499 0.08, 0.06, 0.04, 0.02, 0.01, 0.005,0.003, 0.001} ; 500 501 histMean = histPmt->GetMean() ; 502 503 for (i=0;i<41;i++){ 504 histPmt->SetBinContent(i,ValRazmik[i]); 505 } 506 507 histMean = histPmt->GetMean() ; 477 histPmt->SetName(histname); 478 508 479 509 480 // … … 644 615 // 645 616 646 fwhm_resp = fwhm 647 ampl_resp = ampl 617 fwhm_resp = fwhm; 618 ampl_resp = ampl; 648 619 649 620 overlaping_time = overt; 650 621 651 622 652 threshold = CHANNEL_THRESHOLD 653 654 655 gate_leng = gate 656 trigger_multi = TRIGGER_MULTI 657 trigger_geometry = TRIGGER_GEOM 623 threshold = CHANNEL_THRESHOLD; 624 625 626 gate_leng = gate; 627 trigger_multi = TRIGGER_MULTI; 628 trigger_geometry = TRIGGER_GEOM; 658 629 659 630 cout << endl … … 710 681 peak_time = ( (Float_t) imax ) / ( (Float_t) TRIG_SLICES_PER_NSEC ) ; 711 682 712 // 713 // the amplitude of one single photo electron is not a constant. 714 // There exists a measured distribution from Razmik. This distribution 715 // is used to simulate the noise of the amplitude. 716 // For this a histogramm (histPmt) is created and filled with the 717 // values. 718 // 719 720 histPmt = new TH1F ("histPmt","Noise of PMT", 40, 0., 40.) ; 721 722 Stat_t ValRazmik[41] = { 0., 2.14, 2.06, 2.05, 2.05, 2.06, 2.07, 2.08, 2.15, 723 2.27, 2.40, 2.48, 2.55, 2.50, 2.35, 2.20, 2.10, 724 1.90, 1.65, 1.40, 1.25, 1.00, 0.80, 0.65, 0.50, 725 0.35, 0.27, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 726 0.08, 0.06, 0.04, 0.02, 0.01, 0.005,0.003, 0.001} ; 727 728 histMean = histPmt->GetMean() ; 729 730 for (i=0;i<41;i++){ 731 histPmt->SetBinContent(i,ValRazmik[i]); 732 } 733 734 histMean = histPmt->GetMean() ; 683 684 // Initialize histogram histPmt which represents the distribution of amplitudes 685 // of the PMT response to a single photpelectron. 686 687 InitGainFluctuations(); 688 735 689 736 690 // … … 931 885 // the FADC simulation 932 886 // 933 PmtAmp = (histPmt->GetRandom()/histMean) ; 887 if (fGainFluctuations) 888 PmtAmp = (histPmt->GetRandom()/histMean) ; 889 else 890 PmtAmp = 1.0; 934 891 935 892 // AM April 2004: removed updating of counters nphotshow, nphotnsb, … … 960 917 961 918 // 962 // get the randomized amplitude 963 // 964 PmtAmp = (histPmt->GetRandom()/histMean) ; 919 // get the randomized amplitude (unless fGainFluctuations == kFALSE) 920 // 921 if (fGainFluctuations) 922 PmtAmp = (histPmt->GetRandom()/histMean) ; 923 else 924 PmtAmp = 1.0; 965 925 966 926 // … … 1061 1021 Float_t rausch ; 1062 1022 1063 rausch = RESPONSE_AMPLITUDE* factor ;1023 rausch = ampl_resp * factor ; 1064 1024 1065 1025 cout<<"MTrigger::SetElecNoise ... generating database for electronic noise." … … 1080 1040 // to the signal 1081 1041 // 1082 Float_t rausch ;1083 1084 rausch = RESPONSE_AMPLITUDE * factor ;1085 1042 1086 1043 UInt_t startslice; … … 1900 1857 1901 1858 } 1859 1860 //================================================================= 1861 1862 void MTrigger::InitGainFluctuations() 1863 { 1864 // 1865 // The amplitude of one single photo electron is not a constant. 1866 // There exists a measured distribution from Razmik. This distribution 1867 // is used to simulate the noise of the amplitude. 1868 // For this a histogramm (histPmt) is created and filled with the 1869 // values. 1870 // 1871 1872 histPmt = new TH1F ("histPmt","Noise of PMT", 40, 0., 40.) ; 1873 1874 Stat_t ValRazmik[40] = { 2.14, 2.06, 2.05, 2.05, 2.06, 2.07, 2.08, 2.15, 1875 2.27, 2.40, 2.48, 2.55, 2.50, 2.35, 2.20, 2.10, 1876 1.90, 1.65, 1.40, 1.25, 1.00, 0.80, 0.65, 0.50, 1877 0.35, 0.27, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 1878 0.08, 0.06, 0.04, 0.02, 0.01, 0.005,0.003, 0.001} ; 1879 1880 for (Int_t i = 0; i < 40; i++) 1881 histPmt->SetBinContent(i+1 ,ValRazmik[i]); 1882 1883 histMean = histPmt->GetMean() ; 1884 1885 fGainFluctuations = kTRUE; // Default value 1886 1887 return; 1888 } -
trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx
r5248 r5319 32 32 33 33 //========== 34 // MTrigger 34 // MTrigger FIXME: some explanations are rather outdated!! 35 35 // 36 36 // The simulation of the Trigger for MonteCarlo Events is using this … … 55 55 // the standard response function to the analog signal of the pixel. 56 56 // 57 // Each pixel of the camera has such an summed-up analog signal. It may 58 // look like this picture: 59 // 57 // Each pixel of the camera has such an summed-up analog signal. 60 58 // 61 59 // This is the input of the discriminator for the pixels. The output of … … 67 65 // with a given length is created. 68 66 // 69 // No one can start with the simulation of different trigger levels.67 // Now one can start with the simulation of different trigger levels. 70 68 // 71 69 // The TriggerLevelZero is a very easy one. It is just looking if there 72 // are more th en N digital signals at level ON (=1). If this is the case,70 // are more than N digital signals at level ON (=1). If this is the case, 73 71 // a TriggerLevelZero signal is created. 74 72 // 75 // The TriggerLevelOne is not implemented now. This will be a kind of next76 // neighbour condition (i.e. four neigbouring analog signals at the same77 // time, but this requests at least four digital signals at level ON, what78 // is equivalent with a TriggerLevelZero.79 73 // 80 74 // … … 161 155 Int_t PixelsSecond[5] ; // Pixel which fires the trigger 162 156 163 private:164 165 157 Float_t Fill( Int_t, Float_t, Int_t ) ; 166 158 167 159 Bool_t PassNextNeighbour( Bool_t m[], Bool_t *n) ; 168 160 169 void OverlapingTime( Bool_t m[], Bool_t *n, Int_t ifSli); // n[] will have pixels of 170 // m[] that are on for the required verlaping time 171 161 void OverlapingTime( Bool_t m[], Bool_t *n, Int_t ifSli); 162 // n[] will have pixels of m[] that are on for the required overlaping time 163 164 Bool_t fGainFluctuations; 165 void InitGainFluctuations(); 166 172 167 public: 173 168 … … 216 211 } 217 212 213 void SetGainFluctuations(Bool_t x) { fGainFluctuations = x; } 214 218 215 void CheckThreshold (float *thres, int cells); 219 216
Note:
See TracChangeset
for help on using the changeset viewer.