{ // // An example to analyze info stored in the SVAC ntuple. // // To run the macro, simply do '.x ana.C' in root. // It will produce a root file called 'temp.root'. // // The macro will fill a histogram of planes that are hit for events with less // than 6 digis, fill a ntuple containing reconstructed direction and number // of digis for each event, then store the histogram and the ntuple in a root // file // Author: Chen, Xin (xchen@slac.stanford.edu) // Comments by anders :-) // gROOT->Reset(); // // The main code is in 'anaSvacNtuple.C'. // Here we load it into Root. // TExec ex; ex.Exec(".L anaSvacNtuple.C"); // // Open the output root file to store results of running the macro: // TFile f1("temp.root", "RECREATE"); // // Open an array of histograms and an ntuple to pass to another macro: // TH1F* h[5]; TNtuple* n = new TNtuple("n1", "n1", "TkrNumDigis:VtxXDir:VtxYDir:VtxZDir"); h[0] = new TH1F("h1", "h1", 36, -0.5, 35.5); // // Run the macro which does the real work: // anaSvacNtuple("/nfs/farm/g/glast/u01/svac_workshop/Workshop-3/Data/GlastRelease_v6r2p1-AdditionalCAL/Run-140001338/140001338_svac.root",n, h); // Output: f1.cd(); f1.Write(0, TObject::kOverwrite); f1.Close(); }