Helper Tool for the Analysis on Muon Trigger Ntuple

Setup

You may do something like this when you load the Muon Trigger Ntuple;
$ root -l
root[0] f1 = new TFile("your_trigntuple.root")
root[1] t1 = dynamic_cast<TTree*>( f1->Get("Muon/TrigMuon") )
root[2] t1->MakeClass("YourClassName")
There is a bit problem; it's technically difficult to load array of std::vector

In that case try to use /afs/cern.ch/user/k/kanno/public/CreateMacro.cc like this;

$ root -l
root[0] f1 = new TFile("your_trigntuple.root")
root[1] t1 = dynamic_cast<TTree*>( f1->Get("Muon/TrigMuon") )
root[2] .L /afs/cern.ch/user/k/kanno/public/CreateMacro.cc
root[3] CreateMacro(t1,"YourClassName")
This will create YourClassName.C and YourClassName.h (as same as in case of MakeClass()). Then rewrite your code as following.

Required Changes on Your Codes

  • Change the variables instance in your code

e.g. from muon->Mufast_MuFast_pt[imufast] to muon->Mufast_->At(imufast)->MuFast_pt,

i.e. from muon->BranchName_VariableName[Index] to muon->BranchName_->At(Index)->VariableName.

  • Do appropriate athena setting i.e. source cmthome/setup.sh -tag=(the package used for the production of trigger ntuple)

  • In case you are using root interpreter, add these lines in your sctript, I recommend you also to use a script /afs/cern.ch/user/k/kanno/public/gen_run.sh. This will help you to set include path and library link. Or if you are compiling your job, add libTrigMuonNtuple.so library to link. The codes of this library is found in athena package TrigMuonNtuple.

Attentions and Remarks

This tool require athena enviroment. This tool internally uses the classes ( Mufast_Info, Mucomb_Info, Muiso_Info etc. ) which is used to fill the ntuple.

-- TakayukiKanno - 26-May-2010

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2010-05-26 - TakayukiKanno
 
    • 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-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback