CbmRoot
Loading...
Searching...
No Matches
CbmStackFilter.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
5#
11#ifndef CBMSTACKFILTER_H
12#define CBMSTACKFILTER_H 1
13
14#include "CbmDefs.h"
15
16#include "Rtypes.h"
17
18#include <map>
19#include <vector>
20
21class TClonesArray;
22class TParticle;
23
24
68
69public:
75 typedef std::map<std::pair<Int_t, ECbmModuleId>, Int_t> PointMap;
76
77
80
81
83 virtual ~CbmStackFilter();
84
85
98 virtual const std::vector<Bool_t>& Select(const TClonesArray& particles, const PointMap& points);
99
100
109 void SetMinEkin(Double_t minimum) { fMinEkin = minimum; }
110
111
131 void SetMinNofPoints(ECbmModuleId detector, UInt_t minimum)
132 {
133 if (detector >= ECbmModuleId::kNofSystems) return;
134 fMinNofPoints[detector] = minimum;
135 }
136
137
147 void SetStoreAllMothers(Bool_t choice) { fStoreAllMothers = choice; }
148
149
158 void SetStoreAllPrimaries(Bool_t choice) { fStoreAllPrimaries = choice; }
159
160
170 void SetStoreAllPrimaryDecays(Bool_t choice = kTRUE) { fStoreAllDecays = choice; }
171
172
173private:
177 std::map<ECbmModuleId, UInt_t> fMinNofPoints;
178 Double_t fMinEkin;
179 std::vector<Bool_t> fStore;
180
182};
183
184#endif /* CBMSTACKFILTER_H */
TClonesArray * points
ECbmModuleId
Definition CbmDefs.h:39
@ kNofSystems
For loops over active systems.
Class for filtering the stack before writing.
void SetStoreAllPrimaryDecays(Bool_t choice=kTRUE)
Set the storage of all decay daughters of primaries.
void SetMinNofPoints(ECbmModuleId detector, UInt_t minimum)
Set the minimum number of MCPoints for a given detector.
Bool_t fStoreAllDecays
Flag for storage of all primary decay daughters.
CbmStackFilter()
Constructor.
Bool_t fStoreAllMothers
Flag for storage of mothers.
Double_t fMinEkin
Cut value for kinetic energy.
std::map< ECbmModuleId, UInt_t > fMinNofPoints
Cut values for the number of points.
ClassDef(CbmStackFilter, 2)
Bool_t fStoreAllPrimaries
Flag for storage of primaries.
virtual ~CbmStackFilter()
Destructor.
std::map< std::pair< Int_t, ECbmModuleId >, Int_t > PointMap
Map holding the number of points for each detector. The key is a pair of (track index,...
void SetStoreAllMothers(Bool_t choice)
Set the storage of all mothers of selected tracks.
std::vector< Bool_t > fStore
Vector with storage decision.
void SetStoreAllPrimaries(Bool_t choice)
Set the storage of primary tracks.
virtual const std::vector< Bool_t > & Select(const TClonesArray &particles, const PointMap &points)
Check the stack particles for fulfilling the storage criteria.
void SetMinEkin(Double_t minimum)
Set the minimum kinetic energy.