ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE04TrajectoryPoint.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RE04TrajectoryPoint.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 #include "RE04TrajectoryPoint.hh"
31 
32 #include "G4AttDefStore.hh"
33 #include "G4AttDef.hh"
34 #include "G4AttValue.hh"
35 #include "G4UnitsTable.hh"
36 
37 #include "G4Material.hh"
38 
39 //#define G4ATTDEBUG
40 #ifdef G4ATTDEBUG
41 #include "G4AttCheck.hh"
42 #endif
43 
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49  fPosition(G4ThreeVector(0.,0.,0.)),
50  fpMaterial(0)
51 {
52 }
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56  const G4Material* mat)
58  fPosition(pos),
59  fpMaterial(mat)
60 {
61 }
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66  fPosition(right.fPosition),
67  fpMaterial(right.fpMaterial)
68 {
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 {
74 }
75 
76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77 const std::map<G4String,G4AttDef>* RE04TrajectoryPoint::GetAttDefs() const
78 {
79  G4bool isNew;
80  std::map<G4String,G4AttDef>* store
81  = G4AttDefStore::GetInstance("RE04TrajectoryPoint",isNew);
82  if (isNew) {
83  G4String pos("Pos");
84  (*store)[pos] =
85  G4AttDef(pos, "Position", "Physics","G4BestUnit","G4ThreeVector");
86  G4String mat("Mat");
87  (*store)[mat] =
88  G4AttDef(mat, "Mat", "Physics","Name","G4String");
89  }
90  return store;
91 }
92 
93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
94 std::vector<G4AttValue>* RE04TrajectoryPoint::CreateAttValues() const
95 {
96  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
97 
98  values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
99  values->push_back(G4AttValue("Mat",fpMaterial->GetName(),""));
100 
101 #ifdef G4ATTDEBUG
102  G4cout << G4AttCheck(values,GetAttDefs());
103 #endif
104 
105  return values;
106 }