CMS 3D CMS Logo

LeptonSkimming.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SkimmingForB/LeptonSkimming
4 // Class: LeptonSkimming
5 //
13 //
14 // Original Author: Georgios Karathanasis georgios.karathanasis@cern.ch
15 // Created: Thu, 29 Nov 2018 15:23:09 GMT
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
55 //#include "HLTrigger/Egamma/plugins/HLTGenericFilter.h"
67 #include <vector>
68 #include <string>
69 #include <iostream>
75 #include "TLorentzVector.h"
80 #include <cmath>
81 
82 //
83 // class declaration
84 //
85 
87 public:
88  explicit LeptonSkimming(const edm::ParameterSet&);
89  ~LeptonSkimming() override;
90 
91  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
92 
93 private:
94  void beginStream(edm::StreamID) override;
95  bool filter(edm::Event&, const edm::EventSetup&) override;
96  void endStream() override;
97 
98  bool hltFired(const edm::Event& iEvent, const edm::EventSetup& iSetup, std::vector<string> HLTPath);
99  std::array<float, 5> hltObject(const edm::Event& iEvent, const edm::EventSetup& iSetup, std::vector<string> Seed);
100 
111  std::vector<string> HLTFilter_, HLTPath_;
112 
113  bool Result = false;
115 
116  std::vector<float> track_vx, track_vy, track_vz;
118  std::vector<unsigned int> Epair_ObjectIndex, Epair_TrkIndex, Epair_ObjectId;
119 
120  std::vector<float> SelectedTrgObj_PtEtaPhiCharge;
122 
123  float SelectedMu_DR = -1;
125  unsigned int trk_index = 0;
127  std::vector<float> tempPtEtaPhiM, tempXYZ;
128  std::vector<std::shared_ptr<reco::Track>> cleanedObjTracks;
129  std::vector<std::shared_ptr<reco::Track>> cleanedPairTracks;
130  std::vector<std::shared_ptr<reco::Track>> MuTracks;
131  std::vector<std::shared_ptr<reco::Track>> ElTracks;
132  std::vector<std::shared_ptr<reco::Track>> cleanedTracks;
133  std::vector<unsigned int> trackObj_container, trackPair_container;
134  std::vector<unsigned int> Trk_container, object_container, object_id;
135 
136  unsigned int nel = 0, nmuons = 0, ntracks = 0;
137  //options
138  double PtTrack_Cut = 0;
139  double EtaTrack_Cut = 10;
140  double MinChi2Track_Cut = -1000;
141  double MaxChi2Track_Cut = 1000;
142  double MuTrkMinDR_Cut = 0;
143  double MaxMee_Cut = 1000;
144  double PtKTrack_Cut = 0;
145  double MaxMB_Cut = 1000;
146  double MinMB_Cut = 0;
147  bool SaveOnlyTracks = false;
148  bool SaveOnlyEPairTracks = false;
149  double TrackSdxy_Cut = 0;
151  double MinMee_Cut = 0;
152  double Probee_Cut = 0;
153  double Cosee_Cut = -1;
154  bool EarlyStop = false;
155  double MuTrgMatchCone = 1000;
156  bool SkipIfNoMuMatch = false;
157  double EpairZvtx_Cut = 10000000;
158  double Ksdxy_Cut = 1000;
159  double ProbeeK_Cut = 0;
160  double CoseeK_Cut = 0;
161  double TrackMuDz_Cut = 100000000;
162  double TrgExclusionCone = -1;
163  double SLxy_Cut = 0;
164  double PtB_Cut = 0;
165  double PtMu_Cut = 0;
166  double QualMu_Cut = 0;
167  double PtEl_Cut = 0;
168  double MuTrgExclusionCone = 0;
169  double ElTrgExclusionCone = 0;
171  double MuTrgMuDz_Cut = 1000;
172  double ElTrgMuDz_Cut = 1000;
173  bool SaveOutputRoot = true;
174  bool ObjPtLargerThanTrack = false;
175  double BiasedWP = -100;
176  double UnbiasedWP = -100;
177  bool SkimOnlyMuons = false;
178  bool SkimOnlyElectrons = false;
179  int test_ev = 0;
180  // ----------member data ---------------------------
181 };
RecoEcalCandidateIsolation.h
defaultModuleLabel.h
ConfigurationDescriptions.h
edm::StreamID
Definition: StreamID.h:30
LeptonSkimming::object_container
std::vector< unsigned int > object_container
Definition: LeptonSkimming.h:134
LeptonSkimming::EpairZvtx_Cut
double EpairZvtx_Cut
Definition: LeptonSkimming.h:157
LeptonSkimming::Result
bool Result
Definition: LeptonSkimming.h:113
Handle.h
LeptonSkimming::cleanedObjTracks
std::vector< std::shared_ptr< reco::Track > > cleanedObjTracks
Definition: LeptonSkimming.h:128
LeptonSkimming::nmuons
unsigned int nmuons
Definition: LeptonSkimming.h:136
Muon.h
LeptonSkimming::ElTrgExclusionCone
double ElTrgExclusionCone
Definition: LeptonSkimming.h:169
LeptonSkimming::Ksdxy_Cut
double Ksdxy_Cut
Definition: LeptonSkimming.h:158
LeptonSkimming::trigobjectsToken_
edm::EDGetTokenT< trigger::TriggerEvent > trigobjectsToken_
Definition: LeptonSkimming.h:110
LeptonSkimming::ElTrgMuDz_Cut
double ElTrgMuDz_Cut
Definition: LeptonSkimming.h:172
LeptonSkimming::track_vy
std::vector< float > track_vy
Definition: LeptonSkimming.h:116
KalmanVertexFitter.h
TriggerResults.h
LeptonSkimming::beam_z
float beam_z
Definition: LeptonSkimming.h:114
ConversionTools.h
LeptonSkimming::track_vx
std::vector< float > track_vx
Definition: LeptonSkimming.h:116
LeptonSkimming::SkimOnlyElectrons
bool SkimOnlyElectrons
Definition: LeptonSkimming.h:178
LeptonSkimming::TrackSdxy_Cut
double TrackSdxy_Cut
Definition: LeptonSkimming.h:149
LeptonSkimming::MuTrgMuDz_Cut
double MuTrgMuDz_Cut
Definition: LeptonSkimming.h:171
LeptonSkimming::EarlyStop
bool EarlyStop
Definition: LeptonSkimming.h:154
LeptonSkimming::ntracks
unsigned int ntracks
Definition: LeptonSkimming.h:136
LeptonSkimming::ElTracks
std::vector< std::shared_ptr< reco::Track > > ElTracks
Definition: LeptonSkimming.h:131
TriggerEvent.h
edm::EDGetTokenT
Definition: EDGetToken.h:33
LeptonSkimming::HLTPath_
std::vector< string > HLTPath_
Definition: LeptonSkimming.h:111
LeptonSkimming::MinMB_Cut
double MinMB_Cut
Definition: LeptonSkimming.h:146
LeptonSkimming::TrgExclusionCone
double TrgExclusionCone
Definition: LeptonSkimming.h:162
AssociationMap.h
LeptonSkimming
Definition: LeptonSkimming.h:86
LeptonSkimming::vertex_point
reco::TrackBase::Point vertex_point
Definition: LeptonSkimming.h:126
LeptonSkimming::TrkObjExclusionCone
double TrkObjExclusionCone
Definition: LeptonSkimming.h:170
LeptonSkimming::ProbeeK_Cut
double ProbeeK_Cut
Definition: LeptonSkimming.h:159
ChiSquaredProbability.h
TriggerFilterObjectWithRefs.h
LeptonSkimming::muon_soft
std::vector< float > muon_soft
Definition: LeptonSkimming.h:117
LeptonSkimming::muonsToken_
edm::EDGetToken muonsToken_
Definition: LeptonSkimming.h:104
LeptonSkimming::BiasedWP
double BiasedWP
Definition: LeptonSkimming.h:175
LeptonSkimming::trgresultsToken_
edm::EDGetTokenT< edm::TriggerResults > trgresultsToken_
Definition: LeptonSkimming.h:109
LeptonSkimming::tempPtEtaPhiM
std::vector< float > tempPtEtaPhiM
Definition: LeptonSkimming.h:127
RecoChargedCandidateIsolation.h
TransientTrack.h
ConversionFwd.h
LeptonSkimming::cleanedPairTracks
std::vector< std::shared_ptr< reco::Track > > cleanedPairTracks
Definition: LeptonSkimming.h:129
LeptonSkimming::PtB_Cut
double PtB_Cut
Definition: LeptonSkimming.h:164
LeptonSkimming::MinChi2Track_Cut
double MinChi2Track_Cut
Definition: LeptonSkimming.h:140
LeptonSkimming::conversionsToken_
edm::EDGetTokenT< reco::ConversionCollection > conversionsToken_
Definition: LeptonSkimming.h:108
LeptonSkimming::el_phi
std::vector< float > el_phi
Definition: LeptonSkimming.h:117
LeptonSkimming::MaxMB_Cut
double MaxMB_Cut
Definition: LeptonSkimming.h:145
LeptonSkimming::beginStream
void beginStream(edm::StreamID) override
Definition: LeptonSkimming.cc:529
GenParticle.h
deltaR.h
LeptonSkimming::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: LeptonSkimming.cc:567
MakerMacros.h
LeptonSkimming::EtaTrack_Cut
double EtaTrack_Cut
Definition: LeptonSkimming.h:139
LeptonSkimming::LeptonSkimming
LeptonSkimming(const edm::ParameterSet &)
Definition: LeptonSkimming.cc:26
Track.h
LeptonSkimming::trk_index
unsigned int trk_index
Definition: LeptonSkimming.h:125
LeptonSkimming::muon_eta
std::vector< float > muon_eta
Definition: LeptonSkimming.h:117
LeptonSkimming::eleUnBWPToken_
edm::EDGetTokenT< edm::ValueMap< float > > eleUnBWPToken_
Definition: LeptonSkimming.h:103
LeptonSkimming::PtEl_Cut
double PtEl_Cut
Definition: LeptonSkimming.h:167
VertexCompositeCandidate.h
LeptonSkimming::UnbiasedWP
double UnbiasedWP
Definition: LeptonSkimming.h:176
LeptonSkimming::Epair_ObjectId
std::vector< unsigned int > Epair_ObjectId
Definition: LeptonSkimming.h:118
Service.h
HLTFilter.h
LeptonSkimming::hltFired
bool hltFired(const edm::Event &iEvent, const edm::EventSetup &iSetup, std::vector< string > HLTPath)
Definition: LeptonSkimming.cc:91
LeptonSkimming::SkimOnlyMuons
bool SkimOnlyMuons
Definition: LeptonSkimming.h:177
IdealMagneticFieldRecord.h
LeptonSkimming::Trk_container
std::vector< unsigned int > Trk_container
Definition: LeptonSkimming.h:134
LeptonSkimming::beam_x
float beam_x
Definition: LeptonSkimming.h:114
LeptonSkimming::MuTracks
std::vector< std::shared_ptr< reco::Track > > MuTracks
Definition: LeptonSkimming.h:130
LeptonSkimming::el_pt
std::vector< float > el_pt
Definition: LeptonSkimming.h:117
LeptonSkimming::eleBWPToken_
edm::EDGetTokenT< edm::ValueMap< float > > eleBWPToken_
Definition: LeptonSkimming.h:102
ParameterSetDescription.h
GsfElectron.h
LeptonSkimming::Probee_Cut
double Probee_Cut
Definition: LeptonSkimming.h:152
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
Vertex.h
LeptonSkimming::QualMu_Cut
double QualMu_Cut
Definition: LeptonSkimming.h:166
LeptonSkimming::endStream
void endStream() override
Definition: LeptonSkimming.cc:532
LeptonSkimming::Tracks_
edm::EDGetToken Tracks_
Definition: LeptonSkimming.h:105
LeptonSkimming::MaxMee_Cut
double MaxMee_Cut
Definition: LeptonSkimming.h:143
LeptonSkimming::cleanedTracks
std::vector< std::shared_ptr< reco::Track > > cleanedTracks
Definition: LeptonSkimming.h:132
LeptonSkimming::Cosee_Cut
double Cosee_Cut
Definition: LeptonSkimming.h:153
GsfElectronFwd.h
TransientTrackBuilder.h
LeptonSkimming::tempXYZ
std::vector< float > tempXYZ
Definition: LeptonSkimming.h:127
edm::ParameterSet
Definition: ParameterSet.h:36
LeptonSkimming::MuTrgMatchCone
double MuTrgMatchCone
Definition: LeptonSkimming.h:155
LeptonSkimming::ZvertexTrg
float ZvertexTrg
Definition: LeptonSkimming.h:124
LeptonSkimming::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: LeptonSkimming.h:107
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
LeptonSkimming::muon_pt
std::vector< float > muon_pt
Definition: LeptonSkimming.h:117
LeptonSkimming::MuTrkMinDR_Cut
double MuTrkMinDR_Cut
Definition: LeptonSkimming.h:142
ModuleDef.h
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
LeptonSkimming::UseOnlyBKeeMCForTriplets
bool UseOnlyBKeeMCForTriplets
Definition: LeptonSkimming.h:150
LeptonSkimming::~LeptonSkimming
~LeptonSkimming() override
Definition: LeptonSkimming.cc:86
LeptonSkimming::track_vz
std::vector< float > track_vz
Definition: LeptonSkimming.h:116
LeptonSkimming::nel
unsigned int nel
Definition: LeptonSkimming.h:136
MagneticField.h
LeptonSkimming::SaveOnlyTracks
bool SaveOnlyTracks
Definition: LeptonSkimming.h:147
edm::EventSetup
Definition: EventSetup.h:57
HLTConfigProvider.h
TransientTrackRecord.h
edm::EDGetToken
Definition: EDGetToken.h:35
LeptonSkimming::test_ev
int test_ev
Definition: LeptonSkimming.h:179
LeptonSkimming::ObjPtLargerThanTrack
bool ObjPtLargerThanTrack
Definition: LeptonSkimming.h:174
LeptonSkimming::Epair_ObjectIndex
std::vector< unsigned int > Epair_ObjectIndex
Definition: LeptonSkimming.h:118
TriggerObject.h
LeptonSkimming::muon_phi
std::vector< float > muon_phi
Definition: LeptonSkimming.h:117
reco::TrackBase::Point
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
LeptonSkimming::MuTrgExclusionCone
double MuTrgExclusionCone
Definition: LeptonSkimming.h:168
LeptonSkimming::trackObj_container
std::vector< unsigned int > trackObj_container
Definition: LeptonSkimming.h:133
VertexFwd.h
LeptonSkimming::SaveOutputRoot
bool SaveOutputRoot
Definition: LeptonSkimming.h:173
LeptonSkimming::object_id
std::vector< unsigned int > object_id
Definition: LeptonSkimming.h:134
IPTools.h
Ref.h
LeptonSkimming::vtxToken_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: LeptonSkimming.h:106
RecoEcalCandidate.h
OAEParametrizedMagneticField.h
LeptonSkimming::filter
bool filter(edm::Event &, const edm::EventSetup &) override
Definition: LeptonSkimming.cc:167
RecoChargedCandidate.h
Frameworkfwd.h
LeptonSkimming::PtMu_Cut
double PtMu_Cut
Definition: LeptonSkimming.h:165
LeptonSkimming::trackPair_container
std::vector< unsigned int > trackPair_container
Definition: LeptonSkimming.h:133
LeptonSkimming::SelectedMu_DR
float SelectedMu_DR
Definition: LeptonSkimming.h:123
LeptonSkimming::SLxy_Cut
double SLxy_Cut
Definition: LeptonSkimming.h:163
LeptonSkimming::SkipIfNoMuMatch
bool SkipIfNoMuMatch
Definition: LeptonSkimming.h:156
LeptonSkimming::MinMee_Cut
double MinMee_Cut
Definition: LeptonSkimming.h:151
LeptonSkimming::SelectedTrgObj_PtEtaPhiCharge
std::vector< float > SelectedTrgObj_PtEtaPhiCharge
Definition: LeptonSkimming.h:120
LeptonSkimming::PtTrack_Cut
double PtTrack_Cut
Definition: LeptonSkimming.h:138
LeptonSkimming::beam_y
float beam_y
Definition: LeptonSkimming.h:114
Electron.h
MuonID.h
EDFilter.h
pwdgSkimBPark_cfi.HLTPath
HLTPath
Definition: pwdgSkimBPark_cfi.py:19
LeptonSkimming::HLTFilter_
std::vector< string > HLTFilter_
Definition: LeptonSkimming.h:111
ParameterSet.h
LeptonSkimming::hltObject
std::array< float, 5 > hltObject(const edm::Event &iEvent, const edm::EventSetup &iSetup, std::vector< string > Seed)
Definition: LeptonSkimming.cc:116
LeptonSkimming::electronsToken_
edm::EDGetToken electronsToken_
Definition: LeptonSkimming.h:101
LeptonSkimming::Epair_TrkIndex
std::vector< unsigned int > Epair_TrkIndex
Definition: LeptonSkimming.h:118
edm::stream::EDFilter
Definition: EDFilter.h:38
edm::Event
Definition: Event.h:73
LeptonSkimming::PtKTrack_Cut
double PtKTrack_Cut
Definition: LeptonSkimming.h:144
StreamID.h
LeptonSkimming::CoseeK_Cut
double CoseeK_Cut
Definition: LeptonSkimming.h:160
LeptonSkimming::muon_tight
std::vector< float > muon_tight
Definition: LeptonSkimming.h:117
LeptonSkimming::MaxChi2Track_Cut
double MaxChi2Track_Cut
Definition: LeptonSkimming.h:141
LeptonSkimming::el_eta
std::vector< float > el_eta
Definition: LeptonSkimming.h:117
LeptonSkimming::muon_medium
std::vector< float > muon_medium
Definition: LeptonSkimming.h:117
LeptonSkimming::TrackMuDz_Cut
double TrackMuDz_Cut
Definition: LeptonSkimming.h:161
LeptonSkimming::SaveOnlyEPairTracks
bool SaveOnlyEPairTracks
Definition: LeptonSkimming.h:148
LeptonSkimming::SelectedMu_index
int SelectedMu_index
Definition: LeptonSkimming.h:121
Conversion.h