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