CbmRoot
Loading...
Searching...
No Matches
LitSubstationMuon.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2012 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef LITSUBSTATIONMUON_H_
13#define LITSUBSTATIONMUON_H_
14
15#include "LitMaterialInfo.h"
16
17namespace lit
18{
19 namespace parallel
20 {
21
28 template<class T>
30 public:
35
39 virtual ~LitSubstationMuon() {}
40
45 const T& GetZ() const { return fZ; }
46
51 void SetZ(const T& z) { fZ = z; }
52
57 const LitMaterialInfo<T>& GetMaterial() const { return fMaterial; }
58
63 void SetMaterial(const LitMaterialInfo<T>& material) { fMaterial = material; }
64
69 std::string ToString() const
70 {
71 return "LitSubstationMuon: Z=" + lit::parallel::ToString<T>(GetZ()) + ", material=" + GetMaterial().ToString();
72 }
73
78 friend std::ostream& operator<<(std::ostream& strm, const LitSubstationMuon& substation)
79 {
80 strm << substation.ToString();
81 return strm;
82 }
83
84 private:
85 T fZ; // Z position of substation in [cm]
86 LitMaterialInfo<T> fMaterial; // Material of substation
88
89 /* Some typedefs for convenience */
92
93 } // namespace parallel
94} // namespace lit
95#endif /* LITSUBSTATIONMUON_H_ */
Substation in muon detector layout.
std::string ToString() const
Return string representation for the class.
friend std::ostream & operator<<(std::ostream &strm, const LitSubstationMuon &substation)
Operator << for convenient output to std::ostream.
virtual ~LitSubstationMuon()
Destructor.
void SetZ(const T &z)
Set Z pposition of substation.
const T & GetZ() const
Return Z position of substation.
const LitMaterialInfo< T > & GetMaterial() const
Return material of substation.
void SetMaterial(const LitMaterialInfo< T > &material)
Set material of substation.
class lit::parallel::LitDetectorLayout _fvecalignment
std::string ToString(const T &value)
Function converts object into a std::string.
Definition LitUtils.h:37
LitSubstationMuon< fscal > LitSubstationMuonScal
LitSubstationMuon< fvec > LitSubstationMuonVec