52 G4VPhysicalVolume* physVol )
const {
57 if ( fVerboseLevel > 3 )
59 G4cout <<
"*ExtBesCrystalParameterisation::ComputeTransformation()*" << G4endl;
60 G4cout <<
"copyNo(transfered)=" << copyNo << G4endl
61 <<
"copyNo(gotten) =" << physVol->GetCopyNo() << G4endl
62 <<
"fStartID =" << fStartID << G4endl
63 <<
"fCrystalID =" << fCrystalID << G4endl;
64 G4cout <<
"point of fBesEmcGeometry=" << fBesEmcGeometry << G4endl;
67 G4double xPosition = fBesEmcGeometry->GetXPosition( fCrystalID );
68 G4double yPosition = fBesEmcGeometry->GetYPosition( fCrystalID );
69 G4double zPosition = fBesEmcGeometry->GetZPosition( fCrystalID );
72 if ( fFlagLeft ) zPosition = -zPosition;
73 G4ThreeVector
origin( xPosition, yPosition, zPosition );
74 physVol->SetTranslation(
origin );
92 if ( fVerboseLevel > 5 )
94 G4cout <<
"The crystals are at the position:" << G4endl <<
origin / cm <<
"(cm)" << G4endl;
106 G4Trap& trackerChamber,
const G4int copyNo,
const G4VPhysicalVolume* physVol )
const {
111 G4double zHalfLength = fBesEmcGeometry->GetZHalfLength( fCrystalID );
112 G4double thetaAxis = fBesEmcGeometry->GetThetaAxis( fCrystalID );
113 G4double phiAxis = fBesEmcGeometry->GetPhiAxis( fCrystalID );
114 G4double yHalfLength1 = fBesEmcGeometry->GetYHalfLength1( fCrystalID );
115 G4double xHalfLength1 = fBesEmcGeometry->GetXHalfLength1( fCrystalID );
116 G4double xHalfLength2 = fBesEmcGeometry->GetXHalfLength2( fCrystalID );
117 G4double tanAlpha1 = fBesEmcGeometry->GetTanAlpha1( fCrystalID );
118 G4double yHalfLength2 = fBesEmcGeometry->GetYHalfLength2( fCrystalID );
119 G4double xHalfLength3 = fBesEmcGeometry->GetXHalfLength3( fCrystalID );
120 G4double xHalfLength4 = fBesEmcGeometry->GetXHalfLength4( fCrystalID );
121 G4double tanAlpha2 = fBesEmcGeometry->GetTanAlpha2( fCrystalID );
126 tanAlpha1 = -tanAlpha1;
127 tanAlpha2 = -tanAlpha2;
130 xHalfLength1 = xHalfLength2;
133 xHalfLength3 = xHalfLength4;
136 if ( fVerboseLevel > 5 )
137 G4cout <<
"The size of No." << copyNo <<
" crystal(placed) are:" << G4endl
138 <<
"zHalfLength =" << zHalfLength / cm <<
"(cm), " << G4endl
139 <<
"thetaAxis =" << thetaAxis / deg <<
"(degree), " << G4endl
140 <<
"phiAxis =" << phiAxis / deg <<
"(degree), " << G4endl
141 <<
"yHalfLength1=" << yHalfLength1 / cm <<
"(cm), " << G4endl
142 <<
"xHalfLength1=" << xHalfLength1 / cm <<
"(cm), " << G4endl
143 <<
"xHalfLength2=" << xHalfLength2 / cm <<
"(cm), " << G4endl
144 <<
"tanAlpha1 =" << tanAlpha1 <<
"(), " << G4endl
145 <<
"yHalfLength2=" << yHalfLength2 / cm <<
"(cm), " << G4endl
146 <<
"xHalfLength3=" << xHalfLength3 / cm <<
"(cm), " << G4endl
147 <<
"xHalfLength4=" << xHalfLength4 / cm <<
"(cm)." << G4endl
148 <<
"tanAlpha2 =" << tanAlpha2 <<
"(), " << G4endl <<
"(x4-x3)*y1/(x2-x1)/y2="
149 << ( xHalfLength4 - xHalfLength3 ) * yHalfLength1 /
150 ( xHalfLength2 - xHalfLength1 ) / yHalfLength2
151 << G4endl <<
"tanAlpha2/tanAlpha1=" << tanAlpha2 / tanAlpha1 << G4endl;
154 trackerChamber.SetAllParameters( zHalfLength, thetaAxis, phiAxis, yHalfLength1, xHalfLength1,
155 xHalfLength2, tanAlpha1, yHalfLength2, xHalfLength3,
156 xHalfLength4, tanAlpha2 );
181 const G4VPhysicalVolume* pPhyVol )
const {
184 G4int* pCrystalID =
const_cast<G4int*
>( &fCrystalID );
185 G4bool* pFlagLeft =
const_cast<G4bool*
>( &fFlagLeft );
186 G4int* pVerboseLevel =
const_cast<G4int*
>( &fVerboseLevel );
192 for ( G4int i = fStartID; i <= fAllCrystals; i++ )
196 if ( fBesEmcGeometry->GetPhysiBSCCrystal( i ) == pPhyVol ) { *pCrystalID = i; }
198 if ( *pCrystalID == -1 )
200 G4cout <<
"The point of PhysicCrystal error!!!!!!!!!!!" << G4endl;
213 if ( fCrystalID > fAllCrystals / 2 )
216 *pCrystalID = fCrystalID - fAllCrystals / 2;
221 *pCrystalID = fAllCrystals / 2 - fCrystalID + 1;
223 *pCrystalID = *pCrystalID - 1;