CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HLTHcalPhiSymFilter Class Reference

#include <HLTHcalPhiSymFilter.h>

Inheritance diagram for HLTHcalPhiSymFilter:
HLTFilter edm::global::EDFilter<> edm::global::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
 
 HLTHcalPhiSymFilter (const edm::ParameterSet &)
 
 ~HLTHcalPhiSymFilter () override
 
- Public Member Functions inherited from HLTFilter
 HLTFilter (const edm::ParameterSet &config)
 
int module (edm::Event const &) const
 
const std::string * moduleLabel () const
 
int path (edm::Event const &) const
 
const std::string * pathName (edm::Event const &) const
 
std::pair< int, int > pmid (edm::Event const &) const
 
bool saveTags () const
 
 ~HLTFilter () override
 
- Public Member Functions inherited from edm::global::EDFilter<>
 EDFilter ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () 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
 
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)
 
 ~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
 
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::vector< ModuleDescription const * > &modules, 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
 
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 HLTFilter
static void makeHLTFilterDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::global::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

double eCut_HB_
 
double eCut_HE_
 
double eCut_HF_
 
double eCut_HO_
 
edm::InputTag HBHEHits_
 
edm::EDGetTokenT< HBHERecHitCollectionHBHEHitsToken_
 
edm::InputTag HFHits_
 
edm::EDGetTokenT< HFRecHitCollectionHFHitsToken_
 
edm::InputTag HOHits_
 
edm::EDGetTokenT< HORecHitCollectionHOHitsToken_
 
std::string phiSymHBHEHits_
 
std::string phiSymHFHits_
 
std::string phiSymHOHits_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

Detailed Description

Description: Producer for HcalRecHits to be used for phi-symmetry HCAL calibration . Discard events in which no suitable rechit is available

Definition at line 39 of file HLTHcalPhiSymFilter.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file HLTHcalPhiSymFilter.cc.

References eCut_HB_, eCut_HE_, eCut_HF_, eCut_HO_, edm::ParameterSet::getParameter(), HBHEHits_, HBHEHitsToken_, HFHits_, HFHitsToken_, HOHits_, HOHitsToken_, phiSymHBHEHits_, phiSymHFHits_, phiSymHOHits_, AlCaHLTBitMon_QueryRunRegistry::string, and ~HLTHcalPhiSymFilter().

5  : HLTFilter(iConfig)
6 {
7  HBHEHits_ = iConfig.getParameter< edm::InputTag > ("HBHEHitCollection");
8  HOHits_ = iConfig.getParameter< edm::InputTag > ("HOHitCollection");
9  HFHits_= iConfig.getParameter<edm::InputTag>("HFHitCollection");
10  phiSymHBHEHits_ = iConfig.getParameter<std::string > ("phiSymHBHEHitCollection");
11  phiSymHOHits_ = iConfig.getParameter<std::string > ("phiSymHOHitCollection");
12  phiSymHFHits_ = iConfig.getParameter<std::string > ("phiSymHFHitCollection");
13 
14  eCut_HB_ = iConfig.getParameter< double > ("eCut_HB");
15  eCut_HE_ = iConfig.getParameter< double > ("eCut_HE");
16  eCut_HO_ = iConfig.getParameter<double>("eCut_HO");
17  eCut_HF_ = iConfig.getParameter<double>("eCut_HF");
18 
19  HBHEHitsToken_ = consumes<HBHERecHitCollection>(HBHEHits_);
20  HOHitsToken_ = consumes<HORecHitCollection>(HOHits_);
21  HFHitsToken_ = consumes<HFRecHitCollection>(HFHits_);
22 
23  //register your products
24  produces< HBHERecHitCollection >(phiSymHBHEHits_);
25  produces< HORecHitCollection >(phiSymHOHits_);
26  produces< HFRecHitCollection >(phiSymHFHits_);
27 }
T getParameter(std::string const &) const
edm::EDGetTokenT< HFRecHitCollection > HFHitsToken_
edm::EDGetTokenT< HORecHitCollection > HOHitsToken_
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
edm::EDGetTokenT< HBHERecHitCollection > HBHEHitsToken_
HLTHcalPhiSymFilter::~HLTHcalPhiSymFilter ( )
overridedefault

Referenced by HLTHcalPhiSymFilter().

Member Function Documentation

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

Definition at line 33 of file HLTHcalPhiSymFilter.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLTFilter::makeHLTFilterDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

33  {
36  desc.add<edm::InputTag>("HBHEHitCollection",edm::InputTag("hbhereco"));
37  desc.add<edm::InputTag>("HOHitCollection",edm::InputTag("horeco"));
38  desc.add<edm::InputTag>("HFHitCollection",edm::InputTag("hfreco"));
39  desc.add<double>("eCut_HE",-10.);
40  desc.add<double>("eCut_HF",-10.);
41  desc.add<double>("eCut_HB",-10.);
42  desc.add<double>("eCut_HO",-10.);
43  desc.add<std::string>("phiSymHOHitCollection","phiSymHcalRecHitsHO");
44  desc.add<std::string>("phiSymHBHEHitCollection","phiSymHcalRecHitsHBHE");
45  desc.add<std::string>("phiSymHFHitCollection","phiSymHcalRecHitsHF");
46  descriptions.add("alCaHcalPhiSymStream",desc);
47 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:29
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool HLTHcalPhiSymFilter::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
overridevirtual

Implements HLTFilter.

Definition at line 51 of file HLTHcalPhiSymFilter.cc.

References DEFINE_FWK_MODULE, eCut_HB_, eCut_HE_, eCut_HF_, eCut_HO_, edm::Event::getByToken(), HBHEHitsToken_, HFHitsToken_, HOHitsToken_, eostools::move(), phiSymHBHEHits_, phiSymHFHits_, phiSymHOHits_, and edm::Event::put().

52 {
56 
57  iEvent.getByToken(HBHEHitsToken_,HBHERecHitsH);
58  iEvent.getByToken(HOHitsToken_,HORecHitsH);
59  iEvent.getByToken(HFHitsToken_,HFRecHitsH);
60 
61  //Create empty output collections
62  std::unique_ptr< HBHERecHitCollection > phiSymHBHERecHitCollection( new HBHERecHitCollection );
63  std::unique_ptr< HORecHitCollection > phiSymHORecHitCollection( new HORecHitCollection );
64  std::unique_ptr< HFRecHitCollection > phiSymHFRecHitCollection( new HFRecHitCollection );
65 
66  //Select interesting HBHERecHits
67  for (auto const & it : *HBHERecHitsH) {
68  if (it.energy()>eCut_HB_&&it.id().subdet()==1) {
69  phiSymHBHERecHitCollection->push_back(it);
70  }
71  if (it.energy()>eCut_HE_&&it.id().subdet()==2) {
72  phiSymHBHERecHitCollection->push_back(it);
73  }
74 
75  }
76 
77  //Select interesting HORecHits
78  for (auto const & it : *HORecHitsH) {
79  if (it.energy()>eCut_HO_&&it.id().subdet()==3) {
80  phiSymHORecHitCollection->push_back(it);
81  }
82  }
83 
84  //Select interesting HFRecHits
85  for (auto const & it : *HFRecHitsH) {
86  if (it.energy()>eCut_HF_&&it.id().subdet()==4) {
87  phiSymHFRecHitCollection->push_back(it);
88  }
89  }
90 
91  if ((phiSymHBHERecHitCollection->empty() ) && (phiSymHORecHitCollection->empty()) && (phiSymHFRecHitCollection->empty())) return false;
92 
93  //Put selected information in the event
94  if (!phiSymHBHERecHitCollection->empty()) iEvent.put(std::move(phiSymHBHERecHitCollection), phiSymHBHEHits_);
95  if (!phiSymHORecHitCollection->empty()) iEvent.put(std::move(phiSymHORecHitCollection), phiSymHOHits_);
96  if (!phiSymHFRecHitCollection->empty()) iEvent.put(std::move(phiSymHFRecHitCollection), phiSymHFHits_);
97 
98  return true;
99 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
edm::EDGetTokenT< HFRecHitCollection > HFHitsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< HORecHitCollection > HOHitsToken_
edm::EDGetTokenT< HBHERecHitCollection > HBHEHitsToken_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

double HLTHcalPhiSymFilter::eCut_HB_
private

Definition at line 58 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

double HLTHcalPhiSymFilter::eCut_HE_
private

Definition at line 59 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

double HLTHcalPhiSymFilter::eCut_HF_
private

Definition at line 61 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

double HLTHcalPhiSymFilter::eCut_HO_
private

Definition at line 60 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

edm::InputTag HLTHcalPhiSymFilter::HBHEHits_
private

Definition at line 52 of file HLTHcalPhiSymFilter.h.

Referenced by HLTHcalPhiSymFilter().

edm::EDGetTokenT<HBHERecHitCollection> HLTHcalPhiSymFilter::HBHEHitsToken_
private

Definition at line 49 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

edm::InputTag HLTHcalPhiSymFilter::HFHits_
private

Definition at line 54 of file HLTHcalPhiSymFilter.h.

Referenced by HLTHcalPhiSymFilter().

edm::EDGetTokenT<HFRecHitCollection> HLTHcalPhiSymFilter::HFHitsToken_
private

Definition at line 51 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

edm::InputTag HLTHcalPhiSymFilter::HOHits_
private

Definition at line 53 of file HLTHcalPhiSymFilter.h.

Referenced by HLTHcalPhiSymFilter().

edm::EDGetTokenT<HORecHitCollection> HLTHcalPhiSymFilter::HOHitsToken_
private

Definition at line 50 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

std::string HLTHcalPhiSymFilter::phiSymHBHEHits_
private

Definition at line 55 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

std::string HLTHcalPhiSymFilter::phiSymHFHits_
private

Definition at line 57 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().

std::string HLTHcalPhiSymFilter::phiSymHOHits_
private

Definition at line 56 of file HLTHcalPhiSymFilter.h.

Referenced by hltFilter(), and HLTHcalPhiSymFilter().