FairRoot/PandaRoot
Public Member Functions | List of all members
PndSttTubeCreator Class Reference

#include <PndSttTubeCreator.h>

Inheritance diagram for PndSttTubeCreator:

Public Member Functions

 PndSttTubeCreator ()
 
virtual ~PndSttTubeCreator ()
 
PndSttTubeGetTube (int tubeId)
 
 ClassDef (PndSttTubeCreator, 1)
 

Detailed Description

Definition at line 15 of file PndSttTubeCreator.h.

Constructor & Destructor Documentation

PndSttTubeCreator::PndSttTubeCreator ( )

Definition at line 14 of file PndSttTubeCreator.cxx.

14  {
15  // TODO Auto-generated constructor stub
16 
17 }
PndSttTubeCreator::~PndSttTubeCreator ( )
virtual

Definition at line 19 of file PndSttTubeCreator.cxx.

19  {
20  // TODO Auto-generated destructor stub
21 }

Member Function Documentation

PndSttTubeCreator::ClassDef ( PndSttTubeCreator  ,
 
)
PndSttTube * PndSttTubeCreator::GetTube ( int  tubeId)

Definition at line 23 of file PndSttTubeCreator.cxx.

References Double_t, geoH, PndGeoHandling::GetMatrixShortId(), PndSttTubeIdMap::GetSectorRowFromTubeId(), PndGeoHandling::GetSensorDimensionsShortId(), i, PndSttTubeIdMap::Instance(), PndGeoHandling::Instance(), r, rotation, PndSttTube::SetLayerID(), and PndSttTube::SetSectorID().

Referenced by PndSttTubeMapCreatorRoot::CreateTubeMap().

23  {
25 
26  PndSttTubeParameters* params = new PndSttTubeParameters(tubeId, geoH->GetSensorDimensionsShortId(tubeId).Z());
27  TGeoHMatrix* matrix = geoH->GetMatrixShortId(tubeId);
28 
29  Double_t const *translation = matrix->GetTranslation();
30  Double_t const *rotation = matrix->GetRotationMatrix();
31 
32  double r[3][3];
33  int irot = 0, i = 0, j = 0;
34  for(i = 0; i < 3; i++) {
35  for(j = 0; j < 3; j++) {
36  r[i][j] = rotation[irot];
37  irot++;
38  }
39  }
40 
41  PndSttTube* theTube = new PndSttTube(params,
42  translation[0], translation[1], translation[2],
43  r[0][0],r[0][1],r[0][2],
44  r[1][0],r[1][1],r[1][2],
45  r[2][0],r[2][1],r[2][2],
46  geoH->GetSensorDimensionsShortId(tubeId).X(), geoH->GetSensorDimensionsShortId(tubeId).X() + 0.001);
47 
48  std::pair<int, int > SectorRow = PndSttTubeIdMap::Instance()->GetSectorRowFromTubeId(tubeId);
49  theTube->SetSectorID(SectorRow.first);
50  theTube->SetLayerID(SectorRow.second);
51 
52  //std::cout << "-I- PndSttTubeCreator::GetTube " << tubeId << " : " << SectorRow.first << "/" << SectorRow.second << std::endl;
53 
54  return theTube;
55 }
void SetSectorID(int id)
Definition: PndSttTube.cxx:117
std::pair< int, int > GetSectorRowFromTubeId(int tubeId)
double r
Definition: RiemannTest.C:14
Int_t i
Definition: run_full.C:25
TGeoRotation rotation
TVector3 GetSensorDimensionsShortId(Int_t shortId)
TGeoHMatrix * GetMatrixShortId(Int_t shortId)
Class to access the naming information of the MVD.
static PndSttTubeIdMap * Instance()
Double_t
static PndGeoHandling * Instance()
PndGeoHandling * geoH
void SetLayerID(int id)
Definition: PndSttTube.cxx:120

The documentation for this class was generated from the following files: