Changeset 6584 for trunk/MagicSoft/Simulation/Detector
- Timestamp:
- 02/18/05 10:24:51 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/TOBEDONE
r6566 r6584 2 2 - Change shape of low gain pulse, to look like in data. 3 3 4 - Change default delay of low gain pulse w.r.t. high gain 4 - Introduce correlations in the electronic noise 5 6 - Default intensity of UV calibration 40/0.35 photons 7 8 - Change default delay of low gain pulse w.r.t. high gain (add option in input card) 5 9 6 10 - Make no switch to low gain of high gain signal is small, so that -
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r6567 r6584 7 7 // @subtitle Code for the simulation of the camera phase 8 8 // @desc Code for the simulation of the camera of CT1 and MAGIC 9 // @author J C Gonzalez 9 // @author J C Gonzalez, O Blanch, A Moralejo 10 // @email moralejo@pd.infn.it 10 11 // @email gonzalez@mppmu.mpg.de 12 // @email blanch@ifae.es 11 13 // @date Thu May 7 16:24:22 1998 12 14 // … … 5059 5061 // 5060 5062 // $Log: not supported by cvs2svn $ 5063 // Revision 1.90 2005/02/17 15:37:12 moralejo 5064 // 5065 // Corrected bug in the setting of the trigger patterns. It turns out that 5066 // in the current data format, MRawRunHeader.fFormatVersion=5, as of 5067 // February 2005, the trigger bits are "inverted" ( 0 <-> 1 ) in their meaning 5068 // (see Mars/mtrigger/MTriggerPattern). 5069 // 5061 5070 // Revision 1.89 2005/02/17 09:15:28 moralejo 5062 5071 // -
trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx
r5319 r6584 23 23 Int_t shapeout, Float_t integralout, Float_t fwhmout, 24 24 Float_t trigger_delay, Float_t fadc_slices_per_ns, 25 Int_t fadc_slices_written) { 25 Int_t fadc_slices_written, Int_t gainswitchamp, 26 Int_t shiftfromswitch2lowgain) { 26 27 // 27 28 // Constructor overloaded II … … 52 53 fFadcSlicesPerNanosec = fadc_slices_per_ns; 53 54 fFadcSlices = fadc_slices_written; 55 fGainSwitchAmp = gainswitchamp; 56 fShiftFromSwitch2LowGain = shiftfromswitch2lowgain; 54 57 55 58 fSlices_mFadc = (Int_t)(TOTAL_TRIGGER_TIME*fFadcSlicesPerNanosec); … … 102 105 103 106 // 104 // 107 // set up the response shape 105 108 // 106 109 … … 701 704 // adds the noise due to optronics and electronics 702 705 // to the signal. This is noise which comes before the FADC, 703 // so it will be later scaled down in the low gain branch. 706 // so it will be later scaled down in the low gain branch, if 707 // the switch to low gain occurs. 704 708 // 705 709 UInt_t startslice; … … 872 876 //=========================================================================== 873 877 // 874 // Next function generates one pure noise event for pixel "pix", then adds 875 // up the readouts of a number n_slices of its FADC slices, this being the 876 // return value. 878 // Next function adds up the noise in pixel "pix", scaling down the part 879 // of it which comes from before the receivers in the case we are dealing with 880 // low gain (ishigh=0). The output is the sum of the readouts of a number 881 // n_slices of FADC slices. For the case of low gain, the FADC contents we add 882 // are not what we would have in a real pedestal event, but nevertheless this 883 // is useful in the camera simulation to obtain what the pedestal fluctuations 884 // are for the low gain. This will be written to the camera output, in the 885 // MMcFadcHeader. 877 886 // 878 887 Float_t MFadc::AddNoiseInSlices( Int_t pix, Int_t ishigh, Int_t n_slices) { … … 888 897 // If we deal with low gain, we have to scale the values in sig[][] by 889 898 // the gain ratio (high2low_gain), since "sig" contains here the noise 890 // produce before the receiver boards (for instance NSB noise)899 // produced before the receiver boards (for instance NSB noise) 891 900 // 892 901 factor=(ishigh?1.0:high2low_gain); … … 949 958 for ( Int_t i=0 ; i < fFadcSlices ; i++ ) 950 959 { 951 output[ip][i] = pedestal[ip];952 output_lowgain[ip][i] = pedestal[ip];960 output[ip][i] = pedestal[ip]; 961 output_lowgain[ip][i] = pedestal[ip]; 953 962 } 954 963 continue; 955 964 } 956 965 966 967 // First put the high gain in the output slices: 968 i = 0; 969 Int_t switch_i = 0; 970 for ( Int_t is = iFirstSlice; is < (iFirstSlice+fFadcSlices); is++ ) 971 { 972 if (is < (Int_t)fSlices_mFadc) 973 { 974 output[ip][i] = sig[ip][is]; 975 976 if (switch_i == 0) // Hi gain limit not yet surpassed before. 977 { 978 if (output[ip][i] > fGainSwitchAmp) 979 switch_i = i + fShiftFromSwitch2LowGain; 980 } 981 } 982 983 else // We are beyond the simulated signal history in sig[][]! Put just mean pedestal! 984 output[ip][i] = pedestal[ip]; 985 986 i++; 987 } 988 989 // Now put the low gain: 957 990 i=0; 958 991 for ( Int_t is = iFirstSlice; is < (iFirstSlice+fFadcSlices); is++ ) … … 960 993 if (is < (Int_t)fSlices_mFadc) 961 994 { 962 output[ip][i] = sig[ip][is]; 963 964 // Low gain is scaled down by the factor high2low_gain: 965 output_lowgain[ip][i]= pedestal[ip] + (sig[ip][is]-pedestal[ip])/high2low_gain; 995 if (switch_i > 0 && (i+fFadcSlices) >= switch_i) 996 output_lowgain[ip][i] = pedestal[ip] + 997 (sig[ip][is]-pedestal[ip])/high2low_gain; 998 // Once the shift occurs, low gain is filled with the high 999 // gain signal scaled down by the factor high2low_gain 1000 1001 else 1002 output_lowgain[ip][i] = sig[ip][is+fFadcSlices]; 1003 // Write out high gain into low gain slices if there was no 1004 // switch, or before the switch occurs. 966 1005 } 1006 967 1007 else // We are beyond the simulated signal history in sig[][]! Put just mean pedestal! 968 1008 { 969 output[ip][i] = pedestal[ip];970 1009 output_lowgain[ip][i]= pedestal[ip]; 971 1010 } 972 1011 i++; 973 1012 } 1013 974 1014 } 975 1015 } -
trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx
r5248 r6584 22 22 #include "MFadcDefine.h" 23 23 24 class MMcEvt 24 class MMcEvt; 25 25 26 26 //========== … … 107 107 Float_t *sing_resp_outer; // the shape of the phe_response function 108 108 109 110 // 111 // RandomGenerator for the Electonic Noise 109 Int_t fGainSwitchAmp; // Height of the high gain signal (in ADC counts) at which we decide 110 // to fill the low gain with a scaled down version of the pulse in the 111 // high gain. Else we put in the continuation of the high gain. 112 113 Int_t fShiftFromSwitch2LowGain; 114 // Distance in FADC slices from the slice in which the amplitude 115 // fGainSwitchAmp is reached to were the switch to low gain will happen. 116 117 // 118 // RandomGenerator for the Electronic Noise 112 119 // 113 120 … … 129 136 Float_t trig_delay = 0., 130 137 Float_t fadc_slices_per_ns = FADC_SLICES_PER_NSEC, 131 Int_t fadc_slices_written = FADC_SLICES); 132 138 Int_t fadc_slices_written = FADC_SLICES, 139 Int_t gainswitchamp = 120, 140 Int_t shiftfromswitch2lowgain = 13); 141 133 142 void SetSeed(UInt_t seed) {GenElec->SetSeed(seed);} 134 143
Note:
See TracChangeset
for help on using the changeset viewer.