manTree SFrame PileUpTool instructions
Installation
Start with a clean shell & setup sframe.
Then you need to checkout the package:
svn co svn+ssh://svn.cern.ch/reps/atlasoff/PhysicsAnalysis/AnalysisCommon/PileupReweighting/trunk PileupReweighting
You will need myusername@svn.cern.ch if your cern username is different to your manchester one. If you want to take a tagged version, e.g. 00-00-09, the command is like:
cd $SFRAME_DIR
svn co svn+ssh://svn.cern.ch/reps/atlasoff/PhysicsAnalysis/AnalysisCommon/PileupReweighting/tags/PileupReweighting-00-00-09 PileupReweighting
Now you need to compile (after patching the makefile):
cd PileupReweighting/cmt
gmake -f Makefile.Standalone
This generates the shared library:
PileupReweighting/StandAlone/PileupReweightingLib.so
Now make a soft link of library
PileupReweightingLib.so to your SFrame library folder
ln -s $SFRAME_DIR/PileupReweighting/StandAlone/PileupReweightingLib.so $SFRAME_DIR/lib
What The tool does
More details can be found
here. But the tool compares the average number of interactions per bunch crossing (mu) for the MC sample (mc10a (r2215_r2260)) to what we see in data.
*
AvintprxperiodD:
- Mu_mc10a.png:
Adding PileUpWeight to SFrame analysis code
This code is dealt with by topUtils. You need to check:
The following extract is from
TobObjectSel.cxx
m_tPileUp = new Root::TPileupReweighting( (((std::string)"T")+"Pileup").c_str() );
int isGood = m_tPileUp->initialize( sframedir + "/topUtils/data/PileupMu/ilumicalc_histograms_EF_mu18_178044-180242.root",
"avgintperbx",
sframedir+ "/topUtils/data/PileupMu/mu_mc10a.root",
"mu_mc10a");
Since Mc10a mu is stored in eventinfo class as
LumiBlock(). To use this In your analysis code when running on MC do something like:
float mu = (float)m_evinfo->LumiBlock();
const double pileupEventWeight = m_object_sel->getPileUpWeight(mu);
weight*= pileupEventWeight;
Add the library to the config XML file topSel/config/TopSingleEle_config.xml
<JobConfiguration JobName="TopSingleEleJob" OutputLevel="INFO">
<Library Name="PileupReweightingLib"/>
--
JohnAlmond - 05-May-2011