Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:18

0001 #include "PHG4InttFPHXParameterisation.h"
0002 
0003 #include <Geant4/G4ThreeVector.hh>
0004 #include <Geant4/G4Types.hh>  // for G4double, G4int
0005 #include <Geant4/G4VPhysicalVolume.hh>
0006 
0007 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0008 
0009 PHG4InttFPHXParameterisation::PHG4InttFPHXParameterisation(const double offsetx, const double offsety, const double offsetz, const double dz, const int ncopy)
0010 {
0011   for (G4int icopy = 0; icopy < ncopy; icopy++)
0012   {
0013     fXFPHX[icopy] = offsetx;
0014     fYFPHX[icopy] = offsety;
0015     fZFPHX[icopy] = offsetz + icopy * dz;
0016     /*
0017     std::cout << "      icopy " << icopy
0018               << " offsety " << offsety
0019               << " offsetz " << offsetz
0020               << " dz " << dz
0021               << " fXFPHX[icopy] " << fXFPHX[icopy]
0022               << " fYFPHX[icopy] " << fYFPHX[icopy]
0023               << " fZFPHX[icopy] " << fZFPHX[icopy]
0024               << std::endl;
0025     */
0026   }
0027 }
0028 
0029 void PHG4InttFPHXParameterisation::ComputeTransformation(const G4int icopy, G4VPhysicalVolume *physVol) const
0030 {
0031   physVol->SetTranslation(G4ThreeVector(fXFPHX[icopy], fYFPHX[icopy], fZFPHX[icopy]));
0032 }