68 G4float width = posStrip1 - posStrip0;
71 G4int iGuessStrip = G4int( (m_Pos - posStrip0)/width + 0.5 );
76 else if(iGuessStrip >= 112) {
91 G4int seg = m_pHit->
GetSeg();
92 G4int gap = m_pHit->
GetGap();
94 if(part == 1 && seg == 2 &&gap%2 != 0 && iGuessStrip > 79 ){
95 if(iGuessStrip > 79 && iGuessStrip <= 95 && m_Pos2 < 0) iGuessStrip += 16 ;
96 if(iGuessStrip > 95 && iGuessStrip <= 111 && m_Pos2 > 0) iGuessStrip -= 16 ;
110 G4LogicalVolume *lvStripPlane = m_lvGap->GetDaughter(0)->GetLogicalVolume();
111 G4int daughtersNo = lvStripPlane->GetNoDaughters();
113 if(i >= 0 && i < daughtersNo) {
114 G4VPhysicalVolume* pvStrip = lvStripPlane->GetDaughter(i);
115 G4String strStrip = pvStrip->GetLogicalVolume()->GetName();
119 if (strStrip.find(
"s") == 10) {
131 G4float pos = 1.0e38;
132 if (!pvStrip)
return pos;
134 G4int part = m_pHit->
GetPart();
135 G4int gap = m_pHit->
GetGap();
137 pos = pvStrip->GetObjectTranslation().x();
138 if ( (part == 1 && gap%2 != 0) || (part != 1 && gap%2 == 0) ) {
139 pos = pvStrip->GetObjectTranslation().y();
142 G4String striptype= pvStrip->GetLogicalVolume()->GetSolid()->GetEntityType();
145 temp=(G4Box *)pvStrip->GetLogicalVolume()->GetSolid();
146 G4double
length=temp->GetXHalfLength();
150 G4float box1,box2,box3;
160 G4float posMax = 1.0e38;
161 G4float posLeftStrip;
162 G4float posRightStrip;
163 G4float posCurrentStrip;
165 G4VPhysicalVolume* pvLeftStrip =
GetStrip(i-1);
166 G4VPhysicalVolume* pvRightStrip =
GetStrip(i+1);
167 G4VPhysicalVolume* pvCurrentStrip =
GetStrip(i);
173 posLeftStrip = -1.0*posMax;
176 else if(!pvCurrentStrip) {
180 else if(!pvRightStrip) {
183 posRightStrip = posMax;
192 G4float distCurrent = std::abs(m_Pos - posCurrentStrip);
193 G4float distLeft = std::abs(m_Pos - posLeftStrip);
194 G4float distRight = std::abs(m_Pos - posRightStrip);
198 if( (distCurrent <= distLeft) && (distCurrent <= distRight) ) {
201 else if(distCurrent > distLeft) {