33 EcalFunctionParameters::const_iterator it;
34 std::cout <<
"[[EcalClusterCrackCorrectionBaseClass::getValue]] " 49 double correction_factor=1.;
70 double Theta = -position_.theta()+0.5*
TMath::Pi();
71 double Eta = position_.eta();
72 double Phi = TVector2::Phi_mpi_pi(position_.phi());
76 const float X0 = 0.89;
const float T0 = 7.4;
82 std::vector< std::pair<DetId, float> > crystals_vector = seedbclus.
hitsAndFractions();
87 for (
unsigned int icry=0; icry!=crystals_vector.size(); ++icry) {
91 double EtaCentr = center_pos.
eta();
92 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
95 ietaclosest = crystal.
ieta();
97 if (
TMath::Abs(TVector2::Phi_mpi_pi(PhiCentr-Phi)) < dphimin) {
98 dphimin =
TMath::Abs(TVector2::Phi_mpi_pi(PhiCentr-Phi));
99 iphiclosest = crystal.
iphi();
102 EBDetId crystalseed(ietaclosest, iphiclosest);
109 if (ietaclosest<0) iphiclosest = 361 - iphiclosest;
110 int iphimod20 = iphiclosest%20;
111 if ( iphimod20 >1 ) fphicor=1.;
114 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
116 double PhiCry = (TVector2::Phi_mpi_pi(Phi-PhiCentr))/PhiWidth;
117 if (PhiCry>0.5) PhiCry=0.5;
118 if (PhiCry<-0.5) PhiCry=-0.5;
120 if (ietaclosest<0) PhiCry *= -1.;
124 int offset = iphimod20==0 ?
134 int ietamod20 = ietaclosest%20;
140 double ThetaWidth = (
TMath::Pi()/180.)*TMath::Cos(ThetaCentr);
141 double EtaCry = (Theta-ThetaCentr)/ThetaWidth;
142 if (EtaCry>0.5) EtaCry=0.5;
143 if (EtaCry<-0.5) EtaCry=-0.5;
145 if (ietaclosest<0) EtaCry *= -1.;
158 correction_factor = 1./(fetacor*fphicor);
162 return correction_factor;
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
const math::XYZPoint & position() const
cluster centroid position
Geom::Phi< T > phi() const
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
float getValue(const reco::BasicCluster &, const EcalRecHitCollection &) const override
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
double eta() const
pseudorapidity of cluster centroid
const EcalClusterCrackCorrParameters * params_
Geom::Theta< T > theta() const
int iphi() const
get the crystal iphi
const edm::EventSetup * es_
EcalFunctionParameters & params()
double energy() const
cluster energy
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
#define DEFINE_EDM_PLUGIN(factory, type, name)
const CaloClusterPtr & seed() const
seed BasicCluster
Power< A, B >::type pow(const A &a, const B &b)