Privacy and Security Notice

Tuning SIMC. next up previous
Next: Appendix A: The Input Up: A-B-SIMC Previous: Getting Answers from SIMC.

Tuning SIMC.

One of the most important things to remember when running SIMC is that you are usually trying to reproduce as closely as possible the data you've taken. This means not only giving SIMC the correct kinematics, but also applying any offsets in SIMC that are seen in the data, and using the same cuts, corrections, and calculations in SIMC as you use in your analysis. Here is a list of things to check when running SIMC.

1. Correcting for energy loss and raster position. SIMC includes a raster contribution to the beam position. You need to give SIMC the raster pattern and size that was used for your experiment. SIMC can also try to correct the events it reconstructs for the raster position. However, you should only apply raster corrections in SIMC if you are using them in your data analysis. Similarly, SIMC applies energy loss event by event, and then applies an average correction for energy loss at the end. You should use this average correction if you are correcting for energy loss in your analysis. If you don't correct for it in the analysis, don't correct for it in SIMC. In both of these examples, there is a switch you can use to disable the correction. If there are other corrections that you apply in your data analysis (or don't apply), you should make sure that they are handled the same way in SIMC.

2. Apply kinematic/spectrometer/beam offsets. There are several different way to apply 'offsets' in SIMC. You can shift the central kinematics in the input file. You can apply beam and target offsets (adjusting the x, y, and z positions of the generated events), or you can apply spectrometer offsets. The difficult part is applying offsets that are consistent with your analysis. You can shift the yptar distribution using beam/target offsets OR by applying spectrometer offsets. You need to determine which is consistent with the data. For example, if you apply a target position offset, the yptar distribution will change, as will the focal plane distributions. If you apply a spectrometer yptar offset, then your yptar distribution will shift, but your focal plane distribution will not. It is a non-trivial procedure to determine your best offsets, and to apply them to the correct variables, and I will not try to go over it in detail here. I will just note that it is a very important consideration. Finally, if you 'remove' an offset in your data analysis (after the reconstruction), then you should make sure to apply the offset in SIMC, and then correct for it after reconstruction in a way that is consistent with your data analysis.

Two offsets that are often present, but may change with experiment are the SOS out-of-plane offset (the 0.15 degree offset when not leveled), which must be applied to the correct (electron/hadron) arm, and the collimator positions (especially the vertical offset in the hms, which was large in the old HMS setup, and much smaller for HMS-100), which must be changed in the mc_hms.f code.

3. Setting the options in the single arm monte carlos. You can modify the HMS and SOS models to reflect the trigger and/or analysis you use for your experiment. For example, the parameter scintrig (in mc_hms_hut.f and mc_sos_hut.f) tells how many scintillator planes must be hit in order to form a trigger. The default is 3 (for the 3/4 trigger), but if you ran with 4, you will need to change this in the code (there is no option to change this in the input file at the moment). Note that the hodoscope efficiency is NOT represented in the monte carlo, just the geometry of the planes. Similarly, if you require the calorimeter in the trigger (note that the standard PID trigger does NOT REQUIRE the calorimeter, because either the calorimeter OR the cerenkov is enough), then you will need to turn on the fiducial check at calorimeter in mc_hms(sos)_hut.f. The analysis engine can be run with a fiducial cut on the calorimeter, based on the position of the track projected to the lead glass. If you have this cut turned on in the analysis, then the calorimeter energy will only be calculated if the track passes this cut. Therefore, applying ANY calorimeter cut in the analysis also applies a 'hidden' fiducial cut in the calorimeter. You can represent this by applying a cut in the SIMC Ntuple, or by using the track-based fiducial cut in mc_hms(sos)_hut. See the comments in the code for more detail on these cuts.

4. There is a standard set of variables in the SIMC Ntuple. As a rule, the variable names and units are chosen to be identical to the standard engine Ntuples in order to make comparison easier. The standard Ntuple has all of the tracking quantities first: reconstructed focal plane tracks, reconstructed and generated target tracks, followed by some general kinematic variables. After these variables, there will be a set of calculated variables that depend on the experiment, one for (e,e'p), and one for (e,e'$\pi$) (Note that this is not yet implemented). The goal is to calculate these in the same way as in the analysis, which does not necessarily follow the Hall C unit/sign/coordinate system conventions. You should check in results_write.f and in complete_recon_ev (a subroutine in event.f) that the desired variables are being calculated consistently with your analysis.

5. Most of the target/spectrometer geometry is hardwired in the code. If you use non-standard vacuum windows, target geometry, cryotarget wall thicknesses, you will need to change the appropriate parameters. Most of these are contained in target.f, mc_hms(sos).f, and mc_hms(sos)_hut.f. One important one is the x_off, y_off, z_off for the hms collimator. For some of the pre-NucPi experiments, there was a .5mm vertical offset in the collimator (x_off=+0.496). For NucPi (and presumably Fpi, and any of the HMS-100 runs?), the offset was basically removed (x_off=+0.013). In addition, the z_off has varied (z_off=0 for early (1995) runs, +1.5 cm for 1996 and later runs, and +40.17 cm for the HMS-100 tune. These numbers should be checked versus the latest collimator box survey numbers. The same holds true for the drift chamber (or other detector) offsets.

6. Finally, you need to check that the event generation limits you use are adequate. SIMC takes the generation limits you give it, and increases them to take into account multiple scattering, spectrometer resolution, radiation, etc.... However, it is possible that the range SIMC picks will not be adequate. For example, the delta range is increased by some nominal delta resolution of the spectrometer (slop_param_d_HMS(SOS) in simulate.inc). This is not momentum dependent, and may be too small at low momentum or for extreme kinematics (very large values of delta, very long target lengths, etc...). Therefore, it is a good idea to at least once do a high statistics run where you open up the delta, xptar, and yptar generation limits in order to check that the answer you get (after all cuts) does not change. You should do the same for the Em limits (for (e,e'p)) and the radiation limits. You can check the radiation by setting Egamma_gen_max to a large value. If Egamma_gen_max=0, then SIMC calculates the radiation limits to use. You can find out what limits it chose by looking at the .hist file. Setting Egamma_gen_max to a value larger than the overall limits SIMC calculates will let you test that the radiation limits are being calculated and applied correctly. Finally, the variable dE_edge_test can be used to test the energy ranges. The value of every energy limit used in generation, radiation, etc... is increased by the value of dE_edge_test. With luck, you can increase the generation limits, the radiation limits, and dE_edge_test all at once, and the answer will not change, and you will be done.


next up previous
Next: Appendix A: The Input Up: A-B-SIMC Previous: Getting Answers from SIMC.

12/8/1999