CbmRoot
Loading...
Searching...
No Matches
LitVirtualStation.h
Go to the documentation of this file.
1/* Copyright (C) 2014 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef LITVIRTUALSTATION_H_
13#define LITVIRTUALSTATION_H_
14
15#include "LitFieldGrid.h"
16#include "LitMaterialGrid.h"
17
18#include <sstream>
19using std::ostream;
20using std::stringstream;
21
22namespace lit
23{
24 namespace parallel
25 {
26
37 template<class T>
39 public:
44
48 virtual ~LitVirtualStation() {}
49
50 /* Setters */
51 void SetMaterial(const LitMaterialGrid& material) { fMaterial = material; }
52 void SetField(const LitFieldGrid& field) { fField = field; }
53 void SetZ(T z) { fZ = z; }
54
55 /* Getters */
56 const LitMaterialGrid& GetMaterial() const { return fMaterial; }
57 const LitFieldGrid& GetField() const { return fField; }
58 T GetZ() const { return fZ; }
59
64 string ToString() const
65 {
66 stringstream ss;
67 ss << "LitVirtualStation: Z=" << GetZ() << "\n";
68 ss << " material: " << GetMaterial().ToString() << "\n";
69 ss << " field: " << GetField().ToString();
70 return ss.str();
71 }
72
77 friend ostream& operator<<(ostream& strm, const LitVirtualStation& station)
78 {
79 strm << station.ToString();
80 return strm;
81 }
82
83 private:
84 LitMaterialGrid fMaterial; // Material approximation
85 LitFieldGrid fField; // Field approximation
86 T fZ; // Z center of the station [cm]
88
94
100
101 } // namespace parallel
102} // namespace lit
103#endif /* LITVIRTUALSTATION_H_ */
Class stores a grid of magnetic field values in XY slice at Z position.
Class stores a grid of material thickness in silicon equivalent.
Class stores a grid of magnetic field values in XY slice at Z position.
string ToString() const
Returns string representation of the class.
Class stores a grid of material thickness in silicon equivalent.
string ToString() const
Return string representation of the class.
Virtual detector station which stores information needed for track propagation.
const LitFieldGrid & GetField() const
string ToString() const
Returns string representation of the class.
void SetMaterial(const LitMaterialGrid &material)
friend ostream & operator<<(ostream &strm, const LitVirtualStation &station)
Operator << for convenient output to ostream.
void SetField(const LitFieldGrid &field)
virtual ~LitVirtualStation()
Destructor.
const LitMaterialGrid & GetMaterial() const
LitVirtualStation< fvec > LitVirtualStationVec
Vector version of LitVirtualStation.
class lit::parallel::LitDetectorLayout _fvecalignment
LitVirtualStation< fscal > LitVirtualStationScal
Scalar version of LitVirtualStation.