| 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 | fWobbleMode=0;
|
|---|
| 80 | fAtmosphericModel=0;
|
|---|
| 81 | }
|
|---|
| 82 |
|
|---|
| 83 | // -------------------------------------------------------------------------
|
|---|
| 84 | //
|
|---|
| 85 | // Fill Corsika Run Header
|
|---|
| 86 | //
|
|---|
| 87 | void MMcCorsikaRunHeader::Fill(const Float_t runnumber,
|
|---|
| 88 | const Float_t date,
|
|---|
| 89 | const Float_t vers,
|
|---|
| 90 | const Float_t numobslev,
|
|---|
| 91 | const Float_t height[10],
|
|---|
| 92 | const Float_t slope,
|
|---|
| 93 | const Float_t elow,
|
|---|
| 94 | const Float_t eupp,
|
|---|
| 95 | const Float_t egs4,
|
|---|
| 96 | const Float_t nkg,
|
|---|
| 97 | const Float_t eh,
|
|---|
| 98 | const Float_t em,
|
|---|
| 99 | const Float_t ee,
|
|---|
| 100 | const Float_t eg,
|
|---|
| 101 | const Float_t c[50],
|
|---|
| 102 | const Float_t cka[40],
|
|---|
| 103 | const Float_t ceta[5],
|
|---|
| 104 | const Float_t cstrba[11],
|
|---|
| 105 | const Float_t aatm[5],
|
|---|
| 106 | const Float_t batm[5],
|
|---|
| 107 | const Float_t catm[5],
|
|---|
| 108 | const Float_t nfl[4],
|
|---|
| 109 | const Float_t wobble,
|
|---|
| 110 | const Float_t atmospher
|
|---|
| 111 | )
|
|---|
| 112 | {
|
|---|
| 113 | fRunNumber = runnumber;
|
|---|
| 114 | fDate = date;
|
|---|
| 115 | fCorsikaVersion = vers;
|
|---|
| 116 | fNumObsLev = numobslev;
|
|---|
| 117 |
|
|---|
| 118 | for (int i=0; i<10; i++)
|
|---|
| 119 | fHeightLev[i]=height[i];
|
|---|
| 120 |
|
|---|
| 121 | fSlopeSpec = slope;
|
|---|
| 122 | fELowLim = elow;
|
|---|
| 123 | fEUppLim = eupp;
|
|---|
| 124 | fEGS4flag = egs4;
|
|---|
| 125 | fNKGflag = nkg;
|
|---|
| 126 | fEcutoffh = eh;
|
|---|
| 127 | fEcutoffm = em;
|
|---|
| 128 | fEcutoffe = ee;
|
|---|
| 129 | fEcutoffg = eg;
|
|---|
| 130 |
|
|---|
| 131 | for (int i=0; i<50; i++) fC[i] = c[i];
|
|---|
| 132 | for (int i=0; i<40; i++) fCKA[i] = cka[i];
|
|---|
| 133 | for (int i=0; i<5 ; i++) fCETA[i] = ceta[i];
|
|---|
| 134 | for (int i=0; i<11; i++) fCSTRBA[i] = cstrba[i];
|
|---|
| 135 | for (int i=0; i<5; i++)
|
|---|
| 136 | {
|
|---|
| 137 | fAATM[i] = aatm[i];
|
|---|
| 138 | fBATM[i] = batm[i];
|
|---|
| 139 | fCATM[i] = catm[i];
|
|---|
| 140 | }
|
|---|
| 141 | for (int i=0; i<4; i++) fNFL[i] = nfl[i];
|
|---|
| 142 |
|
|---|
| 143 | fWobbleMode=wobble;
|
|---|
| 144 | fAtmosphericModel=atmospher;
|
|---|
| 145 |
|
|---|
| 146 | }
|
|---|
| 147 |
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|