* * $Id: tpc_init_det_response.F,v 1.4 2004/05/28 16:14:45 dpp Exp $ * * $Log: tpc_init_det_response.F,v $ * Revision 1.4 2004/05/28 16:14:45 dpp * -> move constants to common, initialized in tpc_init_det_response * -> call tpc_init_from_lcd here rather than from tpc_init_cdgeom * -> overide some of the values from tpc_init_from_lcd * -> remove arguments * * Revision 1.3 2004/01/23 21:12:55 dpp * -> only changes to the cell size * * Revision 1.2 2003/10/28 21:30:36 dpp * -> cell size * * Revision 1.1 2003/03/05 18:06:13 dpp * -> NEW ROUTINE * -> extract the geometry infor supplied by user * * #include "sys/CLEO_machine.h" #include "pilot.h" SUBROUTINE TPC_INIT_DET_RESPONSE C....................................................................... C. C. TPC_INIT_DET_RESPOSE - return tpc detector response defined by user C. C. COMMON : C. CALLS : C. CALLED : C. AUTHOR : D. Peterson C. C. VERSION : 1.00 C. CREATED : 29-Oct-2002 C. C....................................................................... #if defined(CLEO_TYPCHK) IMPLICIT NONE #endif SAVE #include "doit/duseq/tpccom.inc" C these are the arguments of TPC_INIT_FROM_LCD real ret_bfield,ret_IR,ret_or,ret_haflen integer ret_nlay c23456789 123456789 123456789 123456789 123456789 123456789 123456789 12 * ----------Executable code starts here--------------------------------- print 1001 1001 FORMAT(' TPC_INIT_DET_RESPONSE: enter') CALL TPC_INIT_FROM_LCD( 2 ret_bfield,ret_IR,ret_or,ret_haflen,ret_nlay) print 1002 1002 format(' TPC_INIT_DET_RESPONSE:', 2 ' overide some values from TPC_INIT_FROM_LCD') ret_IR=0.5692 ret_or=1.9000 ret_nlay=144 print 1003,ret_bfield,ret_IR,ret_or,ret_haflen,ret_nlay 1003 format(' TPC_INIT_DET_RESPONSE:', 1 ' bfield=',F6.3, 2 ' innerR=',F6.3, 3 ' outerR=',F6.3, 4 ' haflen=',F6.3, 5 ' nlay =',I6) * TPC_Bfield............magnetic field in ? TPC_Bfield=ret_bfield * TPC_IR................inner radius in meters TPC_IR=ret_IR * TPC_OR................outer radius in meters TPC_OR=ret_or * TPC_haflen............half length of the TPC in meters TPC_haflen=ret_haflen * TPC_cyl_crossings.....number of crossing cylinders generating MC points * these are radii where track crossings are recorded TPC_cyl_crossing=ret_nlay * TPC_nominal_cell_wid..nominal cell, or pad, width, in meters TPC_nominal_cell_wid=0.004 c----------------- print 1004 1004 format(' tpc_init_det_response: input width size in meters.') read *,TPC_nominal_cell_wid print 1014,TPC_nominal_cell_wid 1014 format(' tpc_init_det_response: TPC_nominal_cell_wid=',F7.4) c----------------- * TPC_ncell_devis.......number of cells in a layer must be * devisible by this TPC_ncell_devis=8 * TPC_cell_z_width......z cell width, * essentially infinite for a 1 sided readout TPC_cell_z_width=10. * TPC_TIME_INHIBIT......applied inhibit in picosec * for possible use in time response simulation * 200 000 ps at 50 E-9 meter /pico sec = 10 mm = 1 cm TPC_TIME_INHIBIT=200 000. * TPC_TIME_AMP..........amplifier shaping time in picosec * for possible use in time response simulation * 400 ns, see Dean Karlens Nov 26, 2002 talk TPC_TIME_AMP=400 000. * TPC_SIGNAL_SIGMA_PADS.sigma of gaussian charge spread on pads TPC_SIGNAL_SIGMA_PADS= 0.7 * TPC_CUTOFF_TOT_PADS...cut off of charge spread based on number of pads TPC_CUTOFF_TOT_PADS= 9 * TPC_CUTOFF_FRAC_HT....cut off of charge spread based on pulse height TPC_CUTOFF_FRAC_HT= .002 * TPC_min_ion_PH........pulse height, for the ionization center hit, * in a single cell height, for min ion particle TPC_min_ion_PH=999. * TPC_noise_fraction....noise rate used in calculating TPC_randomH_area TPC_noise_fraction=.0100 c----------------- print 1005 1005 format(' tpc_init_det_response: input noise fraction.') read *,TPC_noise_fraction print 1015,TPC_noise_fraction 1015 format(' tpc_init_det_response: TPC_noise_fraction=',F7.4) c----------------- * TPC_randomH_area......area per random noise hit: * width*length /occupancy c april 2004 TPC_randomH_area= 0.01 *0.02 /0.010 TPC_randomH_area= TPC_nominal_cell_wid *.04 /TPC_noise_fraction * TPC_randomH_Zwidth....length (width in Z) of a random hit, in meters TPC_randomH_Zwidth=.02 * TPC_randomH_maxPH.....maximum pulse height of random hits TPC_randomH_maxPH=2000. * TPC_DRIFT_VEL.........drift velocity in meters/ps * 50. E-9 meters/ps = 50 microns/nanosecond TPC_DRIFT_VEL=50. *1.E-9 * TPC_FADC_BIN_TIME.....period of the FADC in ps * 20,000ps period is 50 Meg hz * NOTE: with a velocity of 50E-9 m/ps, * the distance of an FADC bin is 50E-9 * 20E3 = 1mm. TPC_FADC_BIN_TIME=20 000. * TPC_FADC_LENGTH_XTR...FADC extra length, in meters, * allow a margin for tails and poorly measured time TPC_FADC_LENGTH_XTR=0.25 * TPC_FADC_BIN_OFFSET...FADC bin for Z=0 * (this is calculated in tpc_FADC_response) * TPC_EXPON_TAIL_CUT....pulse height value in exponential of pulse to * cut off adding ph to FADC time bin * pre-renormalizing FADC ph; compare to TPC_min_ion_PH TPC_EXPON_TAIL_CUT=1. * TPC_TIME_AMP_BINS.....amplifier shaping time converted to FADC bins * NOTE: with an amplifier decay time of 400,000ps, * and a FADC bin time (period) of 20,000ps, * the shaping width is 20 bins. If the drift * velocity is 50 microns/nanosecond this is * a drift distance of 2cm. TPC_TIME_AMP_BINS=TPC_TIME_AMP/TPC_FADC_BIN_TIME * NOTE on normilization: * EvntHit_Charge is filled in ( TPC_ADD_HIT) with passed value PH_HIT * PH_HIT is filled in ( TPC_IONIZATION_CENTERS ) with * PH_frac * TPC_min_ion_PH * REL_PH_ION(i_ph_ion) * where PH_FRAC is the share of the PH on this cell, * TPC_min_ion_PH is a constant, 999, and * REL_PH_ION accounts for the track length on the cell . * A straight track crossing a single cell PH_HIT ~= 700 because * PH_frac ~= .7 * TPC_min_ion_PH=999 and * REL_PH_ION=1 . * If theta ~= 0, the normilization area in ( tpc_FADC_response ) is * AREA_NORM =TPC_TIME_AMP_BINS =TPC_TIME_AMP/TPC_FADC_BIN_TIME * =400 000 /20 000 = 20 bins . * After normalization, the pulse height of 700 becomes 35. This sets the * scale for scaling the pulse height in ( xts_FADCview ) * TPC_FADC_SCALE_SINGLE_CELL_MAX * ........the maximum PH in the FADC from a track * crossing a single cell and leaving all charge * in that one cell, * at theta=0 (so there is no longitudinal spread) * if TPC_TIME_AMP_BINS=20, and * if TPC_min_ion_PH=999, * TPC_FADC_SCALE_SINGLE_CELL_MAX=50 * se discussion above TPC_FADC_SCALE_SINGLE_CELL_MAX=TPC_min_ion_PH/TPC_TIME_AMP_BINS * TPC_FADC_NOISE_TO_SIGNAL * .........noise-to-signal ratio * noise observed in FADC compared to * TPC_FADC_SCALE_SINGLE_CELL_MAX TPC_FADC_NOISE_TO_SIGNAL=.02 * TPC_FADC_PED_I........pedistal for initiating a hit in the FADC bins, * as a fraction of TPC_FADC_SCALE_SINGLE_CELL_MAX * see discussion above; c normal TPC_FADC_PED_I=.08 c 07-12-2005 c TPC_FADC_PED_I=.16 c 28-02-2007 TPC_FADC_PED_I=.08 * TPC_FADC_PED_C........pedistal for continuing a hit in the FADC bins, * as a fraction of TPC_FADC_SCALE_SINGLE_CELL_MAX * see discussion above; TPC_FADC_PED_C=.04 * TPC_FADC_PED_FRAC.....upper limit of dynamic pedistal, * compared to the current hit pulseheight * that is allowed to observe hit * for possible use in time cluster resolution TPC_FADC_PED_FRAC=.3 c temp c TPC_FADC_PED_FRAC=.35 * TPC_FADC_N_SMOOTH.....number of FADC bins to average TPC_FADC_N_SMOOTH=3 * TPC_FADC_PERSIST......persistancy of a FADC time cluster, * minimum pulse length TPC_FADC_PERSIST=6 c TPC_FADC_PERSIST=3 this would be consistant with old use of "smooth" * TPC_FADC_EXTRA_NORM...extra normanlization factor for displaying * pulse heights in xts_FADCview. This multiplies * TPC_TIME_AMP_BINS to obtain the PH normalization. TPC_FADC_EXTRA_NORM=1.15 * ARTIFICIAL_LAYER_STOP.artificially cut off the chamber after this layer ARTIFICIAL_LAYER_STOP=999 RETURN END