source: trunk/Mars/mcorsika/MCorsikaEvtHeader.h@ 10083

Last change on this file since 10083 was 10060, checked in by rohlfs, 14 years ago
two new command line arguments of readcorsika: -A=arrayNo and -T=telescopeNo. New design of program flow in MCorsikaRead: It is now determined by the order of the data blocks in the input file.
File size: 3.4 KB
Line 
1#ifndef MARS_MCorsikaEvtHeader
2#define MARS_MCorsikaEvtHeader
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef ROOT_TVector3
9#include <TVector3.h>
10#endif
11
12// gcc 3.2
13//class ifstream;
14#include <iosfwd>
15
16class MCorsikaFormat;
17
18class MCorsikaEvtHeader : public MParContainer
19{
20private:
21 UInt_t fEvtNumber; // Event number
22 UInt_t fNumReuse; // Counter of the reuse of the same shower
23 UInt_t fTotReuse; //! number of reuse of the same shower
24// UInt_t fParticleID; // Particle ID (see MMcEvtBasic or CORSIKA manual)
25 Float_t fTotalEnergy; // [GeV]
26
27 Float_t fStartAltitude; // [g/cm²]
28 Float_t fFirstTargetNum; // Number of first target if fixed
29 Float_t fFirstInteractionHeight; // [cm] z coordinate, first intercation height
30
31 Float_t fMomentumX; // [GeV/c] "+west" "-east"
32 Float_t fMomentumY; // [GeV/c] "+south" "-north" (north denotes the magnet north which is defined to be in the geografic north!)
33 Float_t fMomentumZ; // [GeV/c] "+upwards" "-downwards"
34
35 Float_t fZd; // [rad] Zenith distance
36 Float_t fAz; // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!)
37
38 Float_t fX; // [cm] Position of telescope on ground x / - impact parameter x
39 Float_t fY; // [cm] Position of telescope on gorund y / - impact parameter y
40
41 Float_t fWeightedNumPhotons; // weighted number of photons arriving at observation level
42
43 Float_t fTempX[20]; //! Temporary storage for impact parameter
44 Float_t fTempY[20]; //! Temporary storage for impact parameter
45
46public:
47 MCorsikaEvtHeader(const char *name=NULL, const char *title=NULL);
48
49 //void Clear(Option_t * = NULL);
50 void Print(Option_t * = NULL) const;
51
52 UInt_t GetEvtNumber() const { return fEvtNumber; }
53 UInt_t GetNumReuse() const { return fNumReuse; }
54 UInt_t GetTotReuse() const { return fTotReuse; }
55// UInt_t GetParticleID() const { return fParticleID; }
56
57 TVector3 GetMomentum() const { return TVector3(fMomentumX, fMomentumY, fMomentumZ); }
58 TVector2 GetImpactPos() const { return TVector2(fX, fY); }
59
60 Float_t GetTotalEnergy() const { return fTotalEnergy; }
61 Float_t GetFirstInteractionHeight() const { return fFirstInteractionHeight; }
62
63 Float_t GetZd() const { return fZd; }
64 Float_t GetAz() const { return fAz; }
65
66 Float_t GetX() const { return fX; }
67 Float_t GetY() const { return fY; }
68
69 Double_t GetImpact() const;
70
71 void GetArrayOffset(Int_t arrayIdx, Float_t & xArrOff, Float_t & yArrOff)
72 {xArrOff = fTempY[arrayIdx]; yArrOff=-fTempX[arrayIdx]; }
73 void SetTelescopeOffset(Int_t arrayIdx, Float_t xTelOff, Float_t yTelOff)
74 {fNumReuse = arrayIdx; fX = xTelOff; fY = yTelOff;}
75
76 void IncNumReuse() { fNumReuse++; }
77 void ResetNumReuse() { fNumReuse=0; }
78
79 void InitXY() { fX=fTempY[fNumReuse]; fY=-fTempX[fNumReuse]; }
80 void AddXY(Float_t x, Float_t y) { fX+=x; fY+=y; }
81
82 Int_t ReadEvt(Float_t * f); // read in event header block
83 Int_t ReadEvtEnd(MCorsikaFormat *informat); // read in event end block
84
85 ClassDef(MCorsikaEvtHeader, 3) // Parameter Conatiner for raw EVENT HEADER
86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.