337 std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry->
dets().begin();
338 for (; itTracker != trackerGeometry->
dets().end(); ++itTracker) {
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())
434 iEvent.
getByToken(*itElectronColl, electrons);
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);
490 if (hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID)
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;
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;
527 if (hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
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) {
582 eta = electron.gsfTrack()->eta();
583 phi = electron.gsfTrack()->phi();
585 eta = electron.track()->eta();
586 phi = electron.track()->phi();
588 for (uint32_t iCabling = 0; iCabling < SiStripCabling.size(); iCabling++) {
590 double dphi = fabs(pos.second - phi);
592 dphi = 2 * acos(-1) - dphi;
593 double R =
sqrt(
pow(pos.first - eta, 2) + dphi * 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);
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
const std::pair< double, double > regionDimensions() const
math::XYZVector beamSpotPosition_
int GetFED(double eta, double phi) const
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
const HcalElectronicsMap * HcalReadoutMap_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::InputTag beamSpotTag_
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< uint32_t > fedList_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string outputLabelModule_
Geom::Phi< T > phi() const
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
const CaloSubdetectorGeometry * GeometryES_
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
std::vector< Element > ElementCabling
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool dumpSelectedSiStripFed_
size_t size() const
Lenght of the data buffer in bytes.
const CaloGeometry * GeometryCalo_
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
edm::InputTag HBHERecHitTag_
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
edm::InputTag rawDataTag_
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
std::vector< RegionCabling > Cabling
const Cabling & getRegionCabling() const
std::vector< int > isGsfElectronCollection_
bool dumpSelectedHCALFed_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const_iterator end() 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...
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
const Position position(const uint32_t) const
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const EcalElectronicsMapping * EcalMapping_
std::pair< double, double > Position
std::vector< PixelModule > pixelModuleVector_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< WedgeCabling > RegionCabling
bool dumpSelectedSiPixelFed_
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
const HcalElectronicsMap * getHcalMapping() const
const SiStripRegionCabling * StripRegionCabling_
const Point & position() const
position
int ES_fedId_[2][2][40][40]
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
std::vector< ElementCabling > WedgeCabling
std::vector< int > addThisSelectedFEDs_
std::pair< double, double > regionDimension_
T const * product() const
Readout chain identification for Hcal.
void pixelFedDump(std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion ®ion)
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
bool dumpSelectedEcalFed_
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Power< A, B >::type pow(const A &a, const B &b)
*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
const_iterator begin() const