29
29
#include "Geant4/globals.hh"
30
30
#include "Geant4/G4SDManager.hh"
32
#include "CLHEP/Units/PhysicalConstants.h"
33
#include "CLHEP/Matrix/Matrix.h"
34
#include "CLHEP/Vector/Rotation.h"
35
#include "src/common_cpp/DataStructure/ThreeVector.hh"
32
37
#include "DetModel/SciFi/SciFiPlane.hh"
33
38
#include "DetModel/SciFi/SciFiSD.hh"
34
39
#include "DetModel/SciFi/DoubletFiberParam.hh"
36
#include "CLHEP/Vector/Rotation.h"
38
42
// NOTE: not sure how Geant4 deals with the deletion
39
43
// of Logical and Solid Volumes;
70
74
CLHEP::HepRotation zflip;
71
const Hep3Vector rowx(-1., 0, 0);
72
const Hep3Vector rowy(0, 1., 0);
73
const Hep3Vector rowz(0, 0, -1.);
75
const Hep3Vector rowx(-1., 0., 0.);
76
const Hep3Vector rowy(0., 1., 0.);
77
const Hep3Vector rowz(0., 0., -1.);
74
78
zflip.setRows(rowx, rowy, rowz);
76
80
G4RotationMatrix* trot = new G4RotationMatrix(mod->globalRotation());
83
found = doubletName.find("Tracker1");
84
if (found != G4String::npos)
85
(*trot) = (*trot)*zflip;
77
87
// this is the rotation of the fibre array
78
(*trot) = (*trot)*zflip;
88
// (*trot) = (*trot)*zflip;
89
// G4RotationMatrix* trot = new G4RotationMatrix();
90
// G4ThreeVector dir(0, 1, 0);
93
std::cerr << "Module name: " << doubletName << "\n"
94
<< "Module rotation: " << *(trot) << "\n"
95
// << "Plane direction: " << dir << "\n"
96
<< "Mother Logical Volume is: " << mlv->GetLogicalVolume()->GetName() << "\n"
97
<< "Mothers rotation is: " << *(mlv->GetRotation()) << "\n";
81
100
solidDoublet = new G4Tubs(doubletName, 0.0,
82
101
tr, doubletThickness / 2.0,
92
111
// lenght of the tube of fibre
93
G4double tlen = 190.0 * mm;
112
G4double tlen = 1.0 * mm;
95
114
// the number of fibres to be simulated
96
115
_numFibres = (G4int)floor(2. * ar / (0.5 * fp));