CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

EcalRecHitWorkerRecover Class Reference

#include <EcalRecHitWorkerRecover.h>

Inheritance diagram for EcalRecHitWorkerRecover:
EcalRecHitWorkerBaseClass

List of all members.

Public Member Functions

 EcalRecHitWorkerRecover (const edm::ParameterSet &)
bool run (const edm::Event &evt, const EcalUncalibratedRecHit &uncalibRH, EcalRecHitCollection &result)
void set (const edm::EventSetup &es)
virtual ~EcalRecHitWorkerRecover ()

Protected Member Functions

bool alreadyInserted (const DetId &id)
float estimateEnergy (int ieta, EcalRecHitCollection *hits, std::set< DetId > sId, std::vector< DetId > vId)
void insertRecHit (const EcalRecHit &hit, EcalRecHitCollection &collection)
float recCheckCalib (float energy, int ieta)

Protected Attributes

edm::ESHandle< CaloGeometrycaloGeometry_
edm::ESHandle< CaloTopologycaloTopology_
const CaloSubdetectorGeometryebGeom_
const EcalElectronicsMappingecalMapping_
EcalTPGScale ecalScale_
const CaloSubdetectorGeometryeeGeom_
const CaloGeometrygeo_
bool killDeadChannels_
edm::ESHandle< EcalLaserDbServicelaser
double logWarningEtThreshold_EB_FE_
double logWarningEtThreshold_EE_FE_
edm::ESHandle
< CaloSubdetectorGeometry
pEBGeom_
edm::ESHandle
< EcalElectronicsMapping
pEcalMapping_
edm::ESHandle
< CaloSubdetectorGeometry
pEEGeom_
EcalRecHitSimpleAlgorechitMaker_
bool recoverEBFE_
bool recoverEBIsolatedChannels_
bool recoverEBVFE_
std::set< DetIdrecoveredDetIds_EB_
std::set< DetIdrecoveredDetIds_EE_
bool recoverEEFE_
bool recoverEEIsolatedChannels_
bool recoverEEVFE_
std::string singleRecoveryMethod_
double singleRecoveryThreshold_
edm::InputTag tpDigiCollection_
edm::ESHandle
< EcalTrigTowerConstituentsMap
ttMap_

Detailed Description

Algorithms to recover dead channels

Id:
EcalRecHitWorkerRecover.h,v 1.8 2010/12/03 13:03:49 argiro Exp
Date:
2010/12/03 13:03:49
Revision:
1.8

Definition at line 29 of file EcalRecHitWorkerRecover.h.


Constructor & Destructor Documentation

EcalRecHitWorkerRecover::EcalRecHitWorkerRecover ( const edm::ParameterSet ps)

Definition at line 22 of file EcalRecHitWorkerRecover.cc.

References edm::ParameterSet::getParameter(), killDeadChannels_, logWarningEtThreshold_EB_FE_, logWarningEtThreshold_EE_FE_, rechitMaker_, recoverEBFE_, recoverEBIsolatedChannels_, recoverEBVFE_, recoverEEFE_, recoverEEIsolatedChannels_, recoverEEVFE_, singleRecoveryMethod_, singleRecoveryThreshold_, and tpDigiCollection_.

                                                                         :
        EcalRecHitWorkerBaseClass(ps)
{
        rechitMaker_ = new EcalRecHitSimpleAlgo();
        // isolated channel recovery
        singleRecoveryMethod_    = ps.getParameter<std::string>("singleChannelRecoveryMethod");
        singleRecoveryThreshold_ = ps.getParameter<double>("singleChannelRecoveryThreshold");
        killDeadChannels_        = ps.getParameter<bool>("killDeadChannels");
        recoverEBIsolatedChannels_ = ps.getParameter<bool>("recoverEBIsolatedChannels");
        recoverEEIsolatedChannels_ = ps.getParameter<bool>("recoverEEIsolatedChannels");
        recoverEBVFE_ = ps.getParameter<bool>("recoverEBVFE");
        recoverEEVFE_ = ps.getParameter<bool>("recoverEEVFE");
        recoverEBFE_ = ps.getParameter<bool>("recoverEBFE");
        recoverEEFE_ = ps.getParameter<bool>("recoverEEFE");

        tpDigiCollection_        = ps.getParameter<edm::InputTag>("triggerPrimitiveDigiCollection");
        logWarningEtThreshold_EB_FE_ = ps.getParameter<double>("logWarningEtThreshold_EB_FE");
        logWarningEtThreshold_EE_FE_ = ps.getParameter<double>("logWarningEtThreshold_EE_FE");
}
virtual EcalRecHitWorkerRecover::~EcalRecHitWorkerRecover ( ) [inline, virtual]

Definition at line 32 of file EcalRecHitWorkerRecover.h.

{};

Member Function Documentation

bool EcalRecHitWorkerRecover::alreadyInserted ( const DetId id) [protected]

Definition at line 377 of file EcalRecHitWorkerRecover.cc.

References EcalBarrel, EcalEndcap, recoveredDetIds_EB_, and recoveredDetIds_EE_.

Referenced by insertRecHit(), and run().

{
        bool res = false;
        if ( id.subdetId() == EcalBarrel ) {
                res = ( recoveredDetIds_EB_.find( id ) != recoveredDetIds_EB_.end() );
        } else if ( id.subdetId() == EcalEndcap ) {
                res = ( recoveredDetIds_EE_.find( id ) != recoveredDetIds_EE_.end() );
        } else {
                edm::LogError("EcalRecHitWorkerRecover::InvalidDetId") << "Invalid DetId " << id.rawId();
        }
        return res;
}
float EcalRecHitWorkerRecover::estimateEnergy ( int  ieta,
EcalRecHitCollection hits,
std::set< DetId sId,
std::vector< DetId vId 
) [protected]

Definition at line 330 of file EcalRecHitWorkerRecover.cc.

References prof2calltree::count, relval_parameters_module::energy, eta(), PV3DBase< T, PVType, FrameType >::eta(), edm::SortedCollection< T, SORT >::find(), geo_, and CaloGeometry::getPosition().

Referenced by run().

                                                                                                                             {
        
        float xtalE=0;
        int count = 0;
        for (std::vector<DetId>::const_iterator vIdit = vId.begin(); vIdit != vId.end(); ++ vIdit){
                std::set<DetId>::const_iterator sIdit = sId.find(*vIdit);
                if (sIdit==sId.end()){
                        float energy = hits->find(*vIdit)->energy();
                        float eta = geo_->getPosition(*vIdit).eta();
                        float pf = 1.0/cosh(eta);
                        xtalE += energy*pf;
                        count++;
                }
        }
        
        if (count==0) return 63.75*(ieta>26?2:1); //If there are no overlapping crystals return saturated value.
        else return xtalE*((vId.size()/(float)count) - 1)*(ieta>26?2:1);
        
        
}
void EcalRecHitWorkerRecover::insertRecHit ( const EcalRecHit hit,
EcalRecHitCollection collection 
) [protected]

Definition at line 352 of file EcalRecHitWorkerRecover.cc.

References alreadyInserted(), EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), EcalRecHit::id(), edm::SortedCollection< T, SORT >::push_back(), DetId::rawId(), recoveredDetIds_EB_, recoveredDetIds_EE_, and DetId::subdetId().

Referenced by run().

{
        // skip already inserted DetId's and raise a log warning
        if ( alreadyInserted( hit.id() ) ) {
          edm::LogWarning("EcalRecHitWorkerRecover") << "DetId already recovered! Skipping...";
                return;
        }
        EcalRecHitCollection::iterator it = collection.find( hit.id() );
        if ( it == collection.end() ) {
                // insert the hit in the collection
                collection.push_back( hit );
        } else {
                // overwrite existing recHit
                *it = hit;
        }
        if ( hit.id().subdetId() == EcalBarrel ) {
                recoveredDetIds_EB_.insert( hit.id() );
        } else if ( hit.id().subdetId() == EcalEndcap ) {
                recoveredDetIds_EE_.insert( hit.id() );
        } else {
                edm::LogError("EcalRecHitWorkerRecover::InvalidDetId") << "Invalid DetId " << hit.id().rawId();
        }
}
float EcalRecHitWorkerRecover::recCheckCalib ( float  energy,
int  ieta 
) [protected]

Definition at line 392 of file EcalRecHitWorkerRecover.cc.

                                                               {
         
         return eTT;
         
}
bool EcalRecHitWorkerRecover::run ( const edm::Event evt,
const EcalUncalibratedRecHit uncalibRH,
EcalRecHitCollection result 
) [virtual]

Implements EcalRecHitWorkerBaseClass.

Definition at line 65 of file EcalRecHitWorkerRecover.cc.

References alreadyInserted(), caloTopology_, EcalRecHitWorkerBaseClass::EB_FE, EcalRecHitWorkerBaseClass::EB_single, EcalRecHitWorkerBaseClass::EB_VFE, ebGeom_, ecalScale_, EcalRecHitWorkerBaseClass::EE_FE, EcalRecHitWorkerBaseClass::EE_single, EcalRecHitWorkerBaseClass::EE_VFE, edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, estimateEnergy(), eta(), PV3DBase< T, PVType, FrameType >::eta(), edm::SortedCollection< T, SORT >::find(), flags, geo_, edm::Event::getByLabel(), CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getPosition(), CaloCellGeometry::getPosition(), EcalTPGScale::getTPGInGeV(), i, EcalUncalibratedRecHit::id(), ExpressReco_HICollisions_FallBack::id, insertRecHit(), edm::InputTag::instance(), edm::HandleBase::isValid(), EEDetId::ix(), EcalScDetId::ix(), EEDetId::iy(), EcalScDetId::iy(), j, EcalRecHit::kDead, killDeadChannels_, EcalRecHit::kL1SpikeFlag, EcalRecHit::kNeighboursRecovered, EcalRecHit::kTowerRecovered, EcalRecHit::kTPSaturated, edm::InputTag::label(), logWarningEtThreshold_EB_FE_, logWarningEtThreshold_EE_FE_, edm::ESHandle< T >::product(), edm::Handle< T >::product(), EcalUncalibratedRecHit::recoFlag(), recoverEBFE_, recoverEBIsolatedChannels_, recoverEBVFE_, recoverEEFE_, recoverEEIsolatedChannels_, recoverEEVFE_, query::result, EcalRecHit::setFlagBits(), funct::sin(), singleRecoveryMethod_, singleRecoveryThreshold_, theta(), PV3DBase< T, PVType, FrameType >::theta(), tpDigiCollection_, ttMap_, v, EEDetId::validDetId(), EcalScDetId::zside(), and EEDetId::zside().

{
        DetId detId=uncalibRH.id();
        uint32_t flags = uncalibRH.recoFlag();

        // get laser coefficient
        //float lasercalib = laser->getLaserCorrection( detId, evt.time());

        // killDeadChannels_ = true, means explicitely kill dead channels even if the recovered energies are computed in the code
        // if you don't want to store the recovered energies in the rechit you can produce LogWarnings if logWarningEtThreshold_EB(EE)_FE>0 
        // logWarningEtThreshold_EB(EE)_FE_<0 will not compute the recovered energies at all (faster)
        // Revovery in the EE is not tested, recovered energies may not make sense
        // EE recovery computation is not tested against segmentation faults, use with caution even if you are going to killDeadChannels=true

        if ( killDeadChannels_ ) {
                if (    (flags == EcalRecHitWorkerRecover::EB_single && !recoverEBIsolatedChannels_)
                     || (flags == EcalRecHitWorkerRecover::EE_single && !recoverEEIsolatedChannels_)
                     || (flags == EcalRecHitWorkerRecover::EB_VFE && !recoverEBVFE_)
                     || (flags == EcalRecHitWorkerRecover::EE_VFE && !recoverEEVFE_)
                     ) {
                        EcalRecHit hit( detId, 0., 0., EcalRecHit::kDead );
                        hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                        insertRecHit( hit, result); // insert trivial rechit with kDead flag
                        return true;
                } 
                if ( flags == EcalRecHitWorkerRecover::EB_FE && !recoverEBFE_) {
                        EcalTrigTowerDetId ttDetId( ((EBDetId)detId).tower() );
                        std::vector<DetId> vid = ttMap_->constituentsOf( ttDetId );
                        for ( std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit ) {
                                EcalRecHit hit( (*dit), 0., 0., EcalRecHit::kDead );
                                hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                                insertRecHit( hit, result ); // insert trivial rechit with kDead flag
                        }
                        if(logWarningEtThreshold_EB_FE_<0)return true; // if you don't want log warning just return true
                }
                if ( flags == EcalRecHitWorkerRecover::EE_FE && !recoverEEFE_) {
                        EEDetId id( detId );
                        EcalScDetId sc( 1+(id.ix()-1)/5, 1+(id.iy()-1)/5, id.zside() );
                        std::vector<DetId> eeC;
                        for(int dx=1; dx<=5; ++dx){
                                for(int dy=1; dy<=5; ++dy){
                                        int ix = (sc.ix()-1)*5 + dx;
                                        int iy = (sc.iy()-1)*5 + dy;
                                        int iz = sc.zside();
                                        if(EEDetId::validDetId(ix, iy, iz)){
                                                eeC.push_back(EEDetId(ix, iy, iz));
                                        }
                                }
                        }
                        for ( size_t i = 0; i < eeC.size(); ++i ) {
                                EcalRecHit hit( eeC[i], 0., 0., EcalRecHit::kDead );
                                hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                                insertRecHit( hit, result ); // insert trivial rechit with kDead flag
                        }
                        if(logWarningEtThreshold_EE_FE_<0)   return true; // if you don't want log warning just return true
                }
        }

        if ( flags == EcalRecHitWorkerRecover::EB_single ) {
                // recover as single dead channel
                const EcalRecHitCollection * hit_collection = &result;
                EcalDeadChannelRecoveryAlgos deadChannelCorrector(caloTopology_.product());

                // channel recovery
                EcalRecHit hit = deadChannelCorrector.correct( detId, hit_collection, singleRecoveryMethod_, singleRecoveryThreshold_ );
                EcalRecHitCollection::const_iterator ti = result.find( detId );
                if ( hit.energy() != 0 ) {
                        hit.setFlags( EcalRecHit::kNeighboursRecovered );
                        hit.setFlagBits( (0x1 << EcalRecHit::kNeighboursRecovered) ) ;
                } else {
                        // recovery failed
                        hit.setFlags( EcalRecHit::kDead );
                        hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                }
                insertRecHit( hit, result );
        } else if ( flags == EcalRecHitWorkerRecover::EB_VFE ) {
                // recover as dead VFE
                EcalRecHit hit( detId, 0., 0., EcalRecHit::kDead );
                hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                // recovery not implemented
                insertRecHit( hit, result );
        } else if ( flags == EcalRecHitWorkerRecover::EB_FE ) {
                // recover as dead TT
                EcalTrigTowerDetId ttDetId( ((EBDetId)detId).tower() );
                edm::Handle<EcalTrigPrimDigiCollection> pTPDigis;
                evt.getByLabel(tpDigiCollection_, pTPDigis);
                const EcalTrigPrimDigiCollection * tpDigis = 0;
                if ( pTPDigis.isValid() ) {
                        tpDigis = pTPDigis.product();
                } else {
                        edm::LogError("EcalRecHitWorkerRecover") << "Can't get the product " << tpDigiCollection_.instance() 
                                << " with label " << tpDigiCollection_.label();
                        return false;
                }
                EcalTrigPrimDigiCollection::const_iterator tp = tpDigis->find( ttDetId );
                // recover the whole trigger tower
                if ( tp != tpDigis->end() ) {
                        //std::vector<DetId> vid = ecalMapping_->dccTowerConstituents( ecalMapping_->DCCid( ttDetId ), ecalMapping_->iTT( ttDetId ) );
                        std::vector<DetId> vid = ttMap_->constituentsOf( ttDetId );
                        float tpEt  = ecalScale_.getTPGInGeV( tp->compressedEt(), tp->id() );
                        float tpEtThreshEB = logWarningEtThreshold_EB_FE_;
                        if(tpEt>tpEtThreshEB){
                                edm::LogWarning("EnergyInDeadEB_FE")<<"TP energy in the dead TT = "<<tpEt<<" at "<<ttDetId;
                        }
                        if ( !killDeadChannels_ || recoverEBFE_ ) {  
                                // democratic energy sharing
                                for ( std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit ) {
                                        if (alreadyInserted(*dit)) continue;
                                        float theta = ebGeom_->getGeometry(*dit)->getPosition().theta();
                                        float tpEt  = ecalScale_.getTPGInGeV( tp->compressedEt(), tp->id() );
                                        EcalRecHit hit( *dit, tpEt / (float)vid.size() / sin(theta), 0., EcalRecHit::kTowerRecovered );
                                        hit.setFlagBits( (0x1 << EcalRecHit::kTowerRecovered) ) ;
                                        if ( tp->compressedEt() == 0xFF ) hit.setFlagBits( (0x1 << EcalRecHit::kTPSaturated) );
                                        if ( tp->sFGVB() ) hit.setFlagBits( (0x1 << EcalRecHit::kL1SpikeFlag) );
                                        insertRecHit( hit, result );
                                }
                        }
                } else {
                        // tp not found => recovery failed
                        std::vector<DetId> vid = ttMap_->constituentsOf( ttDetId );
                        for ( std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit ) {
                          if (alreadyInserted(*dit)) continue;
                          EcalRecHit hit( *dit,0., 0., EcalRecHit::kDead );
                                hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                                EcalRecHitCollection::iterator it = result.find( *dit );
                                insertRecHit( hit, result );
                        }
                }
        } else if ( flags == EcalRecHitWorkerRecover::EE_FE ) {
                        // Structure for recovery:
                        // ** SC --> EEDetId constituents (eeC) --> associated Trigger Towers (aTT) --> EEDetId constituents (aTTC)
                        // ** energy for a SC EEDetId = [ sum_aTT(energy) - sum_aTTC(energy) ] / N_eeC
                        // .. i.e. the total energy of the TTs covering the SC minus 
                        // .. the energy of the recHits in the TTs but not in the SC
                        //std::vector<DetId> vid = ecalMapping_->dccTowerConstituents( ecalMapping_->DCCid( ttDetId ), ecalMapping_->iTT( ttDetId ) );
                        // due to lack of implementation of the EcalTrigTowerDetId ix,iy methods in EE we compute Et recovered energies (in EB we compute E)
                        // --- RECOVERY NOT YET VALIDATED
                        EEDetId eeId( detId );
                        EcalScDetId sc( (eeId.ix()-1)/5+1, (eeId.iy()-1)/5+1, eeId.zside() );
                        std::set<DetId> eeC;
                        for(int dx=1; dx<=5; ++dx){
                                for(int dy=1; dy<=5; ++dy){
                                        int ix = (sc.ix()-1)*5 + dx;
                                        int iy = (sc.iy()-1)*5 + dy;
                                        int iz = sc.zside();
                                        if(EEDetId::validDetId(ix, iy, iz)){
                                                eeC.insert(EEDetId(ix, iy, iz));
                                        }
                                }
                        }
                        
                        edm::Handle<EcalTrigPrimDigiCollection> pTPDigis;
                        evt.getByLabel(tpDigiCollection_, pTPDigis);
                        const EcalTrigPrimDigiCollection * tpDigis = 0;
                        if ( pTPDigis.isValid() ) {
                                tpDigis = pTPDigis.product();
                        } else {
                                edm::LogError("EcalRecHitWorkerRecover") << "Can't get the product " << tpDigiCollection_.instance() 
                                        << " with label " << tpDigiCollection_.label();
                                return false;
                        }
                        // associated trigger towers
                        std::set<EcalTrigTowerDetId> aTT;
                        for ( std::set<DetId>::const_iterator it = eeC.begin(); it!=eeC.end(); ++it ) {
                                aTT.insert( ttMap_->towerOf( *it ) );
                        }
                        // associated trigger towers: total energy
                        float totE = 0;
                        // associated trigger towers: EEDetId constituents
                        std::set<DetId> aTTC;
                        bool atLeastOneTPSaturated = false;
                        for ( std::set<EcalTrigTowerDetId>::const_iterator it = aTT.begin(); it != aTT.end(); ++it ) {
                                // add the energy of this trigger tower
                                EcalTrigPrimDigiCollection::const_iterator itTP = tpDigis->find( *it );
                                if ( itTP != tpDigis->end() ) {
                                        EcalTrigTowerDetId ttId = itTP->id();

                                        std::vector<DetId> v = ttMap_->constituentsOf( *it );
                                        if ( itTP->compressedEt() == 0xFF ){ // In the case of a saturated trigger tower, a fraction
                                          atLeastOneTPSaturated = true; //of the saturated energy is put in: number of xtals in dead region/total xtals in TT *63.75
                                                
                                          //Alternative recovery algorithm that I will now investigate.
                                          //Estimate energy sums the energy in the working channels, then decides how much energy
                                          //to put here depending on that. Duncan 20101203
                                          
                                          totE += estimateEnergy(itTP->id().ietaAbs(), &result, eeC, v);
                                          
                                          /* 
                                             These commented out lines use
                                             64GeV*fraction of the TT overlapping the dead FE
                                            
                                          int count = 0;
                                          for (std::vector<DetId>::const_iterator idsit = v.begin(); idsit != v.end(); ++ idsit){
                                          std::set<DetId>::const_iterator itFind = eeC.find(*idsit);
                                          if (itFind != eeC.end())
                                          ++count;
                                          }
                                          //std::cout << count << ", " << v.size() << std::endl;
                                          totE+=((float)count/(float)v.size())* ((it->ietaAbs()>26)?2*ecalScale_.getTPGInGeV( itTP->compressedEt(), itTP->id() ):ecalScale_.getTPGInGeV( itTP->compressedEt(), itTP->id() ));*/
                                        }
                                        else {totE += ((it->ietaAbs()>26)?2:1)*ecalScale_.getTPGInGeV( itTP->compressedEt(), itTP->id() );}
                                        
                                
                                        // get the trigger tower constituents
                                        
                                        if (itTP->compressedEt() == 0){ // If there's no energy in TT, the constituents are removed from the recovery.
                                                 for (size_t i = 0 ; i < v.size(); ++i)
                                                         eeC.erase(v[i]);
                                        }
                                        else if (itTP->compressedEt()!=0xFF){ //If it's saturated the energy has already been determined, so we do not want to subtract any channels
                                         for ( size_t j = 0; j < v.size(); ++j ) {
                                                 aTTC.insert( v[j] );
                                         }
                                        }
                                    
                                }
                        }
                        // remove crystals of dead SC
                        // (this step is not needed if sure that SC crystals are not 
                        // in the recHit collection)
                        
                        for ( std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it ) {
                          aTTC.erase(*it);
                        }
                        // compute the total energy for the dead SC
                        const EcalRecHitCollection * hits = &result;
                        for ( std::set<DetId>::const_iterator it = aTTC.begin(); it != aTTC.end(); ++it ) {
                                EcalRecHitCollection::const_iterator jt = hits->find( *it );
                                if ( jt != hits->end() ) {
                                  float energy = jt->energy(); // Correct conversion to Et
                                  float eta = geo_->getPosition(jt->id()).eta();
                                  float pf = 1.0/cosh(eta);
                                  //float theta = eeGeom_->getGeometry( *it )->getPosition().theta();
                                  // use Et instead of E, consistent with the Et estimation of the associated TT
                                  totE -= energy*pf;
                                }
                        }
                        

                        float scEt = totE;
                        float scEtThreshEE = logWarningEtThreshold_EE_FE_;
                        if(scEt>scEtThreshEE){
                                edm::LogWarning("EnergyInDeadEE_FE")<<"TP energy in the dead TT = "<<scEt<<" at "<<sc;
                        }

                        // assign the energy to the SC crystals
                        if ( !killDeadChannels_ || recoverEEFE_ ) { // if eeC is empty, i.e. there are no hits 
                                                                    // in the tower, nothing is returned. No negative values from noise.
                          for ( std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it ) {
                            EcalRecHit hit( *it, 0., 0., EcalRecHit::kDead ); 
                            hit.setFlagBits( (0x1 << EcalRecHit::kDead) ) ;
                            float eta = geo_->getPosition(*it).eta(); //Convert back to E from Et for the recovered hits
                            float pf = 1.0/cosh(eta);
                            hit = EcalRecHit( *it, totE / ((float)eeC.size()*pf), 0., EcalRecHit::kTowerRecovered );
                            if (atLeastOneTPSaturated) hit.setFlagBits( (0x1 << EcalRecHit::kTPSaturated) );
                                                    
                            insertRecHit( hit, result );
                          }
                        }
        }
        return true;
}
void EcalRecHitWorkerRecover::set ( const edm::EventSetup es) [virtual]

Member Data Documentation

Definition at line 50 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 49 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().

Definition at line 74 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().

Definition at line 66 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 63 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().

Definition at line 75 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 76 of file EcalRecHitWorkerRecover.h.

Referenced by estimateEnergy(), run(), and set().

Definition at line 53 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 46 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 67 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 68 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 72 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 65 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 73 of file EcalRecHitWorkerRecover.h.

Referenced by set().

Definition at line 78 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover().

Definition at line 59 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 55 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 57 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 80 of file EcalRecHitWorkerRecover.h.

Referenced by alreadyInserted(), insertRecHit(), and set().

Definition at line 81 of file EcalRecHitWorkerRecover.h.

Referenced by alreadyInserted(), insertRecHit(), and set().

Definition at line 60 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 56 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 58 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 52 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 51 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 64 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

Definition at line 70 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().