All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeaneMCApplication.cxx
Go to the documentation of this file.
1 #include "larreco/Genfit/GeaneMCApplication.h"
2 #include "TVirtualMC.h"
3 #include "TGeoManager.h"
4 #include "TVector3.h"
5 #include"GFFieldManager.h"
6 
7 
8 
10 {
11 }
12 
14  gGeoManager->CloseGeometry();
15  gMC->SetRootGeometry();
16 }
17 
19  gMC->Init();
20  gMC->BuildPhysics();
21 }
22 
23 void genf::GeaneMCApplication::Field(const Double_t* x, Double_t* b) const
24 {
25  //assert(field!=NULL);
26  TVector3 pos(x[0],x[1],x[2]);
27  // TVector3 B = FieldManager::getInstance()->getField()->get(pos);
28  TVector3 B = GFFieldManager::getFieldVal(pos);
29  // std::cout << "GeaneMCApplication::Field()" << std::endl;
30  //B.Print();
31  b[0]=B.X();
32  b[1]=B.Y();
33  b[2]=B.Z();
34 }
35 
36 
37 //ClassImp(GeaneMCApplication)
process_name opflash particleana ie x
virtual void Field(const Double_t *x, Double_t *b) const
static TVector3 getFieldVal(const TVector3 &x)