CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
XtoFFbarFilter.h
Go to the documentation of this file.
1 #ifndef XtoFFbarFilter_h
2 #define XtoFFbarFilter_h
3 
16 // system include files
17 #include <memory>
18 
19 // user include files
28 #include <vector>
29 
30 class XtoFFbarFilter : public edm::EDFilter {
31 public:
34 
35  virtual bool filter(edm::Event& iEvent, const edm::EventSetup& iSetup);
36 
37 private:
38 
39  // Check if given integer is present in vector.
40  bool found(const std::vector<int>& v, int j) {
41  return std::find(v.begin(), v.end(), j) != v.end();
42  }
43 
44  // Check if given particle is X-->f fbar
45  bool foundXtoFFbar(const reco::GenParticleRef& moth,
46  const std::vector<int>& idMotherX,
47  const std::vector<int>& idDaughterF);
48 
49  virtual void endJob();
50 
51 private:
52 
54  std::vector<int> idMotherX_;
55  std::vector<int> idDaughterF_;
56  std::vector<int> idMotherY_;
57  std::vector<int> idDaughterG_;
58  bool requireY_;
59 
61 
62  // For statistics only
63  unsigned int xTotal_;
64  double xSumPt_;
65  double xSumR_;
66  double xSumCtau_;
67  unsigned int totalEvents_;
68  unsigned int rejectedEvents_;
69 };
70 
71 #endif
bool found(const std::vector< int > &v, int j)
XtoFFbarFilter(const edm::ParameterSet &)
virtual void endJob()
edm::InputTag src_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
unsigned int rejectedEvents_
std::vector< int > idMotherX_
int iEvent
Definition: GenABIO.cc:230
std::vector< int > idMotherY_
unsigned int totalEvents_
std::vector< int > idDaughterG_
edm::Handle< reco::GenParticleCollection > genParticles_
int j
Definition: DBlmapReader.cc:9
unsigned int xTotal_
std::vector< int > idDaughterF_
bool foundXtoFFbar(const reco::GenParticleRef &moth, const std::vector< int > &idMotherX, const std::vector< int > &idDaughterF)
virtual bool filter(edm::Event &iEvent, const edm::EventSetup &iSetup)