Building CMS.RooFit applications in CMSSW

Complete: 2

Introduction

This page is intended to introduce how to build an application that uses CMS.RooFit in CMSSW.

Creating a RooFit application in CMSSW

Locating your package

You should first find the most appropriate package where you want to place your RooFit application. In the following example, we assume you want to place your code under CMS.PhysicsTools/CandExamples.

Deciding which directory to use

You can put your RooFit application under one of the package sub-directory. Those can be typically test, or bin. In the first case (test), the application can be found, after compiling and linking, under:
$CMSSW_BASE/test/slc4_ia32_gcc345/myRooFitTest

In the second case (bin), yous application will be located under:

$CMSSW_BASE/bin/slc4_ia32_gcc345/myRooFitTest
and, in addition, it will be added to your linux path, so you will be able to run it from the command line just as:
myRooFitTest

Creating the source file

You first need to create, either under test or under bin, the source code file for your application, say myRooFitTest.cpp. You can follow the following example, or start from one of the already existing source files linked below.

Creating the BuildFile

Then, you need to create a file called CMS.BuildFile located under test or bin, that contains the specifications to link your application against RooFit. Below a typical example:

<bin file=myRooFitTest.cpp name=myRooFitTest>
  <use name=rootroofit>
</bin> 

For CMSSW_3_3_X and higher, RooFit was decoupled from the main CMSSW packages. This effects the BuildFile syntax in the following way:

<bin file=myRooFitTest.cpp name=myRooFitTest>
  <use name=roofit>
</bin> 

Getting RooFit examples

You can find examples of RooFit applications in the following page:

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2010-03-11 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback