JeffersonLab / HDGeant4

Geant4 simulation for the GlueX experiment
4 stars 4 forks source link

Incorrect TAGH counter number assignment #182

Closed andrsmit closed 3 years ago

andrsmit commented 3 years ago

For PrimEx runs, we recently changed the scaled_energy_range table in the ccdb (with the 'mc' variation) for the tagger hodoscope to make counters 128-178 be 0. We originally did this because in simulation we saw that hits would be generated for these counters despite the fact that they were not used in data. For example, a beam photon of 7.67 GeV for run 61321 should be tagged by hodoscope counter 190. However, in the hdgeant4 simulations, a hit was created in tagger counter 135 because in the database they had similar scaled_energy_range numbers. To correct this, we simply set the scaled_energy_range numbers for counters 128-178 to 0.

However, this brought the added issue that no counters above counter number 178 (photon energy below that of counter 178) would have hits registered in it. This is because of the way the function GlueXPseudoDetectorTAG::addTaggerPhoton assigns tagger hits to beam photons (lines 138-148 of GlueXPseudoDetectorTAG.cc). In my own installation of hdgeant4 I corrected this problem by adding one line in between lines 140 and 141 stating:

if( E < MICRO_LIMITS_ERANGE[1] ) i = 179

However, this is not the best long-term solution and might cause problems for others not analyzing PrimEx data. What is the best way to address this problem?

markito3 commented 3 years ago

An example of a hodoscope table for a PrimEx run in the mc variation: table_dump.txt

rjones30 commented 3 years ago

Andrew and all, I have introduced a fix into the Master branch of hdgeant4 that I believe solves this problem. Please confirm.

markito3 commented 3 years ago

a good solution is in place