A++ » INC » AtlAnalysisTool

class AtlAnalysisTool: public TNamed


 Abstract base class for ATLAS analysis tools

 The purpose of this class is to provide analysis tools consisting
 of analysis code which might be useful in many analyses (eg a
 particle decay finder).

 A tool is added to an analysis selector by using
 AtlSelector::AddTool(). The selector can include more than one tool
 (it is even possible to run the same tool twice with different
 parameters). Tools are named classes and can be accessed via their
 names from the list of tools held by the AtlSelector class.

 A tool can be plugged at different positions into the analysis. The
 selector allows for two different user-defnied analysis routines,
 one for a crude event preselection (AtlSelector::ProcessPreCut()),
 and the other for the main analysis and event selection
 (AtlSelector::ProcessCut()). The tool can be placed either before
 both of them, in between or at the very end. A decay finder for
 instance, would be placed best in between the preselection and the
 main event selection. This would allow to run the finder only over
 those events which are of special interest, while not loosing any
 time to analsye the rest of them.
 Additionally there might be the need for tools that either change
 or correct kinematic variables, alter the event weight or fulfill
 other tasks.
 For this a series of insertion points are available. In order to
 see clearly where the tools are invoked, have a look at the Process()
 routine of the AtlSelector class.
 Two process modes have to be mentionend in particular:
 The mode kIndividual gives the user the possibility to invoke the
 tool at a point where the user desires it. The tool is invoked via
 tool->Process().
 The mode kOff switches a tool of by removing it from the list of
 registered tools. This makes it possible to keep code that handles
 the setup of tools while dynamically switching on and off the tool.


 The steering is done with the (public) datamember fProcessMode.

 Inter-tool communications can be performed easily in the following way:

   insidde tool A {

     ClassToolB *toolb = fParent->GetTool("ClassToolB");
     toolB->DoSomething();
   }


 Author: Oliver Maria Kind <mailto: kind@mail.desy.de>
 Update: $Id: AtlAnalysisTool.cxx,v 1.16 2016/01/29 21:12:20 kind Exp $
 Copyright: 2009 (C) Oliver Maria Kind

Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~AtlAnalysisTool()
voidTObject::AbstractMethod(const char* method) const
virtual Bool_tAnalyzeEvent()
virtual voidTObject::AppendPad(Option_t* option = "")
AtlAnalysisTool(const AtlAnalysisTool&)
AtlAnalysisTool(const char* name, const char* title)
virtual voidBookHistograms()
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear()
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual voidFillHistograms()
virtual voidFillHistogramsNoEvtSel()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const char*GetOutputDir() const
Float_tGetPreTagEvtWeight() const
static const char*GetProcessModeName(AtlAnalysisTool::EProcessMode mode)
Float_tGetTagEvtWeight() const
virtual const char*TNamed::GetTitle() const
AtlAnalysisTool*GetTool(const char* ClassName, const char* ToolName = "", Bool_t force = kFALSE) const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidInit()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsIndividual() const
Bool_tIsMainAnalysis() const
Bool_tIsObjectsDefinition() const
Bool_tIsOff() const
Bool_tTObject::IsOnHeap() const
Bool_tIsPostAnalysis() const
Bool_tIsPreAnalysis() const
Bool_tIsScaleFactor() const
virtual Bool_tTNamed::IsSortable() const
Bool_tIsSystematics() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tNotify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AtlAnalysisTool&operator=(const AtlAnalysisTool&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint() const
Bool_tProcess()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetBranchStatus()
virtual voidSetCutDefaults()
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEvent(AtlEvent* evt)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOutputDir(const char* dir)
voidSetOutputFile(TFile* f)
voidSetParent(AtlSelector* parent)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidSetTree(TTree* t)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual voidTerminate()
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
TStringfOutputDirDirectory in root output file, where histogram dir is created
AtlAnalysisTool::EProcessModefProcessModeDefines when exactly the tool is run (see AtlAnalysisTool class description for details)
Int_tfVerbosityLevelIndicates the degree of verbosity of tool (0 = no info/debug output, 1 = info, 2 = info+debug)
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static AtlAnalysisTool::EProcessModekIndividual
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static AtlAnalysisTool::EProcessModekMainAnalysis
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static AtlAnalysisTool::EProcessModekObjectsDefinition
static AtlAnalysisTool::EProcessModekOff
static TObject::(anonymous)TObject::kOverwrite
static AtlAnalysisTool::EProcessModekPostAnalysis
static AtlAnalysisTool::EProcessModekPreAnalysis
static AtlAnalysisTool::EProcessModekScaleFactor
static TObject::(anonymous)TObject::kSingleKey
static AtlAnalysisTool::EProcessModekSystematics
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
AtlEvent*fEventPointer to current event
TStringTNamed::fNameobject identifier
TString*fOptionOption string
TFile*fOutputFileOutput file
AtlSelector*fParentPointer to parent selector
TStringTNamed::fTitleobject title
TTree*fTreeEvent tree

Class Charts

Inheritance Chart:
TObject
TNamed
AtlAnalysisTool
AtlBDecayGenTool
AtlCtrlPlots
AtlCutFlowTool
AtlHistogramTool
AtlKinFitterTool
AtlConvFinder
AtlD0Finder
AtlDstarFinder
AtlK0StarFinder
AtlK0sFinder
 [more...]

Function documentation

AtlAnalysisTool(const char* name, const char* title)
 Default constructor

~AtlAnalysisTool()
 Default destructor

const char* GetProcessModeName(AtlAnalysisTool::EProcessMode mode)
 Get human-readable name of the process mode

Bool_t Process()
 Analyze current event

 The return value is only used for AtlObjectsDefinitionTools.

AtlAnalysisTool* GetTool(const char* ClassName, const char* ToolName = "", Bool_t force = kFALSE) const
 Find given (other) tool

void Init()
 User-defined init function which is executed in AtlSelector::SlaveBegin()
 just before Print()

void Print() const
 Print configuration of base class. Can be integrated into the
 print function of the derived class.

AtlAnalysisTool(const char* name, const char* title)
void SetBranchStatus()
void BookHistograms()
void FillHistograms()
void FillHistogramsNoEvtSel()
{;}
Bool_t AnalyzeEvent()
{ return kTRUE; }
void SetCutDefaults()
{;}
void Clear()
{;}
Bool_t Notify()
{ return kTRUE; }
void Terminate()
{;}
Float_t GetPreTagEvtWeight() const
{ return fEvent->GetPreTagEvtWeight(); }
Float_t GetTagEvtWeight() const
{ return fEvent->GetTagEvtWeight(); }
Bool_t IsObjectsDefinition() const
Bool_t IsScaleFactor() const
{ return fProcessMode == kScaleFactor; }
Bool_t IsPreAnalysis() const
{ return fProcessMode == kPreAnalysis; }
Bool_t IsMainAnalysis() const
Bool_t IsPostAnalysis() const
Bool_t IsSystematics() const
{ return fProcessMode == kSystematics; }
Bool_t IsIndividual() const
{ return fProcessMode == kIndividual; }
Bool_t IsOff() const
{ return fProcessMode == kOff; }
void SetParent(AtlSelector* parent)
{ fParent = parent; }
void SetEvent(AtlEvent* evt)
{ fEvent = evt; }
void SetTree(TTree* t)
{ fTree = t; }
void SetOutputFile(TFile* f)
{ fOutputFile = f; }
void SetOutputDir(const char* dir)
{ fOutputDir = dir; }
const char* GetOutputDir() const
{ return fOutputDir.Data(); }