#include "PCBParameterisation.hh"
#include "G4SystemOfUnits.hh"
#include "G4PhysicalConstants.hh"

#include "G4VPhysicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "G4Box.hh"


PCBParameterisation::PCBParameterisation(G4double barSide, G4double barLength, G4double barHeight, G4double barThick, G4int nSide)
{
    fSpacing =  barSide;
    fLength  =  barLength;
    fHeight  =  barHeight;
    fThick   =  barThick;
    fSide    =  nSide;
}


PCBParameterisation::~PCBParameterisation() 
{;}


void PCBParameterisation::ComputeTransformation (const G4int copyNo, G4VPhysicalVolume* physVol) const
{
    G4double xPos = 0.*cm;
    G4double yPos = 0.*cm;
    G4double zPos = fHeight;

    xPos = (-fLength)/2. +1.*cm  + copyNo* 1.*cm; //sono al centro della barra capisci se indietreggiare di mezza barra

    G4cout << " copyNo " << copyNo << G4endl;
    G4cout << " fSpacing " << fSpacing << G4endl;
    G4cout << " zPos " << zPos << G4endl;
    G4cout << " fLength " << fLength << G4endl;
    G4cout << " fSpacing " << fSpacing << G4endl;

    physVol->SetTranslation(G4ThreeVector(xPos, yPos, zPos));
    
}


