%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Some instruction to help setup this package in Athena %and link to the external mT2 library %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This code is available to checkout at svn ls svn://pcfs.hep.phy.cam.ac.uk/TRUNK/StransverseMassUtils %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Contents: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1. Setting up the external mT2 library 2. Setting up the Athena package 3. Using the Athena package in an AOD analysis 4. Conclusions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1. Setting up the external mT2 library %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This package assumes that it is built in the PhysicsAnalysis/AnalysisCommon/StransverseMassUtils directory. To setup this package it is fist necessary to checkout and build the mT2 library. So in some convenient place the mT2 library can be checkout using the following command svn co svn://pcfs.hep.phy.cam.ac.uk/TRUNK/NonAthenaVersion/mT2 In the mT2 directory where this package has been downloaded are some more instruction on how to build it. The one requirement for Athena is that the ROOTHOME variable set in the Makefile.include is set to point to root from the appropriate Athena release. For example in Cambridge compiling for Athena Release 14.2.5 this variable should be set to: /experiment-software/atlas/prod/releases/rel_14-10/sw/lcg/external/root/5.18.00d/slc4_ia32_gcc34/root The last few directories in the above string are invariant across institute distributions, however, up to the rel_14-10 directory is site specific. An easy way to find this is to setup an Athena release and examine the output of echo $ROOTSYS Now that ROOTHOME is set the mT2 library can be built using "make." %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2. Setting up the Athena package %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Now onto the Athena setup. Athena should be setup in the normal way. Once it is setup, if PhysicsAnalysis/AnalysisCommon does not exist the directory should be created. Move into this directory and checkout the StransverseMassUtils package: svn co svn://pcfs.hep.phy.cam.ac.uk/TRUNK/StransverseMassUtils Now move into the cmt directory of that package and in your favourite text editor edit the requirements file. The macro mT2_home needs to be changed to point to the directory of the mT2 package that was built in the above steps. After this macro is set correctly, the Athena package can be configured and built in the standard way. cmt config source setup.sh gmake alternatively: cmt bro config source setup.sh cmt bro gmake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3. Using the Athena package in an AOD analysis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Here is a brief example of how to use this package in another Athena package. This example will use the AnalysisSkeleton CBNTAA algorithm found in the UserAnalysis package. Step 1. Check out the UserAnalysis package if have not already done so. From the top cmt directory: cmt co -r UserAnalysis-13-08 PhysicsAnalysis/AnalysisCommon/UserAnalysis Step 2. Configure the UserAnalysis package to link to the StransverseMassUtils package. In the UserAnalysis/cmt/requirements file add the following line: use StransverseMassUtils StransverseMassUtils-* PhysicsAnalysis/AnalysisCommon Step 4. Add the mT2 tool to the Algorithm. Add the following lines to the AnalysisSkeleton.h header file in the appropriate places: #include "StransverseMassUtils/mT2ClacTool.h" ToolHandle m_mt2; Add the following lines to the AnalysisSkeleton.cxx file (The appropriate places to put these lines will be indicated in the comment directly above the line): //include section #include "StransverseMassUtils/mT2Defs.h" //Constructor member data initialization list add the tool //this may be confusing, but I've added all the code that already //exists. The line that includes m_mt2 simply needs to be added to it. AnalysisSkeleton::AnalysisSkeleton(const std::string& name, ISvcLocator* pSvcLocator) : CBNT_AthenaAwareBase(name, pSvcLocator), m_analysisTools( "AnalysisTools", this ), m_analysisSelectionTool( "UserAnalysisSelectionTool", this ), m_analysisPreparationTool( "UserAnalysisPreparationTool", this ), m_analysisOverlapCheckingTool( "UserAnalysisOverlapCheckingTool", this ), m_analysisOverlapRemovalTool( "UserAnalysisOverlapRemovalTool", this ), m_mt2("mT2CalcTool",this) { //in the AnalysisSkeleton::CBNT_initialize() function the following //lines should be added StatusCode sc = m_mt2.retrieve(); if( sc.isFailure() ){ mLog << MSG::ERROR << "Can't get handle on mT2CalcTool" << endreq; return sc; } m_mt2->setType(Mt2::Bisect); //This line is optional at sets the calculator type. //The other types available are found in the mT2Defs.h file included above. //in the AnalysisSkeleton::CBNT_execute() function add the following segment //This is just an example anything that inherits from INavigable4Momentum //can be passed to the calculator const MissingET * pMissing = 0; StatusCode sc = m_storeGate->retrieve(pMissing,"MET_RefFinal"); if( sc.isFailure() ){ mLog << MSG::ERROR << "Could not retrieve MissingET Object" << endreq; return StatusCode::SUCCESS; } const ElectronContainer * elecTES = 0; sc = m_storeGate->retrieve(elecTES,"ElectronAODCollection"); if( sc.isFailure() ){ mLog << MSG::ERROR << "Could not retrive ElectronContainer Object" << endreq; return StatusCode::SUCCESS; } ElectronContainer::const_iterator itrSecond = elecTES->begin(); ElectronContainer::const_iterator itrFirst = itrSecond; itrSecond++; double MT2 = 0; if(itrFirst!=elecTES->end() && itrSecond!=elecTES->end()){ m_mt2->clear(); m_mt2->setMom(*itrFrist,*itrSecond,pMissing); m_mt2->calc( MT2 ); } ///////////////////////////// The variable MT2 above will be calculated for each event. This example does not show how to dump this variable into an ntuple, but it can be done fairly easily. The main point was to show a basic setup to use this tool. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4. Conclusion %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Perhaps there will one day be more development to make the use of this package in analysis code more simple. There is an empty mT2Rec and mT2Event algorithm and class respectively in this package which could be developed to do these calculations and put the results into the StoreGateSvc. This would solve the issue addressed above by simplifying this package's use for users.