1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2001
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // MMcRunHeader
|
---|
28 | //
|
---|
29 | // Root storage container for the RUN MONTE CARLO HEADER information
|
---|
30 | //
|
---|
31 | ////////////////////////////////////////////////////////////////////////////
|
---|
32 |
|
---|
33 | #include "MMcRunHeader.hxx"
|
---|
34 |
|
---|
35 | #include <fstream.h>
|
---|
36 | #include <iomanip.h>
|
---|
37 |
|
---|
38 | #include "MLog.h"
|
---|
39 |
|
---|
40 | ClassImp(MMcRunHeader);
|
---|
41 |
|
---|
42 | // --------------------------------------------------------------------------
|
---|
43 | //
|
---|
44 | // Default constructor. Creates array which stores the pixel assignment.
|
---|
45 | //
|
---|
46 | //
|
---|
47 | MMcRunHeader::MMcRunHeader(const char *name, const char *title)
|
---|
48 | {
|
---|
49 | fName = name ? name : "MMcRunHeader";
|
---|
50 | fTitle = title ? title : "Raw Run Header Information";
|
---|
51 |
|
---|
52 | fMcRunNumber =0;
|
---|
53 | fProductionSite = 0;
|
---|
54 | fDateRunMMCs = 0;
|
---|
55 | fDateRunCamera = 0;
|
---|
56 | fNumTrigCond = 0;
|
---|
57 | fAllEvtsTriggered = 0 ;
|
---|
58 | fMcEvt = 0;
|
---|
59 | fMcTrig = 0;
|
---|
60 | fMcFadc = 0;
|
---|
61 | fRawEvt = 0;
|
---|
62 | fElecNoise = 0;
|
---|
63 | fStarFieldRotate = 0;
|
---|
64 | fNumAnalisedPixels = 0;
|
---|
65 | fNumSimulatedShowers = 0;
|
---|
66 | fNumStoredShowers = 0;
|
---|
67 |
|
---|
68 | fStarFieldRaH = 0;
|
---|
69 | fStarFieldRaM = 0;
|
---|
70 | fStarFieldRaS = 0;
|
---|
71 | fStarFieldDeD = 0;
|
---|
72 | fStarFieldDeM = 0;
|
---|
73 | fStarFieldDeS = 0;
|
---|
74 |
|
---|
75 | fNumPheFromDNSB = 0.0;
|
---|
76 | fTelesTheta = 0.0;
|
---|
77 | fTelesPhi = 0.0;
|
---|
78 | fSourceOffsetTheta = 0.0;
|
---|
79 | fSourceOffsetPhi = 0.0;
|
---|
80 | fShowerThetaMax = 0.0;
|
---|
81 | fShowerThetaMin = 0.0;
|
---|
82 | fShowerPhiMax = 0.0;
|
---|
83 | fShowerPhiMin = 0.0;
|
---|
84 |
|
---|
85 | fCWaveLower = 0.0;
|
---|
86 | fCWaveUpper = 0.0;
|
---|
87 |
|
---|
88 | fNumObsLev = 0;
|
---|
89 | for (int i=0; i<10; i++){
|
---|
90 | fHeightLev[i]=0.0;
|
---|
91 | }
|
---|
92 | fSlopeSpec = 0.0;
|
---|
93 |
|
---|
94 | fCorsikaVersion = 0;
|
---|
95 | fReflVersion = 0;
|
---|
96 | fCamVersion = 0;
|
---|
97 |
|
---|
98 | }
|
---|
99 |
|
---|
100 | // --------------------------------------------------------------------------
|
---|
101 | //
|
---|
102 | // Destructor.
|
---|
103 | //
|
---|
104 | MMcRunHeader::~MMcRunHeader()
|
---|
105 | {
|
---|
106 |
|
---|
107 | }
|
---|
108 |
|
---|
109 | // -------------------------------------------------------------------------
|
---|
110 | //
|
---|
111 | // Fill. Put data in the container
|
---|
112 | //
|
---|
113 | void MMcRunHeader::Fill(const Float_t runnumber,
|
---|
114 | const UInt_t productionsite,
|
---|
115 | const Float_t daterunMMCs,
|
---|
116 | const Float_t daterunCamera,
|
---|
117 | const UInt_t numtrigcond,
|
---|
118 | const Byte_t allevts,
|
---|
119 | const Byte_t mcevt,
|
---|
120 | const Byte_t mctrig,
|
---|
121 | const Byte_t mcfadc,
|
---|
122 | const Byte_t rawevt,
|
---|
123 | const Byte_t elecnoise,
|
---|
124 | const Int_t numanalpixels,
|
---|
125 | const UInt_t numsim,
|
---|
126 | const UInt_t numsto,
|
---|
127 | const Byte_t starfieldrotate,
|
---|
128 | const Int_t sfRaH,
|
---|
129 | const Int_t sfRaM,
|
---|
130 | const Int_t sfRaS,
|
---|
131 | const Int_t sfDeD,
|
---|
132 | const Int_t sfDeM,
|
---|
133 | const Int_t sfDeS,
|
---|
134 | const Float_t numdnsb,
|
---|
135 | const Float_t telestheta,
|
---|
136 | const Float_t telesphi,
|
---|
137 | const Float_t sofftheta,
|
---|
138 | const Float_t soffphi,
|
---|
139 | const Float_t shthetamax,
|
---|
140 | const Float_t shthetamin,
|
---|
141 | const Float_t shphimax,
|
---|
142 | const Float_t shphimin,
|
---|
143 | const Float_t cwavelower,
|
---|
144 | const Float_t cwaveupper,
|
---|
145 | const Float_t slopespec,
|
---|
146 | const UInt_t numObslev,
|
---|
147 | const Float_t heightlev[10],
|
---|
148 | const UInt_t corsika,
|
---|
149 | const UInt_t refl,
|
---|
150 | const UInt_t cam)
|
---|
151 | {
|
---|
152 | fMcRunNumber =runnumber;
|
---|
153 | fProductionSite = productionsite;
|
---|
154 | fDateRunMMCs = daterunMMCs;
|
---|
155 | fDateRunCamera = daterunCamera;
|
---|
156 | fNumTrigCond = numtrigcond;
|
---|
157 | fAllEvtsTriggered = allevts;
|
---|
158 | fMcEvt = mcevt;
|
---|
159 | fMcTrig = mctrig;
|
---|
160 | fMcFadc = mcfadc;
|
---|
161 | fRawEvt = rawevt;
|
---|
162 | fElecNoise = elecnoise;
|
---|
163 | fStarFieldRotate = starfieldrotate;
|
---|
164 | fNumAnalisedPixels = numanalpixels;
|
---|
165 | fNumSimulatedShowers = numsim;
|
---|
166 | fNumStoredShowers = numsto;
|
---|
167 |
|
---|
168 | fStarFieldRaH = sfRaH;
|
---|
169 | fStarFieldRaM = sfRaM;
|
---|
170 | fStarFieldRaS = sfRaS;
|
---|
171 | fStarFieldDeD = sfDeD;
|
---|
172 | fStarFieldDeM = sfDeM;
|
---|
173 | fStarFieldDeS = sfDeS;
|
---|
174 |
|
---|
175 | fNumPheFromDNSB = numdnsb;
|
---|
176 | fTelesTheta = telestheta;
|
---|
177 | fTelesPhi = telesphi;
|
---|
178 | fSourceOffsetTheta = sofftheta;
|
---|
179 | fSourceOffsetPhi = soffphi;
|
---|
180 | fShowerThetaMax = shthetamax;
|
---|
181 | fShowerThetaMin = shthetamin;
|
---|
182 | fShowerPhiMax = shphimax;
|
---|
183 | fShowerPhiMin = shphimin;
|
---|
184 |
|
---|
185 | fCWaveLower = cwavelower;
|
---|
186 | fCWaveUpper = cwaveupper;
|
---|
187 |
|
---|
188 | fNumObsLev = numObslev;
|
---|
189 | for (UInt_t i=0; i<numObslev; i++){
|
---|
190 | fHeightLev[i]=heightlev[i];
|
---|
191 | }
|
---|
192 | fSlopeSpec = slopespec;
|
---|
193 |
|
---|
194 | fCorsikaVersion = corsika;
|
---|
195 | fReflVersion = refl;
|
---|
196 | fCamVersion = cam;
|
---|
197 |
|
---|
198 | }
|
---|
199 |
|
---|
200 | // -------------------------------------------------------------------------
|
---|
201 | //
|
---|
202 | // GetStarFieldRa. Get RA coordinates of the starfield
|
---|
203 | //
|
---|
204 | void MMcRunHeader::GetStarFieldRa(Int_t *hour, Int_t *minute, Int_t *second) const
|
---|
205 | {
|
---|
206 | *hour = fStarFieldRaH;
|
---|
207 | *minute = fStarFieldRaM;
|
---|
208 | *second = fStarFieldRaS;
|
---|
209 | }
|
---|
210 | // -------------------------------------------------------------------------
|
---|
211 | //
|
---|
212 | // GetStarFieldDec. Get DE coordinates of the starfield
|
---|
213 | //
|
---|
214 | void MMcRunHeader::GetStarFieldDec(Int_t *degree, Int_t *minute, Int_t *second) const
|
---|
215 | {
|
---|
216 | *degree = fStarFieldDeD;
|
---|
217 | *minute = fStarFieldDeM;
|
---|
218 | *second = fStarFieldDeS;
|
---|
219 | }
|
---|