Automatic determination of production cuts for a detector

The method used in GAMOS to determine the best production cuts is based on what we can call an 'inverse reasoning'. We count each particle that reaches the sensitive detector and we calculate first the range of the particle in the region where it is created. Then we can know that if we put a range cut in that region smaller than the calculated range, that particle would not reach our target plane. We also compute the range of the mother particle in the region where it was created and the same consecutively for all the ancestors. We know then that if we set in any of the regions where each of the ancestor particles are created a cut smaller than the corresponding range, we would stop the chain of particles and therefore we would have no particle in the target plane. After running a good number of tracks we can know for each particle type and for each region which is the biggest range we can put if we do not want to lose any particle. Indeed we may allow to lose a small amount of particles if this speeds up our simulation. To know easily which is the biggest cut you can use to lose less than a given percentage of particles, GAMOS provides a set of plots (one per each particle type and per each region) and a simple script to get automatically the cut values.

One warning is due here: as mentioned above when a track reaches the target, its range fills a histogram, but also the range of all the ancestors of this track. It may happen then that when you set a certain cut and the abovementioned script gives you how many tracks would be killed, more than one killed track correspond to the same track reaching the target (i.e., with a cut you kill the track that reaches the target and the parent track). Therefore you might have an overcounting of the number of tracks killed by a cut. To avoid this the total number of tracks (the last lines of output) is not computed as the sum of tracks in the region. This number uses a histogram that contains only one entry per track reaching the target, the one corresponding to the track with the smallest range. If you want to set a different cut for each region and are worried for this double counting, you may have a look at the histogram named "trackInfos per Track in target", that plots per each track reaching the target how many track informations are kept in the histograms. Another useful histogram for this case may be the 2D histogram "trackInfo Region vs trackInfo Region", that plots all the region number of all the pairs of track informations that correspond to the same track reaching the target (you can get a list of which region number corresponds to which region at the end of the standard output file).

To use this utility in GAMOS it is only needed to add this command in your script:

/gamos/userAction GmProdCutsStudyUA DetCutsStudyFilter

that will use as target condition that a track enters a sensitive detector

This command will produce at the end of run a table and a histogram file with the needed information. The table will contain the minimum range that can be applied for each region/particle/process not to lose any track reaching the target, and it will look like this

%%%%% PRODUCTION CUTS STUDY RESULTS 
      GmProdCutsStudyUA: REGION= DefaultRegionForTheWorld PARTICLE= 
      gamma PROCESS= ALL MIN RANGE= 353161.38
      GmProdCutsStudyUA: REGION= DefaultRegionForTheWorld PARTICLE=
      gamma PROCESS= eBrem MIN RANGE= 353161.38

To get the cuts values for not losing a given percentage of particles in the target plane you can execute the ROOT script that can be found at GamosCore/GamosPhysics/Cuts/getProdCutsEffect.C :

root -b -p -q .x getProdCutsEffect.C++\(\"prodcuts.root\",percentage\)

and look at the last lines of output, those that contain the word 'FINAL', like the following ones

PARTICLE= e+ FINAL= 17 / 19
      PARTICLE= e- FINAL= 72 / 34185
      PARTICLE= gamma FINAL= 72 / 34184