uLib-0.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MuonScatter.h
Go to the documentation of this file.
1 /*//////////////////////////////////////////////////////////////////////////////
2 // CMT Cosmic Muon Tomography project //////////////////////////////////////////
4 
5  Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
6  All rights reserved
7 
8  Authors: Andrea Rigoni Garola < andrea.rigoni@pd.infn.it >
9 
10  ------------------------------------------------------------------
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 3.0 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library.
23 
25 
26 
27 
28 
29 #ifndef U_MUONSCATTER_H
30 #define U_MUONSCATTER_H
31 
32 #include "Math/Dense.h"
33 
34 namespace uLib {
35 
36 
37 class MuonScatter {
38 public:
39  inline const HLine3f & LineIn() const { return this->m_LineIn; }
40  inline const HError3f & ErrorIn() const { return this->m_ErrorIn; }
41  inline const HLine3f & LineOut() const { return this->m_LineOut; }
42  inline const HError3f & ErrorOut() const { return this->m_ErrorOut; }
43 
44  inline HLine3f & LineIn() { return this->m_LineIn; }
45  inline HError3f & ErrorIn() { return this->m_ErrorIn; }
46  inline HLine3f & LineOut() { return this->m_LineOut; }
47  inline HError3f & ErrorOut() { return this->m_ErrorOut; }
48 
49  inline void SetMomentum(Scalarf name) { this->m_Momentum = name; }
50  inline void SetMomentumPrime(Scalarf name) { this->m_MomentumPrime = name; }
51 
52  inline Scalarf GetMomentum() const { return this->m_Momentum; }
53  inline Scalarf GetMomentumPrime() const { return this->m_MomentumPrime; }
54 
55 protected:
56  HLine3f m_LineIn;
57  HLine3f m_LineOut;
58  HError3f m_ErrorIn;
59  HError3f m_ErrorOut;
60  Scalarf m_Momentum;
61  Scalarf m_MomentumPrime;
62 };
63 
64 typedef MuonScatter MuonScatterData;
65 
66 inline std::ostream&
67 operator<< (std::ostream& stream, const MuonScatterData &mu) {
68  stream << " MuonScatterData: ------------- \n"
69  << " P: " << mu.GetMomentum() << " Pprim: " << mu.GetMomentumPrime() << "\n"
70  << " IN: " << mu.LineIn() << "\n"
71  << " " << mu.ErrorIn() << "\n"
72  << " OUT: " << mu.LineOut() << "\n"
73  << " " << mu.ErrorOut() <<"\n"
74  << " ------------------------------ \n";
75  return stream;
76 }
77 
78 }
79 
80 #endif // U_MUONSCATTER_H