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 |
|
---|
37 | ClassImp(MMcCorsikaRunHeader);
|
---|
38 |
|
---|
39 | // --------------------------------------------------------------------------
|
---|
40 | //
|
---|
41 | // Default constructor.
|
---|
42 | //
|
---|
43 | //
|
---|
44 | MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title)
|
---|
45 | {
|
---|
46 | fName = name ? name : "MMcCorsikaRunHeader";
|
---|
47 | fTitle = title ? title : "Translation of the CORSIKA header";
|
---|
48 |
|
---|
49 | fRunNumber = 0;
|
---|
50 | fDate = 0;
|
---|
51 | fCorsikaVersion = 0;
|
---|
52 | fNumObsLev = 0;
|
---|
53 |
|
---|
54 | for (int i=0; i<10; i++)
|
---|
55 | fHeightLev[i]=0;
|
---|
56 |
|
---|
57 | fSlopeSpec = 0;
|
---|
58 | fELowLim = 0;
|
---|
59 | fEUppLim = 0;
|
---|
60 | fEGS4flag = 0;
|
---|
61 | fNKGflag = 0;
|
---|
62 | fEcutoffh = 0;
|
---|
63 | fEcutoffm = 0;
|
---|
64 | fEcutoffe = 0;
|
---|
65 | fEcutoffg = 0;
|
---|
66 |
|
---|
67 | for(int i=0; i<50; i++) fC[i] = 0;
|
---|
68 | for(int i=0; i<40; i++) fCKA[i] = 0;
|
---|
69 | for(int i=0; i<5; i++) fCETA[i] = 0;
|
---|
70 | for(int i=0; i<11; i++) fCSTRBA[i] = 0;
|
---|
71 | for(int i=0; i<5; i++)
|
---|
72 | {
|
---|
73 | fAATM[i] = 0;
|
---|
74 | fBATM[i] = 0;
|
---|
75 | fCATM[i] = 0;
|
---|
76 | }
|
---|
77 | for (int i=0;i<4; i++) fNFL[i] = 0;
|
---|
78 |
|
---|
79 | }
|
---|
80 |
|
---|
81 | // -------------------------------------------------------------------------
|
---|
82 | //
|
---|
83 | // Fill Corsika Run Header
|
---|
84 | //
|
---|
85 | void MMcCorsikaRunHeader::Fill(const Float_t runnumber,
|
---|
86 | const Float_t date,
|
---|
87 | const Float_t vers,
|
---|
88 | const Float_t numobslev,
|
---|
89 | const Float_t height[10],
|
---|
90 | const Float_t slope,
|
---|
91 | const Float_t elow,
|
---|
92 | const Float_t eupp,
|
---|
93 | const Float_t egs4,
|
---|
94 | const Float_t nkg,
|
---|
95 | const Float_t eh,
|
---|
96 | const Float_t em,
|
---|
97 | const Float_t ee,
|
---|
98 | const Float_t eg,
|
---|
99 | const Float_t c[50],
|
---|
100 | const Float_t cka[40],
|
---|
101 | const Float_t ceta[5],
|
---|
102 | const Float_t cstrba[11],
|
---|
103 | const Float_t aatm[5],
|
---|
104 | const Float_t batm[5],
|
---|
105 | const Float_t catm[5],
|
---|
106 | const Float_t nfl[4])
|
---|
107 | {
|
---|
108 | fRunNumber = runnumber;
|
---|
109 | fDate = date;
|
---|
110 | fCorsikaVersion = vers;
|
---|
111 | fNumObsLev = numobslev;
|
---|
112 |
|
---|
113 | for (int i=0; i<10; i++)
|
---|
114 | fHeightLev[i]=height[i];
|
---|
115 |
|
---|
116 | fSlopeSpec = slope;
|
---|
117 | fELowLim = elow;
|
---|
118 | fEUppLim = eupp;
|
---|
119 | fEGS4flag = egs4;
|
---|
120 | fNKGflag = nkg;
|
---|
121 | fEcutoffh = eh;
|
---|
122 | fEcutoffm = em;
|
---|
123 | fEcutoffe = ee;
|
---|
124 | fEcutoffg = eg;
|
---|
125 |
|
---|
126 | for (int i=0; i<50; i++) fC[i] = c[i];
|
---|
127 | for (int i=0; i<40; i++) fCKA[i] = cka[i];
|
---|
128 | for (int i=0; i<5 ; i++) fCETA[i] = ceta[i];
|
---|
129 | for (int i=0; i<11; i++) fCSTRBA[i] = cstrba[i];
|
---|
130 | for (int i=0; i<5; i++)
|
---|
131 | {
|
---|
132 | fAATM[i] = aatm[i];
|
---|
133 | fBATM[i] = batm[i];
|
---|
134 | fCATM[i] = catm[i];
|
---|
135 | }
|
---|
136 | for (int i=0; i<4; i++) fNFL[i] = nfl[i];
|
---|
137 | }
|
---|