LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
GeaneMCApplication.cxx
Go to the documentation of this file.
2 #include "TVirtualMC.h"
3 #include "TSystem.h"
4 #include"GFFieldManager.h"
5 
6 
7 
9 {
10 }
11 
13  gGeoManager->CloseGeometry();
14  gMC->SetRootGeometry();
15 }
16 
18  gMC->Init();
19  gMC->BuildPhysics();
20 }
21 
22 void genf::GeaneMCApplication::Field(const Double_t* x, Double_t* b) const
23 {
24  //assert(field!=NULL);
25  TVector3 pos(x[0],x[1],x[2]);
26  // TVector3 B = FieldManager::getInstance()->getField()->get(pos);
27  TVector3 B = GFFieldManager::getFieldVal(pos);
28  // std::cout << "GeaneMCApplication::Field()" << std::endl;
29  //B.Print();
30  b[0]=B.X();
31  b[1]=B.Y();
32  b[2]=B.Z();
33 }
34 
35 
36 //ClassImp(GeaneMCApplication)
37 
38 
Float_t x
Definition: compare.C:6
Int_t B
Definition: plot.C:25
virtual void Field(const Double_t *x, Double_t *b) const
static TVector3 getFieldVal(const TVector3 &x)