source: trunk/MagicSoft/Simulation/Corsika/Simone/MSimone.cxx@ 6724

Last change on this file since 6724 was 415, checked in by harald, 25 years ago
small changes to read in also cphotons
File size: 1.5 KB
Line 
1#include <iostream.h>
2#include "MSimone.hxx"
3//==========
4// MSimone
5//
6// This class handles and contains the MonteCarlo information
7// with which the events have been generated
8// This information exists for each event.
9
10//ClassImp(MSimone)
11
12
13
14MSimone::MSimone() {
15 //
16 // default constructor
17 // set all values to zero
18
19 PartId = 0 ;
20 Energy = 0. ;
21
22 Theta = 0. ;
23 Phi = 0. ;
24
25 CoreD = 0. ;
26 CoreX = 0. ;
27 CoreY = 0. ;
28
29 FirstInt = 0. ;
30
31 NumCerPhot = 0. ;
32}
33
34MSimone::~MSimone() {
35 //
36 // default destructor
37 //
38}
39
40
41
42
43void MSimone::Clear() {
44 //
45 //
46 // reset all values to zero
47
48 PartId = 0. ;
49 Energy = 0. ;
50
51 Theta = 0. ;
52 Phi = 0. ;
53
54 CoreD = 0. ;
55 CoreX = 0. ;
56 CoreY = 0. ;
57
58 FirstInt= 0. ;
59
60 NumCerPhot = 0. ;
61}
62
63
64void MSimone::Print(void) {
65 //
66 // print out the data member on screen
67 //
68 cout <<endl << "Monte Carlo output:" <<endl;
69 cout << " Particle Id : " << PartId ;
70 cout << " Energy (GeV) : " << Energy ;
71 cout << endl ;
72}
73
74
75void MSimone::Transfer( COREventHeader *e )
76{
77 PartId = e->PrimaryID;
78 Energy = e->Etotal;
79
80 Theta = e->Theta;
81 Phi = e->Phi;
82
83 Float_t x, y ;
84
85 CoreD = e->get_core(&x, &y, 0 ) ;
86
87 CoreX = x ;
88 CoreY = y ;
89
90 FirstInt = e->zFirstInt;
91
92}
93
94void MSimone::SetNumCerPhot( Int_t iN )
95{
96 NumCerPhot = (Float_t) iN ;
97}
98
99void MSimone::NtupFill( TNtuple *n )
100{
101 n->Fill(PartId,Energy,Theta,Phi,CoreX, CoreY, CoreD, NumCerPhot ) ;
102}
103
104
105
106
107
108
109
Note: See TracBrowser for help on using the repository browser.