FairRoot/PandaRoot
PndEvtFilterOnInvMassCounts.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndEvtFilterOnInvMassCounts header file -----
3 // -------------------------------------------------------------------------
4 
5 
29 #ifndef PndEvtFilterOnInvMassCounts_H_
30 #define PndEvtFilterOnInvMassCounts_H_
31 
32 #include "PndEvtFilter.h"
33 #include "TMath.h"
34 #include <map>
35 #include <vector>
36 #include <iostream>
37 #include "RhoCandidate.h"
38 #include "RhoCandList.h"
40 #include "TLorentzVector.h"
42 
43 
45 {
46 
47 public:
48 
49  //Default constructor
51 
52  //Constructor with name and title
53  PndEvtFilterOnInvMassCounts(const char* name, const char* title="PndEvtFilterOnInvMassCounts");
54 
55  // Destructor
57 
59  // User interfaces
61  // returns kTRUE if setting was added, otherwise returns kFALSE
62  Bool_t SetPdgCodesToCombine( Int_t pdgCode1, Int_t pdgCode2, Int_t pdgCode3=kInvalidPdgCode, Int_t pdgCode4=kInvalidPdgCode, Int_t pdgCode5=kInvalidPdgCode );
63 
65  Bool_t SetRhoMassParticleSelector( const char* name, Double_t cv, Double_t w, const char* type ); // same arguments as constructor of RhoMassParticleSelector
66 
67  Bool_t SetMinMaxCounts( Int_t min, Int_t max );
68  Bool_t SetMinCounts( Int_t min ){ return SetMinMaxCounts(min, 9999); };
69  Bool_t SetMaxCounts( Int_t max ){ return SetMinMaxCounts(0, max); };
70 
71 
72 
73 
74  // checks if the particles in the event (fParticleList) suit the filter settings
75  // kTRUE if event matches, kFALSE otherwise
76  Bool_t EventMatches(Int_t evtNr);
77 
78 
79  // returns kTRUE if any filter is turned on
81 
82 
83 private:
84  // minimum and maximum acceptable multiplicities for the particle combinations
85  std::pair<Int_t,Int_t> fCountsMinMax;
86  // inv. mass selector which implements the minimum and maximum acceptable invariant mass range for the particle combinations
88  // vector containing the pdg codes which should be combined along with its corresponding charges
89  std::vector< std::pair< Int_t, Double_t > > fPdgCodesCharges;
90 
91 
92 
93  Bool_t fInvMassRangeSet; // is kTRUE if invariant mass is set
94  Bool_t fPgdCodesSet; // is kTRUE if pdg codes are set
95  Bool_t fCountRangeSet; // is kTRUE if min and max counts are set
96 
97 
98  // constant holding an integer number which is not used as a pdg code
99  // this serves as a place holder when constructing a vector from integers given by the user
100  static const Int_t kInvalidPdgCode = 0;
101 
103 
104 };
105 
106 
107 #endif /* PndEvtFilterOnInvMassCounts_H_ */
Bool_t SetMinMaxCounts(Int_t min, Int_t max)
ClassDef(PndEvtFilterOnInvMassCounts, 1)
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:26
Bool_t SetMinMaxInvMass(Double_t min, Double_t max)
Double_t
RhoMassParticleSelector * fInvMassSel
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
TString name
std::pair< Int_t, Int_t > fCountsMinMax
Bool_t SetPdgCodesToCombine(Int_t pdgCode1, Int_t pdgCode2, Int_t pdgCode3=kInvalidPdgCode, Int_t pdgCode4=kInvalidPdgCode, Int_t pdgCode5=kInvalidPdgCode)
Bool_t SetRhoMassParticleSelector(const char *name, Double_t cv, Double_t w, const char *type)
std::vector< std::pair< Int_t, Double_t > > fPdgCodesCharges