Common Analysis Framework » QFRAMEWORK » TQHistoMakerAnalysisJob

class TQHistoMakerAnalysisJob: public TQAnalysisJob


 TQHistoMakerAnalysisJob:

 The TQHistoMakerAnalysisJob is the de-facto standard analaysis job for booking histograms.
 The booking can be done with expressions of the following type:

 A one-dimensional histogram is defined. The value "Mjj/1000" is
 filled into the histogram, and the label of the x-axis will be
 '\#it{m}_{jj} [GeV]'. Please note that the '#'-symbol is escaped by
 a backslash. If the backslash is omitted, the parser will interpret
 anything following the '#' as a comment and ignore it, resulting in
 a syntax error while parsing this histogram.

    TH1F('Mjj', '', 40, 0., 800.) << (Mjj/1000. : '\#it{m}_{jj} [GeV]');

 A one-dimensional histogram with variable binning is defined.

    TH1F('Mjj2', '', {0,200,600,800,1200,2000}) << (Mjj/1000. : '\#it{m}_{jj} [GeV]');

 A two-dimensional histogram is defined with labels for the x- and y-axis.

    TH2F('Mjj_DYjj', '', 40, 0., 800., 30, 0., 5.) << (Mjj/1000. : '\#it{m}_{jj} [GeV]', DYjj : '\#it{\#Delta Y}_{jj}');

 Two of the above histograms will be attached to the Cut named "Cut_2jetincl" and all descendant cuts.

    @Cut_2jetincl/*: Mjj_DYjj,Mjj2;

 Please note that the TQHistoMakerAnalysisJob will also understand
 definitions of TH[1/2/3][D/F/C/I] as well as TProfile and
 TProfile2D.

 Additional option for individual histograms can be specified as in the following example:

    TH1F('Mjj', '', 40, 0., 800.) << (Mjj/1000. : '\#it{m}_{jj} [GeV]') << (fillRaw=true, someOtherOption="someSetting");

 The content between the last pair of parentheses is read as a list
 of tags (see TQTaggable::importTags). Supported options are then
 applied to all booking instances (i.e. for all different cuts) of
 the particular histogram. Currently supported options include:

    fillRaw=true

 Ignore event weights when filling this histogram/profile:

    fillSynchronized=true

 Used for profiles and multidimensional histograms, i.e., everything
 but TH1x. When using vector type observables (observables with
 possibly more than one evaluation per event), by default, all
 combinations of values provided by the observables corresponding to
 the individual axes are filled. By specifying this option the
 behavior is changed such that only combinations of values are
 filled where their indices are equal. This then also enforces all
 non-scalar observables for the histogram/profile to have the same
 number of evaluations (same 'length' of the vector/list of values
 they represent). Scalar type observables are implicitly expanded to
 match the size of the vector observables as if it would return the
 same value for every index.

    weightExpression="myFancyWeight"

 Similar to a weight expression used in a cut but only applied to
 the particular histogram. If "myFancyWeight" corresponds to a
 vector type observable, its number of evaluations must be equal to
 the number of evaluations of the regular observables used for this
 histogram/profile. For multidimensional histograms and profiles the
 use of a vector valued weight is only supported in combination with
 fillSynchronized=true and enforces the weight observable to be of
 equal length as the regular (non-scalar) observables


Function Members (Methods)

public:
virtual~TQHistoMakerAnalysisJob()
voidTObject::AbstractMethod(const char* method) const
intTQAnalysisJob::addToCuts(TList* cuts, const TString& cutname = "*")
virtual voidTObject::AppendPad(Option_t* option = "")
boolbookHistogram(TString definition, TQTaggable* aliases = __null)
virtual voidTObject::Browse(TBrowser* b)
voidcancelHistogram(const TString& name)
ULong_tTObject::CheckedHash()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
static voidclearMessages()
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 boolexecute(double weight)
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)
boolTQAnalysisJob::finalize()
virtual boolfinalizeSampleFolder(TQSampleFolder* sf)
virtual boolfinalizeSelf()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TObjArray*getBranchNames()
virtual TQAnalysisJob*getClone()
TQCut*TQAnalysisJob::getCut()
virtual TStringTQAnalysisJob::getDescription()
virtual Option_t*TObject::GetDrawOption() const
static Longptr_tTObject::GetDtorOnly()
static TStringgetErrorMessage()
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
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
static const TString&getValidNameCharacters()
intgetVerbose()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
Bool_tTObject::HasInconsistentHash() const
static intimportJobsFromTextFiles(const TString& files, TQCut* basecut, const TString& channelfilter = "*", bool verbose = false)
static intimportJobsFromTextFiles(const vector<TString>& filenames, TQCut* basecut, const TString& channelFilter = "*", bool verbose = false)
static intimportJobsFromTextFiles(const TString& files, TQCut* basecut, TQTaggable* aliases, const TString& channelfilter = "*", bool verbose = false)
static intimportJobsFromTextFiles(const vector<TString>& filenames, TQCut* basecut, TQTaggable* aliases, const TString& channelFilter = "*", bool verbose = false)
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
boolTQAnalysisJob::initialize(TQSample* sample)
virtual boolinitializeSampleFolder(TQSampleFolder* sf)
virtual boolinitializeSelf()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTObject::IsDestructed() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual boolisPooling() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::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)
TQHistoMakerAnalysisJob&operator=(const TQHistoMakerAnalysisJob&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidprint(const TString& options)
virtual voidTNamed::Print(Option_t* option = "") const
voidprintBooking(const TString& moretext)
voidprintBookingTeX(const TString& moretext)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidreset()
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)
voidTQAnalysisJob::setCut(TQCut* cut_)
static voidsetDefaultAuthor(const TString& name)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetVerbose(int verbose)
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
TQHistoMakerAnalysisJob()
TQHistoMakerAnalysisJob(TQHistoMakerAnalysisJob* other)
TQHistoMakerAnalysisJob(const TQHistoMakerAnalysisJob&)
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:
voidTQAnalysisJob::copyTransientMembersFrom(TQAnalysisJob* other)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
boolfinalizeHistograms()
voidinitializeHistograms()
voidTObject::MakeZombie()
voidsetErrorMessage(TString message)
private:
virtual Bool_tCheckTObjectHashConsistency() const

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::(anonymous)TObject::kInconsistent
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EDeprecatedStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
TQCut*TQAnalysisJob::fCut!
vector<vector<TString> >fExpressions
vector<bool>fFillRaw
vector<bool>fFillSynchronized
vector<int>fHistoTypes
vector<TH1*>fHistogramTemplates
vector<TH1*>fHistograms!
TStringTNamed::fNameobject identifier
vector<vector<TQObservable*> >fObservables!
TQSample*TQAnalysisJob::fSample!
TStringTNamed::fTitleobject title
vector<TString>fWeightExpressions
vector<TQObservable*>fWeightObservables!
static TQMessageStreamf_ErrMsg
intf_Verbose
static TStringgDefaultAuthor
static boolg_useHistogramObservableNames
static TObject::(anonymous)TObject::kOnlyPrepStep
TQSampleFolder*poolAt

Class Charts

Inheritance Chart:
TObject
TNamed
TQAnalysisJob
TQHistoMakerAnalysisJob

Function documentation

void setDefaultAuthor(const TString& name)
 change the default histogram author tag
TQHistoMakerAnalysisJob()
 standard constructor
TQHistoMakerAnalysisJob(TQHistoMakerAnalysisJob* other)
 copy constructor
void setVerbose(int verbose)
 set verbosity
int getVerbose()
 retrieve verbosity
void setErrorMessage(TString message)
void clearMessages()
 clear the error messages
TString getErrorMessage()
 Return the latest error message
const TString& getValidNameCharacters()
 retrieve a string with valid name characters
void cancelHistogram(const TString& name)
 cancel the histgogram with the given name
bool bookHistogram(TString definition, TQTaggable* aliases = __null)
void print(const TString& options)
 overloading the standard print-routine, internally calling printBooking[TeX], depending on options
void printBookingTeX(const TString& moretext)
 print booked histograms (LaTeX format)
void printBooking(const TString& moretext)
 print booked histograms
bool execute(double weight)
TObjArray * getBranchNames()
 retrieve the list of branch names used by this job
bool initializeSelf()
 initialize this analysis job
void initializeHistograms()
 create histograms from templates *
bool finalizeSelf()
 finalize TQObservables
bool finalizeHistograms()
 store the histograms in the sample folder hierarchy
bool initializeSampleFolder(TQSampleFolder* sf)
 initialize this job on a sample folder (taking care of pooling)
bool finalizeSampleFolder(TQSampleFolder* sf)
 finalize this job on a sample folder (taking care of pooling)
~TQHistoMakerAnalysisJob()
 destructor
TQAnalysisJob* getClone()
 retrieve a clone of this job
void reset()
 Reset this analysis job. This method is called after an analysis job was
 cloned.
int importJobsFromTextFiles(const TString& files, TQCut* basecut, const TString& channelfilter = "*", bool verbose = false)
 open a list of files (comma-separated), parse all histogram definitions inside
 for each assigment encountered matching the channelfilter (or with no channel),
 create a histogram job, fill it with all appropriate histograms and add it to the basecut
int importJobsFromTextFiles(const TString& files, TQCut* basecut, TQTaggable* aliases, const TString& channelfilter = "*", bool verbose = false)
 open a list of files (comma-separated), parse all histogram definitions inside
 for each assigment encountered matching the channelfilter (or with no channel),
 create a histogram job, fill it with all appropriate histograms and add it to the basecut
int importJobsFromTextFiles(const vector<TString>& filenames, TQCut* basecut, const TString& channelFilter = "*", bool verbose = false)
 open a list of files (std::vector), parse all histogram definitions inside
 for each assigment encountered matching the channelfilter (or with no channel),
 create a histogram job, fill it with all appropriate histograms and add it to the basecut
int importJobsFromTextFiles(const vector<TString>& filenames, TQCut* basecut, TQTaggable* aliases, const TString& channelFilter = "*", bool verbose = false)
 open a list of files (std::vector), parse all histogram definitions inside
 for each assigment encountered matching the channelfilter (or with no channel),
 create a histogram job, fill it with all appropriate histograms and add it to the basecut
bool isPooling() const
 return true if pooling, false otherwise
TQHistoMakerAnalysisJob()