~sophie-middleton08/maus/devel

« back to all changes in this revision

Viewing changes to src/common_cpp/DetModel/SciFi/SciFiPlane.cc

  • Committer: Chris Rogers
  • Date: 2012-11-06 12:04:39 UTC
  • mfrom: (659.1.45 release-candidate)
  • Revision ID: chris.rogers@stfc.ac.uk-20121106120439-e6znfg5kfg850l38
Tags: MAUS-v0.4.0
MAUS-v0.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "Geant4/globals.hh"
30
30
#include "Geant4/G4SDManager.hh"
31
31
 
 
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"
 
36
 
32
37
#include "DetModel/SciFi/SciFiPlane.hh"
33
38
#include "DetModel/SciFi/SciFiSD.hh"
34
39
#include "DetModel/SciFi/DoubletFiberParam.hh"
35
40
 
36
 
#include "CLHEP/Vector/Rotation.h"
37
41
 
38
42
// NOTE: not sure how Geant4 deals with the deletion
39
43
// of Logical and Solid Volumes;
68
72
  //
69
73
 
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);
75
79
 
76
80
  G4RotationMatrix* trot = new G4RotationMatrix(mod->globalRotation());
 
81
 
 
82
  size_t found;
 
83
  found = doubletName.find("Tracker1");
 
84
  if (found != G4String::npos)
 
85
    (*trot) = (*trot)*zflip;
 
86
 
77
87
  // this is the rotation of the fibre array
78
 
  (*trot) = (*trot)*zflip;
79
 
 
 
88
  // (*trot) = (*trot)*zflip;
 
89
  // G4RotationMatrix* trot = new G4RotationMatrix();
 
90
  // G4ThreeVector dir(0, 1, 0);
 
91
  // dir = dir*(*trot);
 
92
  /*
 
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";
 
98
  */
80
99
  // this is a fibre
81
100
  solidDoublet = new G4Tubs(doubletName, 0.0,
82
101
                            tr, doubletThickness / 2.0,
90
109
                                               false, 0);
91
110
 
92
111
  // lenght of the tube of fibre
93
 
  G4double tlen = 190.0 * mm;
 
112
  G4double tlen = 1.0 * mm;
94
113
 
95
114
  // the number of fibres to be simulated
96
115
  _numFibres = (G4int)floor(2. * ar / (0.5 * fp));