{ // // An example to analyze info stored in the SVAC and Merit ntuples. // // To run the macro, simply do '.x anaMeritSvac.C' in root. // // The macro will fill a histogram of planes that are hit for events with less // than 6 digis, fill a ntuple (with both SVAC and Merit ntuple variables) // containing reconstructed direction and number of digis and tracks for each // event, then store the histogram and the ntuple in a root file. // // Author: Chen, Xin (xchen@slac.stanford.edu) // Additions and comments by anders :-) // gROOT->Reset(); // // The main code is in 'anaMeritSvacNtuple.C'. // Here we load it into Root. // TExec ex; ex.Exec(".L anaMeritSvacNtuple.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:TkrNumTracks:VtxXDir:VtxYDir:VtxZDir"); h[0] = new TH1F("h1", "h1", 36, -0.5, 35.5); // // Run the macro which does the real work: // anaMeritSvacNtuple("/nfs/farm/g/glast/u01/svac_workshop/Workshop-3/Data/GlastRelease_v6r2p1-AdditionalCAL/Run-140001338/140001338_svac.root","/nfs/farm/g/glast/u12/EM2/rootData/398000371/calib-v1r0/grRoot/recon-EM2-v1r0_398000371_merit_merit.root",n,h); // Output: f1.cd(); f1.Write(0, TObject::kOverwrite); f1.Close(); }