Changeset 1535 for trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c
- Timestamp:
- 10/09/02 19:15:28 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c
r1431 r1535 2 2 #include "header.h" 3 3 4 /* Need to be defined the procedures to set the values in 5 float TimeFirst; 6 float TimeLast; */ 7 8 static RflHeader rhead; RflHeader *rheadp = &rhead; 9 static CerHeader chead; CerHeader *cheadp = &chead; 4 static RflEventHeader rhead; RflEventHeader *rheadp = &rhead; 5 static CerEventHeader chead; CerEventHeader *cheadp = &chead; 10 6 11 7 extern float fixed_Phi, fixed_Theta; 12 extern int ct_NMirrors; 13 extern float mean_refl; 8 extern int is_Fixed_Target; 14 9 15 void TranslateHeader(Rfl Header *r, CerHeader *c)10 void TranslateHeader(RflEventHeader *r, CerEventHeader *c) 16 11 { 17 r->EvtNumber = c->EvtNumber; 18 r->PrimaryID = c->PrimaryID; 19 r->Etotal = c->Etotal; 20 r->Thick0 = c->Thick0; 21 r->FirstTarget = c->FirstTarget; 22 r->zFirstInt = c->zFirstInt; 23 r->Theta = c->Theta; 24 r->Phi = c->Phi; 25 r->NumRndSeq = c->NumRndSeq; 26 r->RunNumber = c->RunNumber; 27 r->DateRun = c->DateRun; 28 r->Corsika_version= c->Corsika_version; 29 r->NumObsLev = c->NumObsLev; 30 r->HeightLev = c->HeightLev[0]; 12 memcpy(r,c,154*sizeof(float)); 31 13 32 33 r->SlopeSpec = c->SlopeSpec; 34 r->ELowLim = c->ELowLim; 35 r->EUppLim = c->EUppLim; 36 r->ThetaMin = c->ThetaMin; 37 r->ThetaMax = c->ThetaMax; 38 r->PhiMin = c->PhiMin; 39 r->PhiMax = c->PhiMax; 40 r->CWaveLower = c->CWaveLower; 41 r->CWaveUpper = c->CWaveUpper; 42 43 memcpy(r->p, c->p, 3*sizeof(float)); 44 memcpy(r->RndData, c->RndData, 30*sizeof(float)); 45 memcpy(r->CorePos, c->CorePos, 40*sizeof(float)); 46 47 /* Next 4 variables added in June 2002, AM */ 48 r->telescopePhi = fixed_Phi; 49 r->telescopeTheta = fixed_Theta; 50 r->num_mirrors = ct_NMirrors; 51 r->mean_reflectivity = mean_refl; 52 53 if (c->Corsika_version >= 6.) /* Viewcone option implemented only in c6xx */ 14 if (is_Fixed_Target) // <- Added in September 2002, AM 54 15 { 55 if (c->viewcone_angles[0] > 0.) 56 { 57 printf ("ERROR: Input cer file was run using Corsika option\n"); 58 printf (" VIEWCONE VUECON(1) VUECON(2) with VUECON(1) > 0\n"); 59 printf (" The reflector program only supports VUECON(1) = 0\n\n"); 60 exit(-1); 61 } 62 else 63 r->ViewConeRadius = c->viewcone_angles[1]; /* degrees */ 16 /* Next 2 variables added in June 2002, AM */ 17 r->telescopePhi = fixed_Phi; 18 r->telescopeTheta = fixed_Theta; 64 19 } 20 // If no fixed target, telescope always points towards shower. AM Sep 2002 65 21 else 66 r->ViewConeRadius = 0.; 67 22 { 23 r->telescopePhi = cheadp->Phi; 24 r->telescopeTheta = cheadp->Theta; 25 } 68 26 } /* end of TranslateHeader */ 69 27
Note:
See TracChangeset
for help on using the changeset viewer.