|
|
#include <SelectedElectronFEDListProducer.h>
template<typename TEle, typename TCand>
class SelectedElectronFEDListProducer< TEle, TCand >
Definition at line 76 of file SelectedElectronFEDListProducer.h.
◆ TCandColl
template<typename TEle , typename TCand >
◆ TEleColl
template<typename TEle , typename TCand >
◆ SelectedElectronFEDListProducer()
template<typename TEle , typename TCand >
Producer constructor.
Definition at line 70 of file SelectedElectronFEDListProducer.cc.
72 if (iConfig.
existsAs<std::vector<edm::InputTag>>(
"electronTags")) {
76 <<
"[SelectedElectronFEDListProducer] empty electron collection is given --> at least one \n";
79 <<
"[SelectedElectronFEDListProducer] no electron collection are given --> need at least one \n";
82 LogDebug(
"SelectedElectronFEDListProducer") <<
" Electron Collections" << std::endl;
86 LogDebug(
"SelectedElectronFEDListProducer") <<
" Ele collection: " << *(itEleTag) << std::endl;
90 if (iConfig.
existsAs<std::vector<edm::InputTag>>(
"recoEcalCandidateTags")) {
93 throw cms::Exception(
"Configuration") <<
"[SelectedElectronFEDListProducer] empty ecal candidate collections "
94 "collection is given --> at least one \n";
96 throw cms::Exception(
"Configuration") <<
"[SelectedElectronFEDListProducer] no electron reco ecal candidate "
97 "collection are given --> need at least one \n";
104 LogDebug(
"SelectedElectronFEDListProducer") <<
" Reco ecal candidate collection: " << *(itEcalCandTag) << std::endl;
108 if (iConfig.
existsAs<std::vector<int>>(
"isGsfElectronCollection")) {
112 <<
"[SelectedElectronFEDListProducer] empty electron flag collection --> at least one \n";
115 <<
"[SelectedElectronFEDListProducer] no electron flag are given --> need at least one \n";
119 throw cms::Exception(
"Configuration") <<
"[SelectedElectronFEDListProducer] electron flag , electron collection "
120 "and reco ecal cand collection must have the same size ! \n";
151 LogDebug(
"SelectedElectronFEDListProducer") <<
" RawDataInput " <<
rawDataTag_ << std::endl;
154 if (iConfig.
existsAs<std::vector<int>>(
"addThisSelectedFEDs")) {
163 LogDebug(
"SelectedElectronFEDListProducer") <<
" Additional FED: " << *(AddFed) << std::endl;
180 if (iConfig.
existsAs<
double>(
"dRStripRegion"))
188 if (iConfig.
existsAs<
double>(
"dRHcalRegion"))
194 if (iConfig.
existsAs<
double>(
"dPhiPixelRegion"))
199 if (iConfig.
existsAs<
double>(
"dEtaPixelRegion"))
204 if (iConfig.
existsAs<
double>(
"maxZPixelRegion"))
209 LogDebug(
"SelectedElectronFEDListProducer")
214 if (iConfig.
existsAs<
bool>(
"dumpSelectedEcalFed"))
219 if (iConfig.
existsAs<
bool>(
"dumpSelectedSiStripFed"))
224 if (iConfig.
existsAs<
bool>(
"dumpSelectedSiPixelFed"))
229 if (iConfig.
existsAs<
bool>(
"dumpSelectedHCALFed"))
234 LogDebug(
"SelectedElectronFEDListProducer")
238 if (iConfig.
existsAs<
bool>(
"dumpAllEcalFed"))
243 if (iConfig.
existsAs<
bool>(
"dumpAllTrackerFed"))
248 if (iConfig.
existsAs<
bool>(
"dumpAllHCALFed"))
253 LogDebug(
"SelectedElectronFEDListProducer")
258 for (
int i = 0;
i < 2; ++
i)
259 for (
int j = 0;
j < 2; ++
j)
260 for (
int k = 0;
k < 40; ++
k)
261 for (
int m = 0;
m < 40;
m++)
265 int nLines, iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
266 std::ifstream ES_file;
268 LogDebug(
"SelectedElectronFEDListProducer")
270 if (ES_file.is_open()) {
273 ES_file >> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
274 ES_fedId_[(3 - iz) / 2 - 1][ip - 1][ix - 1][iy - 1] = fed;
277 LogDebug(
"SelectedElectronFEDListProducer")
References Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), mps_fire::i, HLT_2018_cff::InputTag, dqmiolumiharvest::j, dqmdumpme::k, LogDebug, visualization-live-secondInstance_cfg::m, submitDQMOfflineCAF::nLines, or, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ ~SelectedElectronFEDListProducer()
template<typename TEle , typename TCand >
◆ beginJob()
template<typename TEle , typename TCand >
◆ endJob()
template<typename TEle , typename TCand >
◆ fillDescriptions()
template<typename TEle , typename TCand >
Definition at line 718 of file SelectedElectronFEDListProducer.cc.
720 desc.
add<vector<edm::InputTag>>(
"electronTags", {
edm::InputTag(
"hltEgammaGsfElectrons")});
721 desc.
add<vector<edm::InputTag>>(
"recoEcalCandidateTags", {
edm::InputTag(
"hltL1EG25Ele27WP85GsfTrackIsoFilter")});
726 desc.
add<vector<int>>(
"addThisSelectedFEDs", {812, 813});
727 desc.
add<vector<int>>(
"isGsfElectronCollection", {
true});
728 desc.
add<
std::string>(
"outputLabelModule",
"StreamElectronRawFed");
729 desc.
add<
bool>(
"dumpSelectedSiPixelFed",
true);
730 desc.
add<
bool>(
"dumpSelectedSiStripFed",
true);
731 desc.
add<
bool>(
"dumpSelectedEcalFed",
true);
732 desc.
add<
bool>(
"dumpSelectedHCALFed",
true);
733 desc.
add<
double>(
"dPhiPixelRegion", 0.3);
734 desc.add<
double>(
"dEtaPixelRegion", 0.3);
735 desc.add<
double>(
"dRStripRegion", 0.3);
736 desc.add<
double>(
"dRHcalRegion", 0.3);
737 desc.add<
double>(
"maxZPixelRegion", 24);
738 desc.add<
bool>(
"dumpAllTrackerFed",
false);
739 desc.add<
bool>(
"dumpAllEcalFed",
false);
740 desc.add<
bool>(
"dumpAllHcalFed",
false);
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), defaultModuleLabel(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ pixelFedDump()
template<typename TEle , typename TCand >
◆ produce()
template<typename TEle , typename TCand >
Definition at line 307 of file SelectedElectronFEDListProducer.cc.
337 std::vector<const GeomDet*>::const_iterator itTracker =
trackerGeometry->dets().begin();
339 int subdet = (*itTracker)->geographicalId().subdetId();
343 module.x = (*itTracker)->position().x();
344 module.y = (*itTracker)->position().y();
345 module.z = (*itTracker)->position().z();
346 module.Phi = (*itTracker)->position().phi();
347 module.Eta = (*itTracker)->position().eta();
348 module.DetId = (*itTracker)->geographicalId().rawId();
349 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
PixelCabling_->pathToDetUnit(
module.DetId);
350 module.Fed = path2det[0].fed;
386 hcalRecHitCollection = hbheRecHitHandle.
product();
388 double radTodeg = 180. /
Geom::pi();
414 std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
417 typename std::vector<edm::EDGetTokenT<TEleColl>>::const_iterator itElectronColl =
electronToken_.begin();
419 std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs>>::const_iterator itRecoEcalCandColl =
427 ++itElectronColl, ++itElectronCollFlag, ++itRecoEcalCandColl) {
429 iEvent.getByToken(*itRecoEcalCandColl, triggerRecoEcalCandidateCollection);
430 if (triggerRecoEcalCandidateCollection.
failedToGet())
439 if (recoEcalCandColl.empty())
441 if (recoEcalCandColl.empty())
444 typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand =
445 recoEcalCandColl.begin();
448 for (; itRecoEcalCand != recoEcalCandColl.end(); ++itRecoEcalCand) {
449 recoEcalCand = (*itRecoEcalCand);
451 recoEcalCand->superCluster();
453 typename TEleColl::const_iterator itEle =
electrons->begin();
454 for (; itEle !=
electrons->end(); ++itEle) {
458 if (scRefRecoEcalCand != scRef)
461 const std::vector<std::pair<DetId, float>>&
hits = scRef->hitsAndFractions();
463 std::vector<std::pair<DetId, float>>::const_iterator itSChits =
hits.begin();
465 for (; itSChits !=
hits.end(); ++itSChits) {
466 if ((*itSChits).first.subdetId() ==
EcalBarrel) {
467 EBDetId idEBRaw((*itSChits).first);
474 LogDebug(
"SelectedElectronFEDListProducer")
475 <<
" electron hit detID Barrel " << (*itSChits).first.rawId() <<
" eta " << double(
point.eta())
476 <<
" phi " <<
double(
point.phi()) * radTodeg <<
" FED " << hitFED << std::endl;
485 }
else if ((*itSChits).first.subdetId() ==
EcalEndcap) {
486 EEDetId idEERaw((*itSChits).first);
493 LogDebug(
"SelectedElectronFEDListProducer")
494 <<
" electron hit detID Endcap " << (*itSChits).first.rawId() <<
" eta " << double(
point.eta())
495 <<
" phi " <<
double(
point.phi()) * radTodeg <<
" FED " << hitFED << std::endl;
505 (dynamic_cast<const EcalPreshowerGeometry*>(
GeometryES_))->getClosestCellInPlane(
point, 1);
509 LogDebug(
"SelectedElectronFEDListProducer")
510 <<
" ES hit plane X (deiID) " << stripX.
rawId() <<
" six " << stripX.
six() <<
" siy "
511 << stripX.
siy() <<
" plane " << stripX.
plane() <<
" FED ID " << hitFED << std::endl;
523 (dynamic_cast<const EcalPreshowerGeometry*>(
GeometryES_))->getClosestCellInPlane(
point, 2);
529 LogDebug(
"SelectedElectronFEDListProducer")
530 <<
" ES hit plane Y (deiID) " << stripY.
rawId() <<
" six " << stripY.
six() <<
" siy "
531 << stripY.
siy() <<
" plane " << stripY.
plane() <<
" FED ID " << hitFED << std::endl;
546 for (; itHcalRecHit != hcalRecHitCollection->
end(); ++itHcalRecHit) {
552 cellGeometry->getPosition(recHitId).eta(),
553 cellGeometry->getPosition(recHitId).phi());
557 LogDebug(
"SelectedElectronFEDListProducer")
558 <<
" matched hcal recHit : HcalDetId " << recHitId <<
" HcalElectronicsId " << electronicId
559 <<
" dcc id " << electronicId.
dccid() <<
" spigot " << electronicId.
spigot() <<
" fiber channel "
581 if (*itElectronCollFlag) {
588 for (uint32_t iCabling = 0; iCabling < SiStripCabling.size(); iCabling++) {
590 double dphi = fabs(
pos.second -
phi);
592 dphi = 2 * acos(-1) - dphi;
605 regSubdetLayers[ilayer];
606 SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
607 for (; itFedMap != fedVectorMap.end(); itFedMap++) {
608 for (uint32_t op = 0; op < (itFedMap->second).
size(); op++) {
609 int hitFED = (itFedMap->second)[op].
fedId();
612 LogDebug(
"SelectedElectronFEDListProducer") <<
" SiStrip (FedID) " << hitFED << std::endl;
626 if (*itElectronCollFlag)
627 momentum =
electron.gsfTrack()->momentum();
629 momentum =
electron.track()->momentum();
634 std::vector<PixelModule>::const_iterator itUp, itDn;
635 if (lowerBound.Phi >= -
M_PI && upperBound.Phi <=
M_PI) {
640 if (lowerBound.Phi < -
M_PI)
641 lowerBound.Phi = lowerBound.Phi + 2 *
M_PI;
647 if (upperBound.Phi < -
M_PI)
648 upperBound.Phi = upperBound.Phi - 2 *
M_PI;
668 auto streamFEDRawProduct = std::make_unique<FEDRawDataCollection>();
670 std::vector<uint32_t>::const_iterator itfedList =
fedList_.begin();
671 for (; itfedList !=
fedList_.end(); ++itfedList) {
672 LogDebug(
"SelectedElectronFEDListProducer") <<
" fed point " << *itfedList <<
" ";
674 if (
data.size() > 0) {
675 FEDRawData& fedData = streamFEDRawProduct->FEDData(*itfedList);
References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, pwdgSkimBPark_cfi::beamSpot, edm::SortedCollection< T, SORT >::begin(), SiPixelFedCablingMap::cablingTree(), FEDRawData::data(), std::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::get(), get, HcalDbService::getHcalMapping(), trigger::TriggerRefsCollections::getObjects(), SiStripRegionCabling::getRegionCabling(), CaloGeometry::getSubdetectorGeometry(), hfClusterShapes_cfi::hits, iEvent, LogDebug, cuda_std::lower_bound(), M_PI, FEDNumbering::MAXECALFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXPreShowerFEDID, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINECALFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINPreShowerFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, eostools::move(), Geom::pi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, ESDetId::plane(), point, funct::pow(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), dttmaxenums::R, DetId::rawId(), HLT_2018_cff::region, FEDRawData::resize(), ESDetId::six(), ESDetId::siy(), std::size(), HcalElectronicsId::spigot(), mathSSE::sqrt(), trackerGeometry_cfi::trackerGeometry, trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerPhoton, cuda_std::upper_bound(), and ESDetId::zside().
◆ addThisSelectedFEDs_
template<typename TEle , typename TCand >
◆ beamSpotPosition_
template<typename TEle , typename TCand >
◆ beamSpotTag_
template<typename TEle , typename TCand >
◆ beamSpotToken_
template<typename TEle , typename TCand >
◆ dEtaPixelRegion_
template<typename TEle , typename TCand >
◆ dPhiPixelRegion_
template<typename TEle , typename TCand >
◆ dRHcalRegion_
template<typename TEle , typename TCand >
◆ dRStripRegion_
template<typename TEle , typename TCand >
◆ dumpAllEcalFed_
template<typename TEle , typename TCand >
◆ dumpAllHCALFed_
template<typename TEle , typename TCand >
◆ dumpAllTrackerFed_
template<typename TEle , typename TCand >
◆ dumpSelectedEcalFed_
template<typename TEle , typename TCand >
◆ dumpSelectedHCALFed_
template<typename TEle , typename TCand >
◆ dumpSelectedSiPixelFed_
template<typename TEle , typename TCand >
◆ dumpSelectedSiStripFed_
template<typename TEle , typename TCand >
◆ EcalMapping_
template<typename TEle , typename TCand >
◆ electronTags_
template<typename TEle , typename TCand >
◆ electronToken_
template<typename TEle , typename TCand >
◆ ES_fedId_
template<typename TEle , typename TCand >
◆ ESLookupTable_
template<typename TEle , typename TCand >
◆ fedList_
template<typename TEle , typename TCand >
◆ GeometryCalo_
template<typename TEle , typename TCand >
◆ GeometryES_
template<typename TEle , typename TCand >
◆ HBHERecHitTag_
template<typename TEle , typename TCand >
◆ hbheRecHitToken_
template<typename TEle , typename TCand >
◆ HcalReadoutMap_
template<typename TEle , typename TCand >
◆ isGsfElectronCollection_
template<typename TEle , typename TCand >
◆ maxZPixelRegion_
template<typename TEle , typename TCand >
◆ outputLabelModule_
template<typename TEle , typename TCand >
◆ PixelCabling_
template<typename TEle , typename TCand >
◆ pixelModuleVector_
template<typename TEle , typename TCand >
◆ rawDataTag_
template<typename TEle , typename TCand >
◆ rawDataToken_
template<typename TEle , typename TCand >
◆ recoEcalCandidateTags_
template<typename TEle , typename TCand >
◆ recoEcalCandidateToken_
template<typename TEle , typename TCand >
◆ regionDimension_
template<typename TEle , typename TCand >
◆ StripRegionCabling_
template<typename TEle , typename TCand >
bool dumpSelectedHCALFed_
T const * product() const
std::pair< double, double > Position
std::vector< WedgeCabling > RegionCabling
std::string outputLabelModule_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< T >::const_iterator const_iterator
std::vector< ElementCabling > WedgeCabling
void pixelFedDump(std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion ®ion)
const Cabling & getRegionCabling() const
T const * product() const
std::vector< int > addThisSelectedFEDs_
std::vector< uint32_t > fedList_
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
const Position position(const uint32_t) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
edm::FileInPath ESLookupTable_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
bool dumpSelectedEcalFed_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
std::vector< edm::InputTag > electronTags_
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
const HcalElectronicsMap * getHcalMapping() const
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...
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
std::vector< edm::InputTag > recoEcalCandidateTags_
const CaloSubdetectorGeometry * GeometryES_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
__host__ constexpr __device__ RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
const_iterator begin() const
Readout chain identification for Hcal.
bool dumpSelectedSiStripFed_
int GetFED(double eta, double phi) const
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
std::string defaultModuleLabel()
const_iterator end() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::pair< double, double > regionDimension_
std::vector< PixelModule > pixelModuleVector_
edm::InputTag HBHERecHitTag_
T getParameter(std::string const &) const
const CaloGeometry * GeometryCalo_
constexpr uint32_t rawId() const
get the raw id
edm::InputTag beamSpotTag_
std::vector< RegionCabling > Cabling
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
const SiStripRegionCabling * StripRegionCabling_
void resize(size_t newsize)
const HcalElectronicsMap * HcalReadoutMap_
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
const EcalElectronicsMapping * EcalMapping_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
char data[epos_bytes_allocation]
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
Power< A, B >::type pow(const A &a, const B &b)
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
Abs< T >::type abs(const T &t)
std::vector< int > isGsfElectronCollection_
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
bool dumpSelectedSiPixelFed_
*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
std::vector< Element > ElementCabling
edm::InputTag rawDataTag_
std::string fullPath() const
const std::pair< double, double > regionDimensions() const
math::XYZVector beamSpotPosition_
int ES_fedId_[2][2][40][40]
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_