|
|
Go to the documentation of this file.
95 for (std::vector<DetId>::const_iterator dit =
vid.begin(); dit !=
vid.end(); ++dit) {
106 std::vector<DetId> eeC;
107 for (
int dx = 1;
dx <= 5; ++
dx) {
108 for (
int dy = 1;
dy <= 5; ++
dy) {
109 int ix = (sc.
ix() - 1) * 5 +
dx;
110 int iy = (sc.
iy() - 1) * 5 +
dy;
113 eeC.push_back(
EEDetId(ix, iy, iz));
117 for (
size_t i = 0;
i < eeC.size(); ++
i) {
132 bool AcceptRecHit =
true;
137 if (
hit.energy() != 0 and AcceptRecHit ==
true) {
150 bool AcceptRecHit =
true;
154 if (
hit.energy() != 0 and AcceptRecHit ==
true) {
179 if (
tp != tpDigis->
end()) {
183 float tpEt = ecalScale.getTPGInGeV(
tp->compressedEt(),
tp->id());
185 if (tpEt > tpEtThreshEB) {
186 edm::LogWarning(
"EnergyInDeadEB_FE") <<
"TP energy in the dead TT = " << tpEt <<
" at " << ttDetId;
191 for (std::vector<DetId>::const_iterator dit =
vid.begin(); dit !=
vid.end(); ++dit) {
195 float tpEt = ecalScale.getTPGInGeV(
tp->compressedEt(),
tp->id());
199 if (
tp->compressedEt() == 0xFF)
209 for (std::vector<DetId>::const_iterator dit =
vid.begin(); dit !=
vid.end(); ++dit) {
230 for (
int dx = 1;
dx <= 5; ++
dx) {
231 for (
int dy = 1;
dy <= 5; ++
dy) {
232 int ix = (sc.ix() - 1) * 5 +
dx;
233 int iy = (sc.iy() - 1) * 5 +
dy;
250 std::set<EcalTrigTowerDetId> aTT;
251 for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
260 std::set<DetId> aTTC;
261 bool atLeastOneTPSaturated =
false;
262 for (std::set<EcalTrigTowerDetId>::const_iterator it = aTT.begin(); it != aTT.end(); ++it) {
265 if (itTP != tpDigis->
end()) {
269 std::vector<DetId>::iterator ttcons =
v.begin();
270 while (ttcons !=
v.end()) {
272 ttcons =
v.erase(ttcons);
278 if (itTP->compressedEt() == 0xFF) {
279 atLeastOneTPSaturated =
301 totE += ((it->ietaAbs() > 26) ? 2 : 1) * ecalScale.
getTPGInGeV(itTP->compressedEt(), itTP->id());
306 if (itTP->compressedEt() == 0) {
307 for (
size_t i = 0;
i <
v.size(); ++
i)
309 }
else if (itTP->compressedEt() != 0xFF) {
311 for (
size_t j = 0;
j <
v.size(); ++
j) {
321 for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
326 for (std::set<DetId>::const_iterator it = aTTC.begin(); it != aTTC.end(); ++it) {
328 if (jt !=
hits->end()) {
329 float energy = jt->energy();
331 float pf = 1.0 / cosh(
eta);
339 if (scEt > scEtThreshEE) {
340 edm::LogWarning(
"EnergyInDeadEE_FE") <<
"TP energy in the dead TT = " << scEt <<
" at " << sc;
346 for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
348 float pf = 1.0 / cosh(
eta);
351 if (atLeastOneTPSaturated)
364 const std::set<DetId>& sId,
365 const std::vector<DetId>& vId,
369 for (std::vector<DetId>::const_iterator vIdit = vId.begin(); vIdit != vId.end(); ++vIdit) {
370 std::set<DetId>::const_iterator sIdit = sId.find(*vIdit);
371 if (sIdit == sId.end()) {
374 float pf = 1.0 / cosh(
eta);
386 return etsat / cosh(
ieta) * (
ieta > 26 ? 2 : 1);
388 return xtalE * ((vId.size() / (
float)
count) - 1) * (
ieta > 26 ? 2 : 1);
394 edm::LogWarning(
"EcalRecHitWorkerRecover") <<
"DetId already recovered! Skipping...";
410 edm::LogError(
"EcalRecHitWorkerRecover::InvalidDetId") <<
"Invalid DetId " <<
hit.
id().rawId();
421 edm::LogError(
"EcalRecHitWorkerRecover::InvalidDetId") <<
"Invalid DetId " <<
id.rawId();
438 uint16_t dbStatus = 0;
440 dbStatus = chIt->getEncodedStatusCode();
442 edm::LogError(
"ObjectNotFound") <<
"No channel status found for xtal " <<
id.rawId()
443 <<
"! something wrong with EcalChannelStatus in your DB? ";
446 for (std::vector<int>::const_iterator
status = statusestoexclude.begin();
status != statusestoexclude.end();
T const * product() const
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
bool checkChannelStatus(const DetId &id, const std::vector< int > &statusestoexclude)
std::vector< T >::const_iterator const_iterator
void setParameters(const edm::ParameterSet &ps)
edm::ESHandle< EcalElectronicsMapping > pEcalMapping_
T const * product() const
edm::ESHandle< EcalChannelStatus > chStatus_
EcalDeadChannelRecoveryAlgos< EEDetId > eeDeadChannelCorrector
const edm::EventSetup * eventSetup_
bool recoverEEIsolatedChannels_
EcalTPGScale::Tokens tpgscaleTokens_
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
std::set< DetId > recoveredDetIds_EB_
float recCheckCalib(float energy, int ieta)
std::vector< int > dbStatusToBeExcludedEE_
double singleRecoveryThreshold_
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > pEcalMappingToken_
double logWarningEtThreshold_EB_FE_
void insertRecHit(const EcalRecHit &hit, EcalRecHitCollection &collection)
double logWarningEtThreshold_EE_FE_
EcalTPGScale::Tokens ecalScaleTokens_
edm::ESHandle< CaloTopology > caloTopology_
float estimateEnergy(int ieta, EcalRecHitCollection *hits, const std::set< DetId > &sId, const std::vector< DetId > &vId, const EcalTPGScale &tpgscale)
float correct(const DetIdT id, const EcalRecHitCollection &hit_collection, std::string algo, double single8Cut, double sum8Cut, bool *accFlag)
bool alreadyInserted(const DetId &id)
std::unique_ptr< EcalRecHitSimpleAlgo > rechitMaker_
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > laserToken_
Log< level::Warning, false > LogWarning
Sin< T >::type sin(const T &t)
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > chStatusToken_
Geom::Theta< T > theta() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > ttMapToken_
const CaloGeometry * geo_
edm::ESHandle< EcalTrigTowerConstituentsMap > ttMap_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpDigiToken_
std::set< DetId > recoveredDetIds_EE_
const CaloSubdetectorGeometry * ebGeom_
std::vector< EcalRecHit >::iterator iterator
const_iterator end() const
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi) const
edm::ESHandle< CaloSubdetectorGeometry > pEBGeom_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Log< level::Error, false > LogError
EcalChannelStatusMap EcalChannelStatus
void set(const edm::EventSetup &es) override
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
bool recoverEBIsolatedChannels_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
double sum8RecoveryThreshold_
iterator find(key_type k)
void setCaloTopology(const CaloTopology *topology)
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
EcalDeadChannelRecoveryAlgos< EBDetId > ebDeadChannelCorrector
edm::ESHandle< EcalLaserDbService > laser
std::vector< int > dbStatusToBeExcludedEB_
T getParameter(std::string const &) const
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
std::string singleRecoveryMethod_
std::vector< Item >::const_iterator const_iterator
const EcalElectronicsMapping * ecalMapping_
EcalRecHitWorkerRecover(const edm::ParameterSet &, edm::ConsumesCollector &c)
bool run(const edm::Event &evt, const EcalUncalibratedRecHit &uncalibRH, EcalRecHitCollection &result) override
edm::ESHandle< CaloGeometry > caloGeometry_
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecord > pEBGeomToken_