Tags Description
TQEventIndexObservable.cxx
TQEventIndexObservable The TQEventIndexObservable allows to retrieve the index of the current TTree entry (please not that this is *not* the event/run number!). It needs to be instantiated by the user, typically via an Observable snippet. The name that is passed to its contructor is the expression that matches to this observable. Example: Observable Snippet (python): from QFramework import * from ROOT import * def addObservables(): obs = TQEventIndexObservable("treeindex") if not TQObservable.addObservable(obs): return False return True Expression (e.g. cut only accepting every second event): "[treeindex]%2 == 0"
TQFilterObservable.cxx
TQFilterObservable The TQFilterObservable can be used to filter the entrie(s) of a vector or scalar Observable. As the result of applying such a filter is in general of variying length (varying number of entries) the FilterObservable itself is a vector Observable (i.e. it cannot be used in cuts/event selection). The FilterObservable is automatically created and contains two subobservables. Its creation is triggered by expressions of the form 'Filter(subExpressionValue, subExpressionCondition)'. The 'subExpressionValue' corresponds to the Subobservable providing the values the FilterObservable possibly provides. It will, however, only provide these values of the first subobservable where the corresponding entry of the condition Subobservable evaluates to true (= non-zero). Hence, the length of the vector of values provided by the two Subobservables must be equal or the condition must be scalar (in which case either all on none of the values from the first Subobservable are forwarded). In this way the FilterObservalbe allows, for example, to fill histograms with the pT of all electrons in an event (values provided by first Subobservable) which pass certain criteria evaluated via the second Subobservable (within a certain eta range, passing certain ID criteria, ...)
TQHistogramObservable.cxx
TQHistogramObservable The TQHistogramObservable allows the mapping of values to other values based on an existing histogram (TH1, TH2, or TH3) stored in some ROOT file. It is automatically created whenn encountering expressions of the form 'TH1Map:myFile.root:myHist([observable1])' where TH1Map, TH2Map, or TH3Map are valid prefixes. Following the prefix and a collon the ROOT file containing the mapping histogram to be used and the name of the histogram within the ROOT file are expected, again separated by a collon. Inside the then following parentheses a comma separated list of expressions is expected. These expressions are mapped to Subobservables and correspond to the axes of the histogram (in order x, y, z). The TQHistogramObservable evaluates all Subobservables and finds the bin of the histogram that corresponds to these values. It then returns the value of that bin. An example usecase is given, for example, by some (initial) fake factor studies where events receive a weight based on the pT and eta of certain particle candidates in the event.
TQMVAObservable.cxx
TQMVAObservable The TQMVAObservable provides a way to evaluate TMVA classifiers. Similar to the TQMultiObservable it relies fully on its subObservables which it evaluates in order to forward their values to the (trained) MVA. It then provides the reponse of the MVA. It is automatically instantiated when encountering an expression either matching '*weights.xml*' or starting with 'MVA:'. In the latter case the 'MVA:' part is removed and in either case the remaining expression is interpreted as the path to the MVA weights file which is then passed to TMVA (after passing it through the TQPathManager, i.e., in CAFExample based analysis packages, paths can simply be provided relative to (typically) the 'share' directory just like non-absolute paths to configuration files. Additionally, this observable requires the weights xml file to be slightly modified compared to those produced by default by TMVA: the 'Label' attribute of each variable in the xml must contain the Observable expression corresponding to the variable. The subObservables of the TQMVAObservable are then automatically retrieved using these expressions.
TQMultiObservable.cxx
TQMultiObservable The TQMultiObservable allows for combination of the values provided by other (Sub)Observables in the form of any arithmetic expression that TFormula can handle. It is automatically created uppon encountering square brackets in an expression in between which any non-integer substring is contained. Please note that the TQMultiObservable does not provide any direct data access and fully relies on its Subobservables. Therefore, e.g., when combining a custom Observable with a TTreeFormula expression (e.g. a branch name), both parts need to be separatelly enclosed in square brackets. Examples: '[myCustomObs] * [leadingElectronPt]', '[myOtherCustomObs] * [EventEM[0].part(0).pt()]'
TQObservable.cxx
TQObservable The TQObservable is an abstract base class for all Observables, i.e., it cannot be instantiated. It does, however, provide most of the backend functionality related to Observables, including a registry that both manually and automatically created Observables are added to such that the same instance of an Observable is used when encountering the same expression multiple times.
TQSampleNormalizationObservable.cxx
TQSampleNormalizationObservable The TQSampleNormalizationObservable provides the sample-wide contribution to the event weight, that is the factor composed of cross-section, possible k-factors, luminosity, initial (generated) sumOfWeights, XSec scaling, ... The value provided by this Observable is therefore constant accross all events of one input file (ntuple/xAOD). Technically, the value provided is the one set on the currently processed instance of TQSample and retrieved via TQSample::getNormalisation(). The TQSampleNormalizationObservable is NOT autoamtically created but needs to be instantiated by the user (e.g. in an ObservableSnippet). The name given in the constructor defines the expression that is mapped to this Observable.
TQTreeFormulaObservable.cxx
TQTreeFormulaObservable The TQTreeFormulaObservable employs ROOT's TTreeFormula to extract information from the TTree (in case of xAODs: the transient tree). It is automatically created from any expression that neither matches any existing Observable nor causes any other Observable to be automatically created (instantiated). The expression from which it is instantiated is used as the expression forwarded to the internal TTreeFormula. An excetion to this is the case where the expression starts with 'VecBranch' followed by a TTreeFormula compatible expression enclosed in parentheses (). In this case the expression in between the parentheses is provided to the TTreeFormula but instead of only evaluating the first entry of the TTreeFormula the Observable will provide all possible evaluations (per event, the number of valid evaluations is determined based on TTreeFormula::GetNdata()). It therefore turns into a VectorObservable. Please note that this prohibits the direct use in situations that require a scalar value (e.g. cuts or (event) weight expressions)!
TQTreeObservable.cxx
TQTreeFormulaObservable The TQTreeObservable is a still abstract class derived from TQObservable which is intended to be used as a base class to (usually non-abstract) Observables which require access to the TTree.
TQVectorAuxObservable.cxx
TQVectorAuxObservable The TQVectorAuxObservable is a helper/wrapper Observable when dealing with VectorObservables (i.e. Observables with a variable number of evaluations per event). It is automatically created when encountering expressions of the form 'VecMODE(subExpression)' where MODE is one of the provided operation modes. The available modes and their operation on the values provided by the observable corresponding to the subExpressio nare: 'AND' (logical 'and' of the values, where 'true' is any non-zero value), 'OR' (logical 'or'), 'SUM' (sum of the values), 'SUMABS' (sum of the absolute values), 'AVG' (average of the values), 'AVGABS' (average of absolute values), 'LEN' (number of values/evaluations), 'MAX' (largest value), 'MIN' (sallest value), 'MAXABS'/'MINABS' (largest/smallest absolute value), 'NORM' (modolus of the vector, i.e., sqrt(sumOfSquares) ), 'PROD' (product over all values), 'NTRUE' (number of non-zero values), 'NFALSE' (number of values equal to zero), 'AT' (requires second, comma separated subExpression; provides the values at the index given by the second subExpression). Vector valued modes of operation: 'INDICES' (provides a vector of indices 0, 1, ... with range corresponding to another (vector valued) Observable specified by the argument).
TQCPConstituentVectorObservable.cxx
TQCPConstituentVectorObservable The TQCPConstituentVectorObservable is a VectorObservable providing the values from a selected method of a list of IParticles. The list of IParticles is obtained via a (possibly nested) CompositeParticle's "part" and/or "otherPart" method (by iterating over the valid arguments for these methods). Expressions for this Observable should read like 'CPCV(Event(cand)[0].part(1).otherPart(2).part(3).part().pt())' . The first segment specified the container to retrieve from the xAOD, the subsequent "part(i)" or "otherPart(i)" allow to go deeper in case of nested CompositeParticles. The last two segments specify the list of IParticles to finally consider and the method to call on them. For the second to last segment valid strings are "part()", "otherPart()", and "anyPart()" (the last one concatenating entries from part and otherPart in this order). The last segment specifies the method and can be in principle any simple IParticle method, although explicit support needs to be implemented. At this point the following methods are available: pt(), eta(), phi(), m(), e(), rapidity(), type() . A minimal example (without nested CompositePaticles) is: "CPCV(Event(cand)[0].part().pt())". To create a VectorObservable of, e.g., pTs from objects of only a particular type (e.g. jets), combine this Observable with the TQFilterObservable!
TQCPDecorationObservable.cxx
TQCPDecorationObservable The TQCPDecorationObservable can be used to read the value of decorations of xAOD::IParticle objects, possibly nested inside xAOD::CompositeParticle objects. It is automatically created when encountering expressions like 'CP?D:nameOfContainer[index]:nameOfDecoration'. The '?' needs to indicate the correct data type of the decoration to be read. Supported types are type/? = float/F, double/D, char/C, int/I, unsigned int/U, unsigned short/US, unsinged long long/ULL. Full examples: 'CPCD:Event(cand)[0]:PassLooseJetEventCleaning', 'CPUSD:Event(cand)[0].part(0):author'
TQCompositorObservable.cxx
TQCompositorObservable The TQCompositorObservable allows to dynamically build a TLorentzVector object from a list of individual xAOD::IParticle's kinematics and retrieve pt, eta, phi or m of the so constructed TLorentzVector. Syntax: 'CP(nameOfContainer[indexInContainer], nameOfOtherContainer[indexInOtherContainer], ...).pt()' (or .m(), .phi(), .eta())
TQContainerSizeObservable.cxx
TQContainerSizeObservable The TQContainerSizeObservable provides the size of a xAOD container. It is automatically created from expressions of the form 'SIZE:nameOfContainer'
TQEventObservable.cxx
TQEventObservable The TQEventObservable is a (still abstract) specialization of the abstract class TQObservable. It provides derived classes with an automated mechanism to access the Event.
TQIParticleDecorationObservable.cxx
TQIParticleDecorationObservable The TQIParticleDecorationObservable can be used to read the value of decorations of xAOD::IParticle objects, It is automatically created when encountering expressions like 'IP?D:nameOfContainer[index]:nameOfDecoration'. The '?' needs to indicate the correct data type of the decoration to be read. Supported types are type/? = float/F, double/D, char/C, int/I, unsigned int/U, unsigned short/US, unsinged long long/ULL. Full example: 'IPCD:Event$(cand)[0]:PassLooseJetEventCleaning' (note: this particular example is untested. The functionality of this observable is most likely fully covered by the TQCompositeParticleDecorationObservable as well)
TQIParticleDecorationVectorObservable.cxx
TQIParticleDecorationVectorObservable The TQIParticleDecorationVectorObservable can be used to read the value of decorations of all xAOD::IParticle objects in one container. It is therefore a VectorObservable with number of evaluations equal to the size of the container. It is automatically created when encountering expressions like 'IP?VD:nameOfContainer:nameOfDecorationOnIndividualObjects'. The '?' needs to indicate the correct data type of the decoration to be read. Supported types are type/? = float/F, double/D, char/C, int/I, unsigned int/U, unsigned short/US, unsinged long long/ULL. Full example: 'IPIVD:Electrons[0]:truthType'. If the index specified (in the example '0') is less than 1 the entire container is used, otherwise only elements of the container up to the specified index are considered.
TQIParticleFourVectorObservable.cxx
TQIParticleFourVectorObservable The TQIParticleFourVectorObservable allows to access basic four-vector components of xAOD::IParticle objects. It is automatically created when encountering expressions of the form 'P4:nameOfContainer[indexInContainer].pt()'. Available quantities are pt(), eta(), phi(), m(), e().
TQIParticleFourVectorVectorObservable.cxx
TQIParticleFourVectorVectorObservable The TQIParticleFourVectorVectorObservable allows to access basic four-vector components of all xAOD::IParticle instances in a container. It is automatically created when encountering expressions of the form 'P4V:nameOfContainer.pt()'. Available quantities are pt(), eta(), phi(), m(), e(). In contrast to the TQIParticleFourVectorObservable (only one 'Vector'!) this observable is a VectorObservable as it provides (possibly) more than one value per event, specifically one per IParticle in the specified container.
TQSGAuxElementDecorationObservable.cxx
TQSGAuxElementDecorationObservable The TQSGAuxElementDecorationObservable can be used to read the value of decorations of SG::AuxElement objects (such as the EventInfo object), It is automatically created when encountering expressions like 'SGAux?Dec:nameOfAuxElement:nameOfDecoration'. The '?' needs to indicate the correct data type of the decoration to be read. Supported types are type/? = float/F, double/D, char/C, int/I, unsigned int/U, unsigned short/US, unsinged long long/ULL. Full example: 'SGAuxIDec:EventInfo:HTXS_Stage0_Category'
TQSGAuxFlagCheckingObservable.cxx
TQSGAuxFlagCheckingObservable The TQSGAuxFlagCheckingObservable can be used to check the existence of decorations of SG::AuxElement objects (such as the EventInfo object),
TQToolObservable.cxx
TQToolObservable The TQToolObservable is a generic wrapper around DualUseUtils (tools which are designed to work in AnalysisBase and Athena environments). [TODO: add more meaningful documentation/explanation and usage here]
TQTruthParticleInfoObservable.cxx
TQTruthParticleInfoObservable The TQTruthParticleInfoObservable provides a way to access various information from TruthParticle instances. It is automatically created uppon encountering expressions of the form 'TRUTH:containerName[indexInContainer].infoToObtain()' where 'infoToObtain' can be one of the following: 'hasprodvtx', 'hasdecayvtx', 'nparents', 'nchildren', 'abspdgid', 'pdgid', 'status', 'charge'.