CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
AlCaGammaJetProducer Class Reference
Inheritance diagram for AlCaGammaJetProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 AlCaGammaJetProducer (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 ~AlCaGammaJetProducer () override=default
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

bool select (const reco::PhotonCollection &, const reco::PFJetCollection &) const
 

Private Attributes

edm::InputTag labelBeamSpot_
 
edm::InputTag labelConv_
 
edm::InputTag labelGsfEle_
 
edm::InputTag labelHBHE_
 
edm::InputTag labelHF_
 
edm::InputTag labelHO_
 
edm::InputTag labelLoosePhot_
 
edm::InputTag labelPFCandidate_
 
edm::InputTag labelPFJet_
 
edm::InputTag labelPFMET_
 
edm::InputTag labelPhoton_
 
edm::InputTag labelRho_
 
edm::InputTag labelTightPhot_
 
edm::InputTag labelTrigger_
 
edm::InputTag labelVertex_
 
double minPtJet_
 
double minPtPhoton_
 
edm::EDPutTokenT< reco::BeamSpotput_beamSpot_
 
edm::EDPutTokenT< reco::ConversionCollectionput_conv_
 
edm::EDPutTokenT< reco::GsfElectronCollectionput_gsfEle_
 
edm::EDPutTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > put_hbhe_
 
edm::EDPutTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > put_hf_
 
edm::EDPutTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > put_ho_
 
edm::EDPutTokenT< std::vector< Bool_t > > put_loosePhot_
 
edm::EDPutTokenT< reco::PFCandidateCollectionput_pfCandidate_
 
edm::EDPutTokenT< reco::PFJetCollectionput_pfJet_
 
edm::EDPutTokenT< reco::PFMETCollectionput_pfMET_
 
edm::EDPutTokenT< reco::PhotonCollectionput_photon_
 
edm::EDPutTokenT< double > put_rho_
 
edm::EDPutTokenT< std::vector< Bool_t > > put_tightPhot_
 
edm::EDPutTokenT< edm::TriggerResultsput_trigger_
 
edm::EDPutTokenT< reco::VertexCollectionput_vertex_
 
edm::EDGetTokenT< reco::BeamSpottok_BS_
 
edm::EDGetTokenT< reco::ConversionCollectiontok_Conv_
 
edm::EDGetTokenT< reco::GsfElectronCollectiontok_GsfElec_
 
edm::EDGetTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > tok_HBHE_
 
edm::EDGetTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > tok_HF_
 
edm::EDGetTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > tok_HO_
 
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_loosePhoton_
 
edm::EDGetTokenT< reco::PFCandidateCollectiontok_PFCand_
 
edm::EDGetTokenT< reco::PFJetCollectiontok_PFJet_
 
edm::EDGetTokenT< reco::PFMETCollectiontok_PFMET_
 
edm::EDGetTokenT< reco::PhotonCollectiontok_Photon_
 
edm::EDGetTokenT< double > tok_Rho_
 
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_tightPhoton_
 
edm::EDGetTokenT< edm::TriggerResultstok_TrigRes_
 
edm::EDGetTokenT< reco::VertexCollectiontok_Vertex_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 40 of file AlCaGammaJetProducer.cc.

Constructor & Destructor Documentation

◆ AlCaGammaJetProducer()

AlCaGammaJetProducer::AlCaGammaJetProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 89 of file AlCaGammaJetProducer.cc.

References edm::InputTag::encode(), edm::ParameterSet::getParameter(), labelBeamSpot_, labelConv_, labelGsfEle_, labelHBHE_, labelHF_, labelHO_, labelLoosePhot_, labelPFCandidate_, labelPFJet_, labelPFMET_, labelPhoton_, labelRho_, labelTightPhot_, labelTrigger_, labelVertex_, minPtJet_, minPtPhoton_, put_beamSpot_, put_conv_, put_gsfEle_, put_hbhe_, put_hf_, put_ho_, put_loosePhot_, put_pfCandidate_, put_pfJet_, put_pfMET_, put_photon_, put_rho_, put_tightPhot_, put_trigger_, put_vertex_, tok_BS_, tok_Conv_, tok_GsfElec_, tok_HBHE_, tok_HF_, tok_HO_, tok_loosePhoton_, tok_PFCand_, tok_PFJet_, tok_PFMET_, tok_Photon_, tok_Rho_, tok_tightPhoton_, tok_TrigRes_, and tok_Vertex_.

89  {
90  // Take input
91  labelPhoton_ = iConfig.getParameter<edm::InputTag>("PhoInput");
92  labelPFJet_ = iConfig.getParameter<edm::InputTag>("PFjetInput");
93  labelHBHE_ = iConfig.getParameter<edm::InputTag>("HBHEInput");
94  labelHF_ = iConfig.getParameter<edm::InputTag>("HFInput");
95  labelHO_ = iConfig.getParameter<edm::InputTag>("HOInput");
96  labelTrigger_ = iConfig.getParameter<edm::InputTag>("TriggerResults");
97  labelPFCandidate_ = iConfig.getParameter<edm::InputTag>("particleFlowInput");
98  labelVertex_ = iConfig.getParameter<edm::InputTag>("VertexInput");
99  labelPFMET_ = iConfig.getParameter<edm::InputTag>("METInput");
100  labelGsfEle_ = iConfig.getParameter<edm::InputTag>("gsfeleInput");
101  labelRho_ = iConfig.getParameter<edm::InputTag>("rhoInput");
102  labelConv_ = iConfig.getParameter<edm::InputTag>("ConversionsInput");
103  labelBeamSpot_ = iConfig.getParameter<edm::InputTag>("BeamSpotInput");
104  labelLoosePhot_ = iConfig.getParameter<edm::InputTag>("PhoLoose");
105  labelTightPhot_ = iConfig.getParameter<edm::InputTag>("PhoTight");
106  minPtJet_ = iConfig.getParameter<double>("MinPtJet");
107  minPtPhoton_ = iConfig.getParameter<double>("MinPtPhoton");
108 
109  tok_Photon_ = consumes<reco::PhotonCollection>(labelPhoton_);
110  tok_PFJet_ = consumes<reco::PFJetCollection>(labelPFJet_);
111  tok_HBHE_ = consumes<edm::SortedCollection<HBHERecHit, edm::StrictWeakOrdering<HBHERecHit>>>(labelHBHE_);
112  tok_HF_ = consumes<edm::SortedCollection<HFRecHit, edm::StrictWeakOrdering<HFRecHit>>>(labelHF_);
113  tok_HO_ = consumes<edm::SortedCollection<HORecHit, edm::StrictWeakOrdering<HORecHit>>>(labelHO_);
114  tok_TrigRes_ = consumes<edm::TriggerResults>(labelTrigger_);
115  tok_PFCand_ = consumes<reco::PFCandidateCollection>(labelPFCandidate_);
116  tok_Vertex_ = consumes<reco::VertexCollection>(labelVertex_);
117  tok_PFMET_ = consumes<reco::PFMETCollection>(labelPFMET_);
118  tok_loosePhoton_ = consumes<edm::ValueMap<Bool_t>>(labelLoosePhot_);
119  tok_tightPhoton_ = consumes<edm::ValueMap<Bool_t>>(labelTightPhot_);
120  tok_GsfElec_ = consumes<reco::GsfElectronCollection>(labelGsfEle_);
121  tok_Rho_ = consumes<double>(labelRho_);
122  tok_Conv_ = consumes<reco::ConversionCollection>(labelConv_);
123  tok_BS_ = consumes<reco::BeamSpot>(labelBeamSpot_);
124 
125  // register your products
126  put_photon_ = produces<reco::PhotonCollection>(labelPhoton_.encode());
127  put_pfJet_ = produces<reco::PFJetCollection>(labelPFJet_.encode());
128  put_hbhe_ = produces<edm::SortedCollection<HBHERecHit, edm::StrictWeakOrdering<HBHERecHit>>>(labelHBHE_.encode());
129  put_hf_ = produces<edm::SortedCollection<HFRecHit, edm::StrictWeakOrdering<HFRecHit>>>(labelHF_.encode());
130  put_ho_ = produces<edm::SortedCollection<HORecHit, edm::StrictWeakOrdering<HORecHit>>>(labelHO_.encode());
131  put_trigger_ = produces<edm::TriggerResults>(labelTrigger_.encode());
132  put_loosePhot_ = produces<std::vector<Bool_t>>(labelLoosePhot_.encode());
133  put_tightPhot_ = produces<std::vector<Bool_t>>(labelTightPhot_.encode());
134  put_rho_ = produces<double>(labelRho_.encode());
135  put_pfCandidate_ = produces<reco::PFCandidateCollection>(labelPFCandidate_.encode());
136  put_vertex_ = produces<reco::VertexCollection>(labelVertex_.encode());
137  put_pfMET_ = produces<reco::PFMETCollection>(labelPFMET_.encode());
138  put_gsfEle_ = produces<reco::GsfElectronCollection>(labelGsfEle_.encode());
139  put_conv_ = produces<reco::ConversionCollection>(labelConv_.encode());
140  put_beamSpot_ = produces<reco::BeamSpot>(labelBeamSpot_.encode());
141 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDPutTokenT< double > put_rho_
std::string encode() const
Definition: InputTag.cc:159
edm::EDPutTokenT< std::vector< Bool_t > > put_tightPhot_
edm::EDPutTokenT< reco::PhotonCollection > put_photon_
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_tightPhoton_
edm::EDGetTokenT< reco::BeamSpot > tok_BS_
edm::EDGetTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > tok_HBHE_
edm::EDPutTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > put_hbhe_
edm::EDGetTokenT< reco::VertexCollection > tok_Vertex_
edm::EDPutTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > put_ho_
edm::EDPutTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > put_hf_
edm::EDPutTokenT< reco::PFJetCollection > put_pfJet_
edm::EDGetTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > tok_HF_
edm::EDGetTokenT< double > tok_Rho_
edm::EDPutTokenT< std::vector< Bool_t > > put_loosePhot_
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
edm::EDPutTokenT< edm::TriggerResults > put_trigger_
edm::EDPutTokenT< reco::BeamSpot > put_beamSpot_
edm::EDPutTokenT< reco::VertexCollection > put_vertex_
edm::EDGetTokenT< reco::PFMETCollection > tok_PFMET_
edm::EDPutTokenT< reco::GsfElectronCollection > put_gsfEle_
edm::EDGetTokenT< reco::ConversionCollection > tok_Conv_
edm::EDPutTokenT< reco::PFCandidateCollection > put_pfCandidate_
edm::EDPutTokenT< reco::ConversionCollection > put_conv_
edm::EDGetTokenT< edm::TriggerResults > tok_TrigRes_
edm::EDGetTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > tok_HO_
edm::EDGetTokenT< reco::GsfElectronCollection > tok_GsfElec_
edm::EDGetTokenT< reco::PhotonCollection > tok_Photon_
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_loosePhoton_
edm::EDGetTokenT< reco::PFCandidateCollection > tok_PFCand_
edm::EDPutTokenT< reco::PFMETCollection > put_pfMET_

◆ ~AlCaGammaJetProducer()

AlCaGammaJetProducer::~AlCaGammaJetProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

void AlCaGammaJetProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 321 of file AlCaGammaJetProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_2022v15_cff::InputTag.

321  {
323  desc.add<edm::InputTag>("PhoInput", edm::InputTag("gedPhotons"));
324  desc.add<edm::InputTag>("PFjetInput", edm::InputTag("ak4PFJetsCHS"));
325  desc.add<edm::InputTag>("HBHEInput", edm::InputTag("hbhereco"));
326  desc.add<edm::InputTag>("HFInput", edm::InputTag("hfreco"));
327  desc.add<edm::InputTag>("HOInput", edm::InputTag("horeco"));
328  desc.add<edm::InputTag>("METInput", edm::InputTag("pfMet"));
329  desc.add<edm::InputTag>("TriggerResults", edm::InputTag("TriggerResults::HLT"));
330  desc.add<edm::InputTag>("gsfeleInput", edm::InputTag("gedGsfElectrons"));
331  desc.add<edm::InputTag>("particleFlowInput", edm::InputTag("particleFlow"));
332  desc.add<edm::InputTag>("VertexInput", edm::InputTag("offlinePrimaryVertices"));
333  desc.add<edm::InputTag>("ConversionsInput", edm::InputTag("allConversions"));
334  desc.add<edm::InputTag>("rhoInput", edm::InputTag("fixedGridRhoFastjetAll"));
335  desc.add<edm::InputTag>("BeamSpotInput", edm::InputTag("offlineBeamSpot"));
336  desc.add<edm::InputTag>("PhoLoose", edm::InputTag("PhotonIDProdGED", "PhotonCutBasedIDLoose"));
337  desc.add<edm::InputTag>("PhoTight", edm::InputTag("PhotonIDProdGED", "PhotonCutBasedIDTight"));
338  desc.add<double>("MinPtJet", 10.0);
339  desc.add<double>("MinPtPhoton", 10.0);
340  descriptions.add("alcaGammaJetProducer", desc);
341 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void AlCaGammaJetProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup  
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 164 of file AlCaGammaJetProducer.cc.

References accept(), EcalCondDBWriter_cfi::beam, cms::cuda::bs, conv, ntupleEnum::gsf, photonIsolationHIProducer_cfi::hbhe, photonIsolationHIProducer_cfi::hf, photonIsolationHIProducer_cfi::ho, iEvent, createfilelist::int, labelBeamSpot_, labelConv_, labelGsfEle_, labelHBHE_, labelHF_, labelHO_, labelPFCandidate_, labelPFJet_, labelPFMET_, labelPhoton_, labelRho_, labelTrigger_, labelVertex_, eostools::move(), pfDeepBoostedJetPreprocessParams_cfi::pfcand, displacedMuons_cfi::photon, put_beamSpot_, put_conv_, put_gsfEle_, put_hbhe_, put_hf_, put_ho_, put_loosePhot_, put_pfCandidate_, put_pfJet_, put_pfMET_, put_photon_, put_rho_, put_tightPhot_, put_trigger_, put_vertex_, select(), tok_BS_, tok_Conv_, tok_GsfElec_, tok_HBHE_, tok_HF_, tok_HO_, tok_loosePhoton_, tok_PFCand_, tok_PFJet_, tok_PFMET_, tok_Photon_, tok_Rho_, tok_tightPhoton_, tok_TrigRes_, tok_Vertex_, ClusterTask_cfi::trig, and extraflags_cff::vtx.

164  {
165  // Access the collections from iEvent
166  auto const& phoHandle = iEvent.getHandle(tok_Photon_);
167  if (!phoHandle.isValid()) {
168  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get the product " << labelPhoton_;
169  return;
170  }
171  const reco::PhotonCollection& photon = *(phoHandle.product());
172 
173  auto const& pfjet = iEvent.getHandle(tok_PFJet_);
174  if (!pfjet.isValid()) {
175  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelPFJet_;
176  return;
177  }
178  const reco::PFJetCollection& pfjets = *(pfjet.product());
179 
180  auto const& pfc = iEvent.getHandle(tok_PFCand_);
181  if (!pfc.isValid()) {
182  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelPFCandidate_;
183  return;
184  }
185  const reco::PFCandidateCollection& pfcand = *(pfc.product());
186 
187  auto const& vt = iEvent.getHandle(tok_Vertex_);
188  if (!vt.isValid()) {
189  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelVertex_;
190  return;
191  }
192  const reco::VertexCollection& vtx = *(vt.product());
193 
194  auto const& pfmt = iEvent.getHandle(tok_PFMET_);
195  if (!pfmt.isValid()) {
196  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelPFMET_;
197  return;
198  }
199  const reco::PFMETCollection& pfmet = *(pfmt.product());
200 
201  auto const& hbhe = iEvent.getHandle(tok_HBHE_);
202  if (!hbhe.isValid()) {
203  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelHBHE_;
204  return;
205  }
207 
208  auto const& ho = iEvent.getHandle(tok_HO_);
209  if (!ho.isValid()) {
210  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelHO_;
211  return;
212  }
214 
215  auto const& hf = iEvent.getHandle(tok_HF_);
216  if (!hf.isValid()) {
217  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelHF_;
218  return;
219  }
221 
222  auto const& trig = iEvent.getHandle(tok_TrigRes_);
223  if (!trig.isValid()) {
224  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelTrigger_;
225  return;
226  }
227  const edm::TriggerResults& trigres = *(trig.product());
228 
229  auto const& rh = iEvent.getHandle(tok_Rho_);
230  if (!rh.isValid()) {
231  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelRho_;
232  return;
233  }
234  const double rho_val = *(rh.product());
235 
236  auto const& gsf = iEvent.getHandle(tok_GsfElec_);
237  if (!gsf.isValid()) {
238  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelGsfEle_;
239  return;
240  }
241  const reco::GsfElectronCollection& gsfele = *(gsf.product());
242 
243  auto const& con = iEvent.getHandle(tok_Conv_);
244  if (!con.isValid()) {
245  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelConv_;
246  return;
247  }
248  const reco::ConversionCollection& conv = *(con.product());
249 
250  auto const& bs = iEvent.getHandle(tok_BS_);
251  if (!bs.isValid()) {
252  edm::LogWarning("AlCaGammaJet") << "AlCaGammaJetProducer: Error! can't get product " << labelBeamSpot_;
253  return;
254  }
255  const reco::BeamSpot& beam = *(bs.product());
256 
257  // declare variables
258  // copy from standard place, if the event is useful
259  reco::BeamSpot miniBeamSpotCollection(
260  beam.position(), beam.sigmaZ(), beam.dxdz(), beam.dydz(), beam.BeamWidthX(), beam.covariance(), beam.type());
261 
262  std::vector<Bool_t> miniLoosePhoton{};
263  std::vector<Bool_t> miniTightPhoton{};
264 
265  // See if this event is useful
266  bool accept = select(photon, pfjets);
267  if (accept) {
268  iEvent.emplace(put_photon_, photon);
269  iEvent.emplace(put_pfJet_, pfjets);
270  iEvent.emplace(put_hbhe_, Hithbhe);
271  iEvent.emplace(put_hf_, Hithf);
272  iEvent.emplace(put_ho_, Hitho);
273  iEvent.emplace(put_trigger_, trigres);
274  iEvent.emplace(put_pfCandidate_, pfcand);
275  iEvent.emplace(put_vertex_, vtx);
276  iEvent.emplace(put_pfMET_, pfmet);
277  iEvent.emplace(put_gsfEle_, gsfele);
278  iEvent.emplace(put_rho_, rho_val);
279  iEvent.emplace(put_conv_, conv);
280 
281  auto const& loosePhotonQual = iEvent.getHandle(tok_loosePhoton_);
282  auto const& tightPhotonQual = iEvent.getHandle(tok_tightPhoton_);
283  if (loosePhotonQual.isValid() && tightPhotonQual.isValid()) {
284  miniLoosePhoton.reserve(photon.size());
285  miniTightPhoton.reserve(photon.size());
286  for (int iPho = 0; iPho < int(photon.size()); ++iPho) {
287  edm::Ref<reco::PhotonCollection> photonRef(phoHandle, iPho);
288  if (!photonRef) {
289  edm::LogVerbatim("AlCaGammaJet") << "failed ref";
290  miniLoosePhoton.push_back(-1);
291  miniTightPhoton.push_back(-1);
292  } else {
293  miniLoosePhoton.push_back((*loosePhotonQual)[photonRef]);
294  miniTightPhoton.push_back((*tightPhotonQual)[photonRef]);
295  }
296  }
297  }
298  } else {
309  iEvent.emplace(put_rho_, double{});
311  }
312 
313  //Put them in the event
314  iEvent.emplace(put_beamSpot_, std::move(miniBeamSpotCollection));
315  iEvent.emplace(put_loosePhot_, std::move(miniLoosePhoton));
316  iEvent.emplace(put_tightPhot_, std::move(miniTightPhoton));
317 
318  return;
319 }
Log< level::Info, true > LogVerbatim
edm::EDPutTokenT< double > put_rho_
edm::EDPutTokenT< std::vector< Bool_t > > put_tightPhot_
edm::EDPutTokenT< reco::PhotonCollection > put_photon_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_tightPhoton_
edm::EDGetTokenT< reco::BeamSpot > tok_BS_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
edm::EDGetTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > tok_HBHE_
int iEvent
Definition: GenABIO.cc:224
edm::EDPutTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > put_hbhe_
edm::EDGetTokenT< reco::VertexCollection > tok_Vertex_
edm::EDPutTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > put_ho_
bool select(const reco::PhotonCollection &, const reco::PFJetCollection &) const
edm::EDPutTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > put_hf_
edm::EDPutTokenT< reco::PFJetCollection > put_pfJet_
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::EDGetTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > tok_HF_
edm::EDGetTokenT< double > tok_Rho_
edm::EDPutTokenT< std::vector< Bool_t > > put_loosePhot_
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
edm::EDPutTokenT< edm::TriggerResults > put_trigger_
edm::EDPutTokenT< reco::BeamSpot > put_beamSpot_
edm::EDPutTokenT< reco::VertexCollection > put_vertex_
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
EPOS::IO_EPOS conv
edm::EDGetTokenT< reco::PFMETCollection > tok_PFMET_
edm::EDPutTokenT< reco::GsfElectronCollection > put_gsfEle_
edm::EDGetTokenT< reco::ConversionCollection > tok_Conv_
edm::EDPutTokenT< reco::PFCandidateCollection > put_pfCandidate_
edm::EDPutTokenT< reco::ConversionCollection > put_conv_
edm::EDGetTokenT< edm::TriggerResults > tok_TrigRes_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
std::vector< reco::PFMET > PFMETCollection
collection of PFMET objects
edm::EDGetTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > tok_HO_
edm::EDGetTokenT< reco::GsfElectronCollection > tok_GsfElec_
edm::EDGetTokenT< reco::PhotonCollection > tok_Photon_
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_loosePhoton_
def move(src, dest)
Definition: eostools.py:511
edm::EDGetTokenT< reco::PFCandidateCollection > tok_PFCand_
edm::EDPutTokenT< reco::PFMETCollection > put_pfMET_

◆ select()

bool AlCaGammaJetProducer::select ( const reco::PhotonCollection ph,
const reco::PFJetCollection jt 
) const
private

Definition at line 143 of file AlCaGammaJetProducer.cc.

References minPtJet_, minPtPhoton_, and convertSQLiteXML::ok.

Referenced by produce().

143  {
144  // Check the requirement for minimum pT
145  if (ph.empty())
146  return false;
147  bool ok(false);
148  for (reco::PFJetCollection::const_iterator itr = jt.begin(); itr != jt.end(); ++itr) {
149  if (itr->pt() >= minPtJet_) {
150  ok = true;
151  break;
152  }
153  }
154  if (!ok)
155  return ok;
156  for (reco::PhotonCollection::const_iterator itr = ph.begin(); itr != ph.end(); ++itr) {
157  if (itr->pt() >= minPtPhoton_)
158  return ok;
159  }
160  return false;
161 }

Member Data Documentation

◆ labelBeamSpot_

edm::InputTag AlCaGammaJetProducer::labelBeamSpot_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelConv_

edm::InputTag AlCaGammaJetProducer::labelConv_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelGsfEle_

edm::InputTag AlCaGammaJetProducer::labelGsfEle_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelHBHE_

edm::InputTag AlCaGammaJetProducer::labelHBHE_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelHF_

edm::InputTag AlCaGammaJetProducer::labelHF_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelHO_

edm::InputTag AlCaGammaJetProducer::labelHO_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelLoosePhot_

edm::InputTag AlCaGammaJetProducer::labelLoosePhot_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer().

◆ labelPFCandidate_

edm::InputTag AlCaGammaJetProducer::labelPFCandidate_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelPFJet_

edm::InputTag AlCaGammaJetProducer::labelPFJet_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelPFMET_

edm::InputTag AlCaGammaJetProducer::labelPFMET_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelPhoton_

edm::InputTag AlCaGammaJetProducer::labelPhoton_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelRho_

edm::InputTag AlCaGammaJetProducer::labelRho_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelTightPhot_

edm::InputTag AlCaGammaJetProducer::labelTightPhot_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer().

◆ labelTrigger_

edm::InputTag AlCaGammaJetProducer::labelTrigger_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ labelVertex_

edm::InputTag AlCaGammaJetProducer::labelVertex_
private

Definition at line 52 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ minPtJet_

double AlCaGammaJetProducer::minPtJet_
private

Definition at line 54 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and select().

◆ minPtPhoton_

double AlCaGammaJetProducer::minPtPhoton_
private

Definition at line 54 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and select().

◆ put_beamSpot_

edm::EDPutTokenT<reco::BeamSpot> AlCaGammaJetProducer::put_beamSpot_
private

Definition at line 86 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_conv_

edm::EDPutTokenT<reco::ConversionCollection> AlCaGammaJetProducer::put_conv_
private

Definition at line 85 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_gsfEle_

edm::EDPutTokenT<reco::GsfElectronCollection> AlCaGammaJetProducer::put_gsfEle_
private

Definition at line 84 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_hbhe_

Definition at line 74 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_hf_

Definition at line 75 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_ho_

Definition at line 76 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_loosePhot_

edm::EDPutTokenT<std::vector<Bool_t> > AlCaGammaJetProducer::put_loosePhot_
private

Definition at line 78 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_pfCandidate_

edm::EDPutTokenT<reco::PFCandidateCollection> AlCaGammaJetProducer::put_pfCandidate_
private

Definition at line 81 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_pfJet_

edm::EDPutTokenT<reco::PFJetCollection> AlCaGammaJetProducer::put_pfJet_
private

Definition at line 73 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_pfMET_

edm::EDPutTokenT<reco::PFMETCollection> AlCaGammaJetProducer::put_pfMET_
private

Definition at line 83 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_photon_

edm::EDPutTokenT<reco::PhotonCollection> AlCaGammaJetProducer::put_photon_
private

Definition at line 72 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_rho_

edm::EDPutTokenT<double> AlCaGammaJetProducer::put_rho_
private

Definition at line 80 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_tightPhot_

edm::EDPutTokenT<std::vector<Bool_t> > AlCaGammaJetProducer::put_tightPhot_
private

Definition at line 79 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_trigger_

edm::EDPutTokenT<edm::TriggerResults> AlCaGammaJetProducer::put_trigger_
private

Definition at line 77 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ put_vertex_

edm::EDPutTokenT<reco::VertexCollection> AlCaGammaJetProducer::put_vertex_
private

Definition at line 82 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_BS_

edm::EDGetTokenT<reco::BeamSpot> AlCaGammaJetProducer::tok_BS_
private

Definition at line 68 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_Conv_

edm::EDGetTokenT<reco::ConversionCollection> AlCaGammaJetProducer::tok_Conv_
private

Definition at line 67 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_GsfElec_

edm::EDGetTokenT<reco::GsfElectronCollection> AlCaGammaJetProducer::tok_GsfElec_
private

Definition at line 65 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_HBHE_

Definition at line 58 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_HF_

Definition at line 59 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_HO_

Definition at line 60 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_loosePhoton_

edm::EDGetTokenT<edm::ValueMap<Bool_t> > AlCaGammaJetProducer::tok_loosePhoton_
private

Definition at line 69 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_PFCand_

edm::EDGetTokenT<reco::PFCandidateCollection> AlCaGammaJetProducer::tok_PFCand_
private

Definition at line 62 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_PFJet_

edm::EDGetTokenT<reco::PFJetCollection> AlCaGammaJetProducer::tok_PFJet_
private

Definition at line 57 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_PFMET_

edm::EDGetTokenT<reco::PFMETCollection> AlCaGammaJetProducer::tok_PFMET_
private

Definition at line 64 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_Photon_

edm::EDGetTokenT<reco::PhotonCollection> AlCaGammaJetProducer::tok_Photon_
private

Definition at line 56 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_Rho_

edm::EDGetTokenT<double> AlCaGammaJetProducer::tok_Rho_
private

Definition at line 66 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_tightPhoton_

edm::EDGetTokenT<edm::ValueMap<Bool_t> > AlCaGammaJetProducer::tok_tightPhoton_
private

Definition at line 70 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_TrigRes_

edm::EDGetTokenT<edm::TriggerResults> AlCaGammaJetProducer::tok_TrigRes_
private

Definition at line 61 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().

◆ tok_Vertex_

edm::EDGetTokenT<reco::VertexCollection> AlCaGammaJetProducer::tok_Vertex_
private

Definition at line 63 of file AlCaGammaJetProducer.cc.

Referenced by AlCaGammaJetProducer(), and produce().