296 std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry->dets().begin();
297 for( ; itTracker !=trackerGeometry->dets().end() ; ++itTracker){
298 int subdet = (*itTracker)->geographicalId().subdetId();
301 module.
x = (*itTracker)->position().x();
302 module.
y = (*itTracker)->position().y();
303 module.
z = (*itTracker)->position().z();
305 module.
Eta = (*itTracker)->position().eta() ;
306 module.
DetId = (*itTracker)->geographicalId().rawId();
307 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
PixelCabling_->pathToDetUnit(module.
DetId);
308 module.
Fed = path2det[0].fed;
338 if(!hbheRecHitHandle.
failedToGet()) hcalRecHitCollection = hbheRecHitHandle.
product();
340 double radTodeg = 180. /
Geom::pi();
366 std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
369 typename std::vector<edm::EDGetTokenT<TEleColl> >::const_iterator itElectronColl =
electronToken_.begin();
371 std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> >::const_iterator itRecoEcalCandColl =
recoEcalCandidateToken_.begin();
378 ++itElectronColl , ++itElectronCollFlag, ++itRecoEcalCandColl){
381 iEvent.
getByToken(*itRecoEcalCandColl,triggerRecoEcalCandidateCollection);
382 if(triggerRecoEcalCandidateCollection.
failedToGet())
continue ;
389 if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(
trigger::TriggerPhoton, recoEcalCandColl);
390 if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(
trigger::TriggerElectron, recoEcalCandColl);
392 typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand = recoEcalCandColl.begin();
395 for( ; itRecoEcalCand != recoEcalCandColl.end() ; ++itRecoEcalCand){
396 recoEcalCand = (*itRecoEcalCand);
399 typename TEleColl::const_iterator itEle = electrons->begin();
400 for( ; itEle!=electrons->end() ; ++itEle){
404 if ( scRefRecoEcalCand != scRef ) continue ;
406 const std::vector<std::pair<DetId,float> >& hits = scRef->hitsAndFractions();
408 std::vector<std::pair<DetId,float> >::const_iterator itSChits = hits.begin();
410 for( ; itSChits!=hits.end() ; ++itSChits){
411 if((*itSChits).first.subdetId()==
EcalBarrel){
412 EBDetId idEBRaw ((*itSChits).first);
417 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Barrel "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
427 else if((*itSChits).first.subdetId()==
EcalEndcap){
428 EEDetId idEERaw ((*itSChits).first);
431 if( hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID )
continue;
433 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Endcap "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
445 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane X (deiID) "<<stripX.
rawId()<<
" six "<<stripX.
six()<<
" siy "<<stripX.
siy()<<
" plane "<<stripX.
plane()<<
" FED ID "<<hitFED<<std::endl;
447 if(hitFED < 0)
continue;
457 if(hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
continue;
458 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane Y (deiID) "<<stripY.
rawId()<<
" six "<<stripY.
six()<<
" siy "<<stripY.
siy()<<
" plane "<<stripY.
plane()<<
" FED ID "<<hitFED<<std::endl;
459 if(hitFED < 0)
continue;
472 for( ; itHcalRecHit != hcalRecHitCollection->
end() ; ++itHcalRecHit) {
475 float dR =
reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition().eta(),cellGeometry->getPosition().phi());
479 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;
501 if(*itElectronCollFlag){
502 eta = electron.gsfTrack()->eta();
503 phi = electron.gsfTrack()->phi();
506 eta = electron.track()->eta();
507 phi = electron.track()->phi();
509 for(uint32_t iCabling = 0; iCabling < SiStripCabling.size(); iCabling++){
511 double dphi=fabs(pos.second-phi);
512 if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
513 double R =
sqrt(
pow(pos.first-eta,2)+dphi*dphi);
524 SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
525 for( ; itFedMap!=fedVectorMap.end(); itFedMap++){
526 for (uint32_t op=0; op<(itFedMap->second).
size(); op++){
527 int hitFED = (itFedMap->second)[op].
fedId();
529 LogDebug(
"SelectedElectronFEDListProducer")<<
" SiStrip (FedID) "<<hitFED<<std::endl;
542 if(*itElectronCollFlag) momentum = electron.gsfTrack()->momentum();
543 else momentum = electron.track()->momentum();
548 std::vector<PixelModule>::const_iterator itUp, itDn ;
549 if(lowerBound.Phi >= -
M_PI && upperBound.Phi <=
M_PI ){
555 if(lowerBound.Phi < -
M_PI) lowerBound.Phi = lowerBound.Phi+2*
M_PI;
561 if(upperBound.Phi < -
M_PI) upperBound.Phi = upperBound.Phi-2*
M_PI;
582 std::vector<uint32_t>::const_iterator itfedList =
fedList_.begin();
583 for( ; itfedList!=
fedList_.end() ; ++itfedList){
584 LogDebug(
"SelectedElectronFEDListProducer")<<
" fed point "<<*itfedList<<
" ";
587 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_
edm::InputTag beamSpotTag_
std::vector< uint32_t > fedList_
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
double deltaR(const T1 &t1, const T2 &t2)
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_
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
uint32_t rawId() const
get the raw id
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
void resize(size_t newsize)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
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
const Position position(const uint32_t) const
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const EcalElectronicsMapping * EcalMapping_
T const * product() const
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 SiStripRegionCabling * StripRegionCabling_
int ES_fedId_[2][2][40][40]
std::vector< int > addThisSelectedFEDs_
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_
tuple size
Write out results.
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