- My blog
- Post new blog entry
- Top bloggers
- Recent posts
Sort by:[Date]
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.StarSpinLibraries on OS X
Updated on Thu, 2007-07-19 16:15. Originally created by kocolosk on 2007-05-30 18:27.Update 2007-07-19
StGammaEvent libraries are also available through this same project. After building all targets you can dogSystem->Load("StGammaEvent")
One of the goals of the common Spin PWG analysis trees was that they should be readable without the full STAR framework. The trees are certainly accessible in a plain interactive session, but some of the features are only really available if the class definitions have been loaded. This page shows how to build those class libraries on a Mac with only ROOT installed. Here's what we're going to do:
- Check out the Xcode project. See SVN Repository Access if you don't have a Subversion client installed
- Set up the installation directory for the dynamic libraries and tell ROOT to look there
- Build the dynamic libraries and install them
- Test it out
svn co http://deltag5.lns.mit.edu:8080/svn/StarSpinLibraries
cd StarSpinLibraries
./setup.sh
xcodebuild -alltargets
Then you can test it out by opening a ROOT session and doing
gSystem->Load("StarClassLibrary")
gSystem->Load("StMiniMcEvent")
gSystem->Load("StarSpinAnalyses")
gSystem->Load("StJets")
What's Included?
You've just installed four dynamic libraries in /usr/local/lib/star. The StarClassLibrary and StMiniMcEvent targets build exact copies of the respective libraries from the StRoot framework. StarSpinAnalyses includes- StJetSkimEvent
- StJet
- StChargedPionTrack
- TPi0Candidate
- StSpinTreeReader
- FastAsymmetryMaker
- StTamuRelLum
These libraries are installed and ready to use on deltag5, provided you modify your .rootrc to look in /usr/local/lib/star (setup.sh does this for you automatically if you're building from scratch). Mike Betancourt was my lone beta tester and while we worked out a handful of glitches, I imagine there are use cases I haven't thought of yet. In particular, the Xcode project assumes ROOT is installed in /sw. You'll need to edit some Project-level settings if that's not the case. Feel free to contact me if you run into any problems.
Basic QA Plots
Select a trigger and charge combination to view QA summary plots. Each point on a plot is a mean value of that quantity for the given run, while the error is sqrt(nentries).
The runs selected are those that passed jet QA, so it's not surprising that things generally look good. Exceptions:
The runs selected are those that passed jet QA, so it's not surprising that things generally look good. Exceptions:
- dE/dx, nSigmaPion, and nHitsFit are all out of whack around day 170. I'll take a closer look to see if I can figure out what went wrong, but it's a small group of runs so in the end I expect to simply drop them.
SVN Repository Access
Updated on Thu, 2007-07-12 12:39. Originally created by kocolosk on 2007-05-25 01:29. We set up a Subversion repository at MIT to track a few pieces of software that many of us are using, but that don't fit into the STAR framework.
Browsing and Checking Out Code
http://deltag5.lns.mit.edu/viewvc/
will allow you to browse the contents of the repository. You'll need to have a Subversion client installed in order to check out code. Simplest way on a Mac is to do
fink install svn-client
although there are also binary .pkg installers floating around for most eveery platform if you'd prefer to go that route. Then do
svn co http://deltag5.lns.mit.edu:8080/svn/modulename
Committing Changes
The web server doesn't do any authentication, so if you plan on committing changes to these packages you'll need to be added to the svnusers group on deltag5 and you'll also need to use ssh to get your working copy:
svn co svn+ssh://deltag5.lns.mit.edu/svnrep/modulename
In that case, make sure that your .bashrc on deltag5 adds /usr/local/bin to your $PATH. Note that this method may ask you for your password as much as 4 times, so publickey authentication is your friend (see SSHKeychain for Macs).
For more information on Subversion (basically the successor to CVS) take a look at http://svnbook.red-bean.com/
Browsing and Checking Out Code
http://deltag5.lns.mit.edu/viewvc/will allow you to browse the contents of the repository. You'll need to have a Subversion client installed in order to check out code. Simplest way on a Mac is to do
fink install svn-client
although there are also binary .pkg installers floating around for most eveery platform if you'd prefer to go that route. Then do
svn co http://deltag5.lns.mit.edu:8080/svn/modulename
Committing Changes
The web server doesn't do any authentication, so if you plan on committing changes to these packages you'll need to be added to the svnusers group on deltag5 and you'll also need to use ssh to get your working copy:svn co svn+ssh://deltag5.lns.mit.edu/svnrep/modulename
In that case, make sure that your .bashrc on deltag5 adds /usr/local/bin to your $PATH. Note that this method may ask you for your password as much as 4 times, so publickey authentication is your friend (see SSHKeychain for Macs).
For more information on Subversion (basically the successor to CVS) take a look at http://svnbook.red-bean.com/
Systematic Uncertainty Studies
Updated on Thu, 2007-07-12 12:33. Originally created by kocolosk on 2007-05-20 16:22. In the 2003+2004 jet cross section and A_LL paper we quoted a 5% systematic uncertainty on the absolute BTOW calibration. For the 2005 jet A_LL paper there is some interest in reducing the size of this systematic.
I went back to the electron ntuple used to set the absolute gains and started making some additional plots. Here's an investigation of E_{tower} / p_{track} versus track momentum. I only included tracks passing directly through the center of the tower (R<0.003) where the correction from shower leakage is effectively zero.
Full set of electron cuts (overall momentum acceptance 1.5 < p < 20.):
dedx>3.5 && dedx<4.5 && status==1 && np>25 && adc>2*rms && r<0.003 && id<2401
I forgot to impose a vertex constraint on these posted plots, but when I did require |vz| < 30 the central values didn't really move at all.
![](/STAR/files/active/0/Ep_means.gif)
![](/STAR/files/active/0/Ep_sigma.gif)
Here are the individual slices in track momentum used to obtain the points on that plot:
![](/STAR/files/active/0/Ep_15_20.gif)
![](/STAR/files/active/0/Ep_20_25.gif)
![](/STAR/files/active/1/Ep_25_30.gif)
![](/STAR/files/active/0/Ep_30_35.gif)
![](/STAR/files/active/1/Ep_35_45.gif)
![](/STAR/files/active/0/Ep_45_60.gif)
Electrons with momentum up to 20 GeV were accepted in the original sample, but there are only ~300 of them above 6 GeV and the distribution is actually rather ugly. Integrating over the full momentum range yields a E/p measurement of 0.9978 +- 0.0023, but as you can see the contributions from invididual momentum slices scatter around 1.0 by as much as 4.5%
Next Steps? -- I'm thinking of slicing versus eta and maybe R (distance from center of tower).
I went back to the electron ntuple used to set the absolute gains and started making some additional plots. Here's an investigation of E_{tower} / p_{track} versus track momentum. I only included tracks passing directly through the center of the tower (R<0.003) where the correction from shower leakage is effectively zero.
Full set of electron cuts (overall momentum acceptance 1.5 < p < 20.):
dedx>3.5 && dedx<4.5 && status==1 && np>25 && adc>2*rms && r<0.003 && id<2401
I forgot to impose a vertex constraint on these posted plots, but when I did require |vz| < 30 the central values didn't really move at all.
![](/STAR/files/active/0/Ep_means.gif)
![](/STAR/files/active/0/Ep_sigma.gif)
Here are the individual slices in track momentum used to obtain the points on that plot:
![](/STAR/files/active/0/Ep_15_20.gif)
![](/STAR/files/active/0/Ep_20_25.gif)
![](/STAR/files/active/1/Ep_25_30.gif)
![](/STAR/files/active/0/Ep_30_35.gif)
![](/STAR/files/active/1/Ep_35_45.gif)
![](/STAR/files/active/0/Ep_45_60.gif)
Electrons with momentum up to 20 GeV were accepted in the original sample, but there are only ~300 of them above 6 GeV and the distribution is actually rather ugly. Integrating over the full momentum range yields a E/p measurement of 0.9978 +- 0.0023, but as you can see the contributions from invididual momentum slices scatter around 1.0 by as much as 4.5%
Next Steps? -- I'm thinking of slicing versus eta and maybe R (distance from center of tower).
Performance Benchmarks
Updated on Sat, 2007-07-14 09:21. Originally created by kocolosk on 2007-05-19 13:44. I ran a couple of TStopwatch tests on the Run 5 common trees. Here are the specs:
Hardware: Core Duo laptop, 2.16 Ghz
Trees: 805 runs, 26.2M events, 4.4 GB on disk
Languages: CINT, Python, compliled C++
I also tested the impact of using a TEventList to select the ~11M JP1 and JP2 events needed to plot deta and dphi for pions and jets. Here's a table of the results. The times listed are CPU seconds and real seconds:
I tried the Python code without using a TEventList. The chain initialization dropped down to 50/70 seconds, but reading in all 26M events took me 1889/2183 seconds. In the end the TEventList was definitely worth it, even though it took 3 minutes to construct one.
Conclusions:
Hardware: Core Duo laptop, 2.16 Ghz
Trees: 805 runs, 26.2M events, 4.4 GB on disk
Languages: CINT, Python, compliled C++
I also tested the impact of using a TEventList to select the ~11M JP1 and JP2 events needed to plot deta and dphi for pions and jets. Here's a table of the results. The times listed are CPU seconds and real seconds:
Chain init + TEventList generation | Process TEventList | |
CINT | 156 / 247 | 1664 / 1909 |
Python | 156 / 257 | 1255 / 1565 |
Compiled C++ | 154 / 249 | 877 / 1209 |
I tried the Python code without using a TEventList. The chain initialization dropped down to 50/70 seconds, but reading in all 26M events took me 1889/2183 seconds. In the end the TEventList was definitely worth it, even though it took 3 minutes to construct one.
Conclusions:
- Use a TEventList. My selection criteria weren't very restrictive (event fired JP1 or JP2), but I cut my processing time by > 30%.
- I had already compiled the dictionaries for the various classes and the reader in every case, but this small macro still got a strong performance boost from compilation. I was surprised to see that the Python code was closer to compiled in performance than CINT.
Introduction at Spin PWG meeting - 5/10/07
I've been working on a project to make the datasets from the various longitudinal spin analyses underway at STAR available in a common set of trees. These trees would improve our ability to do the kind of correlation studies that are becoming increasingly important as we move beyond inclusive analyses in the coming years.
In our current workflow, each identified particle analysis has one or more experts responsible for deciding just which reconstruction parameters and cuts are used to determine a good final dataset. I don't envision changing that. Rather, I am taking the trees produced by those analyzers as inputs, picking off the essential information, and feeding it into a single common tree for each run. I am also providing a reader class in StSpinPool that takes care of connecting the various branches and does event selection given a run list and/or trigger list.
Included Analyses
In our current workflow, each identified particle analysis has one or more experts responsible for deciding just which reconstruction parameters and cuts are used to determine a good final dataset. I don't envision changing that. Rather, I am taking the trees produced by those analyzers as inputs, picking off the essential information, and feeding it into a single common tree for each run. I am also providing a reader class in StSpinPool that takes care of connecting the various branches and does event selection given a run list and/or trigger list.
Features
- Readable without the STAR framework
- Condenses data from several analyses down to the most essential ~10 GB (Run 6)
- Takes advantage of new capabilities in ROOT allowing fast fill/run/trigger selection
Included Analyses
- Event information using StJetSkimEvent
- ConeJets12 jets (StJet only)
- ConeJetsEMC jets (StJet only)
- charged pions (StChargedPionTrack)
- BEMC neutral pions (TPi0Candidate)
- EEMC neutral pions (StEEmcPair?) -- TODO
- electrons * -- TODO
- ...
Current Status
I'm waiting on the skimEvent reproduction to finish before releasing. I've got the codes to combine jets, charged pions, and BEMC pions, and I'm working with Jason and Priscilla on EEMC pions and BEMC electrons.Embedding Notes, 3 May 2007
Updated on Thu, 2007-05-03 12:45. Originally created by andrewar on 2007-05-03 12:45. Notes on embedding test sets for CuCu, P06ib.
I ran several sets of embedding test files at PDSF, named Piminus_00x_spectra.
Set Number | Field | Notes | QA |