test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::GlobalHaloDataProducer Class Reference

#include <GlobalHaloDataProducer.h>

Inheritance diagram for reco::GlobalHaloDataProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 GlobalHaloDataProducer (const edm::ParameterSet &)
 
 ~GlobalHaloDataProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::EDGetTokenT
< reco::CaloMETCollection
calomet_token_
 
edm::EDGetTokenT< edm::View
< reco::Candidate > > 
calotower_token_
 
float CaloTowerEtThreshold
 
edm::EDGetTokenT< CSCHaloDatacschalo_token_
 
edm::EDGetTokenT
< CSCRecHit2DCollection
cscrechit_token_
 
edm::EDGetTokenT
< CSCSegmentCollection
cscsegment_token_
 
edm::EDGetTokenT< EcalHaloDataecalhalo_token_
 
float EcalMaxMatchingRadius
 
float EcalMinMatchingRadius
 
GlobalHaloAlgo GlobalAlgo
 
edm::EDGetTokenT< HcalHaloDatahcalhalo_token_
 
float HcalMaxMatchingRadius
 
float HcalMinMatchingRadius
 
bool ishlt
 
edm::InputTag IT_CaloTower
 
edm::InputTag IT_CSCHaloData
 
edm::InputTag IT_CSCRecHit
 
edm::InputTag IT_CSCSegment
 
edm::InputTag IT_EcalHaloData
 
edm::InputTag IT_HcalHaloData
 
edm::InputTag IT_met
 
edm::InputTag IT_Muon
 
edm::EDGetTokenT
< reco::MuonCollection
muon_token_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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

Definition at line 182 of file GlobalHaloDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file GlobalHaloDataProducer.cc.

References edm::ParameterSet::getParameter().

16 {
17 
18  ishlt = iConfig.getParameter< bool> ("IsHLT");
19 
20  //Higher Level Reco
21  IT_met = iConfig.getParameter<edm::InputTag>("metLabel");
22  IT_CaloTower = iConfig.getParameter<edm::InputTag>("calotowerLabel");
23  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
24  IT_CSCRecHit = iConfig.getParameter<edm::InputTag>("CSCRecHitLabel");
25  IT_Muon = iConfig.getParameter<edm::InputTag>("MuonLabel");
26  //Halo Data from Sub-detectors
27  IT_CSCHaloData = iConfig.getParameter<edm::InputTag>("CSCHaloDataLabel");
28  IT_EcalHaloData = iConfig.getParameter<edm::InputTag> ("EcalHaloDataLabel");
29  IT_HcalHaloData = iConfig.getParameter<edm::InputTag> ("HcalHaloDataLabel");
30 
31  EcalMinMatchingRadius = (float)iConfig.getParameter<double>("EcalMinMatchingRadiusParam");
32  EcalMaxMatchingRadius = (float)iConfig.getParameter<double>("EcalMaxMatchingRadiusParam");
33  HcalMinMatchingRadius = (float)iConfig.getParameter<double>("HcalMinMatchingRadiusParam");
34  HcalMaxMatchingRadius = (float)iConfig.getParameter<double>("HcalMaxMatchingRadiusParam");
35  CaloTowerEtThreshold = (float)iConfig.getParameter<double>("CaloTowerEtThresholdParam");
36 
37  //Parameters for CSC-calo matching
38  //Flat segment theta condition:
39  GlobalAlgo.SetMaxSegmentTheta( (float) iConfig.getParameter<double>("MaxSegmentTheta") );
40  //EB
41  GlobalAlgo.setEtThresholdforCSCCaloMatchingEB((float) iConfig.getParameter<double>("rh_et_threshforcscmatching_eb") );
42  GlobalAlgo.setRcaloMinRsegmLowThresholdforCSCCaloMatchingEB((float) iConfig.getParameter<double>("rcalominrsegm_lowthresh_eb") );
43  GlobalAlgo.setRcaloMinRsegmHighThresholdforCSCCaloMatchingEB((float) iConfig.getParameter<double>("rcalominrsegm_highthresh_eb") );
44  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingEB((float) iConfig.getParameter<double>("dtcalosegm_thresh_eb") );
45  GlobalAlgo.setDPhicalosegmThresholdforCSCCaloMatchingEB((float) iConfig.getParameter<double>("dphicalosegm_thresh_eb") );
46  //EE
47  GlobalAlgo.setEtThresholdforCSCCaloMatchingEE((float) iConfig.getParameter<double>("rh_et_threshforcscmatching_ee") );
48  GlobalAlgo.setRcaloMinRsegmLowThresholdforCSCCaloMatchingEE((float) iConfig.getParameter<double>("rcalominrsegm_lowthresh_ee") );
49  GlobalAlgo.setRcaloMinRsegmHighThresholdforCSCCaloMatchingEE((float) iConfig.getParameter<double>("rcalominrsegm_highthresh_ee") );
50  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingEE((float) iConfig.getParameter<double>("dtcalosegm_thresh_ee") );
51  GlobalAlgo.setDPhicalosegmThresholdforCSCCaloMatchingEE((float) iConfig.getParameter<double>("dphicalosegm_thresh_ee") );
52  //HB
53  GlobalAlgo.setEtThresholdforCSCCaloMatchingHB((float) iConfig.getParameter<double>("rh_et_threshforcscmatching_hb") );
54  GlobalAlgo.setRcaloMinRsegmLowThresholdforCSCCaloMatchingHB((float) iConfig.getParameter<double>("rcalominrsegm_lowthresh_hb") );
55  GlobalAlgo.setRcaloMinRsegmHighThresholdforCSCCaloMatchingHB((float) iConfig.getParameter<double>("rcalominrsegm_highthresh_hb") );
56  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingHB((float) iConfig.getParameter<double>("dtcalosegm_thresh_hb") );
57  GlobalAlgo.setDPhicalosegmThresholdforCSCCaloMatchingHB((float) iConfig.getParameter<double>("dphicalosegm_thresh_hb") );
58  //HE
59  GlobalAlgo.setEtThresholdforCSCCaloMatchingHE((float) iConfig.getParameter<double>("rh_et_threshforcscmatching_he") );
60  GlobalAlgo.setRcaloMinRsegmLowThresholdforCSCCaloMatchingHE((float) iConfig.getParameter<double>("rcalominrsegm_lowthresh_he") );
61  GlobalAlgo.setRcaloMinRsegmHighThresholdforCSCCaloMatchingHE((float) iConfig.getParameter<double>("rcalominrsegm_highthresh_he") );
62  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingHE((float) iConfig.getParameter<double>("dtcalosegm_thresh_he") );
63  GlobalAlgo.setDPhicalosegmThresholdforCSCCaloMatchingHE((float) iConfig.getParameter<double>("dphicalosegm_thresh_he") );
64 
65 
66 
67  calotower_token_ = consumes<edm::View<Candidate> >(IT_CaloTower);
68  calomet_token_ = consumes<reco::CaloMETCollection>(IT_met);
69  cscsegment_token_ = consumes<CSCSegmentCollection>(IT_CSCSegment);
70  cscrechit_token_ = consumes<CSCRecHit2DCollection>(IT_CSCRecHit);
71  muon_token_ = consumes<reco::MuonCollection>(IT_Muon);
72  cschalo_token_ = consumes<CSCHaloData>(IT_CSCHaloData);
73  ecalhalo_token_ = consumes<EcalHaloData>(IT_EcalHaloData);
74  hcalhalo_token_ = consumes<HcalHaloData>(IT_HcalHaloData);
75 
76  produces<GlobalHaloData>();
77 }
T getParameter(std::string const &) const
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingHB(float x)
void setEtThresholdforCSCCaloMatchingHB(float x)
void SetMaxSegmentTheta(float x)
void setDtcalosegmThresholdforCSCCaloMatchingHE(float x)
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingHE(float x)
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingHB(float x)
void setDPhicalosegmThresholdforCSCCaloMatchingEB(float x)
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_token_
void setDtcalosegmThresholdforCSCCaloMatchingEE(float x)
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingEB(float x)
void setDPhicalosegmThresholdforCSCCaloMatchingEE(float x)
void setEtThresholdforCSCCaloMatchingHE(float x)
void setEtThresholdforCSCCaloMatchingEB(float x)
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingHE(float x)
void setEtThresholdforCSCCaloMatchingEE(float x)
void setDtcalosegmThresholdforCSCCaloMatchingEB(float x)
edm::EDGetTokenT< reco::CaloMETCollection > calomet_token_
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingEE(float x)
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingEB(float x)
void setDPhicalosegmThresholdforCSCCaloMatchingHB(float x)
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void setDPhicalosegmThresholdforCSCCaloMatchingHE(float x)
edm::EDGetTokenT< EcalHaloData > ecalhalo_token_
void setDtcalosegmThresholdforCSCCaloMatchingHB(float x)
edm::EDGetTokenT< HcalHaloData > hcalhalo_token_
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingEE(float x)
edm::EDGetTokenT< CSCHaloData > cschalo_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_
GlobalHaloDataProducer::~GlobalHaloDataProducer ( )

Definition at line 153 of file GlobalHaloDataProducer.cc.

153 {}

Member Function Documentation

void GlobalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 79 of file GlobalHaloDataProducer.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), GlobalHaloData_cfi::GlobalHaloData, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), edm::Handle< T >::product(), and edm::Event::put().

80 {
81  //Get CSC Geometry
82  edm::ESHandle<CSCGeometry> TheCSCGeometry;
83  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);
84 
85  //Get Global Tracking Geometry
86  edm::ESHandle<GlobalTrackingGeometry> TheGlobalTrackingGeometry;
87  iSetup.get<GlobalTrackingGeometryRecord>().get(TheGlobalTrackingGeometry);
88 
89  //Get CaloGeometry
90  edm::ESHandle<CaloGeometry> TheCaloGeometry;
91  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
92 
93  //Get CaloTowers
94  edm::Handle<edm::View<Candidate> > TheCaloTowers;
95  // iEvent.getByLabel(IT_CaloTower,TheCaloTowers);
96  iEvent.getByToken(calotower_token_, TheCaloTowers);
97 
98  //Get MET
100  // iEvent.getByLabel(IT_met, TheCaloMET);
101  iEvent.getByToken(calomet_token_, TheCaloMET);
102 
103  //Get CSCSegments
104  edm::Handle<CSCSegmentCollection> TheCSCSegments;
105  // iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);
106  iEvent.getByToken(cscsegment_token_, TheCSCSegments);
107 
108  //Get CSCRecHits
110  // iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits );
111  iEvent.getByToken(cscrechit_token_, TheCSCRecHits);
112 
113  //Collision Muon Collection
115  iEvent.getByToken(muon_token_, TheMuons);
116 
117  //Get CSCHaloData
118  edm::Handle<reco::CSCHaloData> TheCSCHaloData;
119  // iEvent.getByLabel(IT_CSCHaloData, TheCSCHaloData );
120  iEvent.getByToken(cschalo_token_, TheCSCHaloData);
121 
122  // Get EcalHaloData
123  edm::Handle<reco::EcalHaloData> TheEcalHaloData;
124  // iEvent.getByLabel(IT_EcalHaloData, TheEcalHaloData );
125  iEvent.getByToken(ecalhalo_token_, TheEcalHaloData);
126 
127  // Get HcalHaloData
128  edm::Handle<reco::HcalHaloData> TheHcalHaloData;
129  // iEvent.getByLabel(IT_HcalHaloData, TheHcalHaloData );
130  iEvent.getByToken(hcalhalo_token_, TheHcalHaloData);
131 
132  // Run the GlobalHaloAlgo to reconstruct the GlobalHaloData object
136  // GlobalHaloData GlobalData;
137 
138 
139  if(TheCaloGeometry.isValid() && TheCaloMET.isValid() && TheCaloTowers.isValid() && TheCSCHaloData.isValid() && TheEcalHaloData.isValid() && TheHcalHaloData.isValid() )
140  {
141  std::auto_ptr<GlobalHaloData> GlobalData( new GlobalHaloData(GlobalAlgo.Calculate(*TheCaloGeometry, *TheCSCGeometry, *(&TheCaloMET.product()->front()), TheCaloTowers, TheCSCSegments, TheCSCRecHits, TheMuons, *TheCSCHaloData.product(), *TheEcalHaloData.product(), *TheHcalHaloData.product() ,ishlt)) );
142  iEvent.put(GlobalData);
143  }
144  else
145  {
146  std::auto_ptr<GlobalHaloData> GlobalData( new GlobalHaloData() ) ;
147  iEvent.put(GlobalData);
148  }
149 
150  return;
151 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
void SetHcalMatchingRadius(float min, float max)
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_token_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
reco::GlobalHaloData Calculate(const CaloGeometry &TheCaloGeometry, const CSCGeometry &TheCSCGeometry, const reco::CaloMET &TheCaloMET, edm::Handle< edm::View< reco::Candidate > > &TheCaloTowers, edm::Handle< CSCSegmentCollection > &TheCSCSegments, edm::Handle< CSCRecHit2DCollection > &TheCSCRecHits, edm::Handle< reco::MuonCollection > &TheMuons, const reco::CSCHaloData &TheCSCHaloData, const reco::EcalHaloData &TheEcalHaloData, const reco::HcalHaloData &TheHcalHaloData, bool ishlt=false)
bool isValid() const
Definition: HandleBase.h:75
void SetEcalMatchingRadius(float min, float max)
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< reco::CaloMETCollection > calomet_token_
const T & get() const
Definition: EventSetup.h:56
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void SetCaloTowerEtThreshold(float EtMin)
edm::EDGetTokenT< EcalHaloData > ecalhalo_token_
edm::EDGetTokenT< HcalHaloData > hcalhalo_token_
bool isValid() const
Definition: ESHandle.h:47
edm::EDGetTokenT< CSCHaloData > cschalo_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_

Member Data Documentation

edm::EDGetTokenT<reco::CaloMETCollection> reco::GlobalHaloDataProducer::calomet_token_
private

Definition at line 205 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<edm::View<reco::Candidate> > reco::GlobalHaloDataProducer::calotower_token_
private

Definition at line 204 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::CaloTowerEtThreshold
private

Definition at line 217 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<CSCHaloData> reco::GlobalHaloDataProducer::cschalo_token_
private

Definition at line 209 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<CSCRecHit2DCollection> reco::GlobalHaloDataProducer::cscrechit_token_
private

Definition at line 207 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<CSCSegmentCollection> reco::GlobalHaloDataProducer::cscsegment_token_
private

Definition at line 206 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<EcalHaloData> reco::GlobalHaloDataProducer::ecalhalo_token_
private

Definition at line 210 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::EcalMaxMatchingRadius
private

Definition at line 214 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::EcalMinMatchingRadius
private

Definition at line 213 of file GlobalHaloDataProducer.h.

GlobalHaloAlgo reco::GlobalHaloDataProducer::GlobalAlgo
private

Definition at line 192 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<HcalHaloData> reco::GlobalHaloDataProducer::hcalhalo_token_
private

Definition at line 211 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::HcalMaxMatchingRadius
private

Definition at line 216 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::HcalMinMatchingRadius
private

Definition at line 215 of file GlobalHaloDataProducer.h.

bool reco::GlobalHaloDataProducer::ishlt
private

Definition at line 219 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CaloTower
private

Definition at line 194 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCHaloData
private

Definition at line 200 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCRecHit
private

Definition at line 196 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCSegment
private

Definition at line 197 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_EcalHaloData
private

Definition at line 201 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_HcalHaloData
private

Definition at line 202 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_met
private

Definition at line 195 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_Muon
private

Definition at line 198 of file GlobalHaloDataProducer.h.

edm::EDGetTokenT<reco::MuonCollection> reco::GlobalHaloDataProducer::muon_token_
private

Definition at line 208 of file GlobalHaloDataProducer.h.