Last change
on this file since 724 was 686, checked in by harald, 24 years ago |
Added the first implementation of macro to calculate the
trigger collection area. the macro is called getCollArea.C
|
File size:
3.0 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 |
|
---|
14 | ClassImp(MMcEvt)
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 | MMcEvt::MMcEvt() {
|
---|
19 | //
|
---|
20 | // default constructor
|
---|
21 | // set all values to zero
|
---|
22 |
|
---|
23 | *fName = "MMcEvt";
|
---|
24 | *fTitle = "Event info from Monte Carlo simulation";
|
---|
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 |
|
---|
45 | MMcEvt::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 | // constuctor II
|
---|
61 | //
|
---|
62 | // All datamembers are parameters.
|
---|
63 | //
|
---|
64 | // Don't use this memberfunction in analysis
|
---|
65 | //
|
---|
66 |
|
---|
67 | fPartId = usPId ;
|
---|
68 | fEnergy = fEner ;
|
---|
69 |
|
---|
70 | fTheta = fThet ;
|
---|
71 | fPhi = fPhii ;
|
---|
72 |
|
---|
73 | fCoreD = fCorD ;
|
---|
74 | fCoreX = fCorX ;
|
---|
75 | fCoreY = fCorY ;
|
---|
76 | fImpact = fImpa ;
|
---|
77 |
|
---|
78 | fPhotIni = uiPin ;
|
---|
79 | fPassPhotAtm = uiPat ;
|
---|
80 | fPassPhotRef = uiPre ;
|
---|
81 | fPassPhotCone = uiPco ;
|
---|
82 | fPhotElfromShower = uiPelS ;
|
---|
83 | fPhotElinCamera = uiPelC ;
|
---|
84 | }
|
---|
85 |
|
---|
86 |
|
---|
87 |
|
---|
88 | MMcEvt::~MMcEvt() {
|
---|
89 | //
|
---|
90 | // default destructor
|
---|
91 | //
|
---|
92 | }
|
---|
93 |
|
---|
94 |
|
---|
95 |
|
---|
96 |
|
---|
97 | void MMcEvt::Clear(Option_t *opt) {
|
---|
98 | //
|
---|
99 | //
|
---|
100 | // reset all values to zero
|
---|
101 |
|
---|
102 | fPartId = 0 ;
|
---|
103 | fEnergy = 0. ;
|
---|
104 |
|
---|
105 | fTheta = 0. ;
|
---|
106 | fPhi = 0. ;
|
---|
107 |
|
---|
108 | fCoreD = 0. ;
|
---|
109 | fCoreX = 0. ;
|
---|
110 | fCoreY = 0. ;
|
---|
111 | fImpact = 0. ;
|
---|
112 |
|
---|
113 | fPhotIni = 0 ;
|
---|
114 | fPassPhotAtm = 0 ;
|
---|
115 | fPassPhotRef = 0 ;
|
---|
116 | fPassPhotCone = 0 ;
|
---|
117 | fPhotElfromShower = 0 ;
|
---|
118 | fPhotElinCamera = 0 ;
|
---|
119 | }
|
---|
120 |
|
---|
121 | void MMcEvt::Fill( UShort_t usPId,
|
---|
122 | Float_t fEner,
|
---|
123 | Float_t fThet,
|
---|
124 | Float_t fPhii,
|
---|
125 | Float_t fCorD,
|
---|
126 | Float_t fCorX,
|
---|
127 | Float_t fCorY,
|
---|
128 | Float_t fImpa,
|
---|
129 | UInt_t uiPin,
|
---|
130 | UInt_t uiPat,
|
---|
131 | UInt_t uiPre,
|
---|
132 | UInt_t uiPco,
|
---|
133 | UInt_t uiPelS,
|
---|
134 | UInt_t uiPelC ) {
|
---|
135 | //
|
---|
136 | // All datamembers are filled with the correspondin parameters.
|
---|
137 | //
|
---|
138 | // Don't use this memberfunction in analysis
|
---|
139 | //
|
---|
140 |
|
---|
141 | fPartId = usPId ;
|
---|
142 | fEnergy = fEner ;
|
---|
143 |
|
---|
144 | fTheta = fThet ;
|
---|
145 | fPhi = fPhii ;
|
---|
146 |
|
---|
147 | fCoreD = fCorD ;
|
---|
148 | fCoreX = fCorX ;
|
---|
149 | fCoreY = fCorY ;
|
---|
150 | fImpact = fImpa ;
|
---|
151 |
|
---|
152 | fPhotIni = uiPin ;
|
---|
153 | fPassPhotAtm = uiPat ;
|
---|
154 | fPassPhotRef = uiPre ;
|
---|
155 | fPassPhotCone = uiPco ;
|
---|
156 | fPhotElfromShower = uiPelS ;
|
---|
157 | fPhotElinCamera = uiPelC ;
|
---|
158 | }
|
---|
159 |
|
---|
160 |
|
---|
161 |
|
---|
162 | void MMcEvt::Print(Option_t *Option) {
|
---|
163 | //
|
---|
164 | // print out the data member on screen
|
---|
165 | //
|
---|
166 | cout <<endl << "Monte Carlo output:" <<endl;
|
---|
167 | cout << " Particle Id : " << fPartId ;
|
---|
168 | cout << " Energy (GeV) : " << fEnergy ;
|
---|
169 | cout << " Impactpar. (m) : " << fImpact ;
|
---|
170 | cout << " Photoelectrons : " << fPhotElfromShower ;
|
---|
171 | cout << endl ;
|
---|
172 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.