#include <EBDetId.h>
Public Types | |
enum | { Subdet = EcalBarrel } |
enum | { kSizeForDenseIndexing = MAX_HASH + 1 } |
Public Member Functions | |
float | approxEta () const |
uint32_t | denseIndex () const |
EBDetId () | |
EBDetId (const DetId &id) | |
EBDetId (uint32_t rawid) | |
EBDetId (int index1, int index2, int mode=ETAPHIMODE) | |
int | hashedIndex () const |
get a compact index for arrays | |
int | ic () const |
get ECAL/crystal number inside SM | |
int | ieta () const |
get the crystal ieta | |
int | ietaAbs () const |
get the absolute value of the crystal ieta | |
int | ietaSM () const |
get the crystal ieta in the SM convention (1-85) | |
int | im () const |
get the number of module inside the SM (1-4) | |
int | iphi () const |
get the crystal iphi | |
int | iphiSM () const |
get the crystal iphi (1-20) | |
int | ism () const |
get the ECAL/SM id | |
int | numberByEtaPhi () const |
int | numberBySM () const |
EBDetId | offsetBy (int nrStepsEta, int nrStepsPhi) const |
EBDetId & | operator= (const DetId &id) |
bool | positiveZ () const |
EBDetId | switchZSide () const |
EcalTrigTowerDetId | tower () const |
get the HCAL/trigger iphi of this crystal | |
int | tower_ieta () const |
get the HCAL/trigger ieta of this crystal | |
int | tower_iphi () const |
get the HCAL/trigger iphi of this crystal | |
int | zside () const |
get the z-side of the crystal (1/-1) | |
Static Public Member Functions | |
static float | approxEta (const DetId id) |
static EBDetId | detIdFromDenseIndex (uint32_t di) |
static int | distanceEta (const EBDetId &a, const EBDetId &b) |
static int | distancePhi (const EBDetId &a, const EBDetId &b) |
static bool | isNextToBoundary (EBDetId id) |
static bool | isNextToEtaBoundary (EBDetId id) |
static bool | isNextToPhiBoundary (EBDetId id) |
static DetId | offsetBy (const DetId startId, int nrStepsEta, int nrStepsPhi) |
static EcalSubdetector | subdet () |
get the subdetector .i.e EcalBarrel (what else?) | |
static DetId | switchZSide (const DetId startId) |
static EBDetId | unhashIndex (int hi) |
get a DetId from a compact index for arrays | |
static bool | validDenseIndex (uint32_t din) |
static bool | validDetId (int i, int j) |
check if a valid index combination | |
static bool | validHashIndex (int i) |
Static Public Attributes | |
static const float | crystalUnitToEta = 0.017453292519943295 |
static const int | ETAPHIMODE = 0 |
static const int | kChannelsPerCard = 5 |
static const int | kCrystalsInEta = 85 |
static const int | kCrystalsInPhi = 20 |
static const int | kCrystalsPerSM = 1700 |
static const int | kModuleBoundaries [4] = { 25, 45, 65, 85 } |
static const int | kModulesPerSM = 4 |
static const int | kTowersInPhi = 4 |
static const int | MAX_C = kCrystalsPerSM |
static const int | MAX_HASH = 2*MAX_IPHI*MAX_IETA-1 |
static const int | MAX_IETA = 85 |
static const int | MAX_IPHI = 360 |
static const int | MAX_SM = 36 |
static const int | MIN_C = 1 |
static const int | MIN_HASH = 0 |
static const int | MIN_IETA = 1 |
range constants | |
static const int | MIN_IPHI = 1 |
static const int | MIN_SM = 1 |
static const int | SMCRYSTALMODE = 1 |
Crystal identifier class for the ECAL barrel
anonymous enum |
anonymous enum |
Definition at line 141 of file EBDetId.h.
{ kSizeForDenseIndexing = MAX_HASH + 1 } ;
EBDetId::EBDetId | ( | ) | [inline] |
Constructor of a null id
Definition at line 24 of file EBDetId.h.
Referenced by offsetBy(), switchZSide(), and unhashIndex().
{}
EBDetId::EBDetId | ( | uint32_t | rawid | ) | [inline] |
EBDetId::EBDetId | ( | int | index1, |
int | index2, | ||
int | mode = ETAPHIMODE |
||
) |
Constructor from crystal ieta and iphi or from SM# and crystal#
Definition at line 20 of file EBDetId.cc.
References ETAPHIMODE, Exception, i, DetId::id_, j, kCrystalsInPhi, SMCRYSTALMODE, and validDetId().
: DetId(Ecal,EcalBarrel) { int crystal_ieta; int crystal_iphi; if (mode == ETAPHIMODE) { crystal_ieta = index1; crystal_iphi = index2; } else if (mode == SMCRYSTALMODE) { int SM = index1; int crystal = index2; int i = (int) floor((crystal-1) / kCrystalsInPhi); int j = ((crystal-1) - (kCrystalsInPhi*i)); if (SM <= 18) { crystal_ieta = i + 1; crystal_iphi = ((SM-1) * kCrystalsInPhi) + (kCrystalsInPhi-j); } else { crystal_ieta = -(i+1); crystal_iphi = ((SM-19) * kCrystalsInPhi) + j+1; } } else { throw cms::Exception("InvalidDetId") << "EBDetId: Cannot create object. Unknown mode for (int, int) constructor."; } if ( !validDetId(crystal_ieta, crystal_iphi) ) { // std::cout << "crystal_eta " << crystal_ieta << "crystal_phi " << crystal_iphi << std::endl; throw cms::Exception("InvalidDetId") << "EBDetId: Cannot create object. Indexes out of bounds \n" << "eta = " << crystal_ieta << " phi = " << crystal_iphi; } id_|=((crystal_ieta>0)?(0x10000|(crystal_ieta<<9)):((-crystal_ieta)<<9))|(crystal_iphi&0x1FF); }
EBDetId::EBDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id
Definition at line 52 of file EBDetId.cc.
References DetId::det(), DetId::Ecal, EcalBarrel, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
{ if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalBarrel )) { throw cms::Exception("InvalidDetId"); } id_=gen.rawId(); }
float EBDetId::approxEta | ( | ) | const [inline] |
return an approximate values of eta (~0.15% precise)
Definition at line 93 of file EBDetId.h.
References crystalUnitToEta, and ieta().
Referenced by approxEta(), and EcalTools::recHitApproxEt().
{ return ieta() * crystalUnitToEta; }
float EBDetId::approxEta | ( | const DetId | id | ) | [static] |
Definition at line 201 of file EBDetId.cc.
References approxEta(), EcalBarrel, and DetId::subdetId().
{ if( id.subdetId() == EcalBarrel ) { EBDetId ebId( id ); return ebId.approxEta(); } else { return 0; } }
uint32_t EBDetId::denseIndex | ( | ) | const [inline] |
static EBDetId EBDetId::detIdFromDenseIndex | ( | uint32_t | di | ) | [inline, static] |
Definition at line 98 of file EBDetId.h.
References unhashIndex().
Referenced by CaloGenericDetId::CaloGenericDetId(), and EcalTPSkimmer::produce().
{ return unhashIndex( di ) ; }
Definition at line 185 of file EBDetId.cc.
Referenced by EcalClusterSeverityLevelAlgo::closestProblematic(), and EcalClusterSeverityLevelAlgo::etaphiDistanceClosestProblematic().
Definition at line 193 of file EBDetId.cc.
Referenced by EcalClusterSeverityLevelAlgo::closestProblematic(), and EcalClusterSeverityLevelAlgo::etaphiDistanceClosestProblematic().
int EBDetId::hashedIndex | ( | ) | const [inline] |
get a compact index for arrays
Definition at line 73 of file EBDetId.h.
References numberByEtaPhi().
Referenced by HcalIsoTrkAnalyzer::analyze(), EcalURecHitHists::analyze(), EcalGetLaserData::analyze(), EcalPulseShapeGrapher::analyze(), CaloGeometryHelper::buildCrystalArray(), CaloGeometryHelper::buildNeighbourArray(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), popcon::EcalChannelStatusHandler::daqOut(), denseIndex(), PFRecHitProducerECAL::ecalNeighbArray(), CalorimetryManager::EMShowerSimulation(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), CaloGeometryHelper::getNeighbours(), popcon::EcalPedestalsHandler::getNewObjectsP5(), ecalpyutils::hashedIndex(), CalorimetryManager::HDShowerSimulation(), EcalBarrelRecHitsMaker::init(), popcon::EcalChannelStatusHandler::laserAnalysis(), PFRecHitProducerECAL::move(), CaloGeometryHelper::move(), CalorimetryManager::MuonMipSimulation(), popcon::EcalChannelStatusHandler::pedAnalysis(), AlCaIsoTracksProducer::produce(), EcalUncalibRecHitWorkerWeights::run(), EcalUncalibRecHitWorkerGlobal::run(), and EcalUncalibRecHitWorkerRatio::run().
{ return numberByEtaPhi(); }
int EBDetId::ic | ( | ) | const |
get ECAL/crystal number inside SM
Definition at line 94 of file EBDetId.cc.
References ietaAbs(), iphi(), kCrystalsInPhi, and zside().
Referenced by TreeProducerCalibSimul::analyze(), EBLaserTask::analyze(), EBCosmicTask::analyze(), EBTestPulseTask::analyze(), EcalURecHitHists::analyze(), EBBeamCaloTask::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalBarrelMonitorModule::analyze(), EcalSimple2007H4TBAnalyzer::analyze(), EBPedestalOnlineTask::analyze(), EEBeamCaloTask::analyze(), EcalBarrelRecHitsValidation::analyze(), EBIntegrityTask::analyze(), EBOccupancyTask::analyze(), EBPedestalTask::analyze(), EBTimingTask::analyze(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EcalTBEventHeader::crystalInBeam(), EcalTBReadout::findTTlist(), iphiSM(), popcon::EcalChannelStatusHandler::laserAnalysis(), EcalTBEventHeader::nextCrystalInBeam(), EcalTBEventHeader::nominalCrystalInBeam(), numberBySM(), popcon::EcalChannelStatusHandler::pedAnalysis(), EcalPedOffset::readDACs(), EcalPedHists::readEBdigis(), and EcalUncalibRecHitWorkerFixedAlphaBetaFit::run().
{ int ie = ietaAbs() -1; int ip; if (zside() < 0) { ip = (( iphi() -1 ) % kCrystalsInPhi ) + 1; } else { ip = kCrystalsInPhi - ((iphi() -1 ) % kCrystalsInPhi ); } return (ie * kCrystalsInPhi) + ip; }
int EBDetId::ieta | ( | ) | const [inline] |
get the crystal ieta
Definition at line 44 of file EBDetId.h.
References ietaAbs(), and zside().
Referenced by PhiSymmetryCalibration::analyze(), HLTAlCaMonPi0::analyze(), TreeProducerCalibSimul::analyze(), EBClusterTaskExtras::analyze(), EBBeamHodoTask::analyze(), EcalRecHitsValidation::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalDigisValidation::analyze(), EcalCosmicsHists::analyze(), EEBeamHodoTask::analyze(), JetToDigiDump::analyze(), EcalBarrelRecHitsValidation::analyze(), HLTAlCa::analyze(), EBOccupancyTask::analyze(), EcalBarrelDigisValidation::analyze(), DQMSourceEleCalib::analyze(), EcalTBValidation::analyze(), EBClusterTask::analyze(), EcalMixingModuleValidation::analyze(), DQMSourcePi0::analyze(), EcalSelectiveReadoutValidation::analyzeEB(), approxEta(), HLTEcalResonanceFilter::calcShowerShape(), EcalHaloAlgo::Calculate(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalDeadChannelRecoveryAlgos::correct(), EcalGlobalShowerContainmentCorrectionsVsEta::correction(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EBSelectiveReadoutTask::dccNum(), distanceEta(), popcon::EcalLaserHandler::dumpBarrelPayload(), InvRingCalib::duringLoop(), Pi0FixedMassWindowCalibration::duringLoop(), ZeeCalibration::duringLoop(), ElectronCalibrationUniv::endJob(), PhiSymmetryCalibration_step2_SM::endJob(), PhiSymmetryCalibration_step2::endJob(), Pi0FixedMassWindowCalibration::endOfJob(), EcalEleCalibLooper::endOfLoop(), Pi0FixedMassWindowCalibration::endOfLoop(), ZeeCalibration::endOfLoop(), AlCaElectronsTest::fillAroundBarrel(), DQMSourceEleCalib::fillAroundBarrel(), MatrixFillMap::fillEBMap(), FastL1Region::FillEMCrystals(), ECALRecHitAnalyzer::FillGeometry(), HLTPi0RecHitsFilter::filter(), EcalRecHitsFilter::filter(), TrackDetMatchInfo::findMaxDeposition(), EcalTBReadout::findTTlist(), CalibrationCluster::get3x3Id(), CalibrationCluster::get5x5Id(), EcalBarrelGeometry::getClosestCell(), EcalClusterTools::getIEta(), EcalRingCalibrationTools::getRingIndex(), EcalClusterTools::getSeedPosition(), EcalClusterCrackCorrection::getValue(), EcalClusterLocalContCorrection::getValue(), ecalpyutils::hashedIndexToEtaPhi(), fireworks::info(), DetIdInfo::info(), isNextToEtaBoundary(), EcalDisplaysByEvent::makeHistos(), EcalDeadChannelRecoveryAlgos::MakeNxNMatrice(), PiZeroAnalyzer::makePizero(), TrackDetMatchInfo::nXnEnergy(), offsetBy(), EcalShowerProperties::processEcalRecHits(), AlCaElectronsProducer::produce(), AlCaIsoTracksProducer::produce(), EcalGeomPhiSymHelper::setup(), EcalTools::swissCross(), switchZSide(), CaloGenericDetId::validDetId(), xuti::writeCell(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and ZeeCalibration::xtalIsOnModuleBorder().
int EBDetId::ietaAbs | ( | ) | const [inline] |
get the absolute value of the crystal ieta
Definition at line 42 of file EBDetId.h.
References DetId::id_.
Referenced by EcalRecHitsValidation::analyze(), EcalBarrelSimHitsValidation::analyze(), GsfElectronAlgo::createElectron(), EcalElectronicsMapping::getElectronicsId(), ic(), ieta(), ietaSM(), im(), EcalBarrelRecHitsMaker::init(), EcalBarrelRecHitsMaker::loadPCaloHits(), EcalBarrelRecHitsMaker::noisifyTriggerTower(), numberByEtaPhi(), EcalBarrelRecHitsMaker::randomNoisifier(), spr::simpleMove(), PFRecHitProducerECAL::stdsimplemove(), tower_ieta(), and EcalSimHitsValidProducer::update().
{ return (id_>>9)&0x7F; }
int EBDetId::ietaSM | ( | ) | const [inline] |
get the crystal ieta in the SM convention (1-85)
Definition at line 60 of file EBDetId.h.
References ietaAbs().
Referenced by EcalCosmicsHists::analyze(), and EcalElectronicsMapping::getLMNumber().
{ return ietaAbs(); }
int EBDetId::im | ( | ) | const |
get the number of module inside the SM (1-4)
Definition at line 85 of file EBDetId.cc.
References i, ietaAbs(), and kModuleBoundaries.
Referenced by CaloGeometryHelper::borderCrossing(), EcalClusterTools::energyBasketFractionEta(), and EcalRingCalibrationTools::getModuleIndex().
int EBDetId::iphi | ( | ) | const [inline] |
get the crystal iphi
Definition at line 46 of file EBDetId.h.
References DetId::id_.
Referenced by PhiSymmetryCalibration::analyze(), HLTAlCaMonPi0::analyze(), TreeProducerCalibSimul::analyze(), EBClusterTaskExtras::analyze(), EcalRecHitsValidation::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalDigisValidation::analyze(), EcalCosmicsHists::analyze(), JetToDigiDump::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalBarrelSimHitsValidation::analyze(), HLTAlCa::analyze(), EcalBarrelDigisValidation::analyze(), DQMSourceEleCalib::analyze(), EcalTBValidation::analyze(), EBClusterTask::analyze(), EcalMixingModuleValidation::analyze(), DQMSourcePi0::analyze(), HLTEcalResonanceFilter::calcShowerShape(), EcalHaloAlgo::Calculate(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalClusterTools::cluster2ndMoments(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EBSelectiveReadoutTask::dccNum(), distancePhi(), popcon::EcalLaserHandler::dumpBarrelPayload(), InvRingCalib::duringLoop(), Pi0FixedMassWindowCalibration::duringLoop(), ZeeCalibration::duringLoop(), ElectronCalibrationUniv::endJob(), PhiSymmetryCalibration_step2_SM::endJob(), PhiSymmetryCalibration_step2::endJob(), Pi0FixedMassWindowCalibration::endOfJob(), EcalEleCalibLooper::endOfLoop(), Pi0FixedMassWindowCalibration::endOfLoop(), ZeeCalibration::endOfLoop(), EcalClusterTools::energyBasketFractionPhi(), AlCaElectronsTest::fillAroundBarrel(), DQMSourceEleCalib::fillAroundBarrel(), MatrixFillMap::fillEBMap(), FastL1Region::FillEMCrystals(), HLTPi0RecHitsFilter::filter(), EcalRecHitsFilter::filter(), TrackDetMatchInfo::findMaxDeposition(), EcalTBReadout::findTTlist(), CalibrationCluster::get3x3Id(), CalibrationCluster::get5x5Id(), EcalBarrelGeometry::getClosestCell(), EcalElectronicsMapping::getElectronicsId(), EcalClusterTools::getIPhi(), EcalClusterCrackCorrection::getValue(), EcalClusterLocalContCorrection::getValue(), ecalpyutils::hashedIndexToEtaPhi(), ic(), fireworks::info(), DetIdInfo::info(), ism(), isNextToPhiBoundary(), EcalDisplaysByEvent::makeHistos(), EcalDeadChannelRecoveryAlgos::MakeNxNMatrice(), PiZeroAnalyzer::makePizero(), numberByEtaPhi(), TrackDetMatchInfo::nXnEnergy(), offsetBy(), EcalShowerProperties::processEcalRecHits(), AlCaElectronsProducer::produce(), AlCaIsoTracksProducer::produce(), EcalGeomPhiSymHelper::setup(), switchZSide(), tower_iphi(), EcalSimHitsValidProducer::update(), CaloGenericDetId::validDetId(), xuti::writeCell(), ECALRecHitAnalyzer::WriteECALRecHits(), Pi0CalibXMLwriter::writeLine(), calibXMLwriter::writeLine(), and ZeeCalibration::xtalIsOnModuleBorder().
{ return id_&0x1FF; }
int EBDetId::iphiSM | ( | ) | const [inline] |
get the crystal iphi (1-20)
Definition at line 62 of file EBDetId.h.
References ic(), and kCrystalsInPhi.
Referenced by EcalCosmicsHists::analyze(), and EcalElectronicsMapping::getLMNumber().
{ return (( ic() -1 ) % kCrystalsInPhi ) + 1; }
int EBDetId::ism | ( | ) | const |
get the ECAL/SM id
Definition at line 79 of file EBDetId.cc.
References iphi(), kCrystalsInPhi, and zside().
Referenced by EcnaAnalyzer::analyze(), EcalSimpleTBAnalyzer::analyze(), JetToDigiDump::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalTBValidation::analyze(), CaloGeometryHelper::borderCrossing(), EcalLaserDbService::getLMNumber(), EcalRingCalibrationTools::getModuleIndex(), ecalpyutils::ism(), numberBySM(), and EcalUncalibRecHitWorkerFixedAlphaBetaFit::run().
{ int id = ( iphi() - 1 ) / kCrystalsInPhi + 1; if ( zside() < 0 ) id += 18; return id; }
bool EBDetId::isNextToBoundary | ( | EBDetId | id | ) | [static] |
Definition at line 171 of file EBDetId.cc.
References isNextToEtaBoundary(), and isNextToPhiBoundary().
Referenced by EcalCleaningAlgo::isNearCrack().
{ return isNextToEtaBoundary( id ) || isNextToPhiBoundary( id ); }
bool EBDetId::isNextToEtaBoundary | ( | EBDetId | id | ) | [static] |
Definition at line 175 of file EBDetId.cc.
References ieta(), and kModuleBoundaries.
Referenced by PhotonIsolationCalculator::classify(), GsfElectronAlgo::createElectron(), and isNextToBoundary().
{ int ieta = id.ietaSM(); return ieta == 1 || std::binary_search( kModuleBoundaries, kModuleBoundaries + 4, ieta ) || ieta == 85; }
bool EBDetId::isNextToPhiBoundary | ( | EBDetId | id | ) | [static] |
Definition at line 180 of file EBDetId.cc.
References iphi().
Referenced by PhotonIsolationCalculator::classify(), GsfElectronAlgo::createElectron(), and isNextToBoundary().
{ int iphi = id.iphiSM(); return iphi == 1 || iphi == 20; }
int EBDetId::numberByEtaPhi | ( | ) | const [inline] |
int EBDetId::numberBySM | ( | ) | const |
Definition at line 107 of file EBDetId.cc.
References ic(), ism(), and kCrystalsPerSM.
{ return (ism()-1) * kCrystalsPerSM + ic() -1; }
EBDetId EBDetId::offsetBy | ( | int | nrStepsEta, |
int | nrStepsPhi | ||
) | const |
returns a new EBDetId offset by nrStepsEta and nrStepsPhi (can be negative), returns EBDetId(0) if invalid
Definition at line 111 of file EBDetId.cc.
References EBDetId(), ieta(), iphi(), and validDetId().
Referenced by EcalCleaningAlgo::neighbours(), offsetBy(), and EcalTools::recHitE().
{ int newEta = ieta()+nrStepsEta; if( newEta*ieta() <= 0 ) { if( ieta() < 0 ) { newEta++; } else if ( ieta() > 0 ) { newEta--; } } int newPhi = iphi() + nrStepsPhi; while ( newPhi>360 ) newPhi -= 360; while ( newPhi<=0 ) newPhi += 360; if( validDetId( newEta, newPhi ) ) { return EBDetId( newEta, newPhi); } else { return EBDetId(0); } }
following are static member functions of the above two functions which take and return a DetId, returns DetId(0) if invalid
Definition at line 143 of file EBDetId.cc.
References DetId::det(), DetId::DetId(), DetId::Ecal, EcalBarrel, offsetBy(), DetId::rawId(), and DetId::subdetId().
{ if( startId.det() == DetId::Ecal && startId.subdetId() == EcalBarrel ) { EBDetId ebStartId(startId); return ebStartId.offsetBy( nrStepsEta, nrStepsPhi ).rawId(); } else { return DetId(0); } }
Assignment operator from cell id
Definition at line 70 of file EBDetId.cc.
References DetId::det(), DetId::Ecal, EcalBarrel, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
{ if (!gen.null() && ( gen.det()!=Ecal || gen.subdetId()!=EcalBarrel )) { throw cms::Exception("InvalidDetId"); } id_=gen.rawId(); return *this; }
bool EBDetId::positiveZ | ( | ) | const [inline] |
Definition at line 65 of file EBDetId.h.
References DetId::id_.
Referenced by EcalClusterTools::energyBasketFractionEta(), EcalClusterTools::energyBasketFractionPhi(), and numberByEtaPhi().
{ return id_&0x10000;}
static EcalSubdetector EBDetId::subdet | ( | ) | [inline, static] |
get the subdetector .i.e EcalBarrel (what else?)
Definition at line 37 of file EBDetId.h.
References EcalBarrel.
{ return EcalBarrel;}
EBDetId EBDetId::switchZSide | ( | ) | const |
returns a new EBDetId on the other zside of barrel (ie iEta*-1), returns EBDetId(0) if invalid (shouldnt happen)
Definition at line 132 of file EBDetId.cc.
References EBDetId(), ieta(), iphi(), and validDetId().
Referenced by switchZSide().
Definition at line 153 of file EBDetId.cc.
References DetId::det(), DetId::DetId(), DetId::Ecal, EcalBarrel, DetId::rawId(), DetId::subdetId(), and switchZSide().
{ if( startId.det() == DetId::Ecal && startId.subdetId() == EcalBarrel ) { EBDetId ebStartId(startId); return ebStartId.switchZSide().rawId(); } else { return DetId(0); } }
EcalTrigTowerDetId EBDetId::tower | ( | ) | const [inline] |
get the HCAL/trigger iphi of this crystal
Definition at line 52 of file EBDetId.h.
References abs, EcalBarrel, tower_ieta(), tower_iphi(), and zside().
Referenced by testEcalTPGScale::analyze(), EcalRecHitsValidation::analyze(), EcalTrigPrimAnalyzer::analyze(), EcalElectronicsMapping::getElectronicsId(), EcalDetIdToBeRecoveredProducer::produce(), EBSelectiveReadoutTask::readOutUnitOf(), and EcalTrigTowerConstituentsMap::towerOf().
{ return EcalTrigTowerDetId(zside(),EcalBarrel,abs(tower_ieta()),tower_iphi()); }
int EBDetId::tower_ieta | ( | ) | const [inline] |
get the HCAL/trigger ieta of this crystal
Definition at line 48 of file EBDetId.h.
References ietaAbs(), and zside().
Referenced by FastL1Region::FillEMCrystals(), fireworks::info(), DetIdInfo::info(), tower(), and CaloTowerConstituentsMap::towerOf().
int EBDetId::tower_iphi | ( | ) | const |
get the HCAL/trigger iphi of this crystal
Definition at line 164 of file EBDetId.cc.
References iphi().
Referenced by FastL1Region::FillEMCrystals(), fireworks::info(), DetIdInfo::info(), tower(), and CaloTowerConstituentsMap::towerOf().
{ int iphi_simple=((iphi()-1)/5)+1; iphi_simple-=2; return ((iphi_simple<=0)?(iphi_simple+72):(iphi_simple)); }
EBDetId EBDetId::unhashIndex | ( | int | hi | ) | [static] |
get a DetId from a compact index for arrays
Definition at line 12 of file EBDetId.cc.
References EBDetId(), MAX_IETA, MAX_IPHI, and validHashIndex().
Referenced by detIdFromDenseIndex(), popcon::EcalLaserHandler::dumpBarrelPayload(), EcalChannelStatusXMLTranslator::dumpXML(), EcalPedestalsXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalFloatCondObjectContainerXMLTranslator::dumpXML(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), EcalEleCalibLooper::EBRegionDefinition(), EcalEleCalibLooper::EcalEleCalibLooper(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), ecalpyutils::hashedIndexToEtaPhi(), CalorimetryManager::loadFromEcalBarrel(), main(), popcon::EcalLaserHandler::notifyProblems(), printStatusRecords(), EcalBarrelRecHitsMaker::randomNoisifier(), StoreEcalCondition::readEcalChannelStatusFromFile(), and EcalDQMStatusWriter::readEcalDQMChannelStatusFromFile().
static bool EBDetId::validDenseIndex | ( | uint32_t | din | ) | [inline, static] |
Definition at line 96 of file EBDetId.h.
References kSizeForDenseIndexing.
Referenced by EcalTPSkimmer::produce().
{ return ( din < kSizeForDenseIndexing ) ; }
bool EBDetId::validDetId | ( | int | i, |
int | j | ||
) | [static] |
check if a valid index combination
Definition at line 59 of file EBDetId.cc.
References MAX_IETA, MAX_IPHI, and TrackValidation_HighPurity_cff::valid.
Referenced by EBCosmicTask::analyze(), EBBeamHodoTask::analyze(), EEBeamHodoTask::analyze(), EcalTBValidation::analyze(), EcalBarrelTopology::decrementIeta(), EcalBarrelTopology::decrementIphi(), EBDetId(), ZeeCalibration::endOfJob(), spr::extraIds(), MatrixFillMap::fillEBMap(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelTopology::incrementIeta(), EcalBarrelTopology::incrementIphi(), Numbers::iTCC(), offsetBy(), CaloMiscalibMapEcal::print(), AlCaElectronsProducer::produce(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), and switchZSide().
static bool EBDetId::validHashIndex | ( | int | i | ) | [inline, static] |
Definition at line 103 of file EBDetId.h.
References MAX_HASH.
Referenced by unhashIndex().
{ return !(i<MIN_HASH || i>MAX_HASH); }
int EBDetId::zside | ( | ) | const [inline] |
get the z-side of the crystal (1/-1)
Definition at line 40 of file EBDetId.h.
References DetId::id_.
Referenced by EBClusterTaskExtras::analyze(), EcalRecHitsValidation::analyze(), EcalSimple2007H4TBAnalyzer::analyze(), EcalBarrelSimHitsValidation::analyze(), EBClusterTask::analyze(), Pi0FixedMassWindowCalibration::duringLoop(), PhiSymmetryCalibration_step2_SM::endJob(), PhiSymmetryCalibration_step2::endJob(), Pi0FixedMassWindowCalibration::endOfJob(), Pi0FixedMassWindowCalibration::endOfLoop(), ic(), ieta(), ism(), EcalGeomPhiSymHelper::setup(), tower(), tower_ieta(), and EcalSimHitsValidProducer::update().
{ return (id_&0x10000)?(1):(-1); }
const float EBDetId::crystalUnitToEta = 0.017453292519943295 [static] |
Definition at line 139 of file EBDetId.h.
Referenced by approxEta().
const int EBDetId::ETAPHIMODE = 0 [static] |
Definition at line 145 of file EBDetId.h.
Referenced by TreeProducerCalibSimul::analyze(), EBCosmicTask::analyze(), EBBeamHodoTask::analyze(), EcalSimpleTBAnalyzer::analyze(), EEBeamHodoTask::analyze(), EcalTBValidation::analyze(), EcalTrigTowerConstituentsMap::constituentsOf(), EcalElectronicsMapping::dccTowerConstituents(), EBDetId(), ElectronCalibration::endJob(), MatrixFillMap::fillEBMap(), CalibrationCluster::get3x3Id(), CalibrationCluster::get5x5Id(), EcalBarrelGeometry::getClosestCell(), EcalElectronicsMapping::getDetId(), CalibrationCluster::getMap(), popcon::EcalPedestalsHandler::getNewObjectsP5(), Numbers::iTCC(), AlCaElectronsProducer::produce(), EcalRecHitProducer::produce(), StoreEcalCondition::readEcalGainRatiosFromFile(), and EcalElectronicsMapping::stripConstituents().
const int EBDetId::kChannelsPerCard = 5 [static] |
const int EBDetId::kCrystalsInEta = 85 [static] |
const int EBDetId::kCrystalsInPhi = 20 [static] |
const int EBDetId::kCrystalsPerSM = 1700 [static] |
Definition at line 130 of file EBDetId.h.
Referenced by numberBySM().
const int EBDetId::kModuleBoundaries = { 25, 45, 65, 85 } [static] |
Definition at line 127 of file EBDetId.h.
Referenced by im(), and isNextToEtaBoundary().
const int EBDetId::kModulesPerSM = 4 [static] |
Definition at line 126 of file EBDetId.h.
Referenced by EcalClusterTools::energyBasketFractionEta(), and EcalShowerContainmentCorrections::fillCorrectionCoefficients().
const int EBDetId::kTowersInPhi = 4 [static] |
Definition at line 125 of file EBDetId.h.
Referenced by EcalClusterTools::energyBasketFractionPhi().
const int EBDetId::MAX_C = kCrystalsPerSM [static] |
const int EBDetId::MAX_HASH = 2*MAX_IPHI*MAX_IETA-1 [static] |
Definition at line 136 of file EBDetId.h.
Referenced by EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), and validHashIndex().
const int EBDetId::MAX_IETA = 85 [static] |
Definition at line 122 of file EBDetId.h.
Referenced by EcalGetLaserData::analyze(), CaloTowerConstituentsMap::constituentsOf(), EcalBarrelHardcodedTopology::decrementIeta(), ZeeCalibration::endOfJob(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalTBWeights(), EcalTestDevDB::generateEcalWeightXtalGroups(), EcalBarrelGeometry::getCells(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalRingCalibrationTools::getDetIdsInECAL(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelHardcodedTopology::incrementIeta(), numberByEtaPhi(), cond::PayLoadInspector< DataT >::plot(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), spr::simpleMove(), PFRecHitProducerECAL::stdsimplemove(), unhashIndex(), and validDetId().
const int EBDetId::MAX_IPHI = 360 [static] |
Definition at line 123 of file EBDetId.h.
Referenced by EcalGetLaserData::analyze(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalBarrelTopology::decrementIphi(), EcalBarrelHardcodedTopology::decrementIphi(), ZeeCalibration::endOfJob(), EcalClusterTools::energyBasketFractionPhi(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalWeightXtalGroups(), EcalBarrelGeometry::getCells(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalBarrelGeometry::getClosestCell(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelHardcodedTopology::incrementIphi(), EcalBarrelTopology::incrementIphi(), numberByEtaPhi(), cond::PayLoadInspector< DataT >::plot(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), StoreEcalCondition::readEcalChannelStatusFromFile(), unhashIndex(), and validDetId().
const int EBDetId::MAX_SM = 36 [static] |
Definition at line 132 of file EBDetId.h.
Referenced by EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration(), EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration(), and EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration().
const int EBDetId::MIN_C = 1 [static] |
const int EBDetId::MIN_HASH = 0 [static] |
Definition at line 135 of file EBDetId.h.
Referenced by EcalPedestalsXMLTranslator::dumpXML(), EcalChannelStatusXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), and EcalFloatCondObjectContainerXMLTranslator::dumpXML().
const int EBDetId::MIN_IETA = 1 [static] |
const int EBDetId::MIN_IPHI = 1 [static] |
Definition at line 121 of file EBDetId.h.
Referenced by EcalGetLaserData::analyze(), ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction(), EcalBarrelTopology::decrementIphi(), EcalBarrelHardcodedTopology::decrementIphi(), ZeeCalibration::endOfJob(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalLaserAlphas(), EcalTestDevDB::generateEcalLaserAPDPNRatios(), EcalTestDevDB::generateEcalLaserAPDPNRatiosRef(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalWeightXtalGroups(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalBarrelGeometry::getClosestCell(), EcalRingCalibrationTools::getDetIdsInECAL(), EcalRingCalibrationTools::getDetIdsInRing(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), EcalBarrelHardcodedTopology::incrementIphi(), EcalBarrelTopology::incrementIphi(), CaloMiscalibMapEcal::prefillMap(), CaloMiscalibMapEcal::print(), EcalTrivialConditionRetriever::produceEcalChannelStatus(), EcalTrivialConditionRetriever::produceEcalDQMChannelStatus(), EcalTrivialConditionRetriever::produceEcalGainRatios(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalIntercalibErrors(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalPedestals(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), EcalTrivialConditionRetriever::produceEcalTimeCalibErrors(), popcon::EcalTPGBadXTHandler::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalTrgChannelStatus(), EcalTrivialConditionRetriever::produceEcalWeightXtalGroups(), and StoreEcalCondition::readEcalChannelStatusFromFile().
const int EBDetId::MIN_SM = 1 [static] |
Definition at line 131 of file EBDetId.h.
Referenced by EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration(), EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration(), and EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration().
const int EBDetId::SMCRYSTALMODE = 1 [static] |
Definition at line 146 of file EBDetId.h.
Referenced by TreeProducerCalibSimul::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalSimple2007H4TBAnalyzer::analyze(), EcalTBValidation::analyze(), EcalDQMStatusReader::beginRun(), TBPositionCalc::CalculateCMSPos(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), popcon::EcalChannelStatusHandler::daqOut(), EcalBarrelGeometry::detIdFromLocalAlignmentIndex(), EBDetId(), EcalShowerContainmentCorrections::fillCorrectionCoefficients(), EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration(), popcon::EcalTPGFineGrainEBGroupHandler::getNewObjects(), popcon::EcalTPGBadXTHandler::getNewObjects(), popcon::EcalTPGBadTTHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGLutGroupHandler::getNewObjects(), popcon::EcalPedestalsHandler::getNewObjectsP5(), EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration(), EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration(), TableDataFormatter::interpretRawData(), popcon::EcalChannelStatusHandler::laserAnalysis(), popcon::EcalChannelStatusHandler::laserMasking(), Masks::maskChannel(), popcon::EcalChannelStatusHandler::nBadLaserModules(), popcon::EcalChannelStatusHandler::pedAnalysis(), popcon::EcalChannelStatusHandler::pedMasking(), popcon::EcalChannelStatusHandler::pedOnlineMasking(), popcon::EcalChannelStatusHandler::physicsMasking(), FakeTBEventHeaderProducer::produce(), EcalShowerContainmentCorrectionsESProducer::produce(), StoreEcalCondition::readEcalChannelStatusFromFile(), EcalDQMStatusWriter::readEcalDQMChannelStatusFromFile(), StoreEcalCondition::readEcalGainRatiosFromFile(), StoreEcalCondition::readEcalIntercalibConstantsFromFile(), StoreEcalCondition::readEcalIntercalibConstantsMCFromFile(), and StoreEcalCondition::readEcalWeightXtalGroupsFromFile().