PandaRoot
PndEvtFilter.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndEvtFilter header file -----
15 // -------------------------------------------------------------------------
16 
30 #ifndef PndEvtFilter_H
31 #define PndEvtFilter_H
32 
33 #include "Rtypes.h" // for Bool_t, etc
34 #include "TClonesArray.h"
35 #include <iostream>
36 #include "TParticle.h"
37 #include "RhoCandidate.h"
38 #include "RhoCandList.h"
39 #include "TLorentzVector.h"
40 #include "FairEvtFilter.h"
41 
42 std::ostream &operator<<(std::ostream &os, const std::set<Int_t> &set);
43 
44 class PndEvtFilter : public FairEvtFilter {
45 
46  public:
48  PndEvtFilter();
49 
51  PndEvtFilter(const char *name, const char *title = "PndEvtFilter");
52 
54  virtual ~PndEvtFilter();
55 
56  // Initialize the filter if needed
57  Bool_t Init() { return kTRUE; }
58 
59  // useful for event filtering on invariant masses
60  // returns a list of particles
61  // which have the same charge as charge(inPdgCode)
62  // mass hypothesis is set to m(inPdgCode)
63  // for better performance pdgCodeCharge can optionally be specified
64  // It should be the same as the charge corresponding to inPdgCode
65  Bool_t FillList(RhoCandList &rhoOutList, Int_t inPdgCode, Double_t pdgCodeCharge = kNoChargeSpecified);
66 
67  // returning kTRUE indicates that the event satisfies the filter conditions,
68  // kFALSE otherwise.
69  virtual Bool_t EventMatches(Int_t evtNr) = 0;
70 
71  virtual Bool_t FilterActive() = 0;
72 
73  private:
74  PndEvtFilter(const PndEvtFilter &G);
75  PndEvtFilter &operator=(const PndEvtFilter &) { return *this; }
76 
77  ClassDef(PndEvtFilter, 1);
78 };
79 
80 #endif
Bool_t FillList(RhoCandList &rhoOutList, Int_t inPdgCode, Double_t pdgCodeCharge=kNoChargeSpecified)
virtual ~PndEvtFilter()
static const Double_t kNoChargeSpecified
Bool_t Init()
Definition: PndEvtFilter.h:57
basic_ostream< char, char_traits< char > > ostream
virtual Bool_t FilterActive()=0
virtual Bool_t EventMatches(Int_t evtNr)=0