REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Protected Member Functions | Private Attributes
TRestCut Class Reference

Detailed Description

A class to help on cuts definitions. To be used with TRestAnalysisTree.

TRestCut is a Collection of TCut objects initialized from rml and stored with the output file, e.g:

<TRestCut> <cut name="cc1" value="XX>10 AND XX<90"> <cut name="cc2" value="sAna_ThresholdIntegral<100e3"> <cut name="cc3" variable="sAna_ThresholdIntegral" condition=">0"> </TRestCut>

Note that the notations " AND " and " OR " will be replaced by " && " and " || " When saved to ROOT file, this class will save together all its TCut objects Then we can easily draw from analysis tree with these cuts:

AnalysisTree->Draw("xxx",*cc1) AnalysisTree->Draw("xxx",*cc1 && *cc2 )


RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2021-dec: First concept. Ni Kaixiang

2023-March: Updating metadata structures JuanAn GarcĂ­a


Definition at line 31 of file TRestCut.h.

#include <TRestCut.h>

Inheritance diagram for TRestCut:
TRestMetadata

Public Member Functions

void AddCut (const TCut &cut)
 
void AddCut (TRestCut *cut)
 
 ClassDefOverride (TRestCut, 2)
 
TCut GetCut (std::string name)
 
auto GetCuts () const
 
auto GetCutStrings () const
 
auto GetParamCut () const
 
TRestCutoperator= (TRestCut &cut)
 
void PrintMetadata () override
 Implemented it in the derived metadata class to print out specific metadata information. More...
 
Int_t Write (const char *name, Int_t option, Int_t bufsize) override
 overwriting the write() method with fStore considered
 

Protected Member Functions

void InitFromConfigFile () override
 To make settings from rml file. This method must be implemented in the derived class.
 
void Initialize () override
 Making default settings.
 

Private Attributes

std::vector< TCut > fCuts
 Vector of TCuts.
 
std::vector< std::string > fCutStrings
 Vector of cut strings e.g. when you use a complex cut.
 
std::vector< std::pair< std::string, std::string > > fParamCut
 Vector of parameter cuts, first item is parameter and second is the condition.
 

Additional Inherited Members

Member Function Documentation

◆ PrintMetadata()

void TRestCut::PrintMetadata ( )
overridevirtual

Implemented it in the derived metadata class to print out specific metadata information.

Prints metadata content on screen. Usually overloaded by the derived metadata class.

Reimplemented from TRestMetadata.

Definition at line 157 of file TRestCut.cxx.


The documentation for this class was generated from the following files: