Changeset 1431 for trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c
- Timestamp:
- 07/24/02 15:36:10 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c
r725 r1431 9 9 static CerHeader chead; CerHeader *cheadp = &chead; 10 10 11 extern float fixed_Phi, fixed_Theta; 12 extern int ct_NMirrors; 13 extern float mean_refl; 14 11 15 void TranslateHeader(RflHeader *r, CerHeader *c) 12 16 { 13 r->EvtNumber = c->EvtNumber; 14 r->PrimaryID = c->PrimaryID; 15 r->Etotal = c->Etotal; 16 r->Thick0 = c->Thick0; 17 r->FirstTarget = c->FirstTarget; 18 r->zFirstInt = c->zFirstInt; 19 r->Theta = c->Theta; 20 r->Phi = c->Phi; 21 r->NumRndSeq = c->NumRndSeq; 22 r->RunNumber = c->RunNumber; 23 r->DateRun = c->DateRun; 24 r->VersionPGM = c->VersionPGM; 25 r->NumObsLev = c->NumObsLev; 26 r->SlopeSpec = c->SlopeSpec; 27 r->ELowLim = c->ELowLim; 28 r->EUppLim = c->EUppLim; 29 r->ThetaMin = c->ThetaMin; 30 r->ThetaMax = c->ThetaMax; 31 r->PhiMin = c->PhiMin; 32 r->PhiMax = c->PhiMax; 33 r->CWaveLower = c->CWaveLower; 34 r->CWaveUpper = c->CWaveUpper; 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]; 35 31 36 memcpy(r->p, c->p, 3*sizeof(float));37 memcpy(r->RndData, c->RndData, 30*sizeof(float));38 memcpy(r->HeightLev, c->HeightLev, 10*sizeof(float));39 memcpy(r->CorePos, c->CorePos, 40*sizeof(float));40 32 41 r->deviationPhi = r->deviationTheta = r->Trigger = 0.f; 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 42 43 } /* end of TranslateHeader */ 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 */ 54 { 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 */ 64 } 65 else 66 r->ViewConeRadius = 0.; 67 68 } /* end of TranslateHeader */ 69 70
Note:
See TracChangeset
for help on using the changeset viewer.