source: trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc@ 2173

Last change on this file since 2173 was 2173, checked in by tbretz, 21 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 4.0 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): Oscar Blanch 11/2002 (blanch@ifae.es)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MMcCorsikaRunHeader
28//
29// Root storage container for the CORSIKA run header
30//
31// It saves in a root file all variable that are in the CORSIKA run header, except
32// dummies.
33//
34////////////////////////////////////////////////////////////////////////////
35#include "MMcCorsikaRunHeader.h"
36
37ClassImp(MMcCorsikaRunHeader);
38
39using namespace std;
40
41// --------------------------------------------------------------------------
42//
43// Default constructor.
44//
45//
46MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title)
47{
48 fName = name ? name : "MMcCorsikaRunHeader";
49 fTitle = title ? title : "Translation of the CORSIKA header";
50
51 fRunNumber = 0;
52 fDate = 0;
53 fCorsikaVersion = 0;
54 fNumObsLev = 0;
55
56 for (int i=0; i<10; i++)
57 fHeightLev[i]=0;
58
59 fSlopeSpec = 0;
60 fELowLim = 0;
61 fEUppLim = 0;
62 fEGS4flag = 0;
63 fNKGflag = 0;
64 fEcutoffh = 0;
65 fEcutoffm = 0;
66 fEcutoffe = 0;
67 fEcutoffg = 0;
68
69 for(int i=0; i<50; i++) fC[i] = 0;
70 for(int i=0; i<40; i++) fCKA[i] = 0;
71 for(int i=0; i<5; i++) fCETA[i] = 0;
72 for(int i=0; i<11; i++) fCSTRBA[i] = 0;
73 for(int i=0; i<5; i++)
74 {
75 fAATM[i] = 0;
76 fBATM[i] = 0;
77 fCATM[i] = 0;
78 }
79 for (int i=0;i<4; i++) fNFL[i] = 0;
80
81 fWobbleMode=0;
82 fAtmosphericModel=0;
83}
84
85// -------------------------------------------------------------------------
86//
87// Fill Corsika Run Header
88//
89void MMcCorsikaRunHeader::Fill(const Float_t runnumber,
90 const Float_t date,
91 const Float_t vers,
92 const Float_t numobslev,
93 const Float_t height[10],
94 const Float_t slope,
95 const Float_t elow,
96 const Float_t eupp,
97 const Float_t egs4,
98 const Float_t nkg,
99 const Float_t eh,
100 const Float_t em,
101 const Float_t ee,
102 const Float_t eg,
103 const Float_t c[50],
104 const Float_t cka[40],
105 const Float_t ceta[5],
106 const Float_t cstrba[11],
107 const Float_t aatm[5],
108 const Float_t batm[5],
109 const Float_t catm[5],
110 const Float_t nfl[4],
111 const Float_t wobble,
112 const Float_t atmospher
113 )
114{
115 fRunNumber = runnumber;
116 fDate = date;
117 fCorsikaVersion = vers;
118 fNumObsLev = numobslev;
119
120 for (int i=0; i<10; i++)
121 fHeightLev[i]=height[i];
122
123 fSlopeSpec = slope;
124 fELowLim = elow;
125 fEUppLim = eupp;
126 fEGS4flag = egs4;
127 fNKGflag = nkg;
128 fEcutoffh = eh;
129 fEcutoffm = em;
130 fEcutoffe = ee;
131 fEcutoffg = eg;
132
133 for (int i=0; i<50; i++) fC[i] = c[i];
134 for (int i=0; i<40; i++) fCKA[i] = cka[i];
135 for (int i=0; i<5 ; i++) fCETA[i] = ceta[i];
136 for (int i=0; i<11; i++) fCSTRBA[i] = cstrba[i];
137 for (int i=0; i<5; i++)
138 {
139 fAATM[i] = aatm[i];
140 fBATM[i] = batm[i];
141 fCATM[i] = catm[i];
142 }
143 for (int i=0; i<4; i++) fNFL[i] = nfl[i];
144
145 fWobbleMode=wobble;
146 fAtmosphericModel=atmospher;
147
148}
149
150
151
152
153
154
155
156
157
158
159
Note: See TracBrowser for help on using the repository browser.