245 std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry->dets().begin();
246 for( ; itTracker !=trackerGeometry->dets().end() ; ++itTracker){
247 int subdet = (*itTracker)->geographicalId().subdetId();
250 module.
x = (*itTracker)->position().x();
251 module.
y = (*itTracker)->position().y();
252 module.
z = (*itTracker)->position().z();
254 module.
Eta = (*itTracker)->position().eta() ;
255 module.
DetId = (*itTracker)->geographicalId().rawId();
256 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
PixelCabling_->pathToDetUnit(module.
DetId);
257 module.
Fed = path2det[0].fed;
287 if(!hbheRecHitHandle.
failedToGet()) hcalRecHitCollection = hbheRecHitHandle.
product();
289 double radTodeg = 180. /
Geom::pi();
316 std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
319 typename std::vector<edm::EDGetTokenT<TEleColl> >::const_iterator itElectronColl =
electronToken_.begin();
321 std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> >::const_iterator itRecoEcalCandColl =
recoEcalCandidateToken_.begin();
327 try { iEvent.
getByToken(*itRecoEcalCandColl,triggerRecoEcalCandidateCollection);
328 if(triggerRecoEcalCandidateCollection.
failedToGet())
continue ;
333 if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(
trigger::TriggerPhoton, recoEcalCandColl);
334 if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(
trigger::TriggerElectron, recoEcalCandColl);
336 typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand = recoEcalCandColl.begin();
338 for( ; itRecoEcalCand != recoEcalCandColl.end() ; ++itRecoEcalCand){
339 recoEcalCand = (*itRecoEcalCand);
343 try { iEvent.
getByToken(*itElectronColl,electrons);
348 typename TEleColl::const_iterator itEle = electrons->begin();
349 for( ; itEle!=electrons->end() ; ++itEle){
353 if ( scRefRecoEcalCand != scRef ) continue ;
355 const std::vector<std::pair<DetId,float> >& hits = scRef->hitsAndFractions();
357 std::vector<std::pair<DetId,float> >::const_iterator itSChits = hits.begin();
359 for( ; itSChits!=hits.end() ; ++itSChits){
360 if((*itSChits).first.subdetId()==
EcalBarrel){
361 EBDetId idEBRaw ((*itSChits).first);
366 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Barrel "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
375 else if((*itSChits).first.subdetId()==
EcalEndcap){
376 EEDetId idEERaw ((*itSChits).first);
379 if( hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID )
continue;
381 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Endcap "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
392 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane X (deiID) "<<stripX.
rawId()<<
" six "<<stripX.
six()<<
" siy "<<stripX.
siy()<<
" plane "<<stripX.
plane()<<
" FED ID "<<hitFED<<std::endl;
394 if(hitFED < 0)
continue;
403 if(hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
continue;
404 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane Y (deiID) "<<stripY.
rawId()<<
" six "<<stripY.
six()<<
" siy "<<stripY.
siy()<<
" plane "<<stripY.
plane()<<
" FED ID "<<hitFED<<std::endl;
405 if(hitFED < 0)
continue;
417 for( ; itHcalRecHit != hcalRecHitCollection->
end() ; ++itHcalRecHit) {
420 float dR =
reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition().eta(),cellGeometry->getPosition().phi());
424 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;
446 if(*itElectronCollFlag){
447 eta = electron.gsfTrack()->eta();
448 phi = electron.gsfTrack()->phi();
451 eta = electron.track()->eta();
452 phi = electron.track()->phi();
454 for(uint32_t iCabling = 0; iCabling <
cabling_.size(); iCabling++){
456 double dphi=fabs(pos.second-phi);
457 if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
458 double R =
sqrt(
pow(pos.first-eta,2)+dphi*dphi);
469 SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
470 for( ; itFedMap!=fedVectorMap.end(); itFedMap++){
471 for (uint32_t op=0; op<(itFedMap->second).
size(); op++){
472 int hitFED = (itFedMap->second)[op].
fedId();
474 LogDebug(
"SelectedElectronFEDListProducer")<<
" SiStrip (FedID) "<<hitFED<<std::endl;
488 if(*itElectronCollFlag) momentum = electron.gsfTrack()->momentum();
489 else momentum = electron.track()->momentum();
495 std::vector<PixelModule>::const_iterator itUp, itDn ;
496 if(lowerBound.Phi >= -
M_PI && upperBound.Phi <=
M_PI ){
502 if(lowerBound.Phi < -
M_PI) lowerBound.Phi = lowerBound.Phi+2*
M_PI;
508 if(upperBound.Phi < -
M_PI) upperBound.Phi = upperBound.Phi-2*
M_PI;
530 std::vector<uint32_t>::const_iterator itfedList =
fedList_.begin();
531 for( ; itfedList!=
fedList_.end() ; ++itfedList){
532 LogDebug(
"SelectedElectronFEDListProducer")<<
" fed point "<<*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...
SiStripRegionCabling::Cabling cabling_
edm::InputTag beamSpotTag_
std::vector< uint32_t > fedList_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const CaloSubdetectorGeometry * geometryES_
std::string outputLabelModule_
Geom::Phi< T > phi() const
std::vector< HBHERecHit >::const_iterator const_iterator
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.
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_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
FEDRawDataCollection * RawDataCollection_
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
T const * product() const
std::vector< PixelModule > pixelModuleVector_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
const EcalElectronicsMapping * TheMapping_
bool dumpSelectedSiPixelFed_
char data[epos_bytes_allocation]
const CaloGeometry * geometry_
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
const HcalElectronicsMap * hcalReadoutMap_
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