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 };
unsigned int trk_index
std::vector< float > muon_eta
std::vector< std::shared_ptr< reco::Track > > cleanedTracks
std::vector< unsigned int > object_id
double TrgExclusionCone
bool UseOnlyBKeeMCForTriplets
std::vector< float > track_vz
std::vector< float > track_vy
double MaxChi2Track_Cut
double MinChi2Track_Cut
bool filter(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
unsigned int nmuons
double TrkObjExclusionCone
edm::EDGetTokenT< edm::TriggerResults > trgresultsToken_
std::vector< std::shared_ptr< reco::Track > > cleanedPairTracks
std::vector< unsigned int > trackPair_container
std::vector< unsigned int > Epair_ObjectId
std::vector< string > HLTFilter_
std::vector< unsigned int > Epair_ObjectIndex
std::vector< std::shared_ptr< reco::Track > > MuTracks
std::vector< unsigned int > trackObj_container
std::vector< unsigned int > Epair_TrkIndex
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
reco::TrackBase::Point vertex_point
int iEvent
Definition: GenABIO.cc:224
std::vector< float > SelectedTrgObj_PtEtaPhiCharge
edm::EDGetToken electronsToken_
std::vector< float > el_pt
edm::EDGetTokenT< edm::ValueMap< float > > eleBWPToken_
std::vector< unsigned int > object_container
std::vector< float > tempXYZ
std::vector< float > track_vx
std::vector< float > el_eta
std::vector< unsigned int > Trk_container
std::vector< float > muon_medium
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
edm::EDGetToken Tracks_
unsigned int ntracks
double ElTrgExclusionCone
unsigned int nel
edm::EDGetTokenT< trigger::TriggerEvent > trigobjectsToken_
std::vector< std::shared_ptr< reco::Track > > cleanedObjTracks
std::vector< std::shared_ptr< reco::Track > > ElTracks
std::vector< float > muon_pt
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< float > tempPtEtaPhiM
double MuTrgExclusionCone
edm::EDGetTokenT< reco::ConversionCollection > conversionsToken_
std::vector< float > el_phi
edm::EDGetToken muonsToken_
~LeptonSkimming() override
std::vector< float > muon_tight
bool hltFired(const edm::Event &iEvent, const edm::EventSetup &iSetup, std::vector< string > HLTPath)
std::vector< float > muon_soft
edm::EDGetTokenT< edm::ValueMap< float > > eleUnBWPToken_
std::vector< string > HLTPath_
std::vector< float > muon_phi
void beginStream(edm::StreamID) override
std::array< float, 5 > hltObject(const edm::Event &iEvent, const edm::EventSetup &iSetup, std::vector< string > Seed)
LeptonSkimming(const edm::ParameterSet &)
void endStream() override