A++ » INC » AtlBDecayGenTool

class AtlBDecayGenTool: public AtlAnalysisTool


 A++ tool for generating semileptonic B-meson decays for fake lepton
 studies

 The tool runs in 'pre-analysis' mode (see AtlAnalysisTool and
 AtlSelector for details), ie. after object defintion/selection
 and event scaling

 !!! IMPORTANT !!! The tool has to be run _after_ the object
 selection&definition tool, because otherwise the required b-jets
 are not yet defined.

 The tool is only active for the given list of valid DSIDs.

 Example:

    // B-meson decay generation tool
    AtlBDecayGenTool *tool_bdecay = new AtlBDecayGenTool("BDecayGenTool", "B-meson decay generation");
    main->AddTool(tool_bdecay);
    main->SetToolParameter("BDecayGenTool", "fValidDSIDs", "\"361106,361107,361108\"");

 Leptons are generated only if at least one b-jet is present in the
 event which can serve as parent jet. If more than one b-jet exists,
 the parent jet can be picked in several ways, see the data member
 fBJetMode (default=random).

 For a better modelling an overlap removal of the parent jet can be
 performed (see public data member fDoOverlapRemoval, default=true).
 If the DeltaR between the generated lepton and its parent jet is
 smaller than the value given in fORdeltaR_max (default=0.4), the
 parent jet will be removed.

 !!! IMPORTANT !!! In case of the overlap removal the jet is removed
 only from the jet and b-jet lists of the object definition tool.
 These are the very same lists used by this tool and the analysis
 selector. However, the jet is _not_ removed from the corresponding
 TClonesArray of the A++ event record, nor is the number of jet
 variable of the A++ event changed.

 Author:  <mailto: kind@mail.desy.de>
 Update: $Id: AtlBDecayGenTool.cxx,v 1.12 2017/07/27 13:48:22 mergelm Exp $
 Copyright: 2017 (C)

Function Members (Methods)

public:
virtual~AtlBDecayGenTool()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
AtlBDecayGenTool(const AtlBDecayGenTool&)
AtlBDecayGenTool(const char* name, const char* title)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidAtlAnalysisTool::Clear()
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 voidAtlAnalysisTool::FillHistogramsNoEvtSel()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const char*GetBJetModeName(AtlBDecayGenTool::EBJetMode BJetMode) 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*AtlAnalysisTool::GetOutputDir() const
Float_tAtlAnalysisTool::GetPreTagEvtWeight() const
static const char*AtlAnalysisTool::GetProcessModeName(AtlAnalysisTool::EProcessMode mode)
Float_tAtlAnalysisTool::GetTagEvtWeight() const
virtual const char*TNamed::GetTitle() const
AtlAnalysisTool*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 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_tAtlAnalysisTool::IsIndividual() const
Bool_tAtlAnalysisTool::IsMainAnalysis() const
Bool_tAtlAnalysisTool::IsObjectsDefinition() const
Bool_tAtlAnalysisTool::IsOff() const
Bool_tTObject::IsOnHeap() const
Bool_tAtlAnalysisTool::IsPostAnalysis() const
Bool_tAtlAnalysisTool::IsPreAnalysis() const
Bool_tAtlAnalysisTool::IsScaleFactor() const
virtual Bool_tTNamed::IsSortable() const
Bool_tAtlAnalysisTool::IsSystematics() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tAtlAnalysisTool::Notify()
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)
AtlBDecayGenTool&operator=(const AtlBDecayGenTool&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
Bool_tAtlAnalysisTool::Process()
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 voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidAtlAnalysisTool::SetEvent(AtlEvent* evt)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidAtlAnalysisTool::SetOutputDir(const char* dir)
voidAtlAnalysisTool::SetOutputFile(TFile* f)
voidAtlAnalysisTool::SetParent(AtlSelector* parent)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidAtlAnalysisTool::SetTree(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
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 Bool_tAnalyzeEvent()
virtual voidBookHistograms()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidFillHistograms()
virtual voidInit()
voidTObject::MakeZombie()
virtual voidPrint() const
virtual voidSetBranchStatus()
virtual voidSetCutDefaults()
virtual voidTerminate()

Data Members

public:
AtlBDecayGenTool::EBJetModefBJetModeDefine how to pick the parent b-jet in case of more than one b-jets (default=random)
Bool_tfDoOverlapRemovalPerform overlap removal of accompanying b-jet (default=true)
Float_tfORdeltaR_maxMaximum deltaR used for the overlap removal (default=0.4)
TStringAtlAnalysisTool::fOutputDirDirectory in root output file, where histogram dir is created
AtlAnalysisTool::EProcessModeAtlAnalysisTool::fProcessModeDefines when exactly the tool is run (see AtlAnalysisTool class description for details)
Bool_tfRequireOverlapRemovalReject event if overlap removal fails
const char*fValidDSIDsComma separated list of valid DSID numbers for which the tool will be enabled; for all other samples the won't run
Int_tAtlAnalysisTool::fVerbosityLevelIndicates the degree of verbosity of tool (0 = no info/debug output, 1 = info, 2 = info+debug)
static const Int_tfgNDSIDsMax
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static AtlBDecayGenTool::EBJetModekHalfRandom
static TObject::EStatusBitsTObject::kHasUUID
static AtlBDecayGenTool::EBJetModekHighPt
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kIndividual
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static AtlBDecayGenTool::EBJetModekLowPt
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kMainAnalysis
static TObject::EStatusBitsTObject::kMustCleanup
static AtlBDecayGenTool::EBJetModekNBJetModes
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kObjectsDefinition
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kOff
static TObject::(anonymous)TObject::kOverwrite
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kPostAnalysis
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kPreAnalysis
static AtlBDecayGenTool::EBJetModekRandom
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kScaleFactor
static TObject::(anonymous)TObject::kSingleKey
static AtlAnalysisTool::EProcessModeAtlAnalysisTool::kSystematics
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
AtlEvent*AtlAnalysisTool::fEventPointer to current event
TStringTNamed::fNameobject identifier
TString*AtlAnalysisTool::fOptionOption string
TFile*AtlAnalysisTool::fOutputFileOutput file
AtlSelector*AtlAnalysisTool::fParentPointer to parent selector
TStringTNamed::fTitleobject title
TTree*AtlAnalysisTool::fTreeEvent tree
private:
TList*fBJetsList of b-jets
UInt_tfDSID[256]Array of valid DSID numbers
TList*fElectronsList of electrons
Bool_tfFirstEvtFirst event ?
TH1F*fHistAlphaLabHistogram of alpha, lab frame
TH1F*fHistAlphaLocHistogram of alpha, local
TH1F*fHistDeltaRHistogram of deltaR between the generated lepton and its parent jet
TH1F*fHistEtaLabHistogram of eta, lab frame
TH2D*fHistGenHistogram for decay angle / energy generation
TH1F*fHistPhiLabHistogram of phi, lab frame
TH1F*fHistPhiLocHistogram of phi, local
TH1F*fHistPmagLabHistogram of P magnitude, lab frame
TH1F*fHistPmagLocHistogram of P magnitude, local
TH1F*fHistPtLabHistogram of Pt, lab frame
TH1F*fHistPtLocHistogram of Pt, local
TH1F*fHistPzLabHistogram of Pz, lab frame
TH1F*fHistPzLocHistogram of Pz, local
TList*fJetsList of jets
TList*fLeptonsList of leptons
TList*fMuonsList of muons
Int_tfNDSIDsNumber of given valid DSIDs
TRandom*fRandomRandom generator

Class Charts

Inheritance Chart:
TObject
TNamed
AtlAnalysisTool
AtlBDecayGenTool

Function documentation

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

~AtlBDecayGenTool()
 Default destructor

void Init()
 Get b-jet list from object definition tool

void SetBranchStatus()
 Switch on needed branches

void SetCutDefaults()
 Selection cut defaults

const char* GetBJetModeName(AtlBDecayGenTool::EBJetMode BJetMode) const
 Get name of current b-jet pick mode

void BookHistograms()
 Book histograms

Bool_t AnalyzeEvent()
 Invocation of tool

void Print() const
 Print tool configuration

void Terminate()
 Executed at the end of the tool

    AtlAnalysisTool::Terminate();
void SetDSIDArray()
 Setup DSID array from DSID string

Bool_t AddLeptons()
 Generate a lepton from a semileptonic B-meson decay for the
 leading b-jet and add it to the A++ event record as well as to
 the lepton lists of the analysis selector

HepParticle* GenerateBDecay(TLorentzVector p_mother, HepParticle* lep)
 Generate lepton from B-meson decay

 If the lepton pointer is 0, a new lepton will be added to
 the current event - otherwise the given lepton momentum vector
 will be changed. The lepton pointer is returned.

void CreateHistGen()
 Create histogram for decay angle / energy generation

AtlBDecayGenTool(const char* name, const char* title)
void FillHistograms()
{;}