46 std::cout <<
" HiEgammaSCEnergyCorrectionAlgo::applyCorrection" << std::endl;
48 std::cout <<
" Will correct now.... " << std::endl;
56 std::cout <<
" Seed cluster energy... " << seedC->energy() << std::endl;
74 std::cout <<
" The seed cluster used algo " << theAlgo;
79 std::vector<std::pair<DetId, float> >
const & seedHits = seedC->hitsAndFractions();
83 std::cout <<
" seed cluster location == " << theBase << std::endl;
90 std::cout <<
" nCryGT2Sigma " << nCryGT2Sigma << std::endl;
94 float bremsEnergy = cl.
energy() - seedC->energy();
97 std::cout <<
" bremsEnergy " << bremsEnergy << std::endl;
104 double phiWidth = 0.;
105 double etaWidth = 0.;
113 float e3x3 = EcalClusterTools::e3x3( *(cl.
seed()), &rhc, &(*topology));
114 float e5x5 = EcalClusterTools::e5x5( *(cl.
seed()), &rhc, &(*topology));
126 fBrem(phiWidth/etaWidth, theAlgo, theBase)
132 newEnergy = e5x5 /
fEta(cl.
eta(), theAlgo, theBase);
144 std::cout <<
" UNCORRECTED SC has energy... " << cl.
energy() << std::endl;
145 std::cout <<
" CORRECTED SC has energy... " << newEnergy << std::endl;
147 std::cout <<
" Seed nCryGT2Sigma Size..." <<nCryGT2Sigma << std::endl;
156 corrCl.setPhiWidth(phiWidth);
157 corrCl.setEtaWidth(etaWidth);
179 if (factor< 0.66
f ) factor = 0.66f;
180 if (factor> 1.5
f ) factor = 1.5f;
199 if (factor< 0.66
f ) factor = 0.66f;
200 if (factor> 1.5
f ) factor = 1.5f;
225 if (factor< 0.66
f ) factor = 0.66f;
226 if (factor> 1.5
f ) factor = 1.5f;
240 float const p0 = 0.682554f;
241 float const p1 = 0.0253013f;
242 float const p2 = -0.0007907f;
243 float const p3 = 1.166e-5
f;
244 float const p4 = -6.7387e-8
f;
245 if (x < 10.
f) x = 10.f;
246 if (x < 40.
f) result = p0 + x*(p1 + x*(p2 + x*(p3 + x*
p4)));
else result = 1.f;
251 float const p0 = 0.712185f;
252 float const p1 = 0.0273609f;
253 float const p2 = -0.00103818f;
254 float const p3 = 2.01828e-05
f;
255 float const p4 = -1.71438e-07
f;
256 if (x < 10.
f) x = 10.f;
257 if (x < 40.
f) result = p0 + x*(p1 + x*(p2 + x*(p3 + x*
p4)));
else result = 1.f;
263 std::cout <<
"trying to correct unknown cluster!!!" << std::endl;
267 if (result > 1.5
f) result = 1.5f;
268 if (result < 0.5
f) result = 0.5f;
277 std::vector<std::pair<DetId,float > >
const &
hits = seed.hitsAndFractions();
281 std::cout <<
" HiEgammaSCEnergyCorrectionAlgo::nCrystalsGT2Sigma" << std::endl;
282 std::cout <<
" Will calculate number of crystals above 2sigma noise" << std::endl;
284 std::cout <<
" There are " << hits.size() <<
" recHits" << std::endl;
288 for(std::vector<std::pair<DetId,float > >::const_iterator
hit = hits.begin();
hit != hits.end(); ++
hit)
298 std::cout <<
" " << nCry <<
" of these above 2sigma noise" << std::endl;
T getParameter(std::string const &) const
const math::XYZPoint & position() const
cluster centroid position
void Calculate_Covariances(const reco::SuperCluster &passedCluster)
float fBrem(float widthRatio, reco::CaloCluster::AlgoId theAlgo, EcalSubdetector theBase) const
CaloTopology const * topology(0)
float fNCrystals(int nCry, reco::CaloCluster::AlgoId theAlgo, EcalSubdetector theBase) const
void push_back(Ptr< T > const &iPtr)
HiEgammaSCEnergyCorrectionAlgo(float noise, reco::CaloCluster::AlgoId theAlgo, const edm::ParameterSet &pSet, VerbosityLevel verbosity=pERROR)
reco::SuperCluster applyCorrection(const reco::SuperCluster &cl, const EcalRecHitCollection &rhc, reco::CaloCluster::AlgoId theAlgo, const CaloSubdetectorGeometry *geometry, const CaloTopology *topology, EcalClusterFunctionBaseClass *EnergyCorrectionClass)
float sigmaElectronicNoise_
std::vector< EcalRecHit >::const_iterator const_iterator
float fEta(float eta, reco::CaloCluster::AlgoId theAlgo, EcalSubdetector theBase) const
double eta() const
pseudorapidity of cluster centroid
float fEtEta(float et, float eta, reco::CaloCluster::AlgoId theAlgo, EcalSubdetector theBase) const
void setFlags(uint32_t flags)
VerbosityLevel verbosity_
int nCrystalsGT2Sigma(reco::BasicCluster const &seed, EcalRecHitCollection const &rhc) const
std::vector< double > p_fEtEta_
double energy() const
cluster energy
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
std::vector< double > p_fEta_
XYZPointD XYZPoint
point in space with cartesian internal representation
et
define resolution functions of each parameter
std::vector< double > p_fBremTh_
iterator find(key_type k)
size_t size() const
size in number of hits (e.g. in crystals for ECAL)
std::vector< double > p_fBrem_
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
const CaloClusterPtr & seed() const
seed BasicCluster
double preshowerEnergy() const
energy deposited in preshower
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents