99 std::vector<DetId> vid =
ttMap_->constituentsOf( ttDetId );
100 for ( std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit ) {
109 EcalScDetId sc( 1+(
id.ix()-1)/5, 1+(
id.iy()-1)/5,
id.zside() );
110 std::vector<DetId> eeC;
111 for(
int dx=1; dx<=5; ++dx){
112 for(
int dy=1; dy<=5; ++dy){
113 int ix = (sc.
ix()-1)*5 + dx;
114 int iy = (sc.
iy()-1)*5 + dy;
117 eeC.push_back(
EEDetId(ix, iy, iz));
121 for (
size_t i = 0;
i < eeC.size(); ++
i ) {
137 if ( hit.energy() != 0 ) {
166 if ( tp != tpDigis->
end() ) {
168 std::vector<DetId> vid =
ttMap_->constituentsOf( ttDetId );
171 if(tpEt>tpEtThreshEB){
172 edm::LogWarning(
"EnergyInDeadEB_FE")<<
"TP energy in the dead TT = "<<tpEt<<
" at "<<ttDetId;
177 for ( std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit ) {
191 std::vector<DetId> vid =
ttMap_->constituentsOf( ttDetId );
192 for ( std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit ) {
212 for(
int dx=1; dx<=5; ++dx){
213 for(
int dy=1; dy<=5; ++dy){
214 int ix = (sc.ix()-1)*5 + dx;
215 int iy = (sc.iy()-1)*5 + dy;
237 std::set<EcalTrigTowerDetId> aTT;
238 for ( std::set<DetId>::const_iterator it = eeC.begin(); it!=eeC.end(); ++it ) {
239 aTT.insert(
ttMap_->towerOf( *it ) );
244 std::set<DetId> aTTC;
245 bool atLeastOneTPSaturated =
false;
246 for ( std::set<EcalTrigTowerDetId>::const_iterator it = aTT.begin(); it != aTT.end(); ++it ) {
249 if ( itTP != tpDigis->
end() ) {
251 std::vector<DetId>
v =
ttMap_->constituentsOf( *it );
254 std::vector<DetId>::iterator ttcons = v.begin();
255 while (ttcons != v.end()){
257 ttcons=v.erase(ttcons);
263 if ( itTP->compressedEt() == 0xFF ){
264 atLeastOneTPSaturated =
true;
290 if (itTP->compressedEt() == 0){
291 for (
size_t i = 0 ;
i < v.size(); ++
i)
294 else if (itTP->compressedEt()!=0xFF){
295 for (
size_t j = 0;
j < v.size(); ++
j ) {
306 for ( std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it ) {
311 for ( std::set<DetId>::const_iterator it = aTTC.begin(); it != aTTC.end(); ++it ) {
313 if ( jt != hits->
end() ) {
314 float energy = jt->energy();
316 float pf = 1.0/cosh(eta);
326 if(scEt>scEtThreshEE){
327 edm::LogWarning(
"EnergyInDeadEE_FE")<<
"TP energy in the dead TT = "<<scEt<<
" at "<<sc;
333 for ( std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it ) {
336 float pf = 1.0/cosh(eta);
353 for (std::vector<DetId>::const_iterator vIdit = vId.begin(); vIdit != vId.end(); ++ vIdit){
354 std::set<DetId>::const_iterator sIdit = sId.find(*vIdit);
355 if (sIdit==sId.end()){
358 float pf = 1.0/cosh(eta);
367 ttMap_->towerOf(*vId.begin()));
370 return etsat/cosh(ieta)*(ieta>26?2:1);
372 else return xtalE*((vId.size()/(float)count) - 1)*(ieta>26?2:1);
382 edm::LogWarning(
"EcalRecHitWorkerRecover") <<
"DetId already recovered! Skipping...";
386 if ( it == collection.
end() ) {
411 edm::LogError(
"EcalRecHitWorkerRecover::InvalidDetId") <<
"Invalid DetId " <<
id.rawId();
427 const std::vector<int>& statusestoexclude){
435 uint16_t dbStatus = 0;
437 dbStatus = chIt->getStatusCode();
439 edm::LogError(
"ObjectNotFound") <<
"No channel status found for xtal "
441 <<
"! something wrong with EcalChannelStatus in your DB? ";
444 for (std::vector<int>::const_iterator
status = statusestoexclude.begin();
447 if ( *
status == dbStatus)
return false;
std::string singleRecoveryMethod_
double singleRecoveryThreshold_
T getParameter(std::string const &) const
double logWarningEtThreshold_EB_FE_
bool recoverEEIsolatedChannels_
bool alreadyInserted(const DetId &id)
void setEventSetup(const edm::EventSetup &evtSetup)
Sin< T >::type sin(const T &t)
std::vector< T >::const_iterator const_iterator
Geom::Theta< T > theta() const
std::vector< int > dbStatusToBeExcludedEE_
void push_back(T const &t)
std::vector< Variable::Flags > flags
void setFlag(int flag)
set the flags (from Flags or ESFlags)
edm::ESHandle< CaloTopology > caloTopology_
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
float recCheckCalib(float energy, int ieta)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
const CaloSubdetectorGeometry * eeGeom_
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Geom::Theta< T > theta() const
void insertRecHit(const EcalRecHit &hit, EcalRecHitCollection &collection)
double logWarningEtThreshold_EE_FE_
uint32_t rawId() const
get the raw id
edm::InputTag tpDigiCollection_
edm::ESHandle< CaloSubdetectorGeometry > pEEGeom_
edm::ESHandle< EcalTrigTowerConstituentsMap > ttMap_
EcalRecHitWorkerRecover(const edm::ParameterSet &)
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
edm::ESHandle< CaloSubdetectorGeometry > pEBGeom_
const CaloGeometry * geo_
bool recoverEBIsolatedChannels_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const CaloSubdetectorGeometry * ebGeom_
std::vector< EcalRecHit >::iterator iterator
const_iterator end() const
float estimateEnergy(int ieta, EcalRecHitCollection *hits, std::set< DetId > sId, std::vector< DetId > vId)
DetId id() const
get the id
std::vector< Item >::const_iterator const_iterator
std::set< DetId > recoveredDetIds_EE_
T const * product() const
EcalRecHitSimpleAlgo * rechitMaker_
T const * product() const
void set(const edm::EventSetup &es)
iterator find(key_type k)
edm::ESHandle< CaloGeometry > caloGeometry_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< int > dbStatusToBeExcludedEB_
edm::ESHandle< EcalChannelStatus > chStatus_
edm::ESHandle< EcalLaserDbService > laser
const EcalElectronicsMapping * ecalMapping_
edm::ESHandle< EcalElectronicsMapping > pEcalMapping_
bool run(const edm::Event &evt, const EcalUncalibratedRecHit &uncalibRH, EcalRecHitCollection &result)
bool checkChannelStatus(const DetId &id, const std::vector< int > &statusestoexclude)
std::set< DetId > recoveredDetIds_EB_