GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PathLengthList.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::PathLengthList
5 
6 \brief Object to be filled with the neutrino path-length, for all detector
7  geometry materials, when starting from a position x and travelling
8  along the direction of the neutrino 4-momentum.
9 
10 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
11  University of Liverpool
12 
13 \created May 24, 2005
14 
15 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17 */
18 //____________________________________________________________________________
19 
20 #ifndef _PATH_LENGTH_LIST_H_
21 #define _PATH_LENGTH_LIST_H_
22 
23 #include <map>
24 #include <ostream>
25 #include <string>
26 
28 
29 class TLorentzVector;
30 
31 using std::map;
32 using std::ostream;
33 using std::string;
34 
35 namespace genie {
36 
37 class PathLengthList;
38 class PDGCodeList;
39 
40 ostream & operator << (ostream & stream, const PathLengthList & list);
41 
42 class PathLengthList : public map<int, double> {
43 
44 public :
46  PathLengthList(const PDGCodeList & pdglist);
47  PathLengthList(const PathLengthList & plist);
48  PathLengthList(const map<int,double> & plist);
50 
51  void AddPathLength (int pdgc, double pl); // path-legth(pdgc) += pl
52  void SetPathLength (int pdgc, double pl); // path-legth(pdgc) = pl
53  void SetAllToZero (void);
54  bool AreAllZero (void) const;
55  void ScalePathLength (int pdgc, double scale);
56  double PathLength (int pdgc) const;
57 
58  XmlParserStatus_t LoadFromXml (string filename);
59  void SaveAsXml (string filename) const;
60 
61  void Copy (const PathLengthList & plist);
62  void Print (ostream & stream) const;
63 
65  friend ostream & operator << (ostream & stream, const PathLengthList & list);
66 };
67 
68 } // genie namespace
69 
70 #endif // _PATH_LENGTH_LIST_H_
void ScalePathLength(int pdgc, double scale)
double PathLength(int pdgc) const
bool AreAllZero(void) const
PathLengthList & operator=(const PathLengthList &list)
void SetPathLength(int pdgc, double pl)
A list of PDG codes.
Definition: PDGCodeList.h:32
Object to be filled with the neutrino path-length, for all detector geometry materials, when starting from a position x and travelling along the direction of the neutrino 4-momentum.
void SaveAsXml(string filename) const
XmlParserStatus_t LoadFromXml(string filename)
friend ostream & operator<<(ostream &stream, const PathLengthList &list)
void Print(ostream &stream) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void AddPathLength(int pdgc, double pl)
enum genie::EXmlParseStatus XmlParserStatus_t
void Copy(const PathLengthList &plist)