/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/GenSim/GenSim-00-00-07/root/t.c

Go to the documentation of this file.
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     //set parameters
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     //randomize cos(theta)
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     //randomize phi
00024     Double_t phi = (Double_t)h3->GetRandom();
00025     cout<<"phi: "<<phi<<endl;
00026     f3->Close();
00027   }
00028 }

Generated on Tue Nov 29 23:14:26 2016 for BOSS_7.0.2 by  doxygen 1.4.7