diff --git a/src/GlueXSensitiveDetectorFMWPC.cc b/src/GlueXSensitiveDetectorFMWPC.cc index a4b709f..1e42eec 100644 --- a/src/GlueXSensitiveDetectorFMWPC.cc +++ b/src/GlueXSensitiveDetectorFMWPC.cc @@ -30,6 +30,12 @@ double GlueXSensitiveDetectorFMWPC::TWO_HIT_TIME_RESOL = 400*ns; // Minimum photoelectron count for a hit double GlueXSensitiveDetectorFMWPC::THRESH_KEV = 0.; +// Coordinate of wire 0, transverse to wire direction +double GlueXSensitiveDetectorFMWPC::WIRE_OFFSET = -73*cm; + +// Minimum photoelectron count for a hit +double GlueXSensitiveDetectorFMWPC::WIRE_PITCH = 1.0*cm; + int GlueXSensitiveDetectorFMWPC::instanceCount = 0; G4Mutex GlueXSensitiveDetectorFMWPC::fMutex = G4MUTEX_INITIALIZER; @@ -184,15 +190,15 @@ G4bool GlueXSensitiveDetectorFMWPC::ProcessHits(G4Step* step, int wire = 0; if (layer % 2 != 0) { // Vertical wires - wire = floor(x[0]/cm + 73.0); + wire = floor(x[0] - WIRE_OFFSET)/WIRE_PITCH; } else { // Horizontal wires - wire = floor(x[1]/cm + 73.0); + wire = floor(x[1] - WIRE_OFFSET)/WIRE_PITCH; } if (layer == 6) { // Vertical wires - wire = floor(x[0]/cm + 73.0); + wire = floor(x[0] - WIRE_OFFSET)/WIRE_PITCH; } //cout<<"MWPC: layer/wire = "<