Common Analysis Trees
The Spin PWG maintains a set of trees connecting datasets from the various inclusive measurements in a way that allows for easy particle correlation studies. This page describes how to access the data in those trees.
PDSF: /auto/pdsfdv34/starspin/common/run6/spinTree/
Anywhere: root://deltag5.lns.mit.edu//Volumes/scratch/common/run6/spinTree/spinAnalyses_runnumber.tree.root
The last option uses xrootd to access read-only files stored on an MIT server from any computer with ROOT installed. If you have an Intel Mac note that ROOT versions 5.13.06 - 5.14.00 have a bug (patched in 5.14.00/b) that prevents you from opening xrootd files.
StRoot/StSpinPool/StSpinTree
and in the macros directory is an example showing how to configure it. Let's look at the macro step-by-step:
After that, the reader behaves pretty much like a regular TChain. The first time you call GetEntries() will be very slow (few minutes for the full dataset) as that's when the reader chains together the files and applies the TEventList with your trigger selection. Each of the particles is stored in a TClonesArray, and the StJetSkimEvent is accessible via reader->event().
Run 5
These are harmless (somehow related to custom Streamers in the StarClassLibrary) but I haven't yet figured out how to shut them up.
42 runs need to be reprocessed for chargedPions in Run 5. Will do once Andrew gives the OK at PDSF.
40 runs need to be reprocessed for Run 6 because of MuDst problems. Murad has also mentioned some problems with missing statistics in the skimEvents and jet trees that we'll revisit at a later date.
Location
RCF: /star/institutions/mit/common/run6/spinTree/PDSF: /auto/pdsfdv34/starspin/common/run6/spinTree/
Anywhere: root://deltag5.lns.mit.edu//Volumes/scratch/common/run6/spinTree/spinAnalyses_runnumber.tree.root
The last option uses xrootd to access read-only files stored on an MIT server from any computer with ROOT installed. If you have an Intel Mac note that ROOT versions 5.13.06 - 5.14.00 have a bug (patched in 5.14.00/b) that prevents you from opening xrootd files.
Interactive Mode
The basic trees are readable in a simple interactive ROOT session. Each particle type is stored in a separate tree, so you need to use TTree::AddFriend to connect things together before you draw. For example: root [1] TFile::Open("root://deltag5.lns.mit.edu//Volumes/scratch/common/run6/spinTree/spinAnalyses_7156028.tree.root"); root [2] .ls TXNetFile** root://deltag5.lns.mit.edu//Volumes/scratch/common/run6/spinTree/spinAnalyses_7156028.tree.root TXNetFile* root://deltag5.lns.mit.edu//Volumes/scratch/common/run6/spinTree/spinAnalyses_7156028.tree.root KEY: TProcessID ProcessID0;1 00013b6e-72c3-1640-a0e8-e5243780beef KEY: TTree spinTree;1 Spin PWG common analysis tree KEY: TTree ConeJets;1 this can be a friend KEY: TTree ConeJetsEMC;1 this can be a friend KEY: TTree chargedPions;1 this can be a friend KEY: TTree bemcPions;1 this can be a friend root [3] spinTree->AddFriend("ConeJets"); root [4] spinTree->AddFriend("chargedPions"); root [5] spinTree->Draw("chargedPions.fE / ConeJets.fE","chargedPions.fE>0")
If you have the class definitions loaded you can also access member functions directly in the interpreter: root [6] spinTree->Draw("chargedPions.Pt() / ConeJets.Pt()","chargedPions.Pt()>0")
Batch Mode
The StSpinTreeReader class takes care of all the details of setting branch addresses for the various particles behind the scenes. It also allows you to supply a runlist and a set of triggers you're interested in, and it will only read in the events that you care about. The code lives inStRoot/StSpinPool/StSpinTree
and in the macros directory is an example showing how to configure it. Let's look at the macro step-by-step:
//create a new reader StSpinTreeReader *reader = new StSpinTreeReader(); //add some files to analyze, one at a time or in a text file reader->selectDataset("$STAR/StRoot/StSpinPool/StSpinTree/datasets/run6_rcf.dataset"); //reader->selectFile("./spinAnalyses_6119039.tree.root");
Ok, so we created a new reader and told it we'd be using the files from Run 6 stored on RCF. You can also give it specfic filenames if you'd prefer, but there's really no reason to do so. //configure the branches you're interested in (default = true) reader->connectJets = true; reader->connectNeutralJets = false; reader->connectChargedPions = true; reader->connectBemcPions = true; reader->connectEemcPions = false; reader->connectBemcElectrons = false; //optionally filter events by run and trigger //reader->selectRunList("$STAR/StRoot/StSpinPool/StSpinTree/filters/run6_jets.runlist"); reader->selectRun(7143025); //select events that passed hardware OR software trigger for any trigger in list reader->selectTrigger(137221); reader->selectTrigger(137222); reader->selectTrigger(137611); reader->selectTrigger(137622); reader->selectTrigger(5); //we can change the OR to AND by doing reader->requireDidFire = true; reader->requireShouldFire = true;
In this block we configured the reader to pick up the jets, chargedPions and BEMC pi0s from the files. We also told it that we only wanted to analyze run 7132001, and that we only cared about events triggered by BJP1, L2jet, or L2gamma in the second longitudinal running period. Finally, we required that one of those trigIds passed both the hardware and the software triggers.After that, the reader behaves pretty much like a regular TChain. The first time you call GetEntries() will be very slow (few minutes for the full dataset) as that's when the reader chains together the files and applies the TEventList with your trigger selection. Each of the particles is stored in a TClonesArray, and the StJetSkimEvent is accessible via reader->event().
StJetSkimEvent *ev = reader->event(); TClonesArray *jets = reader->jets(); TClonesArray *chargedPions = reader->chargedPions(); TClonesArray *bemcPions = reader->bemcPions(); long entries = reader->GetEntries(); for(int i=0; i
What's Included?
Common trees are produced for both Run 5 and the 2nd longitudinal period of Run 6. Here's what available:Run 5
- skimEvent
- ConeJets
- chargedPions
- bemcPions
- skimEvent
- ConeJets12
- ConeJetsEMC
- chargedPions -- see (Data Collection)
- bemcPions
- bemcElectrons
Known Issues
The first time you read a charged pion (batch or interactive) you may see some messages like Error in <tclass::new>: cannot create object of class StHelix</tclass::new>
These are harmless (somehow related to custom Streamers in the StarClassLibrary) but I haven't yet figured out how to shut them up.
42 runs need to be reprocessed for chargedPions in Run 5. Will do once Andrew gives the OK at PDSF.
40 runs need to be reprocessed for Run 6 because of MuDst problems. Murad has also mentioned some problems with missing statistics in the skimEvents and jet trees that we'll revisit at a later date.
Future Plans
Including EEMC pi0s and StGammaCandidates remains on my TO-DO list. I've also added into StJet a vector of trigger IDs fired by that jet. Of course we also need to get L2 trigger emulation into the skimEvent. As always, if you have questions or problems please feel free to contact me.Groups:
- kocolosk's blog
- Printer-friendly version
- Login or register to post comments