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