source: trunk/MagicSoft/include-Classes/MMcFormat/MMcRunHeader.cxx@ 1180

Last change on this file since 1180 was 1180, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 4.5 KB
Line 
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
40ClassImp(MMcRunHeader);
41
42// --------------------------------------------------------------------------
43//
44// Default constructor. Creates array which stores the pixel assignment.
45//
46//
47MMcRunHeader::MMcRunHeader(const char *name, const char *title)
48{
49 fName = name ? name : "MMcRunHeader";
50 fTitle = title ? title : "Raw Run Header Information";
51
52 fNumTrigCond = 0;
53 fAllEvtsTriggered = 0 ;
54 fMcEvt = 0;
55 fMcTrig = 0;
56 fMcFadc = 0;
57 fNumAnalisedPixels = 0;
58 fNumSimulatedShowers = 0;
59 fNumStoredShowers = 0;
60
61 fStarFieldRaH = 0;
62 fStarFieldRaM = 0;
63 fStarFieldRaS = 0;
64 fStarFieldDeD = 0;
65 fStarFieldDeM = 0;
66 fStarFieldDeS = 0;
67
68 fNumPheFromDNSB = 0.0;
69 fTelesTheta = 0.0;
70 fTelesPhi = 0.0;
71 fSourceOffsetTheta = 0.0;
72 fSourceOffsetPhi = 0.0;
73 fShowerThetaMax = 0.0;
74 fShowerThetaMin = 0.0;
75 fShowerPhiMax = 0.0;
76 fShowerPhiMin = 0.0;
77
78 fCorsikaVersion = 0;
79 fReflVersion = 0;
80 fCamVersion = 0;
81
82}
83
84// --------------------------------------------------------------------------
85//
86// Destructor.
87//
88MMcRunHeader::~MMcRunHeader()
89{
90
91}
92
93// -------------------------------------------------------------------------
94//
95// Fill. Put data in the container
96//
97void MMcRunHeader::Fill(const UInt_t numtrigcond,
98 const Byte_t fallevts,
99 const Byte_t fmcevt,
100 const Byte_t fmctrig,
101 const Byte_t fmcfadc,
102 const Int_t fnumanalpixels,
103 const UInt_t fnumsim,
104 const UInt_t fnumsto,
105 const Int_t fsfRaH,
106 const Int_t fsfRaM,
107 const Int_t fsfRaS,
108 const Int_t fsfDeD,
109 const Int_t fsfDeM,
110 const Int_t fsfDeS,
111 const Float_t fnumdnsb,
112 const Float_t ftelestheta,
113 const Float_t ftelesphi,
114 const Float_t fsofftheta,
115 const Float_t fsoffphi,
116 const Float_t fshthetamax,
117 const Float_t fshthetamin,
118 const Float_t fshphimax,
119 const Float_t fshphimin,
120 const UInt_t fcorsika,
121 const UInt_t frefl,
122 const UInt_t fcam
123 ){
124 fNumTrigCond = numtrigcond;
125 fAllEvtsTriggered = fallevts;
126 fMcEvt = fmcevt;
127 fMcTrig = fmctrig;
128 fMcFadc = fmcfadc;
129 fNumAnalisedPixels = fnumanalpixels;
130 fNumSimulatedShowers = fnumsim;
131 fNumStoredShowers = fnumsto;
132
133 fStarFieldRaH = fsfRaH;
134 fStarFieldRaM = fsfRaM;
135 fStarFieldRaS = fsfRaS;
136 fStarFieldDeD = fsfDeD;
137 fStarFieldDeM = fsfDeM;
138 fStarFieldDeS = fsfDeS;
139
140 fNumPheFromDNSB = fnumdnsb;
141 fTelesTheta = ftelestheta;
142 fTelesPhi = ftelesphi;
143 fSourceOffsetTheta = fsofftheta;
144 fSourceOffsetPhi = fsoffphi;
145 fShowerThetaMax = fshthetamax;
146 fShowerThetaMin = fshthetamin;
147 fShowerPhiMax = fshphimax;
148 fShowerPhiMin = fshphimin;
149
150 fCorsikaVersion = fcorsika;
151 fReflVersion = frefl;
152 fCamVersion = fcam;
153}
154
155// -------------------------------------------------------------------------
156//
157// GetStarFieldRa. Get RA coordinates of the starfield
158//
159void MMcRunHeader::GetStarFieldRa(Int_t *hour, Int_t *minute, Int_t *second) const
160{
161 *hour = fStarFieldRaH;
162 *minute = fStarFieldRaM;
163 *second = fStarFieldRaS;
164}
165// -------------------------------------------------------------------------
166//
167// GetStarFieldDec. Get DE coordinates of the starfield
168//
169void MMcRunHeader::GetStarFieldDec(Int_t *degree, Int_t *minute, Int_t *second) const
170{
171 *degree = fStarFieldDeD;
172 *minute = fStarFieldDeM;
173 *second = fStarFieldDeS;
174}
Note: See TracBrowser for help on using the repository browser.