1 |
// -*- C++ -*-
|
2 |
#ifndef Cut_Flow
|
3 |
#define Cut_Flow
|
4 |
//
|
5 |
// Package: CutFlow
|
6 |
// Class: CutFlow
|
7 |
//
|
8 |
/**\class CutFlow CutFlow.h LJMet/Utils/interface/CutFlow.h
|
9 |
|
10 |
Description: times various aspects of data processing
|
11 |
|
12 |
Implementation:
|
13 |
Keep this class as simple and fast as possible
|
14 |
*/
|
15 |
//
|
16 |
// Original Author: "Gennadiy Kukartsev"
|
17 |
// Created: Tue Oct 6 13:39:12 CDT 2009
|
18 |
// $Id: CutFlow.h,v 1.3 2009/10/12 22:45:46 kukartse Exp $
|
19 |
//
|
20 |
//
|
21 |
|
22 |
|
23 |
#include <memory>
|
24 |
#include "FWCore/Framework/interface/Frameworkfwd.h"
|
25 |
#include "FWCore/Framework/interface/EDAnalyzer.h"
|
26 |
#include "FWCore/Framework/interface/Event.h"
|
27 |
#include "FWCore/Framework/interface/MakerMacros.h"
|
28 |
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
29 |
#include "LJMet/Utils/interface/MeanCounter.h"
|
30 |
|
31 |
|
32 |
class CutFlow : public edm::EDAnalyzer {
|
33 |
public:
|
34 |
explicit CutFlow(const edm::ParameterSet&);
|
35 |
~CutFlow();
|
36 |
|
37 |
|
38 |
private:
|
39 |
virtual void beginJob() ;
|
40 |
virtual void analyze(const edm::Event&, const edm::EventSetup&);
|
41 |
virtual void endJob() ;
|
42 |
MeanCounter * c_total;
|
43 |
MeanCounter * c_1;
|
44 |
MeanCounter * c_2;
|
45 |
MeanCounter * c_3;
|
46 |
MeanCounter * c_4;
|
47 |
MeanCounter * c_5;
|
48 |
|
49 |
int muon_index;
|
50 |
int electron_index;
|
51 |
|
52 |
bool is_trigger(std::string mLabel, const edm::Event& iEvent);
|
53 |
bool has_global_muon(std::string mLabel, const edm::Event& iEvent);
|
54 |
bool is_muon(std::string mLabel,
|
55 |
double mPt,
|
56 |
double mEta,
|
57 |
int mNHits,
|
58 |
double mD0,
|
59 |
double mChi2Ndof,
|
60 |
double mEmVeto,
|
61 |
double mHadVeto,
|
62 |
double mRelIso,
|
63 |
const edm::Event& iEvent);
|
64 |
bool is_jets(std::string mLabel,
|
65 |
double mPt,
|
66 |
double mEta,
|
67 |
const edm::Event& iEvent);
|
68 |
bool no_loose_muon(std::string mLabel,
|
69 |
double mEta,
|
70 |
double mPt,
|
71 |
double mRelIso,
|
72 |
const edm::Event& iEvent);
|
73 |
bool no_loose_electron(std::string mLabel,
|
74 |
double mEta,
|
75 |
double mPt,
|
76 |
double mRelIso,
|
77 |
const edm::Event& iEvent);
|
78 |
bool has_electron(std::string mLabel, const edm::Event& iEvent);
|
79 |
bool is_electron(std::string mLabel,
|
80 |
double mPt,
|
81 |
double mEta,
|
82 |
double mD0,
|
83 |
double mRelIso,
|
84 |
const edm::Event& iEvent);
|
85 |
int count_jets(std::string jLabel,
|
86 |
double jPt,
|
87 |
double jEta,
|
88 |
std::string lLabel,
|
89 |
double lPt,
|
90 |
double lEta,
|
91 |
double lD0,
|
92 |
double lDR,
|
93 |
const edm::Event & iEvent);
|
94 |
};
|
95 |
|
96 |
#endif
|