tracker geometry issue when finding fibre number (affects physics resolutions)
The code for determining the fibre number in the detector model is approximate stopgap code whilst geant4 lets you know the true position of the fibres. Especially the part about figuring out when two fibres were hit and splitting the energy between them (which is not physical).
The purpose of the detector model in Geant4 is to produce energy deposited and a time for each fibre. The relevant code is in DetModel/SciFi.
When the Detector construction code encounters a volume that says it is a SciFi sensitive detector in the MiceModules, it knows to build the detailed model using the SciFiPlane class:
This contains the code that finds out the details of the fibre (diameter, pitch, etc) and builds the G4 parametrized volume that places the fibres in the correct position with the correct lengths, etc, for a given plane.
The actual parametrization is performed by the DoubletFiberParam class:
This code is passed the copy number by GEANT4 and returns the position, orientation and dimensions of the fibre that is being placed with that copy number.
Finally, SciFiSD.cc is where the code that is called at the end of the simulation of every event in G4 is found:
The main issue is that based on the description above, the nchans == 2 stuff and splitting the energy between fibres should never happen. One should check to see if the MC hit is actually inside the fibre code (by querying the Geant4 volume name of the object that the hit is in) and throw it away if it isn't.
Then, you ask the volume it is in for its copy number, and that tells you the fibre number of the fibre the hit was in.
Then you stop. It's the job of the digitization to bundle the 7 fibres into a readout channel.