Last change
on this file since 10113 was 306, checked in by harald, 25 years ago |
This is the start point for the further developments of the Classes for the
MAGIC software. Here you find the classes that are used by the Simulation
and the Analysis programs.
This Classes MRawPixel, MRawEvt and MMcEvt are designed by Thomas Schweizer
and Harald Kornmayer. They are using the "root" package from CERN.
|
File size:
2.7 KB
|
Line | |
---|
1 | #include <iostream.h>
|
---|
2 | #include "MMcEvt.h"
|
---|
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 |
|
---|
14 | ClassImp(MMcEvt)
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 | MMcEvt::MMcEvt() {
|
---|
19 | //
|
---|
20 | // default constructor
|
---|
21 | // set all values to zero
|
---|
22 |
|
---|
23 | usPartId = 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 | usPhotIni = 0 ;
|
---|
35 | usPassPhotAtm = 0 ;
|
---|
36 | usPassPhotRef = 0 ;
|
---|
37 | usPassPhotCone = 0 ;
|
---|
38 | usPhotEl = 0 ;
|
---|
39 | }
|
---|
40 |
|
---|
41 | MMcEvt::MMcEvt( UShort_t usPId,
|
---|
42 | Float_t fEner,
|
---|
43 | Float_t fThet,
|
---|
44 | Float_t fPhii,
|
---|
45 | Float_t fCorD,
|
---|
46 | Float_t fCorX,
|
---|
47 | Float_t fCorY,
|
---|
48 | Float_t fImpa,
|
---|
49 | UShort_t usPin,
|
---|
50 | UShort_t usPat,
|
---|
51 | UShort_t usPre,
|
---|
52 | UShort_t usPco,
|
---|
53 | UShort_t usPel ) {
|
---|
54 | //
|
---|
55 | // constuctor II
|
---|
56 | //
|
---|
57 | // All datamembers are parameters.
|
---|
58 | //
|
---|
59 | // Don't use this memberfunction in analysis
|
---|
60 | //
|
---|
61 |
|
---|
62 | usPartId = usPId ;
|
---|
63 | fEnergy = fEner ;
|
---|
64 |
|
---|
65 | fTheta = fThet ;
|
---|
66 | fPhi = fPhii ;
|
---|
67 |
|
---|
68 | fCoreD = fCorD ;
|
---|
69 | fCoreX = fCorX ;
|
---|
70 | fCoreY = fCorY ;
|
---|
71 | fImpact = fImpa ;
|
---|
72 |
|
---|
73 | usPhotIni = usPin ;
|
---|
74 | usPassPhotAtm = usPat ;
|
---|
75 | usPassPhotRef = usPre ;
|
---|
76 | usPassPhotCone = usPco ;
|
---|
77 | usPhotEl = usPel ;
|
---|
78 | }
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 | MMcEvt::~MMcEvt() {
|
---|
83 | //
|
---|
84 | // default destructor
|
---|
85 | //
|
---|
86 | }
|
---|
87 |
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 | void MMcEvt::Clear() {
|
---|
92 | //
|
---|
93 | //
|
---|
94 | // reset all values to zero
|
---|
95 |
|
---|
96 | usPartId = 0 ;
|
---|
97 | fEnergy = 0. ;
|
---|
98 |
|
---|
99 | fTheta = 0. ;
|
---|
100 | fPhi = 0. ;
|
---|
101 |
|
---|
102 | fCoreD = 0. ;
|
---|
103 | fCoreX = 0. ;
|
---|
104 | fCoreY = 0. ;
|
---|
105 | fImpact = 0. ;
|
---|
106 |
|
---|
107 | usPhotIni = 0 ;
|
---|
108 | usPassPhotAtm = 0 ;
|
---|
109 | usPassPhotRef = 0 ;
|
---|
110 | usPassPhotCone = 0 ;
|
---|
111 | usPhotEl = 0 ;
|
---|
112 | }
|
---|
113 | void MMcEvt::Fill( UShort_t usPId,
|
---|
114 | Float_t fEner,
|
---|
115 | Float_t fThet,
|
---|
116 | Float_t fPhii,
|
---|
117 | Float_t fCorD,
|
---|
118 | Float_t fCorX,
|
---|
119 | Float_t fCorY,
|
---|
120 | Float_t fImpa,
|
---|
121 | UShort_t usPin,
|
---|
122 | UShort_t usPat,
|
---|
123 | UShort_t usPre,
|
---|
124 | UShort_t usPco,
|
---|
125 | UShort_t usPel ) {
|
---|
126 | //
|
---|
127 | // All datamembers are filled with the correspondin parameters.
|
---|
128 | //
|
---|
129 | // Don't use this memberfunction in analysis
|
---|
130 | //
|
---|
131 |
|
---|
132 | usPartId = usPId ;
|
---|
133 | fEnergy = fEner ;
|
---|
134 |
|
---|
135 | fTheta = fThet ;
|
---|
136 | fPhi = fPhii ;
|
---|
137 |
|
---|
138 | fCoreD = fCorD ;
|
---|
139 | fCoreX = fCorX ;
|
---|
140 | fCoreY = fCorY ;
|
---|
141 | fImpact = fImpa ;
|
---|
142 |
|
---|
143 | usPhotIni = usPin ;
|
---|
144 | usPassPhotAtm = usPat ;
|
---|
145 | usPassPhotRef = usPre ;
|
---|
146 | usPassPhotCone = usPco ;
|
---|
147 | usPhotEl = usPel ;
|
---|
148 | }
|
---|
149 |
|
---|
150 |
|
---|
151 |
|
---|
152 | void MMcEvt::Print(Option_t *Option) {
|
---|
153 | //
|
---|
154 | // print out the data member on screen
|
---|
155 | //
|
---|
156 | cout <<endl << "Monte Carlo output:" <<endl;
|
---|
157 | cout << " Particle Id : " << usPartId ;
|
---|
158 | cout << " Energy (GeV) : " << fEnergy ;
|
---|
159 | cout << " Impactpar. (m) : " << fImpact ;
|
---|
160 | cout << " Photoelectrons : " << usPhotEl ;
|
---|
161 | cout << endl ;
|
---|
162 | }
|
---|
163 |
|
---|
164 |
|
---|
165 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.