source: trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.hxx@ 1725

Last change on this file since 1725 was 1674, checked in by blanch, 22 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1/////////////////////////////////////////////////////////////////
2//
3// MCRunHeader
4//
5// Created: Wed Oct 30 17:43:14 2002
6// Author: Oscar Blanch Bigas
7// Purpose: Base class for RunHeader-classes
8// Notes:
9//
10/////////////////////////////////////////////////////////////////
11
12// @T \newpage
13
14// @section Source code of {\tt MCRunHeader.hxx}
15
16/* @text
17This section shows the include file {\tt MCRunHeader.hxx}
18@endtext */
19
20#ifndef MCRunHeader_Class
21#define MCRunHeader_Class
22
23// @subsection Include files
24
25// @code
26#ifdef __ROOT__
27#include "TROOT.h"
28#include "TObject.h"
29#else // not __ROOT__
30#include "Rtypes.h"
31#endif
32
33#include <iostream.h>
34#include <iomanip.h>
35#include <fstream.h>
36#include <stdlib.h>
37#include <math.h>
38
39#define SIZE_OF_MCRUNHEADER 272 /* floats */
40
41// @endcode
42
43// @subsection Class {\em MCRunHeader}: Definition
44
45// @code
46class MCRunHeader {
47
48protected:
49 Float_t RunNumber;
50 Float_t date;
51 Float_t Corsika_version;
52 Float_t NumObsLev;
53 Float_t HeightLev[10];
54 Float_t SlopeSpec; /* Slope of primaries' energy spectrum */
55 Float_t ELowLim;
56 Float_t EUppLim; /* Limits of energy range for generation */
57 Float_t EGS4_flag;
58 Float_t NKG_flag;
59 Float_t Ecutoffh;
60 Float_t Ecutoffm;
61 Float_t Ecutoffe;
62 Float_t Ecutoffg;
63 /* Physical constants and interaction flags (see CORSIKA manual): */
64 Float_t C[50];
65 Float_t dummy1[20]; /* not used */
66 Float_t CKA[40];
67 Float_t CETA[5];
68 Float_t CSTRBA[11];
69 Float_t dummy2[104]; /* not used */
70 Float_t AATM[5];
71 Float_t BATM[5];
72 Float_t CATM[5];
73 Float_t NFL[4];
74
75public:
76 MCRunHeader(void) {} // default constructor
77
78 virtual ~MCRunHeader(void) {} // default destructor
79
80 // reads EventHeader from binary input stream
81 Int_t read ( ifstream &is ) {
82 is.read ( (char *)this, mysize() );
83 return is.gcount();
84 }
85
86 // writes EventHeader to binary output stream
87 Int_t write ( ofstream &os ) {
88 os.write ( (char *)this, mysize() );
89 return 0;
90 }
91
92 inline int mysize(void)
93 { return ( sizeof( float ) * SIZE_OF_MCRUNHEADER ); }
94
95 inline void print ( void ) {
96 float *ptr = (float *)this;
97 for(int i=0; i<SIZE_OF_MCRUNHEADER; ++i,++ptr)
98 cerr << i << ':' << *ptr << '\n';
99 }
100
101};
102// @endcode
103
104#endif // not defined MCRunHeader_Class
Note: See TracBrowser for help on using the repository browser.