62 CorrectDeadCells_ = ps.
getParameter<
bool>(
"CorrectDeadCells");
68 Sum8GeVThreshold_= ps.
getParameter<
double>(
"Sum8GeVThreshold");
70 produces< EcalRecHitCollection >(reducedHitCollection_);
98 evt.
getByLabel(hitProducer_, hitCollection_, rhcHandle);
99 if (!(rhcHandle.isValid()))
101 std::cout <<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
112 std::vector<EBDetId>::const_iterator DeadCell;
118 std::vector<EBDetId>::const_iterator CheckDead = ChannelsDeadID.begin();
119 bool OverADeadRecHit=
false;
120 while(CheckDead<ChannelsDeadID.end()){
121 if(it->detid()==*CheckDead){OverADeadRecHit=
true;
break;}
124 if(!OverADeadRecHit)redCollection->push_back( *it );
126 for(DeadCell=ChannelsDeadID.begin();DeadCell<ChannelsDeadID.end();DeadCell++){
127 EcalRecHit NewRecHit = DeadChannelCorrector->Correct(*DeadCell,hit_collection,CorrectionMethod_,Sum8GeVThreshold_);
128 redCollection->push_back( NewRecHit );
134 delete DeadChannelCorrector ;
136 evt.
put(redCollection, reducedHitCollection_);
147 printf(
"Dead Channels FILE: %s\n",DeadChannelFileName_.c_str());
148 DeadCha = fopen(DeadChannelFileName_.c_str(),
"r");
153 while(fileStatus != EOF) {
154 fileStatus = fscanf(DeadCha,
"%d %d\n",&ieta,&iphi);
156 if(ieta==-10000||iphi==-10000){
std::cout <<
"Problem reading Dead Channels file "<<std::endl;
break;}
158 ChannelsDeadID.push_back(cell);
T getParameter(std::string const &) const
std::vector< EcalRecHit >::const_iterator const_iterator
~EcalDeadChannelRecoveryProducers()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
DEFINE_FWK_MODULE(CaloMETProducer)
EcalDeadChannelRecoveryProducers(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)