Pluto v6.3.0
Loading...
Searching...
No Matches
PHUrEventHeader.h
Go to the documentation of this file.
1#ifndef __PHUrEventHeader_h__
2#define __PHUrEventHeader_h__
3
5
6#include "TObject.h"
7
8#include <fstream>
9#include <iostream>
10#include <iomanip>
11
12using namespace std;
13
14
15class PHUrEventHeader : public TObject {
16public:
17
18 Int_t id; // 1 : Int_t The first integer in the event header is a -1.
19 Int_t evtnum; // 2 : Int_t event number,
20 Int_t mass_proj; // 3 : Int_t mass of projectile
21 Int_t mass_target; // 4 : Int_t mass of target,
22 Double_t impact_par; // 5 : Double_t impact parameter,
23 Double_t E_reaction; // 6 : Double_t two-particle c.m. energy of heavy-ion reaction,
24 Double_t tot_sig; // 7 : Double_t the total cross section of the heavy-ion reaction ,
25 Double_t E_beam; // 8 : Double_t the beam energy ,
26 Double_t mom_per_particle; // 9 : Double_t momentum (per particle) in the laboratory frame
27
28 using TObject::Read;
29 Bool_t Read(ifstream& in){
30 if(in.eof()) return kFALSE;
31 if(!in.good()) return kFALSE;
32 in >> id >> evtnum >> mass_proj >> mass_target >> impact_par >>
34 if(evtnum!=-2 && !in.eof() && !in.good())
35 return kFALSE;
36 return kTRUE;
37 }
38
39 using TObject::Print;
40 void Print(Option_t *) {
41 cout << setw(5) << dec << id << " "
42 << setw(6) << evtnum << " "
43 << setw(4) << mass_proj << " "
44 << setw(4) << mass_target << " "
45 << setw(15) << scientific << impact_par << " "
46 << setw(15) << E_reaction << " "
47 << setw(15) << tot_sig << " "
48 << setw(15) << E_beam << " "
49 << setw(15) << mom_per_particle
50 << dec << endl;
51 }
52
53 using TObject::Copy;
54 void Copy(PHUrCollisionHeader& colheader){
55 id = colheader.n_in;
56 evtnum = colheader.n_out;
57 mass_proj = colheader.process_id;
58 mass_target = colheader.n_collision;
59 impact_par = colheader.t_collision;
60 E_reaction = colheader.E_total_CM;
61 tot_sig = colheader.sig_total;
62 E_beam = colheader.sig_partial;
64 }
65
66 using TObject::Clear;
67 void Clear(Option_t *) {
68 id = -2;
69 evtnum = -1;
70 mass_proj = -99;
71 mass_target = -99;
72 impact_par = -1.;
73 E_reaction = -1.;
74 tot_sig = -1.;
75 E_beam = -1.;
76 mom_per_particle = -1.;
77 }
78
81
82 ClassDef(PHUrEventHeader, 0)
83};
84
85
86#endif
void Print(Option_t *)
void Copy(PHUrCollisionHeader &colheader)
Bool_t Read(ifstream &in)
Double_t mom_per_particle
void Clear(Option_t *)