Ignore:
Timestamp:
10/09/02 19:15:28 (22 years ago)
Author:
bigongia
Message:
Version 0.6. Changed output format: added run header, changed event header,
             added ascii parameter files attached at the end of every output
             file to keep all info.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c

    r1431 r1535  
    22#include "header.h"
    33
    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;
     4static RflEventHeader rhead;  RflEventHeader *rheadp = &rhead;
     5static CerEventHeader chead;  CerEventHeader *cheadp = &chead;
    106
    117extern float fixed_Phi, fixed_Theta;
    12 extern int   ct_NMirrors;
    13 extern float mean_refl;
     8extern int   is_Fixed_Target;
    149
    15 void TranslateHeader(RflHeader *r, CerHeader *c)
     10void TranslateHeader(RflEventHeader *r, CerEventHeader *c)
    1611{
    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));
    3113
    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
    5415    {
    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;
    6419    }
     20  // If no fixed target, telescope always points towards shower. AM Sep 2002
    6521  else
    66     r->ViewConeRadius = 0.;
    67 
     22    {
     23      r->telescopePhi      = cheadp->Phi;
     24      r->telescopeTheta    = cheadp->Theta;
     25    }
    6826} /*    end of TranslateHeader  */
    6927
Note: See TracChangeset for help on using the changeset viewer.