|
CbmRoot
|
Manages a map of cuts associated with their IDs. More...
#include <CbmCutMap.h>
Public Member Functions | |
| CbmCutMap ()=default | |
| ~CbmCutMap ()=default | |
| std::unordered_map< CbmCutId, CbmCut< float > > | GetMap () const |
| Get the map of cuts. | |
| CbmCut< float > * | AddCbmCut (CbmCutId id) |
| Add a new cut to the map. | |
| bool | Check (CbmCutId id, double value) |
| Check if a value passes the cut with the given ID. | |
| bool | CheckStsHit (CbmStsHit *, TClonesArray *) |
| Check if a CbmStsHit passes the cuts. | |
| bool | CheckEvent (CbmEvent *evt) |
| Check if a CbmEvent passes the cuts. | |
| void | Print () |
| Print the cuts and failed pass counters. | |
Private Attributes | |
| std::unordered_map< CbmCutId, CbmCut< float > > | fCbmCuts |
| std::unordered_map< CbmCutId, unsigned long int > | fFailedCounter |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const CbmCutMap &obj) |
| Overloaded stream insertion operator for CbmCutMap. | |
Manages a map of cuts associated with their IDs.
Definition at line 19 of file CbmCutMap.h.
|
default |
Referenced by operator<<.
|
default |
Add a new cut to the map.
| id | The ID of the cut. |
Definition at line 7 of file CbmCutMap.cxx.
References fCbmCuts.
| bool CbmCutMap::Check | ( | CbmCutId | id, |
| double | value ) |
Check if a value passes the cut with the given ID.
| id | The ID of the cut to check. |
| value | The value to check against the cut. |
Definition at line 9 of file CbmCutMap.cxx.
References fCbmCuts, and fFailedCounter.
Referenced by CheckEvent(), and CheckStsHit().
| bool CbmCutMap::CheckEvent | ( | CbmEvent * | evt | ) |
Check if a CbmEvent passes the cuts.
| evt | Pointer to the CbmEvent to check. |
Definition at line 36 of file CbmCutMap.cxx.
References Check(), CbmEvent::GetNofData(), kEventNofGlobalTrack, kEventNofMuchPixelHit, kEventNofMuchStrawHit, kEventNofMvdHit, kEventNofRichHit, kEventNofRichRing, kEventNofStsHit, kEventNofTofHit, kEventNofTrdHit, kGlobalTrack, kMuchPixelHit, kMuchStrawHit, kMvdHit, kRichHit, kRichRing, kStsHit, kTofHit, and kTrdHit.
| bool CbmCutMap::CheckStsHit | ( | CbmStsHit * | hit, |
| TClonesArray * | clu_array = nullptr ) |
Check if a CbmStsHit passes the cuts.
| hit | Pointer to the CbmStsHit to check. |
| array | Pointer to the TClonesArray containing CbmStsCluster (for charge retrieving). |
Definition at line 20 of file CbmCutMap.cxx.
References Check(), cbm_sts_utils::GetHitCharge(), cbm_sts_utils::GetHitChargeAsy(), CbmHit::GetTime(), CbmPixelHit::GetX(), CbmPixelHit::GetY(), CbmHit::GetZ(), kStsHitCharge, kStsHitQasym, kStsHitTime, kStsHitX, kStsHitY, and kStsHitZ.
Get the map of cuts.
Definition at line 28 of file CbmCutMap.h.
References fCbmCuts.
Referenced by operator<<.
|
inline |
Print the cuts and failed pass counters.
Definition at line 77 of file CbmCutMap.h.
References fCbmCuts, and fFailedCounter.
|
friend |
Overloaded stream insertion operator for CbmCutMap.
| out | Output stream. |
| obj | CbmCutMap object to output. |
Definition at line 66 of file CbmCutMap.h.
References CbmCutMap(), GetMap(), and ToString().
Definition at line 85 of file CbmCutMap.h.
Referenced by AddCbmCut(), Check(), GetMap(), and Print().
|
private |
Definition at line 86 of file CbmCutMap.h.