CMS 3D CMS Logo

Functions | Variables
eopUtils Namespace Reference

Functions

float ecalEta (float EtaParticle, float Zvertex, float RhoVertex)
 

Variables

static constexpr float etaBarrelEndcap = 1.479
 
static constexpr float R_ECAL = 136.5
 
static constexpr float Z_Endcap = 328.0
 

Function Documentation

◆ ecalEta()

float eopUtils::ecalEta ( float  EtaParticle,
float  Zvertex,
float  RhoVertex 
)

Definition at line 189 of file EopElecTreeWriter.cc.

References ETA, etaBarrelEndcap, dqm-mbProfile::log, M_PI, R_ECAL, funct::tan(), and Z_Endcap.

Referenced by EopElecTreeWriter::analyze().

189  {
190  if (EtaParticle != 0.) {
191  float Theta = 0.0;
192  float ZEcal = (R_ECAL - RhoVertex) * sinh(EtaParticle) + Zvertex;
193 
194  if (ZEcal != 0.0)
195  Theta = atan(R_ECAL / ZEcal);
196  if (Theta < 0.0)
197  Theta = Theta + M_PI;
198 
199  float ETA = -log(tan(0.5 * Theta));
200 
201  if (fabs(ETA) > etaBarrelEndcap) {
202  float Zend = Z_Endcap;
203  if (EtaParticle < 0.0)
204  Zend = -Zend;
205  float Zlen = Zend - Zvertex;
206  float RR = Zlen / sinh(EtaParticle);
207  Theta = atan((RR + RhoVertex) / Zend);
208  if (Theta < 0.0)
209  Theta = Theta + M_PI;
210  ETA = -log(tan(0.5 * Theta));
211  }
212  return ETA;
213  } else {
214  edm::LogWarning("") << "[EcalPositionFromTrack::etaTransformation] Warning: Eta equals to zero, not correcting";
215  return EtaParticle;
216  }
217  }
static constexpr float R_ECAL
#define ETA
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static constexpr float etaBarrelEndcap
#define M_PI
Log< level::Warning, false > LogWarning
static constexpr float Z_Endcap

Variable Documentation

◆ etaBarrelEndcap

constexpr float eopUtils::etaBarrelEndcap = 1.479
static

Definition at line 186 of file EopElecTreeWriter.cc.

◆ R_ECAL

constexpr float eopUtils::R_ECAL = 136.5
static

Definition at line 184 of file EopElecTreeWriter.cc.

◆ Z_Endcap

constexpr float eopUtils::Z_Endcap = 328.0
static

Definition at line 185 of file EopElecTreeWriter.cc.