CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
65 #include <vector>
66 #include <string>
67 #include <iostream>
73 #include "TLorentzVector.h"
78 #include <cmath>
79 
80 //
81 // class declaration
82 //
83 
85 public:
86  explicit LeptonSkimming(const edm::ParameterSet&);
87  ~LeptonSkimming() override;
88 
89  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
90 
91 private:
92  void beginStream(edm::StreamID) override;
93  bool filter(edm::Event&, const edm::EventSetup&) override;
94  void endStream() override;
95 
96  bool hltFired(const edm::Event& iEvent, const edm::EventSetup& iSetup, std::vector<string> HLTPath);
97  std::array<float, 5> hltObject(const edm::Event& iEvent, const edm::EventSetup& iSetup, std::vector<string> Seed);
98 
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 };
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
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bFieldToken_
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