|
|
Go to the documentation of this file.
93 for (std::vector<DetId>::const_iterator dit =
vid.begin(); dit !=
vid.end(); ++dit) {
104 std::vector<DetId> eeC;
105 for (
int dx = 1;
dx <= 5; ++
dx) {
106 for (
int dy = 1;
dy <= 5; ++
dy) {
107 int ix = (sc.
ix() - 1) * 5 +
dx;
108 int iy = (sc.
iy() - 1) * 5 +
dy;
111 eeC.push_back(
EEDetId(ix, iy, iz));
115 for (
size_t i = 0;
i < eeC.size(); ++
i) {
130 bool AcceptRecHit =
true;
135 if (
hit.energy() != 0 and AcceptRecHit ==
true) {
148 bool AcceptRecHit =
true;
152 if (
hit.energy() != 0 and AcceptRecHit ==
true) {
177 if (
tp != tpDigis->
end()) {
182 if (tpEt > tpEtThreshEB) {
183 edm::LogWarning(
"EnergyInDeadEB_FE") <<
"TP energy in the dead TT = " << tpEt <<
" at " << ttDetId;
188 for (std::vector<DetId>::const_iterator dit =
vid.begin(); dit !=
vid.end(); ++dit) {
196 if (
tp->compressedEt() == 0xFF)
206 for (std::vector<DetId>::const_iterator dit =
vid.begin(); dit !=
vid.end(); ++dit) {
227 for (
int dx = 1;
dx <= 5; ++
dx) {
228 for (
int dy = 1;
dy <= 5; ++
dy) {
229 int ix = (sc.ix() - 1) * 5 +
dx;
230 int iy = (sc.iy() - 1) * 5 +
dy;
247 std::set<EcalTrigTowerDetId> aTT;
248 for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
254 std::set<DetId> aTTC;
255 bool atLeastOneTPSaturated =
false;
256 for (std::set<EcalTrigTowerDetId>::const_iterator it = aTT.begin(); it != aTT.end(); ++it) {
259 if (itTP != tpDigis->
end()) {
263 std::vector<DetId>::iterator ttcons =
v.begin();
264 while (ttcons !=
v.end()) {
266 ttcons =
v.erase(ttcons);
272 if (itTP->compressedEt() == 0xFF) {
273 atLeastOneTPSaturated =
300 if (itTP->compressedEt() == 0) {
301 for (
size_t i = 0;
i <
v.size(); ++
i)
303 }
else if (itTP->compressedEt() != 0xFF) {
305 for (
size_t j = 0;
j <
v.size(); ++
j) {
315 for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
320 for (std::set<DetId>::const_iterator it = aTTC.begin(); it != aTTC.end(); ++it) {
322 if (jt !=
hits->end()) {
323 float energy = jt->energy();
325 float pf = 1.0 / cosh(
eta);
333 if (scEt > scEtThreshEE) {
334 edm::LogWarning(
"EnergyInDeadEE_FE") <<
"TP energy in the dead TT = " << scEt <<
" at " << sc;
340 for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
342 float pf = 1.0 / cosh(
eta);
345 if (atLeastOneTPSaturated)
358 const std::set<DetId>& sId,
359 const std::vector<DetId>& vId) {
362 for (std::vector<DetId>::const_iterator vIdit = vId.begin(); vIdit != vId.end(); ++vIdit) {
363 std::set<DetId>::const_iterator sIdit = sId.find(*vIdit);
364 if (sIdit == sId.end()) {
367 float pf = 1.0 / cosh(
eta);
379 return etsat / cosh(
ieta) * (
ieta > 26 ? 2 : 1);
381 return xtalE * ((vId.size() / (
float)
count) - 1) * (
ieta > 26 ? 2 : 1);
387 edm::LogWarning(
"EcalRecHitWorkerRecover") <<
"DetId already recovered! Skipping...";
403 edm::LogError(
"EcalRecHitWorkerRecover::InvalidDetId") <<
"Invalid DetId " <<
hit.
id().rawId();
414 edm::LogError(
"EcalRecHitWorkerRecover::InvalidDetId") <<
"Invalid DetId " <<
id.rawId();
431 uint16_t dbStatus = 0;
433 dbStatus = chIt->getEncodedStatusCode();
435 edm::LogError(
"ObjectNotFound") <<
"No channel status found for xtal " <<
id.rawId()
436 <<
"! something wrong with EcalChannelStatus in your DB? ";
439 for (std::vector<int>::const_iterator
status = statusestoexclude.begin();
status != statusestoexclude.end();
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi)
T const * product() const
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
bool recoverEEIsolatedChannels_
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_
double logWarningEtThreshold_EB_FE_
void insertRecHit(const EcalRecHit &hit, EcalRecHitCollection &collection)
double logWarningEtThreshold_EE_FE_
edm::ESHandle< CaloTopology > caloTopology_
float correct(const DetIdT id, const EcalRecHitCollection &hit_collection, std::string algo, double single8Cut, double sum8Cut, bool *accFlag)
void setEventSetup(const edm::EventSetup &evtSetup)
bool alreadyInserted(const DetId &id)
std::unique_ptr< EcalRecHitSimpleAlgo > rechitMaker_
Sin< T >::type sin(const T &t)
float estimateEnergy(int ieta, EcalRecHitCollection *hits, const std::set< DetId > &sId, const std::vector< DetId > &vId)
Geom::Theta< T > theta() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
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
edm::ESHandle< CaloSubdetectorGeometry > pEBGeom_
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.
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_
double sum8RecoveryThreshold_
T getParameter(std::string const &) const
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_
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_