-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11132 from davidsheffield/76X_ScoutingPacking_Lep…
…tonsPhoton Add scouting electron, photon, and muon classes and producers
- Loading branch information
Showing
13 changed files
with
705 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#ifndef DataFormats_ScoutingElectron_h | ||
#define DataFormats_ScoutingElectron_h | ||
|
||
#include <vector> | ||
|
||
// Class for holding electron information, for use in data scouting | ||
// IMPORTANT: the content of this class should be changed only in backwards compatible ways! | ||
class ScoutingElectron | ||
{ | ||
public: | ||
//constructor with values for all data fields | ||
ScoutingElectron(float pt, float eta, float phi, float m, float d0, float dz, float dEtaIn, | ||
float dPhiIn, float sigmaIetaIeta, float hOverE, float ooEMOop, | ||
int missingHits, int charge, float ecalIso, float hcalIso, float trackIso): | ||
pt_(pt), eta_(eta), phi_(phi), m_(m), d0_(d0), dz_(dz), dEtaIn_(dEtaIn), | ||
dPhiIn_(dPhiIn), sigmaIetaIeta_(sigmaIetaIeta), hOverE_(hOverE), ooEMOop_(ooEMOop), | ||
missingHits_(missingHits), charge_(charge), ecalIso_(ecalIso), hcalIso_(hcalIso), | ||
trackIso_(trackIso) {} | ||
//default constructor | ||
ScoutingElectron(): pt_(0), eta_(0), phi_(0), m_(0), d0_(0), dz_(0), dEtaIn_(0), dPhiIn_(0), | ||
sigmaIetaIeta_(0), hOverE_(0), ooEMOop_(0), missingHits_(0), charge_(0), ecalIso_(0), | ||
hcalIso_(0), trackIso_(0) {} | ||
|
||
//accessor functions | ||
float pt() const { return pt_; } | ||
float eta() const { return eta_; } | ||
float phi() const { return phi_; } | ||
float m() const { return m_; } | ||
float d0() const { return d0_; } | ||
float dz() const { return dz_; } | ||
float dEtaIn() const { return dEtaIn_; } | ||
float dPhiIn() const { return dPhiIn_; } | ||
float sigmaIetaIeta() const { return sigmaIetaIeta_; } | ||
float hOverE() const { return hOverE_; } | ||
float ooEMOop() const { return ooEMOop_; } | ||
int missingHits() const { return missingHits_; } | ||
int charge() const { return charge_; } | ||
float ecalIso() const { return ecalIso_; } | ||
float hcalIso() const { return hcalIso_; } | ||
float trackIso() const { return trackIso_; } | ||
|
||
private: | ||
float pt_; | ||
float eta_; | ||
float phi_; | ||
float m_; | ||
float d0_; | ||
float dz_; | ||
float dEtaIn_; | ||
float dPhiIn_; | ||
float sigmaIetaIeta_; | ||
float hOverE_; | ||
float ooEMOop_; | ||
int missingHits_; | ||
int charge_; | ||
float ecalIso_; | ||
float hcalIso_; | ||
float trackIso_; | ||
}; | ||
|
||
typedef std::vector<ScoutingElectron> ScoutingElectronCollection; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#ifndef DataFormats_ScoutingMuon_h | ||
#define DataFormats_ScoutingMuon_h | ||
|
||
#include <vector> | ||
|
||
// Class for holding muon information, for use in data scouting | ||
// IMPORTANT: the content of this class should be changed only in backwards compatible ways! | ||
class ScoutingMuon | ||
{ | ||
public: | ||
//constructor with values for all data fields | ||
ScoutingMuon(float pt, float eta, float phi, float m, float ecalIso, float hcalIso, | ||
float trackIso, float chi2, float ndof, int charge, float dxy, float dz, | ||
int nValidMuonHits, int nValidPixelHits, int nMatchedStations, | ||
int nTrackerLayersWithMeasurement, int type): | ||
pt_(pt), eta_(eta), phi_(phi), m_(m), | ||
ecalIso_(ecalIso), hcalIso_(hcalIso), trackIso_(trackIso), | ||
chi2_(chi2), ndof_(ndof), charge_(charge), dxy_(dxy), dz_(dz), | ||
nValidMuonHits_(nValidMuonHits), nValidPixelHits_(nValidPixelHits), | ||
nMatchedStations_(nMatchedStations), | ||
nTrackerLayersWithMeasurement_(nTrackerLayersWithMeasurement), type_(type) {} | ||
//default constructor | ||
ScoutingMuon():pt_(0), eta_(0), phi_(0), m_(0), ecalIso_(0), hcalIso_(0), trackIso_(0), | ||
chi2_(0), ndof_(0), charge_(0), dxy_(0), dz_(0), nValidMuonHits_(0), | ||
nValidPixelHits_(0), nMatchedStations_(0), nTrackerLayersWithMeasurement_(0), | ||
type_(0) {} | ||
|
||
//accessor functions | ||
float pt() const { return pt_; } | ||
float eta() const { return eta_; } | ||
float phi() const { return phi_; } | ||
float m() const { return m_; } | ||
float ecalIso() const { return ecalIso_; } | ||
float hcalIso() const { return hcalIso_; } | ||
float trackIso() const { return trackIso_; } | ||
float chi2() const { return chi2_; } | ||
float ndof() const { return ndof_; } | ||
int charge() const { return charge_; } | ||
float dxy() const { return dxy_; } | ||
float dz() const { return dz_; } | ||
int nValidMuonHits() const { return nValidMuonHits_; } | ||
int nValidPixelHits() const { return nValidPixelHits_; } | ||
int nMatchedStations() const { return nMatchedStations_; } | ||
int nTrackerLayersWithMeasurement() const { return nTrackerLayersWithMeasurement_; } | ||
int type() const { return type_; } | ||
bool isGlobalMuon() const { return type_ & 1<<1; } | ||
bool isTrackerMuon() const { return type_ & 1<<2; } | ||
|
||
private: | ||
float pt_; | ||
float eta_; | ||
float phi_; | ||
float m_; | ||
float ecalIso_; | ||
float hcalIso_; | ||
float trackIso_; | ||
float chi2_; | ||
float ndof_; | ||
int charge_; | ||
float dxy_; | ||
float dz_; | ||
int nValidMuonHits_; | ||
int nValidPixelHits_; | ||
int nMatchedStations_; | ||
int nTrackerLayersWithMeasurement_; | ||
int type_; | ||
}; | ||
|
||
typedef std::vector<ScoutingMuon> ScoutingMuonCollection; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef DataFormats_ScoutingPhoton_h | ||
#define DataFormats_ScoutingPhoton_h | ||
|
||
#include <vector> | ||
|
||
// Class for holding photon information, for use in data scouting | ||
// IMPORTANT: the content of this class should be changed only in backwards compatible ways! | ||
class ScoutingPhoton | ||
{ | ||
public: | ||
//constructor with values for all data fields | ||
ScoutingPhoton(float pt, float eta, float phi, float m, float sigmaIetaIeta, float hOverE, | ||
float ecalIso, float hcalIso): | ||
pt_(pt), eta_(eta), phi_(phi), m_(m), sigmaIetaIeta_(sigmaIetaIeta), hOverE_(hOverE), | ||
ecalIso_(ecalIso), hcalIso_(hcalIso) {} | ||
//default constructor | ||
ScoutingPhoton(): pt_(0), eta_(0), phi_(0), m_(0), sigmaIetaIeta_(0), hOverE_(0), | ||
ecalIso_(0), hcalIso_(0) {} | ||
|
||
//accessor functions | ||
float pt() const { return pt_; } | ||
float eta() const { return eta_; } | ||
float phi() const { return phi_; } | ||
float m() const { return m_; } | ||
float sigmaIetaIeta() const { return sigmaIetaIeta_; } | ||
float hOverE() const { return hOverE_; } | ||
float ecalIso() const { return ecalIso_; } | ||
float hcalIso() const { return hcalIso_; } | ||
|
||
private: | ||
float pt_; | ||
float eta_; | ||
float phi_; | ||
float m_; | ||
float sigmaIetaIeta_; | ||
float hOverE_; | ||
float ecalIso_; | ||
float hcalIso_; | ||
}; | ||
|
||
typedef std::vector<ScoutingPhoton> ScoutingPhotonCollection; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#ifndef HLTScoutingEgammaProducer_h | ||
#define HLTScoutingEgammaProducer_h | ||
|
||
// -*- C++ -*- | ||
// | ||
// Package: HLTrigger/Egamma | ||
// Class: HLTScoutingEgammaProducer | ||
// | ||
/**\class HLTScoutingEgammaProducer HLTScoutingEgammaProducer.h HLTrigger/Egamma/interface/HLTScoutingEgammaProducer.h | ||
Description: Producer for ScoutingElectron and ScoutingPhoton | ||
*/ | ||
// | ||
// Original Author: David G. Sheffield (Rutgers) | ||
// Created: Mon, 20 Jul 2015 | ||
// | ||
// | ||
|
||
// system include files | ||
#include <memory> | ||
|
||
// user include files | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/global/EDProducer.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include "DataFormats/Common/interface/AssociationMap.h" | ||
#include "DataFormats/Common/interface/getRef.h" | ||
#include "DataFormats/EgammaReco/interface/ElectronSeed.h" | ||
#include "DataFormats/EgammaReco/interface/ElectronSeedFwd.h" | ||
#include "DataFormats/EgammaReco/interface/SuperCluster.h" | ||
#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" | ||
#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" | ||
#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" | ||
#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" | ||
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" | ||
|
||
#include "DataFormats/Scouting/interface/ScoutingElectron.h" | ||
#include "DataFormats/Scouting/interface/ScoutingPhoton.h" | ||
|
||
class HLTScoutingEgammaProducer : public edm::global::EDProducer<> { | ||
typedef edm::AssociationMap<edm::OneToValue<std::vector<reco::RecoEcalCandidate>, float, | ||
unsigned int> > RecoEcalCandMap; | ||
public: | ||
explicit HLTScoutingEgammaProducer(const edm::ParameterSet&); | ||
~HLTScoutingEgammaProducer(); | ||
|
||
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
|
||
private: | ||
virtual void produce(edm::StreamID sid, edm::Event & iEvent, edm::EventSetup const & setup) | ||
const override final; | ||
|
||
const edm::EDGetTokenT<reco::RecoEcalCandidateCollection> EgammaCandidateCollection_; | ||
const edm::EDGetTokenT<reco::GsfTrackCollection> EgammaGsfTrackCollection_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> SigmaIEtaIEtaMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> HoverEMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> DetaMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> DphiMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> MissingHitsMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> OneOEMinusOneOPMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> EcalPFClusterIsoMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> EleGsfTrackIsoMap_; | ||
const edm::EDGetTokenT<RecoEcalCandMap> HcalPFClusterIsoMap_; | ||
|
||
const double egammaPtCut; | ||
const double egammaEtaCut; | ||
const double egammaHoverECut; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.