STAR Computing Documentation | |
StStrangeMuDstMaker: the Cuts | |
Offline Software using ROOT in STAR | Maintained by G. Van Buren |
Last modified Tue Apr 11 15:30:19 2000 |
What are the cuts
The cuts are instances of the TCut class. This class has a name, and a
title, and can be used in selections for TTree::Draw() or TTree::Scan().
These cuts are kept in two locations. On file, they are stored in a
branch of the micro-DST tree called StrangeCuts. However, when running
the maker, they are also stored in a
TOrdCollection class in memory. You may find that in old micro-DST files,
it was a TOrdCollection named StrangeCuts which was stored on file along
with the micro-DST; in more recent files this is no longer true.
One can easily view the cuts by running the listStrangeCuts.C macro on
a micro-DST file like this:
root4star -b -q 'listStrangeCuts.C("myMuDst.root")'For an older file with the TOrdCollection in the file, one could do the following in Root to see the cuts:
TFile file1("evMuDst.root"); cuts = (TOrdCollection*) file1.Get("StrangeCuts"); cuts->Print();
It is important to note that the cuts stored in the branch on file are currently only there at the beginning of a file, and at any subsequent point in the file at which it was determined that the cuts had changed. For example, when filtering many micro-DSTs into one, the cuts from the first micro-DST file read will go into the first event in the new micro-DST. Each of the subsequent micro-DSTs' cuts are examined to see if they are any different from current set of cuts, and if so, are again written at the appropriate event into the new micro-DST. For events imbetween, no cuts are written to the file. It is not meant for the user to access the cuts directly from the file for each event. Instead, please use either the listStrangeCuts.C macro described above, or the StStrangeCuts class via the maker described below.
When using the StStrangeMuDstMaker, the cuts are managed via a class called StStrangeCuts. Access to this class is obtained from the maker with a call to the member function Cuts():
StStrangeCuts& cuts = dstMaker->Cuts();This class inherits from TOrdCollection and keeps in memory what the current set of cuts associated with the data being read/written are. Thus, for all subsequent events in a micro-DST with cuts the same as the first (in which case the cuts are stored on file only with the first event), one can access the cuts during any event via this class. The following functionality is provided by the StStrangeCuts class in addition to what is provided by the TOrdCollection class from which it inherits: