242 std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry->dets().begin();
243 for( ; itTracker !=trackerGeometry->dets().end() ; ++itTracker){
244 int subdet = (*itTracker)->geographicalId().subdetId();
247 module.
x = (*itTracker)->position().x();
248 module.
y = (*itTracker)->position().y();
249 module.
z = (*itTracker)->position().z();
251 module.
Eta = (*itTracker)->position().eta() ;
252 module.
DetId = (*itTracker)->geographicalId().rawId();
253 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
PixelCabling_->pathToDetUnit(module.
DetId);
254 module.
Fed = path2det[0].fed;
255 assert(module.
Fed<40);
284 if(!hbheRecHitHandle.
failedToGet()) hcalRecHitCollection = hbheRecHitHandle.
product();
286 double radTodeg = 180. /
Geom::pi();
313 std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
316 typename std::vector<edm::EDGetTokenT<TEleColl> >::const_iterator itElectronColl =
electronToken_.begin();
318 std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> >::const_iterator itRecoEcalCandColl =
recoEcalCandidateToken_.begin();
324 try { iEvent.
getByToken(*itRecoEcalCandColl,triggerRecoEcalCandidateCollection);
325 if(triggerRecoEcalCandidateCollection.
failedToGet())
continue ;
330 if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(
trigger::TriggerPhoton, recoEcalCandColl);
331 if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(
trigger::TriggerElectron, recoEcalCandColl);
333 typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand = recoEcalCandColl.begin();
335 for( ; itRecoEcalCand != recoEcalCandColl.end() ; ++itRecoEcalCand){
336 recoEcalCand = (*itRecoEcalCand);
340 try { iEvent.
getByToken(*itElectronColl,electrons);
345 typename TEleColl::const_iterator itEle = electrons->begin();
346 for( ; itEle!=electrons->end() ; ++itEle){
350 if ( scRefRecoEcalCand != scRef ) continue ;
352 const std::vector<std::pair<DetId,float> >& hits = scRef->hitsAndFractions();
354 std::vector<std::pair<DetId,float> >::const_iterator itSChits = hits.begin();
356 for( ; itSChits!=hits.end() ; ++itSChits){
357 if((*itSChits).first.subdetId()==
EcalBarrel){
358 EBDetId idEBRaw ((*itSChits).first);
363 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Barrel "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
372 else if((*itSChits).first.subdetId()==
EcalEndcap){
373 EEDetId idEERaw ((*itSChits).first);
376 if( hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID )
continue;
378 LogDebug(
"SelectedElectronFEDListProducer")<<
" electron hit detID Endcap "<<(*itSChits).first.rawId()<<
" eta "<<double(point.
eta())<<
" phi "<<
double(point.
phi())*radTodeg <<
" FED "<<hitFED<<std::endl;
389 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane X (deiID) "<<stripX.
rawId()<<
" six "<<stripX.
six()<<
" siy "<<stripX.
siy()<<
" plane "<<stripX.
plane()<<
" FED ID "<<hitFED<<std::endl;
391 if(hitFED < 0)
continue;
400 if(hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID)
continue;
401 LogDebug(
"SelectedElectronFEDListProducer")<<
" ES hit plane Y (deiID) "<<stripY.
rawId()<<
" six "<<stripY.
six()<<
" siy "<<stripY.
siy()<<
" plane "<<stripY.
plane()<<
" FED ID "<<hitFED<<std::endl;
402 if(hitFED < 0)
continue;
414 for( ; itHcalRecHit != hcalRecHitCollection->
end() ; ++itHcalRecHit) {
417 float dR =
reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition().eta(),cellGeometry->getPosition().phi());
421 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;
443 if(*itElectronCollFlag){
444 eta = electron.gsfTrack()->eta();
445 phi = electron.gsfTrack()->phi();
448 eta = electron.track()->eta();
449 phi = electron.track()->phi();
451 for(uint32_t iCabling = 0; iCabling <
cabling_.size(); iCabling++){
453 double dphi=fabs(pos.second-phi);
454 if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
455 double R =
sqrt(
pow(pos.first-eta,2)+dphi*dphi);
466 SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
467 for( ; itFedMap!=fedVectorMap.end(); itFedMap++){
468 for (uint32_t op=0; op<(itFedMap->second).
size(); op++){
469 int hitFED = (itFedMap->second)[op].fedId();
471 LogDebug(
"SelectedElectronFEDListProducer")<<
" SiStrip (FedID) "<<hitFED<<std::endl;
485 if(*itElectronCollFlag) momentum = electron.gsfTrack()->momentum();
486 else momentum = electron.track()->momentum();
492 std::vector<PixelModule>::const_iterator itUp, itDn ;
493 if(lowerBound.Phi >= -
M_PI && upperBound.Phi <=
M_PI ){
499 if(lowerBound.Phi < -
M_PI) lowerBound.Phi = lowerBound.Phi+2*
M_PI;
505 if(upperBound.Phi < -
M_PI) upperBound.Phi = upperBound.Phi-2*
M_PI;
527 std::vector<uint32_t>::const_iterator itfedList =
fedList_.begin();
528 for( ; itfedList!=
fedList_.end() ; ++itfedList){
529 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