8 #include "FairRunSim.h"
15 :
PndFieldMap(), fRegionNo(0), fHemiX(0), fHemiY(0), fBeamMom(0.)
25 const char* fileType,
Double_t BeamMom)
26 :
PndFieldMap(mapName, fileType), fRegionNo(0), fHemiX(0), fHemiY(0), fBeamMom(BeamMom)
30 FairRunSim *
fRun= FairRunSim::Instance();
31 if(fRun)
fBeamMom= fRun->GetBeamMom();
34 else if (fBeamMom< 6.0 && fBeamMom >= 3.0)Suffix=
".0406";
35 else if (fBeamMom< 10.0 && fBeamMom >= 6.0 )Suffix=
".0890" ;
36 else if (fBeamMom< 13.0 && fBeamMom >= 10.0)Suffix=
".1191";
37 else if (
fBeamMom>= 13.0) Suffix=
".1500";
41 NewName=mapName+Suffix;
43 TString dir = getenv(
"VMCWORKDIR");
44 fFileName = dir +
"/input/fieldmaps/" + NewName;
45 if ( fileType[0] ==
'R' )
fFileName +=
".root";
59 :
PndFieldMap(), fRegionNo(0), fHemiX(0), fHemiY(0), fBeamMom(0)
72 cerr <<
"-W- PndDipoleMap::PndDipoleMap: empty parameter container!"
84 TString dir = getenv(
"VMCWORKDIR");
85 fFileName = dir +
"/input/fieldmaps/" + fName +
".root";
112 if (
IsInside(x, y, z, ix, iy, iz, dx, dy, dz) ){
166 Int_t& ix, Int_t& iy, Int_t& iz,
212 cout <<
"PndDipoleMap::FillParContainer() " << endl;
Double_t GetPositionX() const
cout<< "-----------------------------------------------> Quarter VOLUME<<endl;name="QuarterShape";QuarterShape=newTGeoArb8(name,dz,vertQuar);name="Quarter4Vol";TStringmedium="air";QuarterVol=newTGeoVolumeAssembly(name);name="SubunitShape";SubunitShape=newTGeoArb8(name,dz,vertSub);TStringmedium="air";name="SubunitVol";name1="SubunitVol1";name2="SubunitVol2";name3="SubunitVol3";name4="SubunitVol4";name5="SubunitVol5";name6="SubunitVol6";name7="SubunitVol7";name8="SubunitVol8";name9="SubunitVol9";SubunitVol=newTGeoVolumeAssembly(name);SubunitVol1=newTGeoVolumeAssembly(name1);SubunitVol2=newTGeoVolumeAssembly(name2);SubunitVol3=newTGeoVolumeAssembly(name3);SubunitVol4=newTGeoVolumeAssembly(name4);SubunitVol5=newTGeoVolumeAssembly(name5);SubunitVol6=newTGeoVolumeAssembly(name6);SubunitVol7=newTGeoVolumeAssembly(name7);SubunitVol8=newTGeoVolumeAssembly(name8);SubunitVol9=newTGeoVolumeAssembly(name9);name="BoxShape";BoxShape=newTGeoArb8(name,dz,vertBox);TStringmedium="air";name="BoxVol";BoxVol=newTGeoVolumeAssembly(name);name1="BoxVol1";name2="BoxVol2";name3="BoxVol3";name4="BoxVol4";BoxVol1=newTGeoVolumeAssembly(name1);BoxVol2=newTGeoVolumeAssembly(name2);BoxVol3=newTGeoVolumeAssembly(name3);BoxVol4=newTGeoVolumeAssembly(name4);for(Int_tb=0;b<kNumOfBoxes;b++){cout<<""<<endl;cout<<"---------------->BOXnumber:"<<b<<endl;if(b==0){trBox=newTGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(0.465518);rotBox.RotateY(-0.465518);}if(b==1){trBox=newTGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(-0.465518);rotBox.RotateY(0.465518);}if(b==2){trBox=newTGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(-0.465518);rotBox.RotateY(-0.465518);}if(b==3){trBox=newTGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(0.465518);rotBox.RotateY(0.465518);}TGeoCombiTrans*trrotBox=newTGeoCombiTrans(trBox,rotBox);name="BoxVol";name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol->AddNode(BoxVol,b,trrotBox);if(b==1){name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol1->AddNode(BoxVol,b,trrotBox);}if(b==2){name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol2->AddNode(BoxVol1,b,trrotBox);}if(b==0){name+=b;trrotBox-> SetName(name)
Double_t GetScale() const
static Int_t fNumberOfRegions
void MapName(TString &name)
Double_t Interpolate(Double_t dx, Double_t dy, Double_t dz)
PndMultiFieldPar * fieldPar
virtual Bool_t IsInside(Double_t x, Double_t y, Double_t z, Int_t &ix, Int_t &iy, Int_t &iz, Double_t &dx, Double_t &dy, Double_t &dz)
Double_t GetPositionZ() const
void GetBxyz(const Double_t point[3], Double_t *bField)
Double_t GetPositionY() const