CbmRoot
CbmStackFilter.h
Go to the documentation of this file.
1 #
7 #ifndef CBMSTACKFILTER_H
8 #define CBMSTACKFILTER_H 1
9 
10 #include "CbmDefs.h"
11 #include "Rtypes.h"
12 #include <map>
13 #include <vector>
14 
15 class TClonesArray;
16 class TParticle;
17 
18 
62 
63 public:
69  typedef std::map<std::pair<Int_t, ECbmModuleId>, Int_t> PointMap;
70 
71 
74 
75 
77  virtual ~CbmStackFilter();
78 
79 
92  virtual const std::vector<Bool_t>& Select(const TClonesArray& particles,
93  const PointMap& points);
94 
95 
104  void SetMinEkin(Double_t minimum) { fMinEkin = minimum; }
105 
106 
126  void SetMinNofPoints(ECbmModuleId detector, UInt_t minimum) {
127  if (detector >= ECbmModuleId::kNofSystems) return;
128  fMinNofPoints[detector] = minimum;
129  }
130 
131 
141  void SetStoreAllMothers(Bool_t choice) { fStoreAllMothers = choice; }
142 
143 
152  void SetStoreAllPrimaries(Bool_t choice) { fStoreAllPrimaries = choice; }
153 
154 
164  void SetStoreAllPrimaryDecays(Bool_t choice = kTRUE) {
165  fStoreAllDecays = choice;
166  }
167 
168 
169 private:
173  std::map<ECbmModuleId, UInt_t>
175  Double_t fMinEkin;
176  std::vector<Bool_t> fStore;
177 
179 };
180 
181 #endif /* CBMSTACKFILTER_H */
CbmStackFilter
Class for filtering the stack before writing.
Definition: CbmStackFilter.h:61
CbmStackFilter::SetMinNofPoints
void SetMinNofPoints(ECbmModuleId detector, UInt_t minimum)
Set the minimum number of MCPoints for a given detector.
Definition: CbmStackFilter.h:126
CbmStackFilter::~CbmStackFilter
virtual ~CbmStackFilter()
Destructor.
Definition: CbmStackFilter.cxx:42
CbmStackFilter::SetStoreAllMothers
void SetStoreAllMothers(Bool_t choice)
Set the storage of all mothers of selected tracks.
Definition: CbmStackFilter.h:141
CbmStackFilter::ClassDef
ClassDef(CbmStackFilter, 2)
CbmStackFilter::CbmStackFilter
CbmStackFilter()
Constructor.
Definition: CbmStackFilter.cxx:23
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmStackFilter::fStore
std::vector< Bool_t > fStore
Vector with storage decision.
Definition: CbmStackFilter.h:176
CbmStackFilter::SetStoreAllPrimaries
void SetStoreAllPrimaries(Bool_t choice)
Set the storage of primary tracks.
Definition: CbmStackFilter.h:152
CbmStackFilter::fStoreAllDecays
Bool_t fStoreAllDecays
Flag for storage of all primary decay daughters.
Definition: CbmStackFilter.h:172
CbmStackFilter::fMinNofPoints
std::map< ECbmModuleId, UInt_t > fMinNofPoints
Cut values for the number of points.
Definition: CbmStackFilter.h:174
ECbmModuleId::kNofSystems
@ kNofSystems
For loops over active systems.
CbmStackFilter::Select
virtual const std::vector< Bool_t > & Select(const TClonesArray &particles, const PointMap &points)
Check the stack particles for fulfilling the storage criteria.
Definition: CbmStackFilter.cxx:47
CbmStackFilter::fStoreAllPrimaries
Bool_t fStoreAllPrimaries
Flag for storage of primaries.
Definition: CbmStackFilter.h:170
CbmStackFilter::fStoreAllMothers
Bool_t fStoreAllMothers
Flag for storage of mothers.
Definition: CbmStackFilter.h:171
points
TClonesArray * points
Definition: Analyze_matching.h:18
CbmStackFilter::PointMap
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,...
Definition: CbmStackFilter.h:69
CbmStackFilter::SetStoreAllPrimaryDecays
void SetStoreAllPrimaryDecays(Bool_t choice=kTRUE)
Set the storage of all decay daughters of primaries.
Definition: CbmStackFilter.h:164
CbmStackFilter::fMinEkin
Double_t fMinEkin
Cut value for kinetic energy.
Definition: CbmStackFilter.h:175
CbmStackFilter::SetMinEkin
void SetMinEkin(Double_t minimum)
Set the minimum kinetic energy.
Definition: CbmStackFilter.h:104
CbmDefs.h