NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcTaggingBase Class Reference

Base class for event tag processing. More...

#include "NcTaggingBase.h"

Inheritance diagram for NcTaggingBase:
NcDataStreamStats NcTaggingSelector NcTaggingStats

Detailed Description

Base class for event tag processing.


Copyright(c) 2022 NCFS/IIHE, All Rights Reserved. *
*
Authors: The Netherlands Center for Fundamental Studies (NCFS). *
The Inter-university Institute for High Energies (IIHE). *
Website : http://www.iihe.ac.be *
Contact : Nick van Eijndhoven (nickve.nl@gmail.com) *
*
Contributors are mentioned in the code where appropriate. *
*
No part of this software may be used, copied, modified or distributed *
by any means nor transmitted or translated into machine language for *
commercial purposes without written permission by the IIHE representative. *
Permission to use the software strictly for non-commercial purposes *
is hereby granted without fee, provided that the above copyright notice *
appears in all copies and that both the copyright notice and this *
permission notice appear in the supporting documentation. *
This software is provided "as is" without express or implied warranty. *
The authors make no claims that this software is free of error, or is *
consistent with any particular standard of merchantability, or that it *
will meet your requirements for any particular application, other than *
indicated in the corresponding documentation. *
This software should not be relied on for solving a problem whose *
incorrect solution could result in injury to a person or loss of property. *
If you do use this software in such a manner, it is at your own risk. *
The authors disclaim all liability for direct or consequential damage *
resulting from your use of this software. *

// Class NcTaggingBase
// TTask derived base class to facilitate processing of event classification tags.
//
// This base class is used by NcDataStreamStats, NcTaggingStats and NcTaggingSelector.
// Please refer to the documentation of these derived classes for further details.
//
//--- Author: Nick van Eijndhoven 20-dec-2022, IIHE-VUB, Brussel
//- Modified: Nick van Eijndhoven, IIHE-VUB, Brussel, December 22, 2022 01:28Z

Definition at line 19 of file NcTaggingBase.h.

Public Member Functions

 NcTaggingBase (const char *name="NcTaggingBase", const char *title="Base class for event tag processing")
 
 NcTaggingBase (const NcTaggingBase &q)
 
virtual ~NcTaggingBase ()
 
void ActivateTag (TString name)
 
void DeactivateTag (TString name)
 
void SetDevice (TString devname, Bool_t passcheck=kTRUE, Bool_t writecheck=kTRUE)
 
void SetDeviceNames (TString devname, TString passname, TString writename)
 
void SetMaxTag (Int_t n)
 

Protected Member Functions

void ListStatistics ()
 

Protected Attributes

TArrayI fAcombis
 
TObjArray * fAct
 
TArrayI fApass
 
TArrayI fAwrites
 
NcSignal fCombis
 
TObjArray * fDeact
 
TString fDevname
 
NcEventfEvt
 
NcEventfEvtFirst
 
NcEventfEvtLast
 
Bool_t fFirst
 
Int_t fMaxtag
 
TMatrixF fMcombis
 
TMatrixF fMpass
 
TMatrixF fMwrites
 
Int_t fNevt
 
Int_t fNevtComb
 
NcSignal fPass
 
TString fPassname
 
TString fWritename
 
NcSignal fWrites
 

Constructor & Destructor Documentation

◆ NcTaggingBase() [1/2]

NcTaggingBase::NcTaggingBase ( const char * name = "NcTaggingBase",
const char * title = "Base class for event tag processing" )
// Constructor and initialisation of default parameters.

Definition at line 53 of file NcTaggingBase.cxx.

◆ ~NcTaggingBase()

NcTaggingBase::~NcTaggingBase ( )
virtual
// Default destructor.

Definition at line 78 of file NcTaggingBase.cxx.

◆ NcTaggingBase() [2/2]

NcTaggingBase::NcTaggingBase ( const NcTaggingBase & q)
// Copy constructor.

Definition at line 113 of file NcTaggingBase.cxx.

Member Function Documentation

◆ ActivateTag()

void NcTaggingBase::ActivateTag ( TString name)
// In case the specified "name" matches (part of) a certain tag name, that
// specific tag will be used by NcTaggingSelector to mark candidate events
// for selection for further analysis.
// This memberfunction may be invoked several times to select various tags
// before executing the task.
// The logic to be used for the combination of the specified tags can be specified
// via the memberfunction NcTaggingSelector::SetLogic().
// All (for "AND" logic) or at least one (for "OR" logic) of the tags that have been
// specified here need(s) to have the corresponding tag criteria fulfilled
// (i.e. the "pass" indicator set to 1) to mark the event as a candidate for selection.
// Please refer to the docs of the class NcTaggingSelector for further details.
//
// For investigation of event tag statistics by NcDataStreamStats or NcTaggingStats,
// this will activate the corresponding tag for the combined pass*write statistics
// which will enable to study user selected event samples.
// It should be noted that this doesn't affect the results for the
// regular individual "pass" and "write" statistics.
//
// All characters in "name" are taken literally, so wildcards are not allowed.
//
// Example :
// ---------
// If name="LowPt" it would activate both tags "LowPtMuon" and "LowPtPion".
//
// Notes :
// -------
// 1) If this memberfunction is not invoked, all tags are regarded as active.
// 2) If this memberfunction is invoked, all tags that are not explicitly activated
// by the user will be considered de-activated for the combined pass*write statistics.
// 3) Tags that are explicitly de-activated by the user via invokation of DeactivateTag()
// can not be effectively activated anymore.

Definition at line 211 of file NcTaggingBase.cxx.

◆ DeactivateTag()

void NcTaggingBase::DeactivateTag ( TString name)
// In case the specified "name" matches (part of) a certain tag name, that
// specific tag will be used by NcTaggingSelector to mark candidate events
// for selection for further analysis.
// This memberfunction may be invoked several times to select various tags
// before executing the task.
// The logic to be used for the combination of the specified tags can be specified
// via the memberfunction NcTaggingSelector::SetLogic().
// All (for "AND" logic) or at least one (for "OR" logic) of the tags that have been
// specified here need(s) to have the corresponding tag criteria NOT fulfilled
// (i.e. the "pass" indicator set to 0) in order not to reject the candidate event.
// Please refer to the docs of the class NcTaggingSelector for further details.
//
// For investigation of event tag statistics by NcDataStreamStats or NcTaggingStats,
// this will de-activate the corresponding tag for the combined pass*write statistics
// which will enable to study background reduction.
// It should be noted that this doesn't affect the results for the
// regular individual "pass" and "write" statistics.
//
// All characters in "name" are taken literally, so wildcards are not allowed.
//
// Example :
// ---------
// If name="LowPt" it would de-activate both tags "LowPtMuon" and "LowPtPion".
//
// Notes :
// -------
// 1) This memberfunction may be invoked several times to de-activate
// various tags before executing the task.
// 2) Tags that are explicitly de-activated via this memberfunction
// can not be effectively activated anymore via invokation of ActivateTag().

Definition at line 259 of file NcTaggingBase.cxx.

◆ ListStatistics()

void NcTaggingBase::ListStatistics ( )
protected
// Provide the final statistics.

Definition at line 306 of file NcTaggingBase.cxx.

◆ SetDevice()

void NcTaggingBase::SetDevice ( TString devname,
Bool_t passcheck = kTRUE,
Bool_t writecheck = kTRUE )
// Set the name of an NcTagger (derived) device and the check modes of the tag
// passing and writing indicators.
//
// The pre-defined tag passing and writing indicators are :
// Pass : Indicates whether the tag criteria have been fulfilled (1) or not (0)
// Write : Indicates whether the event is actually labeled to be written (1) or not (0)
//
// In case passcheck=kFALSE and/or writecheck=kFALSE, no check will be made for the
// corresponding indicator setting and the tag criteria will be regarded as fulfilled.
//
// The default values are passcheck=kTRUE and writecheck=kTRUE.

Definition at line 185 of file NcTaggingBase.cxx.

◆ SetDeviceNames()

void NcTaggingBase::SetDeviceNames ( TString devname,
TString passname,
TString writename )
// Set the name of a generic NcDevice to be investigated and the corresponding names
// of the tag passing and writing indicators.
// Note that the device must have the specific data structure as outlined in the general
// documentation of the derived classes NcDataStreamStats, NcTaggingStats and NcTaggingSelector.
//
// It is common that a certain tag has the following two indicators
// pass : Indicates whether the tag criteria have been fulfilled (1) or not (0)
// write : Indicates whether the event is actually labeled to be written (1) or not (0)
//
// Instead of the names "pass" and "write", various other naming conventions
// (e.g. "condition" and "prescale") are often used.
// Via the input arguments "passname" and "writename" one can specify the names
// used by the current experiment.
//
// Notes :
// -------
// 1) This memberfunction allows the investigation of user defined tagging devices,
// to be backward compatible with old data files.
// For new(er) data, the use of NcTagger (derived) devices is recommended.
// 2) In case passname="*" and/or writename="*", no check will be made for the
// corresponding indicator setting and the tag criteria will be regarded as fulfilled.

Definition at line 152 of file NcTaggingBase.cxx.

◆ SetMaxTag()

void NcTaggingBase::SetMaxTag ( Int_t n)
// Set the maximum number of tags to be processed.
// The default constructor has set n=99.

Definition at line 140 of file NcTaggingBase.cxx.

Member Data Documentation

◆ fAcombis

TArrayI NcTaggingBase::fAcombis
protected

Definition at line 54 of file NcTaggingBase.h.

◆ fAct

TObjArray* NcTaggingBase::fAct
protected

Definition at line 37 of file NcTaggingBase.h.

◆ fApass

TArrayI NcTaggingBase::fApass
protected

Definition at line 48 of file NcTaggingBase.h.

◆ fAwrites

TArrayI NcTaggingBase::fAwrites
protected

Definition at line 51 of file NcTaggingBase.h.

◆ fCombis

NcSignal NcTaggingBase::fCombis
protected

Definition at line 53 of file NcTaggingBase.h.

◆ fDeact

TObjArray* NcTaggingBase::fDeact
protected

Definition at line 38 of file NcTaggingBase.h.

◆ fDevname

TString NcTaggingBase::fDevname
protected

Definition at line 34 of file NcTaggingBase.h.

◆ fEvt

NcEvent* NcTaggingBase::fEvt
protected

Definition at line 42 of file NcTaggingBase.h.

◆ fEvtFirst

NcEvent* NcTaggingBase::fEvtFirst
protected

Definition at line 43 of file NcTaggingBase.h.

◆ fEvtLast

NcEvent* NcTaggingBase::fEvtLast
protected

Definition at line 44 of file NcTaggingBase.h.

◆ fFirst

Bool_t NcTaggingBase::fFirst
protected

Definition at line 39 of file NcTaggingBase.h.

◆ fMaxtag

Int_t NcTaggingBase::fMaxtag
protected

Definition at line 33 of file NcTaggingBase.h.

◆ fMcombis

TMatrixF NcTaggingBase::fMcombis
protected

Definition at line 55 of file NcTaggingBase.h.

◆ fMpass

TMatrixF NcTaggingBase::fMpass
protected

Definition at line 49 of file NcTaggingBase.h.

◆ fMwrites

TMatrixF NcTaggingBase::fMwrites
protected

Definition at line 52 of file NcTaggingBase.h.

◆ fNevt

Int_t NcTaggingBase::fNevt
protected

Definition at line 45 of file NcTaggingBase.h.

◆ fNevtComb

Int_t NcTaggingBase::fNevtComb
protected

Definition at line 46 of file NcTaggingBase.h.

◆ fPass

NcSignal NcTaggingBase::fPass
protected

Definition at line 47 of file NcTaggingBase.h.

◆ fPassname

TString NcTaggingBase::fPassname
protected

Definition at line 35 of file NcTaggingBase.h.

◆ fWritename

TString NcTaggingBase::fWritename
protected

Definition at line 36 of file NcTaggingBase.h.

◆ fWrites

NcSignal NcTaggingBase::fWrites
protected

Definition at line 50 of file NcTaggingBase.h.


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