00001 int t()
00002 {
00003
00004 for(Int_t i=0;i<339;i)
00005 {
00006 TFile* f1 = new TFile("ppdc.root");
00007 TH1F* h1 = (TH1F*)f1->Get("htemp");
00008
00009 Double_t pMag = h1->GetRandom();
00010 cout<<"pMag: "<<pMag<<endl;
00011 f1->Close();
00012
00013 TFile* f2 = new TFile("theta.root");
00014 TH1F* h2 = (TH1F*)f2->Get("htemp");
00015
00016 Double_t theta =(Double_t)h2->GetRandom();
00017 cout<<"theta: "<<theta<<endl;
00018 G4double costheta = cos(theta);
00019 f2->Close();
00020
00021 TFile* f3 = new TFile("phi.root");
00022 TH1F* h3 = (TH1F*)f3->Get("htemp");
00023
00024 Double_t phi = (Double_t)h3->GetRandom();
00025 cout<<"phi: "<<phi<<endl;
00026 f3->Close();
00027 }
00028 }