emaansahmed

Time Between y Bursts Hist.

Aug 5th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. TFile::Open("/home/emaan/Documents/Scripts/Veritas/41584_reduced.root");
  2. .ls
  3. gamma->Print();
  4. double my_ra, my_dec, my_energy, my_time;
  5. gamma->SetBranchAddress("ra_j2000_rad",&my_ra);
  6. gamma->SetBranchAddress("dec_j2000_rad",&my_dec);
  7. gamma->SetBranchAddress("energy_gev",&my_energy);
  8. gamma->SetBranchAddress("mjd",&my_time);
  9. TTree *n = new TTree();
  10. double diff_t;
  11. TBranch *l = n->Branch("diff_t", &diff_t, "diff_t/D");
  12. int count;
  13. for(count=0,count<1698,++count){
  14. double x = my_time;
  15. gamma->GetEntry(count+1);
  16. double y = my_time;
  17. double d = y-x;
  18. l->Fill();
  19. }
  20. n->Draw(“diff_t”)
Advertisement
Add Comment
Please, Sign In to add comment