FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
detectors
hyp
hypTracking
PndFieldAdaptor.cxx
Go to the documentation of this file.
1
//-----------------------------------------------------------
2
// File and Version Information:
3
// $Id$
4
//
5
// Description:
6
// Implementation of class PndFieldAdaptor
7
// see PndFieldAdaptor.hh for details
8
//
9
// Environment:
10
// Software developed for the PANDA Detector at FAIR.
11
//
12
// Author List:
13
// Sebastian Neubert TUM (original author)
14
//
15
//
16
//-----------------------------------------------------------
17
18
// Panda Headers ----------------------
19
20
// This Class' Header ------------------
21
#include "
PndFieldAdaptor.h
"
22
23
// C/C++ Headers ----------------------
24
#include "assert.h"
25
#include<iostream>
26
27
// Collaborating Class Headers --------
28
#include "FairField.h"
29
30
// Class Member definitions -----------
31
32
33
PndFieldAdaptor::PndFieldAdaptor
(FairField* field)
34
:
fField
(field)
35
{}
36
37
TVector3
38
PndFieldAdaptor::get
(
const
TVector3&
pos
)
const
{
39
assert(
fField
!=NULL);
40
Double_t
x
[3];
41
x[0] = pos.X();
42
x[1] = pos.Y();
43
x[2] = pos.Z();
44
45
Double_t
f
[3];
46
fField
->GetFieldValue(x,f);
47
//std::cout << "PndFieldAdapter::get() field at "
48
// <<x[0]<<","<<x[1]<<","<<x[2]<<" has value "
49
// <<f[0]<<","<<f[1]<<","<<f[2]<<std::endl;
50
return
TVector3(f[0],f[1],f[2]);
51
}
52
53
ClassImp
(
PndFieldAdaptor
);
pos
TVector3 pos
Definition:
GammaSpectraAnalysis.C:43
fField
PndMultiField * fField
Definition:
sim_emc_apd.C:97
PndFieldAdaptor::fField
FairField * fField
Definition:
PndFieldAdaptor.h:46
Double_t
Double_t
Definition:
SimCompleteLinkDef.h:6
PndFieldAdaptor::PndFieldAdaptor
PndFieldAdaptor()
Definition:
PndFieldAdaptor.h:36
f
TFile * f
Definition:
bump_analys.C:12
x
Double_t x
Definition:
createRootFscGeometryFile.C:159
PndFieldAdaptor
Definition:
PndFieldAdaptor.h:32
PndFieldAdaptor.h
ClassImp
ClassImp(PndAnaContFact)
PndFieldAdaptor::get
TVector3 get(const TVector3 &) const
override this is you concrete implementation
Definition:
PndFieldAdaptor.cxx:38
Generated on Wed Apr 3 2019 08:43:55 for FairRoot/PandaRoot by
1.8.5