emaansahmed

Final

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