FairRoot/PandaRoot
Functions | Variables
createROOTEnDrcGeo.C File Reference

Go to the source code of this file.

Functions

gROOT LoadMacro ("$VMCWORKDIR/gconfig/basiclibs.C")
 
 basiclibs ()
 
gSystem Load ("libGeoBase")
 
gSystem Load ("libParBase")
 
gSystem Load ("libBase")
 
gSystem Load ("libPndData")
 
gSystem Load ("libPassive")
 
geoFace setMediaFile ("../../../pandaroot/geometry/media_pnd.geo")
 
geoFace readMedia ()
 
geoFace print ()
 
gGeoMan SetTopVolume (top)
 
 if (nsegs%4!=0)
 
trans RegisterYourself ()
 
cout<<"Composite shape "
<< compShape<< endl;TGeoCompositeShape
*discShape=new
TGeoCompositeShape("dshape",
compShape);TGeoVolume *disc=new
TGeoVolume("disc", discShape,
gGeoMan->GetMedium("FusedSil"));TGeoRotation
*rotCave=new TGeoRotation("drotCave");rotCave-> 
RotateX (90)
 
rotCave RotateZ (90)
 
top AddNode (disc, 1, new TGeoCombiTrans(TGeoTranslation(0, 0, 0),*rotCave))
 
rotCave ReflectX (kFALSE)
 
top AddNode (disc, 2, new TGeoCombiTrans(TGeoTranslation(0, 0, 0),*rotCave))
 
rotCave RotateZ (-180)
 
top AddNode (disc, 3, new TGeoCombiTrans(TGeoTranslation(0, 0, 0),*rotCave))
 
top AddNode (disc, 4, new TGeoCombiTrans(TGeoTranslation(0, 0, 0),*rotCave))
 
 for (Int_t i=0;i< nsegs;i++)
 
gGeoMan GetListOfMatrices () -> Remove(global)
 
trans Write ()
 
gGeoMan CloseGeometry ()
 
top Draw ()
 
fi Close ()
 

Variables

Double_t dist_z1 = 0.
 
Double_t dist_z2 = 1100./10
 
Double_t thickness = 15./10
 
Double_t angle = 2*TMath::Pi()/nsegs
 
Double_t ztarget =1945./10
 
Double_t LiFThick =50./10
 
TString outfile = "../../geometry/endrc.root"
 
TFile * fi = new TFile(outfile,"RECREATE")
 
FairGeoLoader * geoLoad = new FairGeoLoader("TGeo","FairGeoLoader")
 
FairGeoInterface * geoFace = geoLoad->getGeoInterface()
 
FairGeoMedia * Media = geoFace->getMedia()
 
FairGeoBuilder * geobuild =geoLoad->getGeoBuilder()
 
FairGeoMedium * CbmMediumDIRCair = Media->getMedium("DIRCair")
 
FairGeoMedium * CbmMediumDIRCglass = Media->getMedium("FusedSil")
 
FairGeoMedium * CbmMediumDIRClg = Media->getMedium("carbon")
 
Int_t nmed =geobuild->createMedium(CbmMediumDIRCair)
 
TGeoManager * gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom")
 
TGeoVolume * top = gGeoMan->MakeTube("EnDrc",gGeoMan->GetMedium("DIRCair"),0,dist_z2+20. ,5.)
 
TString segName ="dseg"
 
TGeoTrd1 * dsegShape =new TGeoTrd1(segName,0.,dist_z2*tan(angle/2),thickness/2,dist_z2/2)
 
TGeoRotation * rot
 
TString rotName
 
char rotNamech [10]
 
TString compShape
 
TGeoTranslation * trans =new TGeoTranslation("thole",0,0,0)
 
TGeoCombiTrans * combi
 
TGeoBBox * holeShape =new TGeoBBox("hole",ztarget*tan(5*TMath::DegToRad()),thickness,ztarget*tan(10*TMath::DegToRad()))
 
TGeoBBox * LiFShape =new TGeoBBox("LiFShape",dist_z2*tan(angle/2),thickness/2,LiFThick/2)
 
TGeoBBox * LGShape =new TGeoBBox("LGShape",dist_z2*tan(angle/2),thickness/2,LiFThick)
 
TGeoVolume * lif
 
TGeoVolume * lg
 
TGeoHMatrix * global = gGeoMan->GetHMatrix()
 

Function Documentation

top AddNode ( disc  ,
,
new   TGeoCombiTransTGeoTranslation(0, 0, 0),*rotCave 
)
top AddNode ( disc  ,
,
new   TGeoCombiTransTGeoTranslation(0, 0, 0),*rotCave 
)
top AddNode ( disc  ,
,
new   TGeoCombiTransTGeoTranslation(0, 0, 0),*rotCave 
)
top AddNode ( disc  ,
,
new   TGeoCombiTransTGeoTranslation(0, 0, 0),*rotCave 
)
basiclibs ( )
fi Close ( )
gGeoMan CloseGeometry ( )
top Draw ( )

Definition at line 64 of file NHitsPerEvent.C.

64  {
65 
66  std::cout << "mvdHitArray: " << mvdHitArray->GetEntries() << " projectedHitArray " << mvdProjectedArray->GetEntries() << std::endl;
67 
68 // gHitPoints->Clear();
71  //if (gHitPoints->GetN() != x.size()) gHitPoints->Expand(x.size());
72 
73  std::cout << "NHits: " << gHitPoints->GetN() << std::endl;
74  gHitPoints->Draw("apl");
75  gProjections->Draw("pl");
76 }
void ExtractData(TClonesArray *array, TGraph *g)
Definition: NHitsPerEvent.C:78
TGraph * gHitPoints
Definition: NHitsPerEvent.C:15
TClonesArray * mvdHitArray
Definition: NHitsPerEvent.C:12
TClonesArray * mvdProjectedArray
Definition: NHitsPerEvent.C:13
TGraph * gProjections
Definition: NHitsPerEvent.C:16
for ( )

Definition at line 127 of file createROOTEnDrcGeo.C.

References i, rotNamech, and thickness.

127  {
128  sprintf(rotNamech,"lrot%d",i);
130  rot=new TGeoRotation(rotName);
131  //rot->RegisterYourself();
132  rot->RotateX(90);
133  rot->RotateZ(90);
134  rot->RotateZ((angle*i+angle/2)*TMath::RadToDeg());
135  TVector3 temp(0,0,dist_z2+LiFThick/2);
136  temp.RotateY(angle*i+angle/2);
137  temp.RotateX(90*TMath::DegToRad());
138  temp.RotateZ(90*TMath::DegToRad());
139  trans=new TGeoTranslation(rotNamech,temp.X(),temp.Y(),temp.Z());
140  combi=new TGeoCombiTrans(*trans,*rot);
141  sprintf(rotNamech,"lifc%d",i);
143  combi->SetName(rotName);
144  sprintf(rotNamech,"lif%d",i);
146  //position LiF
147  lif=new TGeoVolume(rotName,LiFShape,gGeoMan->GetMedium("FusedSil"));
148  top->AddNode(lif,i+1,combi);
149  //position light guide
150  sprintf(rotNamech,"lg%d",i);
152  trans=new TGeoTranslation(rotNamech,temp.X(),temp.Y(),temp.Z()-thickness);
153  combi=new TGeoCombiTrans(*trans,*rot);
154  //lg=new TGeoVolume(rotName,LGShape,gGeoMan->GetMedium("carbon"));
155  lg=new TGeoVolume(rotName,LGShape,gGeoMan->GetMedium("FusedSil"));
156  top->AddNode(lg,i+1,combi);
157 
158 
159  //combi->RegisterYourself();
160  }
Int_t i
Definition: run_full.C:25
TString rotName
TGeoVolume * lg
Double_t thickness
TGeoTranslation * trans
char rotNamech[10]
TGeoManager * gGeoMan
TGeoBBox * LiFShape
TGeoCombiTrans * combi
TGeoVolume * top
TGeoRotation * rot
TGeoVolume * lif
Double_t dist_z2
Double_t LiFThick
Double_t angle
TGeoBBox * LGShape
gGeoMan GetListOfMatrices ( ) -> Remove(global)
if ( nsegs%4!  = 0)

Definition at line 69 of file createROOTEnDrcGeo.C.

References i, rotName, rotNamech, and segName.

70  {
71  //others rotated by seg*angle
72  sprintf(rotNamech,"drot%d",i);
74  rot=new TGeoRotation(rotName);
75  //rot->RegisterYourself();
76  rot->RotateY((angle*i+angle/2)*TMath::RadToDeg());
77  sprintf(rotNamech,"dtra%d",i);
79  TVector3 temp(0,0,dist_z2/2);
80  temp.RotateY(angle*i+angle/2);
81  trans=new TGeoTranslation(rotNamech,temp.X(),temp.Y(),temp.Z());
82  combi=new TGeoCombiTrans(*trans,*rot);
83  sprintf(rotNamech,"dcom%d",i);
85  combi->SetName(rotName);
86  combi->RegisterYourself();
87  compShape+="(";
89  compShape+=":";
91  compShape+="-hole:thole)";
92  //compShape+=")";
93  if(i!=nsegs/4-1)compShape+="+";
94  }
Int_t i
Definition: run_full.C:25
TString rotName
TString compShape
TGeoTranslation * trans
char rotNamech[10]
TGeoCombiTrans * combi
TString segName
TGeoRotation * rot
Double_t dist_z2
Double_t angle
gSystem Load ( "libGeoBase"  )
gSystem Load ( "libParBase"  )
gSystem Load ( "libBase"  )
gSystem Load ( "libPndData"  )
gSystem Load ( "libPassive"  )
gROOT LoadMacro ( "$VMCWORKDIR/gconfig/basiclibs.C )
geoFace readMedia ( )
rotCave ReflectX ( kFALSE  )
trans RegisterYourself ( )
cout<<"Composite shape "<<compShape<<endl; TGeoCompositeShape* discShape=new TGeoCompositeShape("dshape",compShape); TGeoVolume* disc=new TGeoVolume("disc",discShape,gGeoMan->GetMedium("FusedSil")); TGeoRotation* rotCave=new TGeoRotation("drotCave"); rotCave-> RotateX ( 90  )
rotCave RotateZ ( 90  )

Referenced by hypGe_DoubleGeo(), and hypGe_TripleGeo().

rotCave RotateZ ( 180)
geoFace setMediaFile ( "../../../pandaroot/geometry/media_pnd.geo"  )
gGeoMan SetTopVolume ( top  )
trans Write ( )

Variable Documentation

Double_t angle = 2*TMath::Pi()/nsegs

Definition at line 13 of file createROOTEnDrcGeo.C.

Referenced by PndTrkCTFindTrackInXY2::AddMvdHitsToSttTracks(), PndSttTrackFinderReal::AssociateSkewHitsToXYTrack(), ATan2Pi(), BOOST_AUTO_TEST_CASE(), PndFTSCAParameters::CALocalToGlobal(), PndTrkLegendreSecTask::Cleanup(), PndTrkLegendreTask::Cleanup(), PndTrkLegendreSecTask2::Cleanup(), PndTrkTracking2::CollectParSttHitsagain(), PndTrackCombiner::combine(), PndTrkComparisonMCtruth::ComparisonwithMC(), constructGasManifold(), create_HV_MAPS(), create_lumi(), create_lumi_geanetest(), PndForwardTrackFinderTask::createStatictcs(), PndSttTrackFinderReal::DoFind(), PndDiscTaskReconstruction::Exec(), PndTrkGlpkFits::FitHelixCylinder(), PndSttTrackFinderReal::FitHelixCylinder(), PndTrkGlpkFits::FitSZspace(), PndSttTrackFinderReal::FitSZspace(), PndLmdDim::Generate_rootgeom(), PndLmdGeometryFactory::generatePCB(), Get_PolyLine_circle(), PndFtsLineComparator::getAngle(), PndSttHelixTrackFitter::GetCharge(), PndSttHelixTrackFitter::GetHitAngle(), PndCAParameters::GlobalToCALocal(), PndFTSCAParameters::GlobalToCALocal(), PndSttHitCorrector::KeepBestAngle(), lutmean(), PndTrkTracking2::MatchMvdHitsToSttTracks(), PndTrkTracking2::MatchMvdHitsToSttTracks2(), PndTrkTracking2::MatchMvdHitsToSttTracksagain(), PndSttTrackFinderReal::PndSttFitSZspacebis(), PndSttTrackFinderReal::PndSttTrkAssociatedParallelHitsToHelix5(), PndSttTrackFinderReal::PndSttTrkAssociatedParallelHitsToHelixQuater(), PndLmdDim::reCreate_transformation_matrices(), PndDskCerenkov::SetTotalRefAngle(), PndTrkCleanup::Track_Crosses_MvdMiniDisk_withMargin(), PndFtsCellTrackletGenerator::transform(), PndFtsLineApproximator::transform(), PndTrkCTFindTrackInXY2::TrkAssociatedParallelHitsToHelix5(), PndTrkCTFindTrackInXY::TrkAssociatedParallelHitsToHelix5(), PndTrkCTFindTrackInXY2::TrkAssociatedParallelHitsToHelix6(), PndTrkCTFindTrackInXY::TrkAssociatedParallelHitsToHelixQuater(), PndSttTrackFinderReal::WriteMacroParallelAssociatedHits(), PndSttTrackFinderReal::WriteMacroParallelAssociatedHitswithMC(), PndSttTrackFinderReal::WriteMacroParallelHitsConformalwithMCspecial(), PndSttTrackFinderReal::WriteMacroParallelHitsGeneral(), PndSttTrackFinderReal::WriteMacroParallelHitsGeneralConformalwithMC(), PndSttTrackFinderReal::WriteMacroParallelHitswithRfromMC(), PndSttTrackFinderReal::WriteMacroSkewAssociatedHits(), PndSttTrackFinderReal::WriteMacroSkewAssociatedHitswithMC(), and PndSttTrackFinderReal::WriteMacroSkewAssociatedHitswithRfromMC().

FairGeoMedium* CbmMediumDIRCair = Media->getMedium("DIRCair")

Definition at line 40 of file createROOTEnDrcGeo.C.

FairGeoMedium* CbmMediumDIRCglass = Media->getMedium("FusedSil")

Definition at line 41 of file createROOTEnDrcGeo.C.

FairGeoMedium* CbmMediumDIRClg = Media->getMedium("carbon")

Definition at line 42 of file createROOTEnDrcGeo.C.

TGeoCombiTrans* combi
TString compShape

Definition at line 64 of file createROOTEnDrcGeo.C.

Double_t dist_z1 = 0.

Definition at line 10 of file createROOTEnDrcGeo.C.

Double_t dist_z2 = 1100./10

Definition at line 11 of file createROOTEnDrcGeo.C.

TGeoTrd1* dsegShape =new TGeoTrd1(segName,0.,dist_z2*tan(angle/2),thickness/2,dist_z2/2)

Definition at line 58 of file createROOTEnDrcGeo.C.

TFile* fi = new TFile(outfile,"RECREATE")

Definition at line 29 of file createROOTEnDrcGeo.C.

FairGeoBuilder* geobuild =geoLoad->getGeoBuilder()

Definition at line 38 of file createROOTEnDrcGeo.C.

FairGeoInterface* geoFace = geoLoad->getGeoInterface()

Definition at line 32 of file createROOTEnDrcGeo.C.

FairGeoLoader* geoLoad = new FairGeoLoader("TGeo","FairGeoLoader")

Definition at line 31 of file createROOTEnDrcGeo.C.

TGeoManager* gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom")

Definition at line 48 of file createROOTEnDrcGeo.C.

TGeoHMatrix* global = gGeoMan->GetHMatrix()
TGeoBBox* holeShape =new TGeoBBox("hole",ztarget*tan(5*TMath::DegToRad()),thickness,ztarget*tan(10*TMath::DegToRad()))

Definition at line 96 of file createROOTEnDrcGeo.C.

TGeoVolume* lg

Definition at line 126 of file createROOTEnDrcGeo.C.

Referenced by PndSttSingleStraw::RRise(), and PndFtsSingleStraw::RRise().

TGeoBBox* LGShape =new TGeoBBox("LGShape",dist_z2*tan(angle/2),thickness/2,LiFThick)

Definition at line 124 of file createROOTEnDrcGeo.C.

TGeoVolume* lif

Definition at line 125 of file createROOTEnDrcGeo.C.

TGeoBBox* LiFShape =new TGeoBBox("LiFShape",dist_z2*tan(angle/2),thickness/2,LiFThick/2)

Definition at line 122 of file createROOTEnDrcGeo.C.

Double_t LiFThick =50./10

Definition at line 16 of file createROOTEnDrcGeo.C.

FairGeoMedia* Media = geoFace->getMedia()

Definition at line 37 of file createROOTEnDrcGeo.C.

Definition at line 44 of file createROOTEnDrcGeo.C.

TString outfile = "../../geometry/endrc.root"

Definition at line 28 of file createROOTEnDrcGeo.C.

TGeoRotation* rot

Definition at line 61 of file createROOTEnDrcGeo.C.

TString rotName
char rotNamech[10]

Definition at line 63 of file createROOTEnDrcGeo.C.

Referenced by for(), and if().

TString segName ="dseg"

Definition at line 57 of file createROOTEnDrcGeo.C.

Referenced by if().

Double_t thickness = 15./10

Definition at line 12 of file createROOTEnDrcGeo.C.

Referenced by for().

TGeoVolume* top = gGeoMan->MakeTube("EnDrc",gGeoMan->GetMedium("DIRCair"),0,dist_z2+20. ,5.)

Definition at line 51 of file createROOTEnDrcGeo.C.

trans =new TGeoTranslation("thole",0,0,0)
Double_t ztarget =1945./10

Definition at line 15 of file createROOTEnDrcGeo.C.