Top Italia shared code

Page under construction...

ITopClass - Common classes for top analysis

These classes are built as common electron, muon and jet classes to store the top selected object. They include methods to select them as "good" objects.

New: now the code is on svn: svn.cern.ch/reps/atlasgrp/Institutes/UdineICTP/ITopClass

To check it out do:

export SVNROOT=svn+ssh://svn.cern.ch/reps/atlasgrp/Institutes/UdineICTP
cmt co ITopClass
To update:
svn update

The code includes:

  • .C and .h files for the variuos classes: analysis objects (electrons, muons, jets and vertexes, including parent classes) and a class for the event
  • the files FillMcObjects.C and .h, including some functions to fill the classes with the correct D3PD variables
  • a couple of example makefiles
  • a base macro Code.C
  • the files physics.C and .h generated by executing root -> MakeClass from a sample D3PD file

To test the code one can simply compile it using "make" or "make -f Makefile.athena" (check / modify the Makefile or Makefile.athena to work with your root configuration).

To update the code for a new D3PD (with some different set of branches, or some different naming), do the following:

  • open it with ROOT and type "physics->MakeClass()"
  • modify the file physics.h and add these lines:
  using std::vector ;
  using std::string ;

To implement a simple code, just go inside the physics.C file and add stuff after the line: // if (Cut(ientry) < 0) continue; adding lines like:

vector<McEle> *ElectronVec = ITopClass::MakeEleVec(this);
vector<McMuon> *MuonVec = ITopClass::MakeMuonVec(this);
vector<McJet> *JetVec = ITopClass::MakeJetVec(this);

// good electron selection
int N_good_ele = 0;
for ( int i=0; i<(int)ElectronVec.size(); i++ ) {
  if ( ElectronVec.isGood() ) N_good_ele ++;
  // ...
}

// ...

Notes:

  • the McObject-derived and the TopEvent classes include a config map: this map contains all the external options one can give as input for the object and event selection (minimum pt, maximum isolation, flags to use or not some selection cuts...)
  • to set the options, do the following:

McMuon muon;
muon.set_config("MuonPtMin",20*1000.);
muon.set_config("MuonEtaMin",2.5);
...

or

map<string,double> gMyConfig;
map<string,string> gMyConfigString;
gMyConfig["MuonPtMin"] = 20 *1000;
gMyConfig["MuonEtaMax"] = 2.5;
gMyConfigString["BtagAlgo"] = "SV0";
...
McMuon muon;
muon.set_config(gMyConfig,gMyConfigString);

Some external package is needed to fully access the object and event selection:

To include them, make sure you define them before the corresponding #ifdef UseMyPackage by adding a line #define UseMyPackage

Old files:

  • McMuon.C: class to store muons
  • McMuon.h: class to store muons
  • McLepton.C: common class for electrons and muons
  • McLepton.h: common class for electrons and muons
  • McObject.C: parent class for all the objects (electrons, muons and jets)
  • McObject.h: parent class for all the objects (electrons, muons and jets)

TopChi2Fitter Standalone

This class is a standalone root implementation of the TopChi2Fitter. The preliminary version contains limited options (no energy rescaling, for eg).

To use the tool just include the following files it in your compiled code with:

or run in a root CINT session a code similar to this example macro:

with the "+" option:

root -l Example.C+

-- MichelePinamonti - 02-May-2011

Topic attachments
I Attachment History Action Size Date Who Comment
C source code filec Example.C r2 r1 manage 2.4 K 2011-04-15 - 16:21 UnknownUser  
C source code filec McLepton.C r1 manage 0.7 K 2011-03-31 - 12:54 UnknownUser  
Header fileh McLepton.h r1 manage 1.0 K 2011-03-31 - 12:54 UnknownUser  
C source code filec McMuon.C r1 manage 7.1 K 2011-03-31 - 12:53 UnknownUser  
Header fileh McMuon.h r1 manage 7.2 K 2011-03-31 - 12:54 UnknownUser  
C source code filec McObject.C r1 manage 1.3 K 2011-03-31 - 12:55 UnknownUser  
Header fileh McObject.h r1 manage 2.5 K 2011-03-31 - 12:55 UnknownUser  
C source code filec TopChi2Fitter.C r2 r1 manage 10.3 K 2011-04-15 - 16:18 UnknownUser  
Header fileh TopChi2Fitter.h r2 r1 manage 2.4 K 2011-04-15 - 16:18 UnknownUser  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2011-05-02 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main 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