6 #include "FairGeoRootBuilder.h" 
    7 #include "FairGeoNode.h" 
    9 #include "FairRuntimeDb.h" 
   11 #include "TObjArray.h" 
   13 #include "TGeoVolume.h" 
   14 #include "TGeoMatrix.h" 
   15 #include "TGeoManager.h" 
   16 #include "TGeoCompositeShape.h" 
   28   : FairModule(name ,title)
 
   40   TString fileName=GetGeometryFileName();
 
   41   if (fileName.EndsWith(
".root")) {
 
   42     std::cout<< 
"<I> PndPipe - Using geometry " << fileName <<std::endl;
 
   43     ConstructRootGeometry();
 
   44   } 
else if (fileName.EndsWith(
".geo")) {
 
   45     std::cout<< 
"<I> PndPipe - Using geometry " << fileName <<std::endl;
 
   46     ConstructASCIIGeometry();
 
   48     std::cout<< 
"<I> PndPipe - Using default geometry" <<std::endl;
 
   68     Double_t parPipeLeft[9] = { 0., 360., 2,
 
   73     Double_t parPipeCentral[12] = {    0., 360., 3,
 
   78     Double_t parPipeRight[18] = { 0., 360., 5,
 
   85     Double_t parPipeVacuumLeft[9] = { 0., 360., 2,
 
   89     Double_t parPipeVacuumCentral[12] = {    0., 360., 3,
 
   94     Double_t parPipeVacuumRight[18] = { 0., 360., 5,
 
  102     Double_t parPipeTargetDown[27] = { 0., 360., 8,
 
  112     Double_t parPipeTargetCentral[9] = { 0., 360., 2,
 
  116     Double_t parPipeTargetUp[27] = { 0., 360., 8,
 
  126     Double_t parPipeVacuumTargetDown[27] = { 0., 360., 8, 
 
  136     Double_t parPipeVacuumTargetCentral[9] = { 0., 360., 2,
 
  140     Double_t parPipeVacuumTargetUp[27] = { 0., 360., 8,
 
  150     TGeoPcon *pipeLeft          = 
new TGeoPcon(parPipeLeft);
 
  151     TGeoPcon *pipeCentral       = 
new TGeoPcon(parPipeCentral);pipeCentral->SetName(
"PIPE_CN");
 
  152     TGeoPcon *pipeRight         = 
new TGeoPcon(parPipeRight);
 
  153     TGeoPcon *pipeTargetDown    = 
new TGeoPcon(parPipeTargetDown);
 
  154     TGeoPcon *pipeTargetCentral = 
new TGeoPcon(parPipeTargetCentral); pipeTargetCentral->SetName(
"TRG_CN");
 
  155     TGeoPcon *pipeTargetUp      = 
new TGeoPcon(parPipeTargetUp);
 
  157     TGeoPcon *pipeVacuumLeft          = 
new TGeoPcon(parPipeVacuumLeft);
 
  158     TGeoPcon *pipeVacuumCentral       = 
new TGeoPcon(parPipeVacuumCentral); pipeVacuumCentral->SetName(
"PIPEV_CN");
 
  159     TGeoPcon *pipeVacuumRight         = 
new TGeoPcon(parPipeVacuumRight);
 
  160     TGeoPcon *pipeVacuumTargetDown    = 
new TGeoPcon(parPipeVacuumTargetDown);
 
  161     TGeoPcon *pipeVacuumTargetCentral = 
new TGeoPcon(parPipeVacuumTargetCentral); pipeVacuumTargetCentral->SetName(
"TRGV_CN");
 
  162     TGeoPcon *pipeVacuumTargetUp      = 
new TGeoPcon(parPipeVacuumTargetUp);
 
  164     TGeoRotation *
r1 = 
new TGeoRotation(
"r1");
 
  166     r1->RegisterYourself(); 
 
  168     TGeoCompositeShape *pipeCross       = 
new TGeoCompositeShape(
"pipeCross",       
"(PIPE_CN+TRG_CN:r1) - (PIPEV_CN+TRGV_CN:r1)");
 
  169     TGeoCompositeShape *pipeVacuumCross = 
new TGeoCompositeShape(
"pipeVacuumCross", 
"PIPEV_CN+TRGV_CN:r1");
 
  172     TGeoVolume *volPipeLeft       = 
new TGeoVolume(
"PipeLeft",       pipeLeft,       
gGeoManager->GetMedium(
"steel"));
 
  173     TGeoVolume *volPipeCross      = 
new TGeoVolume(
"PipeCross",      pipeCross,      
gGeoManager->GetMedium(
"Al+Be"));
 
  174     TGeoVolume *volPipeRight      = 
new TGeoVolume(
"PipeRight",      pipeRight,      
gGeoManager->GetMedium(
"steel"));
 
  175     TGeoVolume *volPipeTargetUp   = 
new TGeoVolume(
"PipeTargetUp",   pipeTargetUp,   
gGeoManager->GetMedium(
"steel"));
 
  176     TGeoVolume *volPipeTargetDown = 
new TGeoVolume(
"PipeTargetDown", pipeTargetDown, 
gGeoManager->GetMedium(
"steel"));
 
  178     TGeoVolume *volPipeVacuumLeft       = 
new TGeoVolume(
"PipeVacuumLeft",       pipeVacuumLeft,       
gGeoManager->GetMedium(
"vacuum"));  
 
  179     TGeoVolume *volPipeVacuumCross      = 
new TGeoVolume(
"PipeVacuumCross",      pipeVacuumCross,      
gGeoManager->GetMedium(
"vacuum"));
 
  180     TGeoVolume *volPipeVacuumRight      = 
new TGeoVolume(
"PipeVacuumRight",      pipeVacuumRight,      
gGeoManager->GetMedium(
"vacuum"));
 
  181     TGeoVolume *volPipeVacuumTargetUp   = 
new TGeoVolume(
"PipeVacuumTargetUp",   pipeVacuumTargetUp,   
gGeoManager->GetMedium(
"vacuum")); 
 
  182     TGeoVolume *volPipeVacuumTargetDown = 
new TGeoVolume(
"PipeVacuumTargetDown", pipeVacuumTargetDown, 
gGeoManager->GetMedium(
"vacuum")); 
 
  187     TGeoVolume *beamPipe = 
new TGeoVolumeAssembly(
"BeamPipe");
 
  188     beamPipe->AddNode(volPipeLeft,             0);
 
  189     beamPipe->AddNode(volPipeRight,            0);
 
  190     beamPipe->AddNode(volPipeVacuumLeft,       0);
 
  191     beamPipe->AddNode(volPipeVacuumRight,      0);
 
  192     beamPipe->AddNode(volPipeTargetUp,         0, 
new TGeoRotation(rot));
 
  193     beamPipe->AddNode(volPipeTargetDown,       0, 
new TGeoRotation(rot));
 
  194     beamPipe->AddNode(volPipeVacuumTargetUp,   0, 
new TGeoRotation(rot));
 
  195     beamPipe->AddNode(volPipeVacuumTargetDown, 0, 
new TGeoRotation(rot));
 
  196     beamPipe->AddNode(volPipeCross,            0);
 
  197     beamPipe->AddNode(volPipeVacuumCross,      0);
 
  200     cave->AddNode(beamPipe, 1);
 
TGeoManager * gGeoManager
virtual void ConstructGeometry()
Bool_t CheckIfSensitive(std::string name)