CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes
SelectedElectronFEDListProducer< TEle, TCand > Class Template Reference

#include <SelectedElectronFEDListProducer.h>

Inheritance diagram for SelectedElectronFEDListProducer< TEle, TCand >:
edm::stream::EDProducer<>

Public Member Functions

void pixelFedDump (std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion &region)
 
 SelectedElectronFEDListProducer (const edm::ParameterSet &)
 Producer constructor. More...
 
 ~SelectedElectronFEDListProducer () override
 
- Public Member Functions inherited from edm::stream::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
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Protected Member Functions

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

Private Types

typedef std::vector< TCand > TCandColl
 
typedef std::vector< TEle > TEleColl
 

Private Attributes

std::vector< int > addThisSelectedFEDs_
 
math::XYZVector beamSpotPosition_
 
edm::InputTag beamSpotTag_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
const edm::ESGetToken< CaloGeometry, CaloGeometryRecordcaloGeometryToken_
 
double dEtaPixelRegion_
 
double dPhiPixelRegion_
 
double dRHcalRegion_
 
double dRStripRegion_
 
bool dumpAllEcalFed_
 
bool dumpAllHCALFed_
 
bool dumpAllTrackerFed_
 
bool dumpSelectedEcalFed_
 
bool dumpSelectedHCALFed_
 
bool dumpSelectedSiPixelFed_
 
bool dumpSelectedSiStripFed_
 
const EcalElectronicsMappingEcalMapping_
 
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdecalMappingToken_
 
std::vector< edm::InputTagelectronTags_
 
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
 
int ES_fedId_ [2][2][40][40]
 
edm::FileInPath ESLookupTable_
 
std::vector< uint32_t > fedList_
 
const CaloGeometryGeometryCalo_
 
const CaloSubdetectorGeometryGeometryES_
 
edm::InputTag HBHERecHitTag_
 
edm::EDGetTokenT< HBHERecHitCollectionhbheRecHitToken_
 
const edm::ESGetToken< HcalDbService, HcalDbRecordhcalDbToken_
 
const HcalElectronicsMapHcalReadoutMap_
 
std::vector< int > isGsfElectronCollection_
 
double maxZPixelRegion_
 
std::string outputLabelModule_
 
std::unique_ptr< SiPixelFedCablingTreePixelCabling_
 
std::vector< PixelModulepixelModuleVector_
 
edm::InputTag rawDataTag_
 
edm::EDGetTokenT< FEDRawDataCollectionrawDataToken_
 
std::vector< edm::InputTagrecoEcalCandidateTags_
 
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
 
std::pair< double, double > regionDimension_
 
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcdsiPixelFedCablingMapToken_
 
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcdsiStripRegionCablingToken_
 
const SiStripRegionCablingStripRegionCabling_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerGeometryToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

template<typename TEle, typename TCand>
class SelectedElectronFEDListProducer< TEle, TCand >

Definition at line 88 of file SelectedElectronFEDListProducer.h.

Member Typedef Documentation

◆ TCandColl

template<typename TEle , typename TCand >
typedef std::vector<TCand> SelectedElectronFEDListProducer< TEle, TCand >::TCandColl
private

Definition at line 102 of file SelectedElectronFEDListProducer.h.

◆ TEleColl

template<typename TEle , typename TCand >
typedef std::vector<TEle> SelectedElectronFEDListProducer< TEle, TCand >::TEleColl
private

Definition at line 101 of file SelectedElectronFEDListProducer.h.

Constructor & Destructor Documentation

◆ SelectedElectronFEDListProducer()

template<typename TEle , typename TCand >
SelectedElectronFEDListProducer< TEle, TCand >::SelectedElectronFEDListProducer ( const edm::ParameterSet iConfig)
explicit

Producer constructor.

Definition at line 54 of file SelectedElectronFEDListProducer.cc.

References SelectedElectronFEDListProducer< TEle, TCand >::addThisSelectedFEDs_, SelectedElectronFEDListProducer< TEle, TCand >::beamSpotTag_, SelectedElectronFEDListProducer< TEle, TCand >::beamSpotToken_, SelectedElectronFEDListProducer< TEle, TCand >::dEtaPixelRegion_, SelectedElectronFEDListProducer< TEle, TCand >::dPhiPixelRegion_, SelectedElectronFEDListProducer< TEle, TCand >::dRHcalRegion_, SelectedElectronFEDListProducer< TEle, TCand >::dRStripRegion_, SelectedElectronFEDListProducer< TEle, TCand >::dumpAllEcalFed_, SelectedElectronFEDListProducer< TEle, TCand >::dumpAllHCALFed_, SelectedElectronFEDListProducer< TEle, TCand >::dumpAllTrackerFed_, SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedEcalFed_, SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedHCALFed_, SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedSiPixelFed_, SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedSiStripFed_, SelectedElectronFEDListProducer< TEle, TCand >::electronTags_, SelectedElectronFEDListProducer< TEle, TCand >::electronToken_, SelectedElectronFEDListProducer< TEle, TCand >::ES_fedId_, SelectedElectronFEDListProducer< TEle, TCand >::ESLookupTable_, Exception, edm::ParameterSet::existsAs(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), SelectedElectronFEDListProducer< TEle, TCand >::HBHERecHitTag_, SelectedElectronFEDListProducer< TEle, TCand >::hbheRecHitToken_, mps_fire::i, ProducerED_cfi::InputTag, SelectedElectronFEDListProducer< TEle, TCand >::isGsfElectronCollection_, dqmiolumiharvest::j, dqmdumpme::k, LogDebug, visualization-live-secondInstance_cfg::m, SelectedElectronFEDListProducer< TEle, TCand >::maxZPixelRegion_, submitDQMOfflineCAF::nLines, or, SelectedElectronFEDListProducer< TEle, TCand >::outputLabelModule_, SelectedElectronFEDListProducer< TEle, TCand >::rawDataTag_, SelectedElectronFEDListProducer< TEle, TCand >::rawDataToken_, SelectedElectronFEDListProducer< TEle, TCand >::recoEcalCandidateTags_, SelectedElectronFEDListProducer< TEle, TCand >::recoEcalCandidateToken_, and AlCaHLTBitMon_QueryRunRegistry::string.

61  // input electron collection Tag
62  if (iConfig.existsAs<std::vector<edm::InputTag>>("electronTags")) {
63  electronTags_ = iConfig.getParameter<std::vector<edm::InputTag>>("electronTags");
64  if (electronTags_.empty())
65  throw cms::Exception("Configuration")
66  << "[SelectedElectronFEDListProducer] empty electron collection is given --> at least one \n";
67  } else
68  throw cms::Exception("Configuration")
69  << "[SelectedElectronFEDListProducer] no electron collection are given --> need at least one \n";
70 
71  // Consumes for the electron collection
72  LogDebug("SelectedElectronFEDListProducer") << " Electron Collections" << std::endl;
73  for (std::vector<edm::InputTag>::const_iterator itEleTag = electronTags_.begin(); itEleTag != electronTags_.end();
74  ++itEleTag) {
75  electronToken_.push_back(consumes<TEleColl>(*itEleTag));
76  LogDebug("SelectedElectronFEDListProducer") << " Ele collection: " << *(itEleTag) << std::endl;
77  }
78 
79  // input RecoEcalCandidate collection Tag
80  if (iConfig.existsAs<std::vector<edm::InputTag>>("recoEcalCandidateTags")) {
81  recoEcalCandidateTags_ = iConfig.getParameter<std::vector<edm::InputTag>>("recoEcalCandidateTags");
82  if (recoEcalCandidateTags_.empty())
83  throw cms::Exception("Configuration") << "[SelectedElectronFEDListProducer] empty ecal candidate collections "
84  "collection is given --> at least one \n";
85  } else
86  throw cms::Exception("Configuration") << "[SelectedElectronFEDListProducer] no electron reco ecal candidate "
87  "collection are given --> need at least one \n";
88 
89  // Consumes for the recoEcal candidate collection
90  for (std::vector<edm::InputTag>::const_iterator itEcalCandTag = recoEcalCandidateTags_.begin();
91  itEcalCandTag != recoEcalCandidateTags_.end();
92  ++itEcalCandTag) {
93  recoEcalCandidateToken_.push_back(consumes<trigger::TriggerFilterObjectWithRefs>(*itEcalCandTag));
94  LogDebug("SelectedElectronFEDListProducer") << " Reco ecal candidate collection: " << *(itEcalCandTag) << std::endl;
95  }
96 
97  // list of gsf collections
98  if (iConfig.existsAs<std::vector<int>>("isGsfElectronCollection")) {
99  isGsfElectronCollection_ = iConfig.getParameter<std::vector<int>>("isGsfElectronCollection");
100  if (isGsfElectronCollection_.empty())
101  throw cms::Exception("Configuration")
102  << "[SelectedElectronFEDListProducer] empty electron flag collection --> at least one \n";
103  } else
104  throw cms::Exception("Configuration")
105  << "[SelectedElectronFEDListProducer] no electron flag are given --> need at least one \n";
106 
107  if (isGsfElectronCollection_.size() != electronTags_.size() or
109  throw cms::Exception("Configuration") << "[SelectedElectronFEDListProducer] electron flag , electron collection "
110  "and reco ecal cand collection must have the same size ! \n";
111 
112  // take the beam spot Tag
113  if (iConfig.existsAs<edm::InputTag>("beamSpot"))
114  beamSpotTag_ = iConfig.getParameter<edm::InputTag>("beamSpot");
115  else
116  beamSpotTag_ = edm::InputTag("hltOnlineBeamSpot");
117 
118  if (!(beamSpotTag_ == edm::InputTag("")))
119  beamSpotToken_ = consumes<reco::BeamSpot>(beamSpotTag_);
120 
121  LogDebug("SelectedElectronFEDListProducer") << " Beam Spot Tag " << beamSpotTag_ << std::endl;
122 
123  // take the HBHE recHit Tag
124  if (iConfig.existsAs<edm::InputTag>("HBHERecHitTag"))
125  HBHERecHitTag_ = iConfig.getParameter<edm::InputTag>("HBHERecHitTag");
126  else
127  HBHERecHitTag_ = edm::InputTag("hltHbhereco");
128 
129  if (!(HBHERecHitTag_ == edm::InputTag("")))
130  hbheRecHitToken_ = consumes<HBHERecHitCollection>(HBHERecHitTag_);
131 
132  // raw data collector label
133  if (iConfig.existsAs<edm::InputTag>("rawDataTag"))
134  rawDataTag_ = iConfig.getParameter<edm::InputTag>("rawDataTag");
135  else
136  rawDataTag_ = edm::InputTag("rawDataCollector");
137 
138  if (!(rawDataTag_ == edm::InputTag("")))
139  rawDataToken_ = consumes<FEDRawDataCollection>(rawDataTag_);
140 
141  LogDebug("SelectedElectronFEDListProducer") << " RawDataInput " << rawDataTag_ << std::endl;
142 
143  // add a set of selected feds
144  if (iConfig.existsAs<std::vector<int>>("addThisSelectedFEDs")) {
145  addThisSelectedFEDs_ = iConfig.getParameter<std::vector<int>>("addThisSelectedFEDs");
146  if (addThisSelectedFEDs_.empty())
147  addThisSelectedFEDs_.push_back(-1);
148  } else
149  addThisSelectedFEDs_.push_back(-1);
150 
151  std::vector<int>::const_iterator AddFed = addThisSelectedFEDs_.begin();
152  for (; AddFed != addThisSelectedFEDs_.end(); ++AddFed)
153  LogDebug("SelectedElectronFEDListProducer") << " Additional FED: " << *(AddFed) << std::endl;
154 
155  // ES look up table path
156  if (iConfig.existsAs<std::string>("ESLookupTable"))
157  ESLookupTable_ = iConfig.getParameter<edm::FileInPath>("ESLookupTable");
158  else
159  ESLookupTable_ = edm::FileInPath("EventFilter/ESDigiToRaw/data/ES_lookup_table.dat");
160 
161  // output model label
162  if (iConfig.existsAs<std::string>("outputLabelModule"))
163  outputLabelModule_ = iConfig.getParameter<std::string>("outputLabelModule");
164  else
165  outputLabelModule_ = "streamElectronRawData";
166 
167  LogDebug("SelectedElectronFEDListProducer") << " Output Label " << outputLabelModule_ << std::endl;
168 
169  // dR for the strip region
170  if (iConfig.existsAs<double>("dRStripRegion"))
171  dRStripRegion_ = iConfig.getParameter<double>("dRStripRegion");
172  else
173  dRStripRegion_ = 0.5;
174 
175  LogDebug("SelectedElectronFEDListProducer") << " dRStripRegion " << dRStripRegion_ << std::endl;
176 
177  // dR for the hcal region
178  if (iConfig.existsAs<double>("dRHcalRegion"))
179  dRHcalRegion_ = iConfig.getParameter<double>("dRHcalRegion");
180  else
181  dRHcalRegion_ = 0.5;
182 
183  // dPhi, dEta and maxZ for pixel dump
184  if (iConfig.existsAs<double>("dPhiPixelRegion"))
185  dPhiPixelRegion_ = iConfig.getParameter<double>("dPhiPixelRegion");
186  else
187  dPhiPixelRegion_ = 0.5;
188 
189  if (iConfig.existsAs<double>("dEtaPixelRegion"))
190  dEtaPixelRegion_ = iConfig.getParameter<double>("dEtaPixelRegion");
191  else
192  dEtaPixelRegion_ = 0.5;
193 
194  if (iConfig.existsAs<double>("maxZPixelRegion"))
195  maxZPixelRegion_ = iConfig.getParameter<double>("maxZPixelRegion");
196  else
197  maxZPixelRegion_ = 24.;
198 
199  LogDebug("SelectedElectronFEDListProducer")
200  << " dPhiPixelRegion " << dPhiPixelRegion_ << " dEtaPixelRegion " << dEtaPixelRegion_ << " MaxZPixelRegion "
201  << maxZPixelRegion_ << std::endl;
202 
203  // bool
204  if (iConfig.existsAs<bool>("dumpSelectedEcalFed"))
205  dumpSelectedEcalFed_ = iConfig.getParameter<bool>("dumpSelectedEcalFed");
206  else
207  dumpSelectedEcalFed_ = true;
208 
209  if (iConfig.existsAs<bool>("dumpSelectedSiStripFed"))
210  dumpSelectedSiStripFed_ = iConfig.getParameter<bool>("dumpSelectedSiStripFed");
211  else
213 
214  if (iConfig.existsAs<bool>("dumpSelectedSiPixelFed"))
215  dumpSelectedSiPixelFed_ = iConfig.getParameter<bool>("dumpSelectedSiPixelFed");
216  else
218 
219  if (iConfig.existsAs<bool>("dumpSelectedHCALFed"))
220  dumpSelectedHCALFed_ = iConfig.getParameter<bool>("dumpSelectedHCALFed");
221  else
222  dumpSelectedHCALFed_ = true;
223 
224  LogDebug("SelectedElectronFEDListProducer")
225  << " DumpEcalFedList set to " << dumpSelectedEcalFed_ << " DumpSelectedSiStripFed " << dumpSelectedSiStripFed_
226  << " DumpSelectedSiPixelFed " << dumpSelectedSiPixelFed_ << std::endl;
227 
228  if (iConfig.existsAs<bool>("dumpAllEcalFed"))
229  dumpAllEcalFed_ = iConfig.getParameter<bool>("dumpAllEcalFed");
230  else
231  dumpAllEcalFed_ = false;
232 
233  if (iConfig.existsAs<bool>("dumpAllTrackerFed"))
234  dumpAllTrackerFed_ = iConfig.getParameter<bool>("dumpAllTrackerFed");
235  else
236  dumpAllTrackerFed_ = false;
237 
238  if (iConfig.existsAs<bool>("dumpAllHCALFed"))
239  dumpAllHCALFed_ = iConfig.getParameter<bool>("dumpAllHCALFed");
240  else
241  dumpAllHCALFed_ = false;
242 
243  LogDebug("SelectedElectronFEDListProducer")
244  << " DumpAllEcalFed " << dumpAllEcalFed_ << " DumpAllTrackerFed " << dumpAllTrackerFed_ << " Dump all HCAL fed "
245  << dumpAllHCALFed_ << std::endl;
246 
247  // initialize pre-shower fed id --> look up table
248  for (int i = 0; i < 2; ++i)
249  for (int j = 0; j < 2; ++j)
250  for (int k = 0; k < 40; ++k)
251  for (int m = 0; m < 40; m++)
252  ES_fedId_[i][j][k][m] = -1;
253 
254  // read in look-up table
255  int nLines, iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
256  std::ifstream ES_file;
257  ES_file.open(ESLookupTable_.fullPath().c_str());
258  LogDebug("SelectedElectronFEDListProducer")
259  << " Look Up table for ES " << ESLookupTable_.fullPath().c_str() << std::endl;
260  if (ES_file.is_open()) {
261  ES_file >> nLines;
262  for (int i = 0; i < nLines; ++i) {
263  ES_file >> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
264  ES_fedId_[(3 - iz) / 2 - 1][ip - 1][ix - 1][iy - 1] = fed;
265  }
266  } else
267  LogDebug("SelectedElectronFEDListProducer")
268  << " Look up table file can not be found in " << ESLookupTable_.fullPath().c_str() << std::endl;
269  ES_file.close();
270 
271  // produce the final collection
272  produces<FEDRawDataCollection>(outputLabelModule_); // produce exit collection
273 }
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
const edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
std::string fullPath() const
Definition: FileInPath.cc:161
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > siStripRegionCablingToken_
std::vector< edm::InputTag > recoEcalCandidateTags_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
#define LogDebug(id)

◆ ~SelectedElectronFEDListProducer()

template<typename TEle , typename TCand >
SelectedElectronFEDListProducer< TEle, TCand >::~SelectedElectronFEDListProducer ( )
override

Definition at line 276 of file SelectedElectronFEDListProducer.cc.

276  {
277  if (!electronTags_.empty())
278  electronTags_.clear();
279  if (!recoEcalCandidateTags_.empty())
280  recoEcalCandidateTags_.clear();
281  if (!recoEcalCandidateToken_.empty())
282  recoEcalCandidateToken_.clear();
283  if (!electronToken_.empty())
284  electronToken_.clear();
285  if (!fedList_.empty())
286  fedList_.clear();
287  if (!pixelModuleVector_.empty())
288  pixelModuleVector_.clear();
289 }
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
std::vector< edm::InputTag > recoEcalCandidateTags_
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_

Member Function Documentation

◆ beginJob()

template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::beginJob ( )
protectedvirtual

Definition at line 292 of file SelectedElectronFEDListProducer.cc.

References LogDebug.

292  {
293  LogDebug("SelectedElectronFEDListProducer") << " Begin of the Job " << std::endl;
294 }
#define LogDebug(id)

◆ endJob()

template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::endJob ( void  )
protectedvirtual

Definition at line 670 of file SelectedElectronFEDListProducer.cc.

References LogDebug.

Referenced by o2olib.O2ORunMgr::executeJob().

670  {
671  LogDebug("SelectedElectronFEDListProducer") << " End of the Job " << std::endl;
672 }
#define LogDebug(id)

◆ fillDescriptions()

template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 700 of file SelectedElectronFEDListProducer.cc.

References edm::ConfigurationDescriptions::add(), defaultModuleLabel(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

700  {
702  desc.add<vector<edm::InputTag>>("electronTags", {edm::InputTag("hltEgammaGsfElectrons")});
703  desc.add<vector<edm::InputTag>>("recoEcalCandidateTags", {edm::InputTag("hltL1EG25Ele27WP85GsfTrackIsoFilter")});
704  desc.add<edm::FileInPath>("ESLookupTable", edm::FileInPath("EventFilter/ESDigiToRaw/data/ES_lookup_table.dat"));
705  desc.add<edm::InputTag>("HBHERecHitTag", edm::InputTag("hltHbhereco"));
706  desc.add<edm::InputTag>("beamSpotTag", edm::InputTag("hltOnlineBeamSpot"));
707  desc.add<edm::InputTag>("rawDataTag", edm::InputTag("rawDataCollector"));
708  desc.add<vector<int>>("addThisSelectedFEDs", {812, 813});
709  desc.add<vector<int>>("isGsfElectronCollection", {true});
710  desc.add<std::string>("outputLabelModule", "StreamElectronRawFed");
711  desc.add<bool>("dumpSelectedSiPixelFed", true);
712  desc.add<bool>("dumpSelectedSiStripFed", true);
713  desc.add<bool>("dumpSelectedEcalFed", true);
714  desc.add<bool>("dumpSelectedHCALFed", true);
715  desc.add<double>("dPhiPixelRegion", 0.3);
716  desc.add<double>("dEtaPixelRegion", 0.3);
717  desc.add<double>("dRStripRegion", 0.3);
718  desc.add<double>("dRHcalRegion", 0.3);
719  desc.add<double>("maxZPixelRegion", 24);
720  desc.add<bool>("dumpAllTrackerFed", false);
721  desc.add<bool>("dumpAllEcalFed", false);
722  desc.add<bool>("dumpAllHcalFed", false);
723 
725 }
std::string defaultModuleLabel()
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ pixelFedDump()

template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::pixelFedDump ( std::vector< PixelModule >::const_iterator &  itDn,
std::vector< PixelModule >::const_iterator &  itUp,
const PixelRegion region 
)

Definition at line 675 of file SelectedElectronFEDListProducer.cc.

References funct::abs(), spr::find(), LogDebug, FEDNumbering::MAXSiPixelFEDID, and HLT_2023v12_cff::region.

677  {
678  for (; itDn != itUp; ++itDn) {
679  float zmodule = itDn->z - ((itDn->x - beamSpotPosition_.x()) * region.cosphi +
680  (itDn->y - beamSpotPosition_.y()) * region.sinphi) *
681  region.atantheta;
682  if (std::abs(zmodule) > region.maxZ)
683  continue;
684  int hitFED = itDn->Fed;
685  if (hitFED < FEDNumbering::MINSiPixelFEDID || hitFED > FEDNumbering::MAXSiPixelFEDID)
686  continue;
687  LogDebug("SelectedElectronFEDListProducer")
688  << " electron pixel hit " << itDn->DetId << " hitFED " << hitFED << std::endl;
689  if (!fedList_.empty()) {
690  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
691  fedList_.push_back(hitFED);
692  } else
693  fedList_.push_back(hitFED);
694  }
695 
696  return;
697 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define LogDebug(id)

◆ produce()

template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotected

Definition at line 297 of file SelectedElectronFEDListProducer.cc.

References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, pwdgSkimBPark_cfi::beamSpot, edm::SortedCollection< T, SORT >::begin(), FEDRawData::data(), data, HcalElectronicsId::dccid(), reco::deltaR(), HGC3DClusterGenMatchSelector_cfi::dR, DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, HPSPFTauProducerPuppi_cfi::electron, pwdgSkimBPark_cfi::electrons, edm::SortedCollection< T, SORT >::end(), PVValHelper::eta, edm::HandleBase::failedToGet(), FEDRawDataCollection::FEDData(), l1tstage2_dqm_sourceclient-live_cfg::fedId, HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), spr::find(), edm::EventSetup::getData(), trigger::TriggerRefsCollections::getObjects(), edm::EventSetup::getTransientHandle(), hfClusterShapes_cfi::hits, iEvent, LogDebug, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, M_PI, FEDNumbering::MAXECALFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXPreShowerFEDID, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINECALFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINPreShowerFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, callgraph::module, eostools::move(), PVValHelper::phi, Geom::pi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, ESDetId::plane(), point, funct::pow(), edm::Handle< T >::product(), dttmaxenums::R, DetId::rawId(), HLT_2023v12_cff::region, FEDRawData::resize(), ESDetId::six(), ESDetId::siy(), findQualityFiles::size, jetUpdater_cfi::sort, HcalElectronicsId::spigot(), mathSSE::sqrt(), trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerPhoton, pfDeepBoostedJetPreprocessParams_cfi::upper_bound, and ESDetId::zside().

297  {
298  // get the hcal electronics map
299  const auto& pSetup = iSetup.getData(hcalDbToken_);
300  HcalReadoutMap_ = pSetup.getHcalMapping();
301 
302  // get the ecal electronics map
304 
305  // get the calo geometry
306  const auto& caloGeometry = iSetup.getData(caloGeometryToken_);
307  GeometryCalo_ = &caloGeometry;
308 
309  //ES geometry
310  GeometryES_ = caloGeometry.getSubdetectorGeometry(DetId::Ecal, EcalPreshower);
311 
312  // pixel tracker cabling map
313  const auto pixelCablingMap = iSetup.getTransientHandle(siPixelFedCablingMapToken_);
314  PixelCabling_.reset();
315  PixelCabling_ = pixelCablingMap->cablingTree();
316 
317  const auto& trackerGeometry = iSetup.getData(trackerGeometryToken_);
318 
319  if (pixelModuleVector_.empty()) {
320  // build the tracker pixel module map
321  std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry.dets().begin();
322  for (; itTracker != trackerGeometry.dets().end(); ++itTracker) {
323  int subdet = (*itTracker)->geographicalId().subdetId();
324  if (!(subdet == PixelSubdetector::PixelBarrel || subdet == PixelSubdetector::PixelEndcap))
325  continue;
327  module.x = (*itTracker)->position().x();
328  module.y = (*itTracker)->position().y();
329  module.z = (*itTracker)->position().z();
330  module.Phi = (*itTracker)->position().phi();
331  module.Eta = (*itTracker)->position().eta();
332  module.DetId = (*itTracker)->geographicalId().rawId();
333  const std::vector<sipixelobjects::CablingPathToDetUnit> path2det = PixelCabling_->pathToDetUnit(module.DetId);
334  module.Fed = path2det[0].fed;
335 
336  pixelModuleVector_.push_back(module);
337  }
339  }
340 
342 
343  SiStripRegionCabling::Cabling SiStripCabling;
344  SiStripCabling = StripRegionCabling_->getRegionCabling();
346 
347  // event by event analysis
348  // Get event raw data
350  if (!(rawDataTag_ == edm::InputTag("")))
351  iEvent.getByToken(rawDataToken_, rawdata);
352 
353  // take the beam spot position
355  if (!(beamSpotTag_ == edm::InputTag("")))
356  iEvent.getByToken(beamSpotToken_, beamSpot);
357  if (!beamSpot.failedToGet())
358  beamSpotPosition_ = beamSpot->position();
359  else
360  beamSpotPosition_.SetXYZ(0, 0, 0);
361 
362  // take the calo tower collection
363  edm::Handle<HBHERecHitCollection> hbheRecHitHandle;
364  if (!(HBHERecHitTag_ == edm::InputTag("")))
365  iEvent.getByToken(hbheRecHitToken_, hbheRecHitHandle);
366  const HBHERecHitCollection* hcalRecHitCollection = nullptr;
367  if (!hbheRecHitHandle.failedToGet())
368  hcalRecHitCollection = hbheRecHitHandle.product();
369 
370  double radTodeg = 180. / Geom::pi();
371 
372  if (dumpAllEcalFed_) {
373  for (uint32_t iEcalFed = FEDNumbering::MINECALFEDID; iEcalFed <= FEDNumbering::MAXECALFEDID; iEcalFed++)
374  fedList_.push_back(iEcalFed);
375  for (uint32_t iESFed = FEDNumbering::MINPreShowerFEDID; iESFed <= FEDNumbering::MAXPreShowerFEDID; iESFed++)
376  fedList_.push_back(iESFed);
377  }
378 
379  if (dumpAllTrackerFed_) {
380  for (uint32_t iPixelFed = FEDNumbering::MINSiPixelFEDID; iPixelFed <= FEDNumbering::MAXSiPixelFEDID; iPixelFed++)
381  fedList_.push_back(iPixelFed);
382  for (uint32_t iStripFed = FEDNumbering::MINSiStripFEDID; iStripFed <= FEDNumbering::MAXSiStripFEDID; iStripFed++)
383  fedList_.push_back(iStripFed);
384  }
385 
386  if (dumpAllHCALFed_) {
387  for (uint32_t iHcalFed = FEDNumbering::MINHCALFEDID; iHcalFed <= FEDNumbering::MAXHCALFEDID; iHcalFed++)
388  fedList_.push_back(iHcalFed);
389  }
390 
391  // loop on the input electron collection vector
392  TEle electron;
393  edm::Ref<TCandColl> recoEcalCand;
395  edm::Handle<trigger::TriggerFilterObjectWithRefs> triggerRecoEcalCandidateCollection;
396  std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
397 
398  // iterator to electron and ecal candidate collections
399  typename std::vector<edm::EDGetTokenT<TEleColl>>::const_iterator itElectronColl = electronToken_.begin();
400  std::vector<int>::const_iterator itElectronCollFlag = isGsfElectronCollection_.begin();
401  std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs>>::const_iterator itRecoEcalCandColl =
402  recoEcalCandidateToken_.begin();
403 
404  // if you want to dump just FED related to the triggering electron/s
406  // loop on the same time on ecal candidate and elctron collection and boolean for Gsf ones
407  for (; itRecoEcalCandColl != recoEcalCandidateToken_.end() and itElectronColl != electronToken_.end() and
408  itElectronCollFlag != isGsfElectronCollection_.end();
409  ++itElectronColl, ++itElectronCollFlag, ++itRecoEcalCandColl) {
410  // get ecal candidate collection
411  iEvent.getByToken(*itRecoEcalCandColl, triggerRecoEcalCandidateCollection);
412  if (triggerRecoEcalCandidateCollection.failedToGet())
413  continue;
414 
415  // get gsf electron collection
416  iEvent.getByToken(*itElectronColl, electrons);
417  if (electrons.failedToGet())
418  continue;
419 
420  triggerRecoEcalCandidateCollection->getObjects(trigger::TriggerCluster, recoEcalCandColl);
421  if (recoEcalCandColl.empty())
422  triggerRecoEcalCandidateCollection->getObjects(trigger::TriggerPhoton, recoEcalCandColl);
423  if (recoEcalCandColl.empty())
424  triggerRecoEcalCandidateCollection->getObjects(trigger::TriggerElectron, recoEcalCandColl);
425 
426  typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand =
427  recoEcalCandColl.begin(); // loop on recoEcalCandidate objects
428 
429  // loop on the recoEcalCandidates
430  for (; itRecoEcalCand != recoEcalCandColl.end(); ++itRecoEcalCand) {
431  recoEcalCand = (*itRecoEcalCand);
432  reco::SuperClusterRef scRefRecoEcalCand =
433  recoEcalCand->superCluster(); // take the supercluster in order to match with electron objects
434 
435  typename TEleColl::const_iterator itEle = electrons->begin();
436  for (; itEle != electrons->end(); ++itEle) { // loop on all the electrons inside a collection
437  // get electron supercluster and the associated hit -> detID
438  electron = (*itEle);
439  reco::SuperClusterRef scRef = electron.superCluster();
440  if (scRefRecoEcalCand != scRef)
441  continue; // mathching
442 
443  const std::vector<std::pair<DetId, float>>& hits = scRef->hitsAndFractions();
444  // start in dump the ecal FED associated to the electron
445  std::vector<std::pair<DetId, float>>::const_iterator itSChits = hits.begin();
446  if (!dumpAllEcalFed_) {
447  for (; itSChits != hits.end(); ++itSChits) {
448  if ((*itSChits).first.subdetId() == EcalBarrel) { // barrel part
449  EBDetId idEBRaw((*itSChits).first);
451  int hitFED = FEDNumbering::MINECALFEDID +
452  EcalMapping_->GetFED(double(point.eta()), double(point.phi()) * radTodeg);
453  if (hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID)
454  continue;
455 
456  LogDebug("SelectedElectronFEDListProducer")
457  << " electron hit detID Barrel " << (*itSChits).first.rawId() << " eta " << double(point.eta())
458  << " phi " << double(point.phi()) * radTodeg << " FED " << hitFED << std::endl;
459 
460  if (dumpSelectedEcalFed_) {
461  if (!fedList_.empty()) {
462  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
463  fedList_.push_back(hitFED); // in order not to duplicate info
464  } else
465  fedList_.push_back(hitFED);
466  }
467  } else if ((*itSChits).first.subdetId() == EcalEndcap) { // endcap one
468  EEDetId idEERaw((*itSChits).first);
470  int hitFED = FEDNumbering::MINECALFEDID +
471  EcalMapping_->GetFED(double(point.eta()), double(point.phi()) * radTodeg);
472  if (hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID)
473  continue;
474 
475  LogDebug("SelectedElectronFEDListProducer")
476  << " electron hit detID Endcap " << (*itSChits).first.rawId() << " eta " << double(point.eta())
477  << " phi " << double(point.phi()) * radTodeg << " FED " << hitFED << std::endl;
478  if (dumpSelectedEcalFed_) {
479  if (!fedList_.empty()) {
480  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
481  fedList_.push_back(hitFED);
482  } else
483  fedList_.push_back(hitFED);
484 
485  // preshower hit for each ecal endcap hit
486  DetId tmpX =
487  (dynamic_cast<const EcalPreshowerGeometry*>(GeometryES_))->getClosestCellInPlane(point, 1);
488  ESDetId stripX = (tmpX == DetId(0)) ? ESDetId(0) : ESDetId(tmpX);
489  int hitFED =
490  ES_fedId_[(3 - stripX.zside()) / 2 - 1][stripX.plane() - 1][stripX.six() - 1][stripX.siy() - 1];
491  LogDebug("SelectedElectronFEDListProducer")
492  << " ES hit plane X (deiID) " << stripX.rawId() << " six " << stripX.six() << " siy "
493  << stripX.siy() << " plane " << stripX.plane() << " FED ID " << hitFED << std::endl;
494  if (hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
495  continue;
496  if (hitFED < 0)
497  continue;
498  if (!fedList_.empty()) {
499  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
500  fedList_.push_back(hitFED);
501  } else
502  fedList_.push_back(hitFED);
503 
504  DetId tmpY =
505  (dynamic_cast<const EcalPreshowerGeometry*>(GeometryES_))->getClosestCellInPlane(point, 2);
506  ESDetId stripY = (tmpY == DetId(0)) ? ESDetId(0) : ESDetId(tmpY);
507  hitFED =
508  ES_fedId_[(3 - stripY.zside()) / 2 - 1][stripY.plane() - 1][stripY.six() - 1][stripY.siy() - 1];
509  if (hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
510  continue;
511  LogDebug("SelectedElectronFEDListProducer")
512  << " ES hit plane Y (deiID) " << stripY.rawId() << " six " << stripY.six() << " siy "
513  << stripY.siy() << " plane " << stripY.plane() << " FED ID " << hitFED << std::endl;
514  if (hitFED < 0)
515  continue;
516  if (!fedList_.empty()) {
517  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
518  fedList_.push_back(hitFED);
519  } else
520  fedList_.push_back(hitFED);
521  }
522  } // end endcap
523  } // end loop on SC hit
524 
525  // check HCAL behind each hit
526  if (dumpSelectedHCALFed_) {
527  HBHERecHitCollection::const_iterator itHcalRecHit = hcalRecHitCollection->begin();
528  for (; itHcalRecHit != hcalRecHitCollection->end(); ++itHcalRecHit) {
529  HcalDetId recHitId(itHcalRecHit->id());
530  const HcalGeometry* cellGeometry =
531  static_cast<const HcalGeometry*>(GeometryCalo_->getSubdetectorGeometry(recHitId));
532  float dR = reco::deltaR(scRef->eta(),
533  scRef->phi(),
534  cellGeometry->getPosition(recHitId).eta(),
535  cellGeometry->getPosition(recHitId).phi());
536  if (dR <= dRHcalRegion_) {
537  const HcalElectronicsId electronicId = HcalReadoutMap_->lookup(recHitId);
538  int hitFED = electronicId.dccid() + FEDNumbering::MINHCALFEDID;
539  LogDebug("SelectedElectronFEDListProducer")
540  << " matched hcal recHit : HcalDetId " << recHitId << " HcalElectronicsId " << electronicId
541  << " dcc id " << electronicId.dccid() << " spigot " << electronicId.spigot() << " fiber channel "
542  << electronicId.fiberChanId() << " fiber index " << electronicId.fiberIndex() << std::endl;
543  if (hitFED < FEDNumbering::MINHCALFEDID || hitFED > FEDNumbering::MAXHCALFEDID)
544  continue; //first eighteen feds are for HBHE
545  if (hitFED < 0)
546  continue;
547  if (!fedList_.empty()) {
548  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
549  fedList_.push_back(hitFED);
550  } else
551  fedList_.push_back(hitFED);
552  }
553  }
554  } // End Hcal
555  } // End Ecal
556 
557  // get the electron track
558  if (!dumpAllTrackerFed_) {
559  //loop on the region
561  double eta;
562  double phi;
563  if (*itElectronCollFlag) {
564  eta = electron.gsfTrack()->eta();
565  phi = electron.gsfTrack()->phi();
566  } else {
567  eta = electron.track()->eta();
568  phi = electron.track()->phi();
569  }
570  for (uint32_t iCabling = 0; iCabling < SiStripCabling.size(); iCabling++) {
572  double dphi = fabs(pos.second - phi);
573  if (dphi > acos(-1))
574  dphi = 2 * acos(-1) - dphi;
575  double R = sqrt(pow(pos.first - eta, 2) + dphi * dphi);
576  if (R - sqrt(pow(regionDimension_.first / 2, 2) + pow(regionDimension_.second / 2, 2)) > dRStripRegion_)
577  continue;
578  //get vector of subdets within region
579  const SiStripRegionCabling::RegionCabling regSubdets = SiStripCabling[iCabling];
580  //cycle on subdets
581  for (uint32_t idet = 0; idet < SiStripRegionCabling::ALLSUBDETS; idet++) { //cicle between 1 and 4
582  //get vector of layers whin subdet of region
583  const SiStripRegionCabling::WedgeCabling& regSubdetLayers = regSubdets[idet]; // at most 10 layers
584  for (uint32_t ilayer = 0; ilayer < SiStripRegionCabling::ALLLAYERS; ilayer++) {
585  //get map of vectors of feds withing the layer of subdet of region
586  const SiStripRegionCabling::ElementCabling& fedVectorMap =
587  regSubdetLayers[ilayer]; // vector of the fed
588  SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
589  for (; itFedMap != fedVectorMap.end(); itFedMap++) {
590  for (uint32_t op = 0; op < (itFedMap->second).size(); op++) {
591  int hitFED = (itFedMap->second)[op].fedId();
592  if (hitFED < FEDNumbering::MINSiStripFEDID || hitFED > FEDNumbering::MAXSiStripFEDID)
593  continue;
594  LogDebug("SelectedElectronFEDListProducer") << " SiStrip (FedID) " << hitFED << std::endl;
595  if (!fedList_.empty()) {
596  if (std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
597  fedList_.push_back(hitFED);
598  } else
599  fedList_.push_back(hitFED);
600  }
601  }
602  }
603  }
604  }
605  } // end si strip
607  math::XYZVector momentum;
608  if (*itElectronCollFlag)
609  momentum = electron.gsfTrack()->momentum();
610  else
611  momentum = electron.track()->momentum();
613  PixelModule lowerBound(region.vector.phi() - region.dPhi, region.vector.eta() - region.dEta);
614  PixelModule upperBound(region.vector.phi() + region.dPhi, region.vector.eta() + region.dEta);
615 
616  std::vector<PixelModule>::const_iterator itUp, itDn;
617  if (lowerBound.Phi >= -M_PI && upperBound.Phi <= M_PI) {
618  itDn = std::lower_bound(pixelModuleVector_.begin(), pixelModuleVector_.end(), lowerBound);
619  itUp = std::upper_bound(pixelModuleVector_.begin(), pixelModuleVector_.end(), upperBound);
620  pixelFedDump(itDn, itUp, region);
621  } else {
622  if (lowerBound.Phi < -M_PI)
623  lowerBound.Phi = lowerBound.Phi + 2 * M_PI;
624  PixelModule phi_p(M_PI, region.vector.eta() - region.dEta);
625  itDn = std::lower_bound(pixelModuleVector_.begin(), pixelModuleVector_.end(), lowerBound);
626  itUp = std::upper_bound(pixelModuleVector_.begin(), pixelModuleVector_.end(), phi_p);
627  pixelFedDump(itDn, itUp, region);
628 
629  if (upperBound.Phi < -M_PI)
630  upperBound.Phi = upperBound.Phi - 2 * M_PI;
631  PixelModule phi_m(-M_PI, region.vector.eta() - region.dEta);
632  itDn = std::lower_bound(pixelModuleVector_.begin(), pixelModuleVector_.end(), phi_m);
633  itUp = std::upper_bound(pixelModuleVector_.begin(), pixelModuleVector_.end(), upperBound);
634  pixelFedDump(itDn, itUp, region);
635  }
636  }
637  } // end tracker analysis
638  } // end loop on the electron candidate
639  } // end loop on the electron collection collection
640  } // end loop on the recoEcal candidate
641  } // end loop on the recoEcal candidate collection
642  // add a set of chosen FED
643  for (unsigned int iFed = 0; iFed < addThisSelectedFEDs_.size(); iFed++) {
644  if (addThisSelectedFEDs_.at(iFed) == -1)
645  continue;
646  fedList_.push_back(addThisSelectedFEDs_.at(iFed));
647  }
648 
649  // make the final raw data collection
650  auto streamFEDRawProduct = std::make_unique<FEDRawDataCollection>();
651  std::sort(fedList_.begin(), fedList_.end());
652  std::vector<uint32_t>::const_iterator itfedList = fedList_.begin();
653  for (; itfedList != fedList_.end(); ++itfedList) {
654  LogDebug("SelectedElectronFEDListProducer") << " fed point " << *itfedList << " ";
655  const FEDRawData& data = rawdata->FEDData(*itfedList);
656  if (data.size() > 0) {
657  FEDRawData& fedData = streamFEDRawProduct->FEDData(*itfedList);
658  fedData.resize(data.size());
659  memcpy(fedData.data(), data.data(), data.size());
660  }
661  }
662 
663  iEvent.put(std::move(streamFEDRawProduct), outputLabelModule_);
664 
665  if (!fedList_.empty())
666  fedList_.clear();
667 }
size
Write out results.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbToken_
int GetFED(double eta, double phi) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
const CaloSubdetectorGeometry * GeometryES_
int zside() const
Definition: ESDetId.h:39
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
const Cabling & getRegionCabling() const
std::vector< Element > ElementCabling
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
const Position position(const uint32_t) const
bool failedToGet() const
Definition: HandleBase.h:72
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
int iEvent
Definition: GenABIO.cc:224
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
void resize(size_t newsize)
Definition: FEDRawData.cc:28
int plane() const
Definition: ESDetId.h:41
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
T sqrt(T t)
Definition: SSEVec.h:19
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
const_iterator begin() const
std::vector< RegionCabling > Cabling
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > siStripRegionCablingToken_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
#define M_PI
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const_iterator end() const
Definition: DetId.h:17
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const EcalElectronicsMapping * EcalMapping_
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
std::pair< double, double > Position
int siy() const
Definition: ESDetId.h:45
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
std::vector< WedgeCabling > RegionCabling
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int six() const
Definition: ESDetId.h:43
const std::pair< double, double > regionDimensions() const
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:141
const SiStripRegionCabling * StripRegionCabling_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
std::vector< ElementCabling > WedgeCabling
constexpr double pi()
Definition: Pi.h:31
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
Readout chain identification for Hcal.
void pixelFedDump(std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion &region)
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
def move(src, dest)
Definition: eostools.py:511
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
#define LogDebug(id)

Member Data Documentation

◆ addThisSelectedFEDs_

template<typename TEle , typename TCand >
std::vector<int> SelectedElectronFEDListProducer< TEle, TCand >::addThisSelectedFEDs_
private

◆ beamSpotPosition_

template<typename TEle , typename TCand >
math::XYZVector SelectedElectronFEDListProducer< TEle, TCand >::beamSpotPosition_
private

Definition at line 155 of file SelectedElectronFEDListProducer.h.

◆ beamSpotTag_

template<typename TEle , typename TCand >
edm::InputTag SelectedElectronFEDListProducer< TEle, TCand >::beamSpotTag_
private

◆ beamSpotToken_

template<typename TEle , typename TCand >
edm::EDGetTokenT<reco::BeamSpot> SelectedElectronFEDListProducer< TEle, TCand >::beamSpotToken_
private

◆ caloGeometryToken_

template<typename TEle , typename TCand >
const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> SelectedElectronFEDListProducer< TEle, TCand >::caloGeometryToken_
private

Definition at line 149 of file SelectedElectronFEDListProducer.h.

◆ dEtaPixelRegion_

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dEtaPixelRegion_
private

◆ dPhiPixelRegion_

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dPhiPixelRegion_
private

◆ dRHcalRegion_

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dRHcalRegion_
private

◆ dRStripRegion_

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dRStripRegion_
private

◆ dumpAllEcalFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpAllEcalFed_
private

◆ dumpAllHCALFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpAllHCALFed_
private

◆ dumpAllTrackerFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpAllTrackerFed_
private

◆ dumpSelectedEcalFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedEcalFed_
private

◆ dumpSelectedHCALFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedHCALFed_
private

◆ dumpSelectedSiPixelFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedSiPixelFed_
private

◆ dumpSelectedSiStripFed_

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedSiStripFed_
private

◆ EcalMapping_

template<typename TEle , typename TCand >
const EcalElectronicsMapping* SelectedElectronFEDListProducer< TEle, TCand >::EcalMapping_
private

Definition at line 164 of file SelectedElectronFEDListProducer.h.

◆ ecalMappingToken_

template<typename TEle , typename TCand >
const edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> SelectedElectronFEDListProducer< TEle, TCand >::ecalMappingToken_
private

Definition at line 148 of file SelectedElectronFEDListProducer.h.

◆ electronTags_

template<typename TEle , typename TCand >
std::vector<edm::InputTag> SelectedElectronFEDListProducer< TEle, TCand >::electronTags_
private

◆ electronToken_

template<typename TEle , typename TCand >
std::vector<edm::EDGetTokenT<TEleColl> > SelectedElectronFEDListProducer< TEle, TCand >::electronToken_
private

◆ ES_fedId_

template<typename TEle , typename TCand >
int SelectedElectronFEDListProducer< TEle, TCand >::ES_fedId_[2][2][40][40]
private

◆ ESLookupTable_

template<typename TEle , typename TCand >
edm::FileInPath SelectedElectronFEDListProducer< TEle, TCand >::ESLookupTable_
private

◆ fedList_

template<typename TEle , typename TCand >
std::vector<uint32_t> SelectedElectronFEDListProducer< TEle, TCand >::fedList_
private

Definition at line 161 of file SelectedElectronFEDListProducer.h.

◆ GeometryCalo_

template<typename TEle , typename TCand >
const CaloGeometry* SelectedElectronFEDListProducer< TEle, TCand >::GeometryCalo_
private

Definition at line 165 of file SelectedElectronFEDListProducer.h.

◆ GeometryES_

template<typename TEle , typename TCand >
const CaloSubdetectorGeometry* SelectedElectronFEDListProducer< TEle, TCand >::GeometryES_
private

Definition at line 166 of file SelectedElectronFEDListProducer.h.

◆ HBHERecHitTag_

template<typename TEle , typename TCand >
edm::InputTag SelectedElectronFEDListProducer< TEle, TCand >::HBHERecHitTag_
private

◆ hbheRecHitToken_

template<typename TEle , typename TCand >
edm::EDGetTokenT<HBHERecHitCollection> SelectedElectronFEDListProducer< TEle, TCand >::hbheRecHitToken_
private

◆ hcalDbToken_

template<typename TEle , typename TCand >
const edm::ESGetToken<HcalDbService, HcalDbRecord> SelectedElectronFEDListProducer< TEle, TCand >::hcalDbToken_
private

Definition at line 147 of file SelectedElectronFEDListProducer.h.

◆ HcalReadoutMap_

template<typename TEle , typename TCand >
const HcalElectronicsMap* SelectedElectronFEDListProducer< TEle, TCand >::HcalReadoutMap_
private

Definition at line 168 of file SelectedElectronFEDListProducer.h.

◆ isGsfElectronCollection_

template<typename TEle , typename TCand >
std::vector<int> SelectedElectronFEDListProducer< TEle, TCand >::isGsfElectronCollection_
private

◆ maxZPixelRegion_

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::maxZPixelRegion_
private

◆ outputLabelModule_

template<typename TEle , typename TCand >
std::string SelectedElectronFEDListProducer< TEle, TCand >::outputLabelModule_
private

◆ PixelCabling_

template<typename TEle , typename TCand >
std::unique_ptr<SiPixelFedCablingTree> SelectedElectronFEDListProducer< TEle, TCand >::PixelCabling_
private

Definition at line 171 of file SelectedElectronFEDListProducer.h.

◆ pixelModuleVector_

template<typename TEle , typename TCand >
std::vector<PixelModule> SelectedElectronFEDListProducer< TEle, TCand >::pixelModuleVector_
private

Definition at line 172 of file SelectedElectronFEDListProducer.h.

◆ rawDataTag_

template<typename TEle , typename TCand >
edm::InputTag SelectedElectronFEDListProducer< TEle, TCand >::rawDataTag_
private

◆ rawDataToken_

template<typename TEle , typename TCand >
edm::EDGetTokenT<FEDRawDataCollection> SelectedElectronFEDListProducer< TEle, TCand >::rawDataToken_
private

◆ recoEcalCandidateTags_

template<typename TEle , typename TCand >
std::vector<edm::InputTag> SelectedElectronFEDListProducer< TEle, TCand >::recoEcalCandidateTags_
private

◆ recoEcalCandidateToken_

template<typename TEle , typename TCand >
std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> > SelectedElectronFEDListProducer< TEle, TCand >::recoEcalCandidateToken_
private

◆ regionDimension_

template<typename TEle , typename TCand >
std::pair<double, double> SelectedElectronFEDListProducer< TEle, TCand >::regionDimension_
private

Definition at line 175 of file SelectedElectronFEDListProducer.h.

◆ siPixelFedCablingMapToken_

template<typename TEle , typename TCand >
const edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> SelectedElectronFEDListProducer< TEle, TCand >::siPixelFedCablingMapToken_
private

Definition at line 150 of file SelectedElectronFEDListProducer.h.

◆ siStripRegionCablingToken_

template<typename TEle , typename TCand >
const edm::ESGetToken<SiStripRegionCabling, SiStripRegionCablingRcd> SelectedElectronFEDListProducer< TEle, TCand >::siStripRegionCablingToken_
private

Definition at line 152 of file SelectedElectronFEDListProducer.h.

◆ StripRegionCabling_

template<typename TEle , typename TCand >
const SiStripRegionCabling* SelectedElectronFEDListProducer< TEle, TCand >::StripRegionCabling_
private

Definition at line 167 of file SelectedElectronFEDListProducer.h.

◆ trackerGeometryToken_

template<typename TEle , typename TCand >
const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SelectedElectronFEDListProducer< TEle, TCand >::trackerGeometryToken_
private

Definition at line 151 of file SelectedElectronFEDListProducer.h.