Main Page
Namespaces
Classes
Package Documentation
HLTrigger
JetMET
interface
HLTCAWZTagFilter.h
Go to the documentation of this file.
1
#ifndef HLTCAWZTagFilter_h
2
#define HLTCAWZTagFilter_h
3
4
// system include files
5
#include <memory>
6
#include <vector>
7
#include <sstream>
8
9
// user include files
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/Framework/interface/MakerMacros.h
"
12
#include "
DataFormats/BTauReco/interface/CATopJetTagInfo.h
"
13
#include "
FWCore/Utilities/interface/InputTag.h
"
14
#include "
DataFormats/JetReco/interface/BasicJet.h
"
15
#include "
DataFormats/JetReco/interface/CaloJet.h
"
16
#include "
DataFormats/Candidate/interface/CompositeCandidate.h
"
17
#include "
CommonTools/CandUtils/interface/AddFourMomenta.h
"
18
#include "
DataFormats/Candidate/interface/CandMatchMap.h
"
19
#include "
DataFormats/HLTReco/interface/TriggerTypeDefs.h
"
20
#include "
HLTrigger/HLTcore/interface/HLTFilter.h
"
21
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
22
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
23
#include <Math/VectorUtil.h>
24
25
class
CAWZJetHelperUser
{
26
public
:
27
28
CAWZJetHelperUser
(
double
massdropcut) :
29
massdropcut_
(massdropcut)
30
{}
31
32
reco::CATopJetProperties
operator()
(
reco::Jet
const
& ihardJet )
const
;
33
34
protected
:
35
double
massdropcut_
;
36
37
};
38
39
//
40
// class declaration
41
//
42
43
class
HLTCAWZTagFilter
:
public
HLTFilter
{
44
public
:
45
explicit
HLTCAWZTagFilter
(
const
edm::ParameterSet
&);
46
~
HLTCAWZTagFilter
()
override
;
47
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
48
bool
hltFilter(
edm::Event
&,
const
edm::EventSetup
&,
trigger::TriggerFilterObjectWithRefs
& filterobject)
const override
;
49
50
51
private
:
52
// ----------member data ---------------------------
53
54
edm::InputTag
src_
;
55
edm::InputTag
pfsrc_
;
56
const
edm::EDGetTokenT<reco::BasicJetCollection>
inputToken_
;
57
const
edm::EDGetTokenT<reco::PFJetCollection>
inputPFToken_
;
58
double
minWMass_
;
59
double
maxWMass_
;
60
double
massdropcut_
;
61
62
};
63
64
reco::CATopJetProperties
CAWZJetHelperUser::operator()
(
reco::Jet
const
& ihardJet )
const
{
65
reco::CATopJetProperties
properties;
66
// Get subjets
67
reco::Jet::Constituents
subjets = ihardJet.
getJetConstituents
();
68
properties.
nSubJets
= subjets.size();
// number of subjets
69
properties.
wMass
= 999999.;
// best W mass
70
properties.
topMass
= 999999.;
71
properties.
minMass
= -1;
72
73
if
(properties.
nSubJets
== 2) {
74
75
sort
( subjets.begin(), subjets.end(), [](
auto
const
& t1,
auto
const
& t2){
return
t1->pt() > t2->pt(); } );
76
77
reco::Jet::Constituent
icandJet = subjets[0];
78
79
reco::Candidate::LorentzVector
isubJet = icandJet->p4();
80
double
imass = isubJet.mass();
81
double
imw = ihardJet.
mass
();
82
83
if
(imass/imw <
massdropcut_
) {
84
// Get the candidate mass
85
properties.
wMass
= imw;
86
}
87
}
88
89
return
properties;
90
}
91
92
#endif
jetUpdater_cfi.sort
sort
Definition:
jetUpdater_cfi.py:29
CandMatchMap.h
HLTCAWZTagFilter::minWMass_
double minWMass_
Definition:
HLTCAWZTagFilter.h:58
HLTCAWZTagFilter::src_
edm::InputTag src_
Definition:
HLTCAWZTagFilter.h:54
CAWZJetHelperUser::CAWZJetHelperUser
CAWZJetHelperUser(double massdropcut)
Definition:
HLTCAWZTagFilter.h:28
HLTFilter.h
reco::Jet
Base class for all types of Jets.
Definition:
Jet.h:20
Event.h
MakerMacros.h
trigger::TriggerFilterObjectWithRefs
Definition:
TriggerFilterObjectWithRefs.h:36
reco::Jet::Constituents
std::vector< Constituent > Constituents
Definition:
Jet.h:23
HLTCAWZTagFilter::massdropcut_
double massdropcut_
Definition:
HLTCAWZTagFilter.h:60
reco::Jet::getJetConstituents
virtual Constituents getJetConstituents() const
list of constituents
HLTCAWZTagFilter::maxWMass_
double maxWMass_
Definition:
HLTCAWZTagFilter.h:59
edm::EDGetTokenT< reco::BasicJetCollection >
CompositeCandidate.h
reco::CATopJetProperties::nSubJets
int nSubJets
Definition:
CATopJetTagInfo.h:30
reco::CATopJetProperties::minMass
double minMass
Definition:
CATopJetTagInfo.h:31
ParameterSetDescription.h
HLTFilter
Definition:
HLTFilter.h:28
CAWZJetHelperUser
Definition:
HLTCAWZTagFilter.h:25
CAWZJetHelperUser::operator()
reco::CATopJetProperties operator()(reco::Jet const &ihardJet) const
Definition:
HLTCAWZTagFilter.h:64
edm::EventSetup
Definition:
EventSetup.h:57
BasicJet.h
edm::Ptr< Candidate >
reco::CATopJetProperties::topMass
double topMass
Definition:
CATopJetTagInfo.h:32
HLTCAWZTagFilter::inputPFToken_
const edm::EDGetTokenT< reco::PFJetCollection > inputPFToken_
Definition:
HLTCAWZTagFilter.h:57
AddFourMomenta.h
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
reco::CATopJetProperties::wMass
double wMass
Definition:
CATopJetTagInfo.h:33
HLTCAWZTagFilter::inputToken_
const edm::EDGetTokenT< reco::BasicJetCollection > inputToken_
Definition:
HLTCAWZTagFilter.h:56
reco::CATopJetProperties
Definition:
CATopJetTagInfo.h:22
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Candidate.h:37
edm::InputTag
Definition:
InputTag.h:15
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:36
ConfigurationDescriptions.h
CAWZJetHelperUser::massdropcut_
double massdropcut_
Definition:
HLTCAWZTagFilter.h:35
TriggerTypeDefs.h
CATopJetTagInfo.h
HLTCAWZTagFilter
Definition:
HLTCAWZTagFilter.h:43
CaloJet.h
edm::Event
Definition:
Event.h:71
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
reco::LeafCandidate::mass
double mass() const final
mass
Definition:
LeafCandidate.h:116
HLTCAWZTagFilter::pfsrc_
edm::InputTag pfsrc_
Definition:
HLTCAWZTagFilter.h:55
Generated for CMSSW Reference Manual by
1.8.11