297 std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry->
dets().begin();
298 for( ; itTracker !=trackerGeometry->
dets().end() ; ++itTracker){
299 int subdet = (*itTracker)->geographicalId().subdetId();
302 module.
x = (*itTracker)->position().x();
303 module.
y = (*itTracker)->position().y();
304 module.
z = (*itTracker)->position().z();
305 module.
Phi = (*itTracker)->position().phi();
306 module.
Eta = (*itTracker)->position().eta();
307 module.
DetId = (*itTracker)->geographicalId().rawId();
308 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
PixelCabling_->pathToDetUnit(module.
DetId);
309 module.
Fed = path2det[0].fed;
339 if(!hbheRecHitHandle.
failedToGet()) hcalRecHitCollection = hbheRecHitHandle.
product();
341 double radTodeg = 180. /
Geom::pi();
367 std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
370 typename std::vector<edm::EDGetTokenT<TEleColl> >::const_iterator itElectronColl =
electronToken_.begin();
372 std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> >::const_iterator itRecoEcalCandColl =
recoEcalCandidateToken_.begin();
379 ++itElectronColl , ++itElectronCollFlag, ++itRecoEcalCandColl){
382 iEvent.
getByToken(*itRecoEcalCandColl,triggerRecoEcalCandidateCollection);
383 if(triggerRecoEcalCandidateCollection.
failedToGet())
continue ;
393 typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand = recoEcalCandColl.begin();
396 for( ; itRecoEcalCand != recoEcalCandColl.end() ; ++itRecoEcalCand){
397 recoEcalCand = (*itRecoEcalCand);
400 typename TEleColl::const_iterator itEle = electrons->begin();
401 for( ; itEle!=electrons->end() ; ++itEle){
405 if ( scRefRecoEcalCand != scRef ) continue ;
407 const std::vector<std::pair<DetId,float> >&
hits = scRef->hitsAndFractions();
409 std::vector<std::pair<DetId,float> >::const_iterator itSChits = hits.begin();
411 for( ; itSChits!=hits.end() ; ++itSChits){
412 if((*itSChits).first.subdetId()==
EcalBarrel){
413 EBDetId idEBRaw ((*itSChits).first);
418 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Barrel "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
428 else if((*itSChits).first.subdetId()==
EcalEndcap){
429 EEDetId idEERaw ((*itSChits).first);
432 if( hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID )
continue;
434 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Endcap "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
446 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane X (deiID) "<<stripX.
rawId()<<
" six "<<stripX.
six()<<
" siy "<<stripX.
siy()<<
" plane "<<stripX.
plane()<<
" FED ID "<<hitFED<<std::endl;
448 if(hitFED < 0)
continue;
458 if(hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
continue;
459 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane Y (deiID) "<<stripY.
rawId()<<
" six "<<stripY.
six()<<
" siy "<<stripY.
siy()<<
" plane "<<stripY.
plane()<<
" FED ID "<<hitFED<<std::endl;
460 if(hitFED < 0)
continue;
473 for( ; itHcalRecHit != hcalRecHitCollection->
end() ; ++itHcalRecHit) {
476 float dR =
reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition(recHitId).eta(),cellGeometry->getPosition(recHitId).phi());
480 LogDebug(
"SelectedElectronFEDListProducer")<<
" matched hcal recHit : HcalDetId "<<recHitId<<
" HcalElectronicsId "<<electronicId<<
" dcc id "<<electronicId.
dccid()<<
" spigot "<<electronicId.
spigot()<<
" fiber channel "<<electronicId.
fiberChanId()<<
" fiber index "<<electronicId.
fiberIndex()<<std::endl;
502 if(*itElectronCollFlag){
503 eta = electron.gsfTrack()->eta();
504 phi = electron.gsfTrack()->phi();
507 eta = electron.track()->eta();
508 phi = electron.track()->phi();
510 for(uint32_t iCabling = 0; iCabling < SiStripCabling.size(); iCabling++){
512 double dphi=fabs(pos.second-phi);
513 if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
514 double R =
sqrt(
pow(pos.first-eta,2)+dphi*dphi);
525 SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
526 for( ; itFedMap!=fedVectorMap.end(); itFedMap++){
527 for (uint32_t op=0; op<(itFedMap->second).
size(); op++){
528 int hitFED = (itFedMap->second)[op].
fedId();
530 LogDebug(
"SelectedElectronFEDListProducer")<<
" SiStrip (FedID) "<<hitFED<<std::endl;
543 if(*itElectronCollFlag) momentum = electron.gsfTrack()->momentum();
544 else momentum = electron.track()->momentum();
546 PixelModule lowerBound (region.vector.phi()-region.dPhi, region.vector.eta()-region.dEta);
547 PixelModule upperBound (region.vector.phi()+region.dPhi, region.vector.eta()+region.dEta);
549 std::vector<PixelModule>::const_iterator itUp, itDn ;
550 if(lowerBound.Phi >= -
M_PI && upperBound.Phi <=
M_PI ){
556 if(lowerBound.Phi < -
M_PI) lowerBound.Phi = lowerBound.Phi+2*
M_PI;
562 if(upperBound.Phi < -
M_PI) upperBound.Phi = upperBound.Phi-2*
M_PI;
581 auto streamFEDRawProduct = std::make_unique<FEDRawDataCollection>();
583 std::vector<uint32_t>::const_iterator itfedList =
fedList_.begin();
584 for( ; itfedList!=
fedList_.end() ; ++itfedList){
585 LogDebug(
"SelectedElectronFEDListProducer")<<
" fed point "<<*itfedList<<
" ";
588 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
std::pair< double, double > regionDimension_
math::XYZVector beamSpotPosition_
int GetFED(double eta, double phi) const
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
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_
const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string outputLabelModule_
Geom::Phi< T > phi() const
std::vector< HBHERecHit >::const_iterator const_iterator
const CaloSubdetectorGeometry * GeometryES_
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_
uint32_t rawId() const
get the raw id
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
std::vector< ElementCabling > WedgeCabling
edm::InputTag HBHERecHitTag_
int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
std::pair< double, double > Position
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
edm::InputTag rawDataTag_
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
const Cabling & getRegionCabling() const
std::vector< int > isGsfElectronCollection_
bool dumpSelectedHCALFed_
int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
const_iterator end() const
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::vector< PixelModule > pixelModuleVector_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
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]
std::vector< int > addThisSelectedFEDs_
T const * product() const
std::vector< WedgeCabling > RegionCabling
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
std::vector< RegionCabling > Cabling