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 
20 // system include files
21 #include <memory>
22 
23 // user include files
56 //#include "HLTrigger/Egamma/plugins/HLTGenericFilter.h"
68 #include <vector>
69 #include <string>
70 #include <iostream>
76 #include "TLorentzVector.h"
81 #include <cmath>
82 
83 //
84 // class declaration
85 //
86 
88  public:
89  explicit LeptonSkimming(const edm::ParameterSet&);
90  ~LeptonSkimming() override;
91 
92  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
93 
94 
95  private:
96  void beginStream(edm::StreamID) override;
97  bool filter(edm::Event&, const edm::EventSetup&) override;
98  void endStream() override;
99 
100  bool hltFired(const edm::Event& iEvent, const edm::EventSetup& iSetup,std::vector< string> HLTPath );
101  std::array<float,5> hltObject(const edm::Event& iEvent, const edm::EventSetup& iSetup,std::vector< string> Seed);
102 
113  std::vector<string> HLTFilter_,HLTPath_;
114 
115  bool Result=false;
117 
118  std::vector<float> track_vx,track_vy,track_vz;
121 
123 
124  float SelectedMu_DR=-1;
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; double EtaTrack_Cut=10; double MinChi2Track_Cut=-1000;
139  double MaxChi2Track_Cut=1000; double MuTrkMinDR_Cut=0; double MaxMee_Cut=1000;
140  double PtKTrack_Cut=0;
141  double MaxMB_Cut=1000; double MinMB_Cut=0;
142  bool SaveOnlyTracks=false; bool SaveOnlyEPairTracks=false;
144  double MinMee_Cut=0; double Probee_Cut=0; double Cosee_Cut=-1;
145  bool EarlyStop=false; double MuTrgMatchCone=1000; bool SkipIfNoMuMatch=false;
146  double EpairZvtx_Cut=10000000; double Ksdxy_Cut=1000; double ProbeeK_Cut=0;
147  double CoseeK_Cut=0; double TrackMuDz_Cut=100000000;
148  double TrgExclusionCone=-1; double SLxy_Cut=0;
149  double PtB_Cut=0; double PtMu_Cut=0; double QualMu_Cut=0; double PtEl_Cut=0;
151  double TrkObjExclusionCone=0; double MuTrgMuDz_Cut=1000;
152  double ElTrgMuDz_Cut=1000; bool SaveOutputRoot=true;
154  double BiasedWP=-100; double UnbiasedWP=-100;
155  bool SkimOnlyMuons=false; bool SkimOnlyElectrons=false;
156  int test_ev=0;
157  // ----------member data ---------------------------
158 };
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:230
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:83
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