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

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