CMS 3D CMS Logo

SelectedElectronFEDListProducer.h
Go to the documentation of this file.
1 #ifndef SelectedElectronFEDListProducer_h
2 #define SelectedElectronFEDListProducer_h
3 
5 // egamma objects
7 
8 // Math
10 
12 // #include "FWCore/Framework/interface/EDProducer.h"
15 // Message logger
17 
18 class InputTag;
19 
21 
24 class SiStripFedCabling;
26 
27 class CaloGeometry;
30 class HcalElectronicsMap;
31 
32 // Hcal rec hit: this is a Fwd file defining typedefs
34 
35 // Pixel region class
36 class PixelRegion {
37 public:
38  PixelRegion(math::XYZVector& momentum, float dphi = 0.5, float deta = 0.5, float maxz = 24.0) {
39  vector = momentum;
40  dPhi = dphi;
41  dEta = deta;
42  maxZ = maxz;
43  cosphi = vector.x() / vector.rho();
44  sinphi = vector.y() / vector.rho();
45  atantheta = vector.z() / vector.rho();
46  }
47 
49  float dPhi, dEta, maxZ;
51 };
52 
53 // Pixel module class
54 class PixelModule {
55 public:
57  PixelModule(float phi, float eta) : Phi(phi), Eta(eta), x(0.), y(0.), z(0.), DetId(0), Fed(0) {}
58  bool operator<(const PixelModule& m) const {
59  if (Phi < m.Phi)
60  return true;
61  if (Phi == m.Phi && Eta < m.Eta)
62  return true;
63  if (Phi == m.Phi && Eta == m.Eta && DetId < m.DetId)
64  return true;
65  return false;
66  }
67 
68  float Phi, Eta;
69  float x, y, z;
70  unsigned int DetId;
71  unsigned int Fed;
72 };
73 
74 // main class
75 template <typename TEle, typename TCand>
77 public:
80 
81  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
82 
83 protected:
84  virtual void beginJob();
85  virtual void endJob();
86  void produce(edm::Event&, const edm::EventSetup&) override;
87 
88 private:
89  typedef std::vector<TEle> TEleColl;
90  typedef std::vector<TCand> TCandColl;
91 
92 public:
93  void pixelFedDump(std::vector<PixelModule>::const_iterator& itDn,
94  std::vector<PixelModule>::const_iterator& itUp,
95  const PixelRegion& region);
96 
97 private:
98  // input parameter of the producer
99  std::vector<edm::InputTag> recoEcalCandidateTags_;
100  std::vector<edm::InputTag> electronTags_;
103 
105 
106  std::vector<int> isGsfElectronCollection_;
107  std::vector<int> addThisSelectedFEDs_;
108 
110 
118 
124 
126 
127  // Token for the input collection
131  std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> > recoEcalCandidateToken_;
132  std::vector<edm::EDGetTokenT<TEleColl> > electronToken_;
133 
134  // used inside the producer
136 
137  // internal info for ES geometry
138  int ES_fedId_[2][2][40][40];
139 
140  // fed list and output raw data
141  std::vector<uint32_t> fedList_;
142 
143  // get calo geomentry and electronic map
149 
150  // get pixel geometry and electronic map
151  std::unique_ptr<SiPixelFedCablingTree> PixelCabling_;
152  std::vector<PixelModule> pixelModuleVector_;
153 
154  // get strip geometry and electronic map
155  std::pair<double, double> regionDimension_;
156 };
157 
158 #endif // SelectedElectronFEDListProducer_h
SelectedElectronFEDListProducer::dumpSelectedHCALFed_
bool dumpSelectedHCALFed_
Definition: SelectedElectronFEDListProducer.h:114
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
PixelRegion::PixelRegion
PixelRegion(math::XYZVector &momentum, float dphi=0.5, float deta=0.5, float maxz=24.0)
Definition: SelectedElectronFEDListProducer.h:38
SelectedElectronFEDListProducer::outputLabelModule_
std::string outputLabelModule_
Definition: SelectedElectronFEDListProducer.h:125
SelectedElectronFEDListProducer::pixelFedDump
void pixelFedDump(std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion &region)
Definition: SelectedElectronFEDListProducer.cc:693
PixelModule::DetId
unsigned int DetId
Definition: SelectedElectronFEDListProducer.h:70
PixelRegion::dEta
float dEta
Definition: SelectedElectronFEDListProducer.h:49
ESHandle.h
PixelModule::operator<
bool operator<(const PixelModule &m) const
Definition: SelectedElectronFEDListProducer.h:58
SelectedElectronFEDListProducer::addThisSelectedFEDs_
std::vector< int > addThisSelectedFEDs_
Definition: SelectedElectronFEDListProducer.h:107
SelectedElectronFEDListProducer::fedList_
std::vector< uint32_t > fedList_
Definition: SelectedElectronFEDListProducer.h:141
edm::EDGetTokenT< FEDRawDataCollection >
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
SelectedElectronFEDListProducer::dumpAllTrackerFed_
bool dumpAllTrackerFed_
Definition: SelectedElectronFEDListProducer.h:116
EDProducer.h
PixelModule::PixelModule
PixelModule(float phi, float eta)
Definition: SelectedElectronFEDListProducer.h:57
TriggerFilterObjectWithRefs.h
SelectedElectronFEDListProducer::ESLookupTable_
edm::FileInPath ESLookupTable_
Definition: SelectedElectronFEDListProducer.h:109
PixelRegion::dPhi
float dPhi
Definition: SelectedElectronFEDListProducer.h:49
SelectedElectronFEDListProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SelectedElectronFEDListProducer.cc:718
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
SelectedElectronFEDListProducer::dumpSelectedEcalFed_
bool dumpSelectedEcalFed_
Definition: SelectedElectronFEDListProducer.h:111
SelectedElectronFEDListProducer::electronToken_
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
Definition: SelectedElectronFEDListProducer.h:132
SelectedElectronFEDListProducer::rawDataToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
Definition: SelectedElectronFEDListProducer.h:128
SelectedElectronFEDListProducer::electronTags_
std::vector< edm::InputTag > electronTags_
Definition: SelectedElectronFEDListProducer.h:100
PixelRegion::atantheta
float atantheta
Definition: SelectedElectronFEDListProducer.h:50
SelectedElectronFEDListProducer::dEtaPixelRegion_
double dEtaPixelRegion_
Definition: SelectedElectronFEDListProducer.h:121
SelectedElectronFEDListProducer::dumpAllEcalFed_
bool dumpAllEcalFed_
Definition: SelectedElectronFEDListProducer.h:115
PixelModule::Phi
float Phi
Definition: SelectedElectronFEDListProducer.h:68
SelectedElectronFEDListProducer::TCandColl
std::vector< TCand > TCandColl
Definition: SelectedElectronFEDListProducer.h:90
SelectedElectronFEDListProducer::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: SelectedElectronFEDListProducer.h:129
SelectedElectronFEDListProducer::dumpAllHCALFed_
bool dumpAllHCALFed_
Definition: SelectedElectronFEDListProducer.h:117
DetId
Definition: DetId.h:17
edm::FileInPath
Definition: FileInPath.h:64
SelectedElectronFEDListProducer::PixelCabling_
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
Definition: SelectedElectronFEDListProducer.h:151
CaloGeometry
Definition: CaloGeometry.h:21
SelectedElectronFEDListProducer::recoEcalCandidateTags_
std::vector< edm::InputTag > recoEcalCandidateTags_
Definition: SelectedElectronFEDListProducer.h:99
SelectedElectronFEDListProducer::GeometryES_
const CaloSubdetectorGeometry * GeometryES_
Definition: SelectedElectronFEDListProducer.h:146
BeamSpot.h
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:69
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
SelectedElectronFEDListProducer::dumpSelectedSiStripFed_
bool dumpSelectedSiStripFed_
Definition: SelectedElectronFEDListProducer.h:112
SelectedElectronFEDListProducer
Definition: SelectedElectronFEDListProducer.h:76
PixelRegion::vector
math::XYZVector vector
Definition: SelectedElectronFEDListProducer.h:48
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
PixelModule
Definition: SelectedElectronFEDListProducer.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SelectedElectronFEDListProducer::dRHcalRegion_
double dRHcalRegion_
Definition: SelectedElectronFEDListProducer.h:123
PixelRegion::sinphi
float sinphi
Definition: SelectedElectronFEDListProducer.h:50
PixelModule::x
float x
Definition: SelectedElectronFEDListProducer.h:69
PixelRegion::cosphi
float cosphi
Definition: SelectedElectronFEDListProducer.h:50
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
SelectedElectronFEDListProducer::endJob
virtual void endJob()
Definition: SelectedElectronFEDListProducer.cc:688
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
normalizedPhi.h
SelectedElectronFEDListProducer::regionDimension_
std::pair< double, double > regionDimension_
Definition: SelectedElectronFEDListProducer.h:155
PixelRegion
Definition: SelectedElectronFEDListProducer.h:36
edm::stream::EDProducer
Definition: EDProducer.h:38
PixelModule::PixelModule
PixelModule()
Definition: SelectedElectronFEDListProducer.h:56
SelectedElectronFEDListProducer::dRStripRegion_
double dRStripRegion_
Definition: SelectedElectronFEDListProducer.h:119
edm::EventSetup
Definition: EventSetup.h:57
SelectedElectronFEDListProducer::SelectedElectronFEDListProducer
SelectedElectronFEDListProducer(const edm::ParameterSet &)
Producer constructor.
Definition: SelectedElectronFEDListProducer.cc:70
SelectedElectronFEDListProducer::pixelModuleVector_
std::vector< PixelModule > pixelModuleVector_
Definition: SelectedElectronFEDListProducer.h:152
PixelModule::y
float y
Definition: SelectedElectronFEDListProducer.h:69
SelectedElectronFEDListProducer::HBHERecHitTag_
edm::InputTag HBHERecHitTag_
Definition: SelectedElectronFEDListProducer.h:104
SiPixelFedCablingMap
Definition: SiPixelFedCablingMap.h:19
HcalElectronicsMap
Definition: HcalElectronicsMap.h:31
DDAxes::phi
SelectedElectronFEDListProducer::GeometryCalo_
const CaloGeometry * GeometryCalo_
Definition: SelectedElectronFEDListProducer.h:145
SelectedElectronFEDListProducer::beamSpotTag_
edm::InputTag beamSpotTag_
Definition: SelectedElectronFEDListProducer.h:101
SelectedElectronFEDListProducer::~SelectedElectronFEDListProducer
~SelectedElectronFEDListProducer() override
Definition: SelectedElectronFEDListProducer.cc:286
PixelModule::z
float z
Definition: SelectedElectronFEDListProducer.h:69
SelectedElectronFEDListProducer::StripRegionCabling_
const SiStripRegionCabling * StripRegionCabling_
Definition: SelectedElectronFEDListProducer.h:147
SelectedElectronFEDListProducer::dPhiPixelRegion_
double dPhiPixelRegion_
Definition: SelectedElectronFEDListProducer.h:120
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
SelectedElectronFEDListProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: SelectedElectronFEDListProducer.cc:307
EventSetup.h
SelectedElectronFEDListProducer::HcalReadoutMap_
const HcalElectronicsMap * HcalReadoutMap_
Definition: SelectedElectronFEDListProducer.h:148
SelectedElectronFEDListProducer::EcalMapping_
const EcalElectronicsMapping * EcalMapping_
Definition: SelectedElectronFEDListProducer.h:144
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
HcalRecHitCollections.h
SelectedElectronFEDListProducer::hbheRecHitToken_
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
Definition: SelectedElectronFEDListProducer.h:130
SelectedElectronFEDListProducer::beginJob
virtual void beginJob()
Definition: SelectedElectronFEDListProducer.cc:302
PixelModule::Eta
float Eta
Definition: SelectedElectronFEDListProducer.h:68
PixelModule::Fed
unsigned int Fed
Definition: SelectedElectronFEDListProducer.h:71
SelectedElectronFEDListProducer::isGsfElectronCollection_
std::vector< int > isGsfElectronCollection_
Definition: SelectedElectronFEDListProducer.h:106
SelectedElectronFEDListProducer::dumpSelectedSiPixelFed_
bool dumpSelectedSiPixelFed_
Definition: SelectedElectronFEDListProducer.h:113
PixelRegion::maxZ
float maxZ
Definition: SelectedElectronFEDListProducer.h:49
edm::Event
Definition: Event.h:73
SiPixelFedCablingTree
Definition: SiPixelFedCablingTree.h:13
SelectedElectronFEDListProducer::rawDataTag_
edm::InputTag rawDataTag_
Definition: SelectedElectronFEDListProducer.h:102
edm::InputTag
Definition: InputTag.h:15
SiStripRegionCabling
Definition: SiStripRegionCabling.h:23
SelectedElectronFEDListProducer::maxZPixelRegion_
double maxZPixelRegion_
Definition: SelectedElectronFEDListProducer.h:122
SelectedElectronFEDListProducer::beamSpotPosition_
math::XYZVector beamSpotPosition_
Definition: SelectedElectronFEDListProducer.h:135
SelectedElectronFEDListProducer::TEleColl
std::vector< TEle > TEleColl
Definition: SelectedElectronFEDListProducer.h:89
SelectedElectronFEDListProducer::ES_fedId_
int ES_fedId_[2][2][40][40]
Definition: SelectedElectronFEDListProducer.h:138
SelectedElectronFEDListProducer::recoEcalCandidateToken_
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
Definition: SelectedElectronFEDListProducer.h:131