CbmRoot
LitVirtualStation.h
Go to the documentation of this file.
1 
8 #ifndef LITVIRTUALSTATION_H_
9 #define LITVIRTUALSTATION_H_
10 
11 #include "LitFieldGrid.h"
12 #include "LitMaterialGrid.h"
13 #include <sstream>
14 using std::ostream;
15 using std::stringstream;
16 
17 namespace lit {
18  namespace parallel {
19 
30  template<class T>
32  public:
37 
41  virtual ~LitVirtualStation() {}
42 
43  /* Setters */
44  void SetMaterial(const LitMaterialGrid& material) {
45  fMaterial = material;
46  }
47  void SetField(const LitFieldGrid& field) { fField = field; }
48  void SetZ(T z) { fZ = z; }
49 
50  /* Getters */
51  const LitMaterialGrid& GetMaterial() const { return fMaterial; }
52  const LitFieldGrid& GetField() const { return fField; }
53  T GetZ() const { return fZ; }
54 
59  string ToString() const {
60  stringstream ss;
61  ss << "LitVirtualStation: Z=" << GetZ() << "\n";
62  ss << " material: " << GetMaterial().ToString() << "\n";
63  ss << " field: " << GetField().ToString();
64  return ss.str();
65  }
66 
71  friend ostream& operator<<(ostream& strm,
72  const LitVirtualStation& station) {
73  strm << station.ToString();
74  return strm;
75  }
76 
77  private:
78  LitMaterialGrid fMaterial; // Material approximation
79  LitFieldGrid fField; // Field approximation
80  T fZ; // Z center of the station [cm]
82 
88 
94 
95  } // namespace parallel
96 } // namespace lit
97 #endif /* LITVIRTUALSTATION_H_ */
LitFieldGrid.h
Class stores a grid of magnetic field values in XY slice at Z position.
lit::parallel::LitVirtualStation::SetZ
void SetZ(T z)
Definition: LitVirtualStation.h:48
lit::parallel::LitVirtualStation::fMaterial
LitMaterialGrid fMaterial
Definition: LitVirtualStation.h:78
lit::parallel::LitVirtualStationScal
LitVirtualStation< fscal > LitVirtualStationScal
Scalar version of LitVirtualStation.
Definition: LitVirtualStation.h:93
lit::parallel::LitMaterialGrid
Class stores a grid of material thickness in silicon equivalent.
Definition: LitMaterialGrid.h:37
lit::parallel::LitVirtualStationVec
LitVirtualStation< fvec > LitVirtualStationVec
Vector version of LitVirtualStation.
Definition: LitVirtualStation.h:87
lit::parallel::LitVirtualStation::~LitVirtualStation
virtual ~LitVirtualStation()
Destructor.
Definition: LitVirtualStation.h:41
lit::parallel::_fvecalignment
class lit::parallel::LitDetectorLayout _fvecalignment
lit::parallel::LitFieldGrid::ToString
string ToString() const
Returns string representation of the class.
Definition: LitFieldGrid.h:199
lit::parallel::LitVirtualStation::SetMaterial
void SetMaterial(const LitMaterialGrid &material)
Definition: LitVirtualStation.h:44
lit::parallel::LitVirtualStation
Virtual detector station which stores information needed for track propagation.
Definition: LitVirtualStation.h:31
lit::parallel::LitMaterialGrid::ToString
string ToString() const
Return string representation of the class.
Definition: LitMaterialGrid.h:167
lit::parallel::LitVirtualStation::LitVirtualStation
LitVirtualStation()
Constructor.
Definition: LitVirtualStation.h:36
lit::parallel::LitVirtualStation::ToString
string ToString() const
Returns string representation of the class.
Definition: LitVirtualStation.h:59
lit::parallel::LitFieldGrid
Class stores a grid of magnetic field values in XY slice at Z position.
Definition: LitFieldGrid.h:44
lit::parallel::LitVirtualStation::SetField
void SetField(const LitFieldGrid &field)
Definition: LitVirtualStation.h:47
lit::parallel::LitVirtualStation::GetMaterial
const LitMaterialGrid & GetMaterial() const
Definition: LitVirtualStation.h:51
lit::parallel::LitVirtualStation::fZ
T fZ
Definition: LitVirtualStation.h:80
lit::parallel::LitVirtualStation::GetZ
T GetZ() const
Definition: LitVirtualStation.h:53
lit::parallel::LitVirtualStation::operator<<
friend ostream & operator<<(ostream &strm, const LitVirtualStation &station)
Operator << for convenient output to ostream.
Definition: LitVirtualStation.h:71
lit::parallel::LitVirtualStation::GetField
const LitFieldGrid & GetField() const
Definition: LitVirtualStation.h:52
LitMaterialGrid.h
Class stores a grid of material thickness in silicon equivalent.
lit::parallel::LitVirtualStation::fField
LitFieldGrid fField
Definition: LitVirtualStation.h:79
lit
Definition: LitTrackFinderNNVecElectron.h:19