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