source: trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.cxx@ 854

Last change on this file since 854 was 736, checked in by magicsol, 24 years ago
Some modification in filling the number of photons at each step of the simualtion.
File size: 2.9 KB
Line 
1#include <iostream.h>
2#include "MMcEvt.hxx"
3
4
5//==========
6// MMcEvt
7//
8// This class handles and contains the MonteCarlo information
9// with which the events have been generated
10// This information exists for each event.
11
12
13
14ClassImp(MMcEvt)
15
16
17
18MMcEvt::MMcEvt() {
19 //
20 // default constructor
21 // set all values to zero
22
23 fPartId = 0 ;
24 fEnergy = 0. ;
25
26 fTheta = 0. ;
27 fPhi = 0. ;
28
29 fCoreD = 0. ;
30 fCoreX = 0. ;
31 fCoreY = 0. ;
32 fImpact = 0. ;
33
34 fPhotIni = 0 ;
35 fPassPhotAtm = 0 ;
36 fPassPhotRef = 0 ;
37 fPassPhotCone = 0 ;
38 fPhotElfromShower = 0 ;
39 fPhotElinCamera = 0 ;
40}
41
42MMcEvt::MMcEvt( UShort_t usPId,
43 Float_t fEner,
44 Float_t fThet,
45 Float_t fPhii,
46 Float_t fCorD,
47 Float_t fCorX,
48 Float_t fCorY,
49 Float_t fImpa,
50 UInt_t uiPin,
51 UInt_t uiPat,
52 UInt_t uiPre,
53 UInt_t uiPco,
54 UInt_t uiPelS,
55 UInt_t uiPelC ) {
56 //
57 // constuctor II
58 //
59 // All datamembers are parameters.
60 //
61 // Don't use this memberfunction in analysis
62 //
63
64 fPartId = usPId ;
65 fEnergy = fEner ;
66
67 fTheta = fThet ;
68 fPhi = fPhii ;
69
70 fCoreD = fCorD ;
71 fCoreX = fCorX ;
72 fCoreY = fCorY ;
73 fImpact = fImpa ;
74
75 fPhotIni = uiPin ;
76 fPassPhotAtm = uiPat ;
77 fPassPhotRef = uiPre ;
78 fPassPhotCone = uiPco ;
79 fPhotElfromShower = uiPelS ;
80 fPhotElinCamera = uiPelC ;
81}
82
83
84
85MMcEvt::~MMcEvt() {
86 //
87 // default destructor
88 //
89}
90
91
92
93
94void MMcEvt::Clear(Option_t *opt) {
95 //
96 //
97 // reset all values to zero
98
99 fPartId = 0 ;
100 fEnergy = 0. ;
101
102 fTheta = 0. ;
103 fPhi = 0. ;
104
105 fCoreD = 0. ;
106 fCoreX = 0. ;
107 fCoreY = 0. ;
108 fImpact = 0. ;
109
110 fPhotIni = 0 ;
111 fPassPhotAtm = 0 ;
112 fPassPhotRef = 0 ;
113 fPassPhotCone = 0 ;
114 fPhotElfromShower = 0 ;
115 fPhotElinCamera = 0 ;
116}
117
118void MMcEvt::Fill( UShort_t usPId,
119 Float_t fEner,
120 Float_t fThet,
121 Float_t fPhii,
122 Float_t fCorD,
123 Float_t fCorX,
124 Float_t fCorY,
125 Float_t fImpa,
126 UInt_t uiPin,
127 UInt_t uiPat,
128 UInt_t uiPre,
129 UInt_t uiPco,
130 UInt_t uiPelS,
131 UInt_t uiPelC ) {
132 //
133 // All datamembers are filled with the correspondin parameters.
134 //
135 // Don't use this memberfunction in analysis
136 //
137
138 fPartId = usPId ;
139 fEnergy = fEner ;
140
141 fTheta = fThet ;
142 fPhi = fPhii ;
143
144 fCoreD = fCorD ;
145 fCoreX = fCorX ;
146 fCoreY = fCorY ;
147 fImpact = fImpa ;
148
149 fPhotIni = uiPin ;
150 fPassPhotAtm = fPhotIni-uiPat ;
151 fPassPhotRef = fPassPhotAtm-uiPre ;
152 fPassPhotCone = uiPco ;
153 fPhotElfromShower = uiPelS ;
154 fPhotElinCamera = uiPelC ;
155}
156
157
158
159void MMcEvt::Print(Option_t *Option) {
160 //
161 // print out the data member on screen
162 //
163 cout <<endl << "Monte Carlo output:" <<endl;
164 cout << " Particle Id : " << fPartId ;
165 cout << " Energy (GeV) : " << fEnergy ;
166 cout << " Impactpar. (m) : " << fImpact ;
167 cout << " Photoelectrons : " << fPhotElfromShower ;
168 cout << endl ;
169}
Note: See TracBrowser for help on using the repository browser.