This page supplements the material available there.
The SR ntuple is analyzable in a "bare" root session, without the load of minossoft libraries, or in a loon session. Examples of this are given on the Standard Ntuple site described above. The ntuple may be also be read into a subsequent loon job using job control for further analysis or record selection.
The NtpSR tree is constructed with one main branch of name "NtpSRRecord", which has been "split" (automatically, specifying the splitlevel in a root method) to create a branch.subbranch.(...).leaf structure for the NtpSR tree, such that every leaf stores the data of one ntuple variable of basic data type (float,int, etc.).
The NtpSR tree contains hundreds of data branches. Its structure can be viewed in a bare root session using the TTree::Print() command, for example:
{
//usage: root -bq thisscript.C >& thisscript.log
TFile* file = new TFile("filename.sntp.R1.9.root","READ");
TTree* tree = (TTree*)(file->Get("NtpSR"));
tree -> Print();
}
The contents of the ntuple can be better understood by looking at the data members of the top level ntuple class, NtpSRRecord. From NtpSRRecord.h:
NtpSREventSummary evthdr; // event summary data NtpSRShieldSummary vetohdr; // veto shield summary data NtpSRCosmicRay crhdr; // cr data, filled from last recons. trk vertex NtpSRDmxStatus dmxstatus; // status of demux TClonesArray* vetostp; //-> array of shield strips of type NtpSRShieldStrip TClonesArray* stp; //-> array of strips of type NtpSRStrip TClonesArray* slc; //-> array of slices of type NtpSRSlice TClonesArray* shw; //-> array of showers of type NtpSRShower TClonesArray* trk; //-> array of tracks of type NtpSRTrack TClonesArray* evt; //-> array of events of type NtpSREventThe NtpSRRecord class stores data members organized as objects and arrays of objects. The object data members, for example "evthdr", represent summary data for the entire snarl, and the (TClones)Arrays of objects, for example "trk", represent the different reconstruction entities associated with the snarl, specifically events,tracks, showers, slices, and strips (detector and veto).
Brief descriptions of the data members appearing in the ntuple are given in the class definition header files alongside the data members, so that the CandNtupleSR/*.h files can be a useful introductory resource to the content of the SR ntuple.
{
// A job to demonstrate how to run the NtpSRModule
// usage: loon -bq thisscript.C <cand filename>
JobC j;
j.Input.Set("Format=input");
j.Input.Set("Streams=DaqSnarl,Cand"); // Define the input data streams
j.Path.Create("Demo","NtpSRModule::Reco "
"Output::Put ");
j.Path("Demo").Mod("Output").Set("Streams=NtpSR"); // output data stream
j.Path("Demo").Mod("Output").Set("FileName=testNtpSR.root"); // output file
j.Path("Demo").Run();
}