FairRoot/PandaRoot
CAFieldValue.h
Go to the documentation of this file.
1  //-*- Mode: C++ -*-
2  // *****************************************************************************
3  // *
4  // @Autors: I.Kulakov; M.Zyzak; I.Kisel *
5  // @e-mail: I.Kulakov@gsi.de; M.Zyzak@gsi.de; I.Kisel@compeng.uni-frankfurt.de *
6  // *
7  // *****************************************************************************
8 
9 #ifndef CAFieldValue_H
10 #define CAFieldValue_H
11 
12 #ifdef PANDA_FTS
13 
14 class CAFieldValue{
15 
16  //* parameters of the magnetic field
17 
18  public:
19  CAFieldValue():x(Vc::Zero),y(Vc::Zero),z(Vc::Zero){};
20 
21  float_v x, y, z;
22 
23  void Combine( CAFieldValue &B, float_v w )
24  {
25  x+= w*( B.x - x );
26  y+= w*( B.y - y );
27  z+= w*( B.z - z );
28  }
29 
30  void UpdateValue( const CAFieldValue &B, const float_m &mask ) {
31  x(mask) = B.x;
32  y(mask) = B.y;
33  z(mask) = B.z;
34  };
35 
37  return out << B.x << endl <<
38  B.y << endl <<
39  B.z << endl;
40  };
41 };
42 
43 #else // PANDA_FTS
44 
45 struct CAFieldValue{
46  public:
48 
49  CAFieldValue(float f):fcBz(f){}
50  operator float() const { return fcBz; }
51 
52  private:
53  float fcBz;
54 };
55 
56 #endif // PANDA_FTS
57 
58 #endif
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
static const fvec Zero
basic_ostream< char, char_traits< char > > ostream
TFile * f
Definition: bump_analys.C:12
Double_t z
TFile * out
Definition: reco_muo.C:20
Double_t x
Double_t y
CAFieldValue(float f)
Definition: CAFieldValue.h:49