| 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 "MGeomCorsikaCT.h"
|
|---|
| 36 | #include "MMcCorsikaRunHeader.h"
|
|---|
| 37 |
|
|---|
| 38 | ClassImp(MMcCorsikaRunHeader);
|
|---|
| 39 |
|
|---|
| 40 | using namespace std;
|
|---|
| 41 |
|
|---|
| 42 | // --------------------------------------------------------------------------
|
|---|
| 43 | //
|
|---|
| 44 | // Default constructor.
|
|---|
| 45 | //
|
|---|
| 46 | //
|
|---|
| 47 | MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title,
|
|---|
| 48 | int NumCT)
|
|---|
| 49 | {
|
|---|
| 50 | fName = name ? name : "MMcCorsikaRunHeader";
|
|---|
| 51 | fTitle = title ? title : "Translation of the CORSIKA header";
|
|---|
| 52 |
|
|---|
| 53 | fRunNumber = 0;
|
|---|
| 54 | fDate = 0;
|
|---|
| 55 | fCorsikaVersion = 0;
|
|---|
| 56 | fNumObsLev = 0;
|
|---|
| 57 |
|
|---|
| 58 | for (int i=0; i<10; i++)
|
|---|
| 59 | fHeightLev[i]=0;
|
|---|
| 60 |
|
|---|
| 61 | fSlopeSpec = 0;
|
|---|
| 62 | fELowLim = 0;
|
|---|
| 63 | fEUppLim = 0;
|
|---|
| 64 | fEGS4flag = 0;
|
|---|
| 65 | fNKGflag = 0;
|
|---|
| 66 | fEcutoffh = 0;
|
|---|
| 67 | fEcutoffm = 0;
|
|---|
| 68 | fEcutoffe = 0;
|
|---|
| 69 | fEcutoffg = 0;
|
|---|
| 70 |
|
|---|
| 71 | for(int i=0; i<50; i++) fC[i] = 0;
|
|---|
| 72 | for(int i=0; i<40; i++) fCKA[i] = 0;
|
|---|
| 73 | for(int i=0; i<5; i++) fCETA[i] = 0;
|
|---|
| 74 | for(int i=0; i<11; i++) fCSTRBA[i] = 0;
|
|---|
| 75 | for(int i=0; i<5; i++)
|
|---|
| 76 | {
|
|---|
| 77 | fAATM[i] = 0;
|
|---|
| 78 | fBATM[i] = 0;
|
|---|
| 79 | fCATM[i] = 0;
|
|---|
| 80 | }
|
|---|
| 81 | for (int i=0;i<4; i++) fNFL[i] = 0;
|
|---|
| 82 |
|
|---|
| 83 | fViewconeAngles[0]=0.0;
|
|---|
| 84 | fViewconeAngles[1]=0.0;
|
|---|
| 85 |
|
|---|
| 86 | fWobbleMode=0;
|
|---|
| 87 | fAtmosphericModel=0;
|
|---|
| 88 |
|
|---|
| 89 | fNumCT=NumCT;
|
|---|
| 90 | for (int i=0;i<NumCT;i++)
|
|---|
| 91 | fTelescopes[i]= new MGeomCorsikaCT;
|
|---|
| 92 |
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 | // -------------------------------------------------------------------------
|
|---|
| 96 | //
|
|---|
| 97 | // Fill Corsika Run Header
|
|---|
| 98 | //
|
|---|
| 99 | void MMcCorsikaRunHeader::Fill(const Float_t runnumber,
|
|---|
| 100 | const Float_t date,
|
|---|
| 101 | const Float_t vers,
|
|---|
| 102 | const Float_t numobslev,
|
|---|
| 103 | const Float_t height[10],
|
|---|
| 104 | const Float_t slope,
|
|---|
| 105 | const Float_t elow,
|
|---|
| 106 | const Float_t eupp,
|
|---|
| 107 | const Float_t egs4,
|
|---|
| 108 | const Float_t nkg,
|
|---|
| 109 | const Float_t eh,
|
|---|
| 110 | const Float_t em,
|
|---|
| 111 | const Float_t ee,
|
|---|
| 112 | const Float_t eg,
|
|---|
| 113 | const Float_t c[50],
|
|---|
| 114 | const Float_t cka[40],
|
|---|
| 115 | const Float_t ceta[5],
|
|---|
| 116 | const Float_t cstrba[11],
|
|---|
| 117 | const Float_t aatm[5],
|
|---|
| 118 | const Float_t batm[5],
|
|---|
| 119 | const Float_t catm[5],
|
|---|
| 120 | const Float_t nfl[4],
|
|---|
| 121 | const Float_t viewcone[2],
|
|---|
| 122 | const Float_t wobble,
|
|---|
| 123 | const Float_t atmospher
|
|---|
| 124 | )
|
|---|
| 125 | {
|
|---|
| 126 | fRunNumber = runnumber;
|
|---|
| 127 | fDate = date;
|
|---|
| 128 | fCorsikaVersion = vers;
|
|---|
| 129 | fNumObsLev = numobslev;
|
|---|
| 130 |
|
|---|
| 131 | for (int i=0; i<10; i++)
|
|---|
| 132 | fHeightLev[i]=height[i];
|
|---|
| 133 |
|
|---|
| 134 | fSlopeSpec = slope;
|
|---|
| 135 | fELowLim = elow;
|
|---|
| 136 | fEUppLim = eupp;
|
|---|
| 137 | fEGS4flag = egs4;
|
|---|
| 138 | fNKGflag = nkg;
|
|---|
| 139 | fEcutoffh = eh;
|
|---|
| 140 | fEcutoffm = em;
|
|---|
| 141 | fEcutoffe = ee;
|
|---|
| 142 | fEcutoffg = eg;
|
|---|
| 143 |
|
|---|
| 144 | for (int i=0; i<50; i++) fC[i] = c[i];
|
|---|
| 145 | for (int i=0; i<40; i++) fCKA[i] = cka[i];
|
|---|
| 146 | for (int i=0; i<5 ; i++) fCETA[i] = ceta[i];
|
|---|
| 147 | for (int i=0; i<11; i++) fCSTRBA[i] = cstrba[i];
|
|---|
| 148 | for (int i=0; i<5; i++)
|
|---|
| 149 | {
|
|---|
| 150 | fAATM[i] = aatm[i];
|
|---|
| 151 | fBATM[i] = batm[i];
|
|---|
| 152 | fCATM[i] = catm[i];
|
|---|
| 153 | }
|
|---|
| 154 | for (int i=0; i<4; i++) fNFL[i] = nfl[i];
|
|---|
| 155 |
|
|---|
| 156 | fViewconeAngles[0]=viewcone[0];
|
|---|
| 157 | fViewconeAngles[1]=viewcone[1];
|
|---|
| 158 |
|
|---|
| 159 | fWobbleMode=wobble;
|
|---|
| 160 | fAtmosphericModel=atmospher;
|
|---|
| 161 |
|
|---|
| 162 | }
|
|---|
| 163 |
|
|---|
| 164 | // -------------------------------------------------------------------------
|
|---|
| 165 | //
|
|---|
| 166 | // Fill C Telescope information in Corsika Run Header
|
|---|
| 167 | //
|
|---|
| 168 | void MMcCorsikaRunHeader::FillCT(Float_t ctx, Float_t cty, Float_t ctz,
|
|---|
| 169 | Float_t cttheta, Float_t ctphi,
|
|---|
| 170 | Float_t ctdiam, Float_t ctfocal,
|
|---|
| 171 | Int_t CTnum){
|
|---|
| 172 |
|
|---|
| 173 | static_cast<MGeomCorsikaCT*>(fTelescopes.UncheckedAt(CTnum))
|
|---|
| 174 | ->Fill(ctx, cty, ctz, cttheta, ctphi, ctdiam, ctfocal);
|
|---|
| 175 |
|
|---|
| 176 | }
|
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
|
|---|
| 180 |
|
|---|
| 181 |
|
|---|
| 182 |
|
|---|
| 183 |
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|