hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
Loading...
Searching...
No Matches
TreeCutSelector Class Reference

#include <TreeCutSelector.h>

Inheritance diagram for TreeCutSelector:
BaseSelector

Public Member Functions

 TreeCutSelector ()
 TreeCutSelector (const std::string &inputName)
 TreeCutSelector (const std::string &inputName, const std::string &cfgFile)
virtual ~TreeCutSelector ()
bool LoadSelection ()
std::string getCutString (std::string cutname, bool forTree=false)
std::string getFullCutString (std::vector< std::string > cuts_to_exclude={}, bool forTree=false)
std::string getCutVar (std::string cutname, bool forTree=false)
void makeCutFlowHisto ()
 description
std::map< std::string, std::pair< std::pair< double, double >, int > > * getPointerToCuts ()
 get pointer to the base class cuts
std::pair< double, double > getCutRange (std::string cutname)
void printCuts ()
void setCutValue (std::string cutname, std::pair< double, double > value)
bool hasCut (const std::string &cutname)
void filterCuts (std::vector< std::string > cut_variable_list)
Public Member Functions inherited from BaseSelector
 BaseSelector ()
 BaseSelector (const std::string &inputName)
 BaseSelector (const std::string &inputName, const std::string &cfgFile)
virtual ~BaseSelector ()
void setCfgFile (const std::string &cfgFile)
 Set the Cfg File object.
void setDebug (bool val)
 Set Debug.
bool hasCut (const std::string &cutname)
 description
bool LoadSelection ()
 description
float getCut (const std::string &cutname)
 Get cut values ?
std::map< std::string, std::pair< double, int > > getCuts ()
 description
void makeCutFlowHisto ()
 description
std::shared_ptr< TH1F > getCutFlowHisto ()
 Get the Cut Flow Histo.
bool passCut (const std::string &cutname, double val, double weight)
 description
bool passCutEq (const std::string &cutname, double val, double weight)
 description
bool passCutLt (const std::string &cutname, double val, double weight)
 description
bool passCutGt (const std::string &cutname, double val, double weight)
 description
void clearSelector ()
 description

Protected Types

typedef std::map< std::string, std::pair< std::pair< double, double >, int > >::iterator range_cut_it
 description
Protected Types inherited from BaseSelector
typedef std::map< std::string, std::pair< double, int > >::iterator cut_it
 description

Protected Attributes

std::map< std::string, std::pair< std::pair< double, double >, int > > range_cuts
Protected Attributes inherited from BaseSelector
std::map< std::string, std::pair< double, int > > cuts
 description
bool debug_ {false}
 description

Private Attributes

json _h_selections
 description
std::string m_name {""}
 description
std::string m_cfgFile {""}
 description
std::map< std::string, std::string > labels
 description
int ncuts_ {0}
 description
std::shared_ptr< TH1F > h_cf_
 description

Detailed Description

Definition at line 10 of file TreeCutSelector.h.

Member Typedef Documentation

◆ range_cut_it

typedef std::map<std::string,std::pair<std::pair<double,double>,int>>::iterator range_cut_it
protected

description

Definition at line 65 of file TreeCutSelector.h.

Constructor & Destructor Documentation

◆ TreeCutSelector() [1/3]

Definition at line 3 of file TreeCutSelector.cxx.

◆ TreeCutSelector() [2/3]

TreeCutSelector ( const std::string & inputName)

Definition at line 5 of file TreeCutSelector.cxx.

◆ TreeCutSelector() [3/3]

TreeCutSelector ( const std::string & inputName,
const std::string & cfgFile )

Definition at line 11 of file TreeCutSelector.cxx.

◆ ~TreeCutSelector()

~TreeCutSelector ( )
virtual

Definition at line 17 of file TreeCutSelector.cxx.

Member Function Documentation

◆ filterCuts()

void filterCuts ( std::vector< std::string > cut_variable_list)

Definition at line 126 of file TreeCutSelector.cxx.

◆ getCutRange()

std::pair< double, double > getCutRange ( std::string cutname)
inline

Definition at line 35 of file TreeCutSelector.h.

◆ getCutString()

std::string getCutString ( std::string cutname,
bool forTree = false )

Definition at line 72 of file TreeCutSelector.cxx.

◆ getCutVar()

std::string getCutVar ( std::string cutname,
bool forTree = false )

Definition at line 62 of file TreeCutSelector.cxx.

◆ getFullCutString()

std::string getFullCutString ( std::vector< std::string > cuts_to_exclude = {},
bool forTree = false )

Definition at line 100 of file TreeCutSelector.cxx.

◆ getPointerToCuts()

std::map< std::string, std::pair< std::pair< double, double >, int > > * getPointerToCuts ( )
inline

get pointer to the base class cuts

Definition at line 33 of file TreeCutSelector.h.

◆ hasCut()

bool hasCut ( const std::string & cutname)
inline

Definition at line 55 of file TreeCutSelector.h.

◆ LoadSelection()

bool LoadSelection ( )

Definition at line 19 of file TreeCutSelector.cxx.

◆ makeCutFlowHisto()

void makeCutFlowHisto ( )

description

Definition at line 50 of file TreeCutSelector.cxx.

◆ printCuts()

void printCuts ( )
inline

Definition at line 43 of file TreeCutSelector.h.

◆ setCutValue()

void setCutValue ( std::string cutname,
std::pair< double, double > value )
inline

Definition at line 50 of file TreeCutSelector.h.

Member Data Documentation

◆ _h_selections

json _h_selections
private

description

Definition at line 69 of file TreeCutSelector.h.

◆ h_cf_

std::shared_ptr<TH1F> h_cf_
private

description

Definition at line 74 of file TreeCutSelector.h.

◆ labels

std::map<std::string, std::string> labels
private

description

Definition at line 72 of file TreeCutSelector.h.

◆ m_cfgFile

std::string m_cfgFile {""}
private

description

Definition at line 71 of file TreeCutSelector.h.

◆ m_name

std::string m_name {""}
private

description

Definition at line 70 of file TreeCutSelector.h.

◆ ncuts_

int ncuts_ {0}
private

description

Definition at line 73 of file TreeCutSelector.h.

◆ range_cuts

std::map<std::string, std::pair<std::pair<double, double>, int> > range_cuts
protected

Definition at line 66 of file TreeCutSelector.h.


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