31 std::string sCAlgo_str = ps.
getParameter<std::string>(
"superClusterAlgo");
36 if (sCAlgo_str==
"Hybrid") {
39 }
else if (sCAlgo_str==
"Island") {
42 }
else if (sCAlgo_str==
"DynamicHybrid") {
45 }
else if (sCAlgo_str==
"Multi5x5") {
50 <<
"Error! SuperClusterAlgo in config file must be Hybrid or Island: "
51 << sCAlgo_str <<
" Using Hybrid by default";
59 ps.
getParameter<
bool>(
"applyLocalContCorrection") :
false;
63 ps.
getParameter<std::string>(
"crackCorrectorName") : std::string(
"EcalClusterCrackCorrection");
65 ps.
getParameter<std::string>(
"localContCorrectorName") : std::string(
"EcalBasicClusterLocalContCorrection") ;
90 if (applyCrackCorrection_ )
96 if (applyLocalContCorrection_ )
137 if(rHInputCollection ==
"EcalRecHitsEB") {
139 }
else if(rHInputCollection ==
"EcalRecHitsEE") {
141 }
else if(rHInputCollection ==
"EcalRecHitsPS") {
144 std::string str =
"\n\nSCCorrectionMaker encountered invalied ecalhitcollection type: " + rHInputCollection +
".\n\n";
145 throw(std::runtime_error( str.c_str() ));
154 <<
"Error! can't get the rawSuperClusters "
164 <<
"Error! can't get the RecHits "
176 reco::SuperClusterCollection::const_iterator aClus;
178 for(aClus = rawClusters->begin(); aClus != rawClusters->end(); aClus++)
193 crackcorrClus=enecorrClus;
199 localContCorrClus = crackcorrClus;
204 corrClusters->push_back(localContCorrClus);
virtual void produce(edm::Event &, const edm::EventSetup &)
T getParameter(std::string const &) const
const math::XYZPoint & position() const
cluster centroid position
reco::SuperCluster applyCorrection(const reco::SuperCluster &cl, const EcalRecHitCollection &rhc, reco::CaloCluster::AlgoId theAlgo, const CaloSubdetectorGeometry *geometry, EcalClusterFunctionBaseClass *energyCorrectionFunction, std::string energyCorrectorName_, int modeEB_, int modeEE_)
EcalClusterFunctionBaseClass * localContCorrectionFunction_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
edm::InputTag rHInputProducer_
Sin< T >::type sin(const T &t)
EcalClusterFunctionBaseClass * energyCorrectionFunction_
std::string energyCorrectorName_
std::string localContCorrectorName_
EgammaSCCorrectionMaker(const edm::ParameterSet &)
double sigmaElectronicNoise_
bool applyEnergyCorrection_
std::string outputCollection_
EcalClusterFunctionBaseClass * crackCorrectionFunction_
std::string crackCorrectorName_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
reco::CaloCluster::AlgoId sCAlgo_
bool applyCrackCorrection_
double energy() const
cluster energy
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
reco::SuperCluster applyCrackCorrection(const reco::SuperCluster &cl, EcalClusterFunctionBaseClass *crackCorrectionFunction)
reco::SuperCluster applyLocalContCorrection(const reco::SuperCluster &cl, EcalClusterFunctionBaseClass *localContCorrectionFunction)
bool applyLocalContCorrection_
EgammaSCEnergyCorrectionAlgo * energyCorrector_
~EgammaSCCorrectionMaker()
ESHandle< TrackerGeometry > geometry
virtual void init(const edm::EventSetup &es)=0
T get(const Candidate &c)
edm::InputTag sCInputProducer_