BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
t.c
Go to the documentation of this file.
1int t() {
2
3 for ( Int_t i = 0; i < 339; i )
4 {
5 TFile* f1 = new TFile( "ppdc.root" );
6 TH1F* h1 = (TH1F*)f1->Get( "htemp" );
7 // set parameters
8 Double_t pMag = h1->GetRandom();
9 cout << "pMag: " << pMag << endl;
10 f1->Close();
11
12 TFile* f2 = new TFile( "theta.root" );
13 TH1F* h2 = (TH1F*)f2->Get( "htemp" );
14 // randomize cos(theta)
15 Double_t theta = (Double_t)h2->GetRandom();
16 cout << "theta: " << theta << endl;
17 G4double costheta = cos( theta );
18 f2->Close();
19
20 TFile* f3 = new TFile( "phi.root" );
21 TH1F* h3 = (TH1F*)f3->Get( "htemp" );
22 // randomize phi
23 Double_t phi = (Double_t)h3->GetRandom();
24 cout << "phi: " << phi << endl;
25 f3->Close();
26 }
27}
TFile * f1
int t()
Definition t.c:1