32 EcalFunctionParameters::const_iterator it;
33 std::cout <<
"[[EcalClusterLocalContCorrection::getValue]] " 34 << params_->params().size() <<
" parameters:";
35 for ( it = params_->params().begin(); it != params_->params().end(); ++it ) {
48 double correction_factor=1.;
61 if (
TMath::Abs(seedbclus->eta()) >1.4442 )
return 1.;
69 double Theta = -position_.theta()+0.5*
TMath::Pi();
70 double Eta = position_.eta();
71 double Phi = TVector2::Phi_mpi_pi(position_.phi());
75 const float X0 = 0.89;
const float T0 = 7.4;
76 double depth = X0 * (T0 +
log(seedbclus->energy()));
81 std::vector< std::pair<DetId, float> > crystals_vector = seedbclus->hitsAndFractions();
86 for (
unsigned int icry=0; icry!=crystals_vector.size(); ++icry) {
90 double EtaCentr = center_pos.
eta();
91 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
94 ietaclosest = crystal.
ieta();
96 if (
TMath::Abs(TVector2::Phi_mpi_pi(PhiCentr-Phi)) < dphimin) {
97 dphimin =
TMath::Abs(TVector2::Phi_mpi_pi(PhiCentr-Phi));
98 iphiclosest = crystal.
iphi();
101 EBDetId crystalseed(ietaclosest, iphiclosest);
109 if ( iphimod20 <=1 ) fphicor=1.;
112 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
114 double PhiCry = (TVector2::Phi_mpi_pi(Phi-PhiCentr))/PhiWidth;
115 if (PhiCry>0.5) PhiCry=0.5;
116 if (PhiCry<-0.5) PhiCry=-0.5;
118 if (ietaclosest<0) PhiCry *= -1.;
122 for (
int k=0;
k!=5; ++
k) g[
k] = (params_->params())[
k+5];
130 if (
TMath::Abs(ietaclosest) >24 && (ietamod20==5 || ietamod20==6) ) fetacor = 1.;
135 double ThetaWidth = (
TMath::Pi()/180.)*TMath::Cos(ThetaCentr);
136 double EtaCry = (Theta-ThetaCentr)/ThetaWidth;
137 if (EtaCry>0.5) EtaCry=0.5;
138 if (EtaCry<-0.5) EtaCry=-0.5;
140 if (ietaclosest<0) EtaCry *= -1.;
144 for (
int k=0;
k!=5; ++
k) f[
k] = (params_->params())[
k];
151 correction_factor = (params_->params())[10]/(fetacor*fphicor);
156 return correction_factor;
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Geom::Phi< T > phi() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Geom::Theta< T > theta() const
int iphi() const
get the crystal iphi
int ieta() const
get the crystal ieta
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
XYZPointD XYZPoint
point in space with cartesian internal representation
float getValue(const reco::BasicCluster &, const EcalRecHitCollection &) const override
#define DEFINE_EDM_PLUGIN(factory, type, name)
const CaloClusterPtr & seed() const
seed BasicCluster
Power< A, B >::type pow(const A &a, const B &b)