musrBackwardParameterisation Class Reference

#include <musrBackwardParameterisation.hh>

List of all members.

Public Member Functions

 musrBackwardParameterisation (G4int NoRadialPixels, G4int NoLengthPixels, G4double X1Pixels, G4double X2Pixels, G4double Y1Pixels, G4double Y2Pixels, G4double ZPixels, G4double ArrayLength, G4double TiltAngle, G4double LRadius)
virtual ~musrBackwardParameterisation ()
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
void ComputeDimensions (G4Trd &trackerlayer, const G4int copyNo, const G4VPhysicalVolume *physVol) const


Detailed Description

Definition at line 25 of file musrBackwardParameterisation.hh.


Constructor & Destructor Documentation

musrBackwardParameterisation::musrBackwardParameterisation G4int  NoRadialPixels,
G4int  NoLengthPixels,
G4double  X1Pixels,
G4double  X2Pixels,
G4double  Y1Pixels,
G4double  Y2Pixels,
G4double  ZPixels,
G4double  ArrayLength,
G4double  TiltAngle,
G4double  LRadius
 

Definition at line 14 of file musrBackwardParameterisation.cc.

00025 {
00026    fNoRadialPixels     =  NoRadialPixels; 
00027    fNoLengthPixels     =  NoLengthPixels; 
00028    fPixelWidthX1  =  X1Pixel;
00029    fPixelWidthX2  =  X2Pixel;
00030    fPixelWidthY1  =  Y1Pixel;
00031    fPixelWidthY2  =  Y2Pixel;
00032    fPixelWidthZ  =  ZPixel;
00033    fArrayLength  =  ArrayLength;
00034    fTiltAngle    =  TiltAngle;
00035    fLRadius      =  LRadius;
00036 
00037 }

musrBackwardParameterisation::~musrBackwardParameterisation  )  [virtual]
 

Definition at line 41 of file musrBackwardParameterisation.cc.

00042 {}


Member Function Documentation

void musrBackwardParameterisation::ComputeDimensions G4Trd &  trackerlayer,
const G4int  copyNo,
const G4VPhysicalVolume *  physVol
const
 

Definition at line 86 of file musrBackwardParameterisation.cc.

00087 {
00088 
00089   //    G4int i;
00090     G4int j;
00091     G4double fNewWidthX1;
00092     G4double fNewWidthX2;
00093     G4double fNewWidthY1;
00094     G4double fNewWidthY2;
00095 
00096     G4double fNewWidthZ;
00097     G4double fRadiusAtY1;      
00098     G4double fRadiusAtY2;      
00099     G4double fZDist;
00100     G4double fZStep;
00101     G4double hArrayLength=0.5*fArrayLength;
00102     G4double hDetectorGap=1.2*mm;
00103 
00104 
00105     j=int(copyNo/fNoRadialPixels);
00106 
00107     fNewWidthZ=(hArrayLength/(cos(fTiltAngle)*fNoLengthPixels))-hDetectorGap;
00108     fZStep = (fArrayLength/fNoLengthPixels);
00109     fZDist=-(j)*fArrayLength/fNoLengthPixels;
00110 
00111 
00112     fRadiusAtY2=fLRadius+(fZDist)*tan(fTiltAngle);
00113     fRadiusAtY1=fLRadius+(fZDist-fZStep)*tan(fTiltAngle);
00114 
00115     fNewWidthY1=(fRadiusAtY1*tan(2*pi/(2*fNoRadialPixels)))-hDetectorGap;
00116     fNewWidthY2=(fRadiusAtY2*tan(2*pi/(2*fNoRadialPixels)))-hDetectorGap;
00117 
00118     fNewWidthX1=fPixelWidthX1;
00119     fNewWidthX2=fPixelWidthX2;
00120 
00121   PixelBackward.CheckAndSetAllParameters(fNewWidthX1,fNewWidthX1,
00122                                          fNewWidthY1,fNewWidthY2,
00123                                          fNewWidthZ);
00124 }

void musrBackwardParameterisation::ComputeTransformation const G4int  copyNo,
G4VPhysicalVolume *  physVol
const
 

Definition at line 47 of file musrBackwardParameterisation.cc.

00048 {
00049     G4int j;
00050     G4double ftheta;    
00051     G4double fRadius;      
00052     G4double fZDist;
00053     G4double hArrayLength=0.5*fArrayLength;
00054     G4double fhZStep;
00055 
00056   j=int(copyNo/fNoRadialPixels);
00057 
00058   G4RotationMatrix* fRotFdeg= new G4RotationMatrix();
00059   G4ThreeVector fTa;
00060   fhZStep = (fArrayLength/(2*fNoLengthPixels));
00061   fZDist=-(j)*fArrayLength/fNoLengthPixels;
00062 
00063   fTa.setZ(fZDist+(hArrayLength-fhZStep));
00064 
00065   fRadius=fLRadius+(fZDist-fhZStep)*tan(fTiltAngle);
00066 
00067   ftheta=(360*(copyNo-1)/fNoRadialPixels)*deg;
00068   fTa.setX(fRadius*cos(ftheta)*mm);
00069   fTa.setY(fRadius*sin(ftheta)*mm);
00070   fRotFdeg->rotateZ(-ftheta);
00071   fRotFdeg->rotateY(-fTiltAngle);  
00072 
00073    //----- first delete the old rotation matrix 
00074    G4RotationMatrix* rmold = physVol->GetRotation();
00075    delete rmold;
00076 
00077     physVol->SetTranslation(fTa);
00078     physVol->SetRotation(fRotFdeg);
00079 
00080 
00081 }


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 12:19:54 2006 for MUSR by  doxygen 1.4.6