CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCGattiFunction Class Reference

#include <CSCGattiFunction.h>

Public Member Functions

double binValue (double x, double stripWidth) const
 
 CSCGattiFunction ()
 
void initChamberSpecs (const CSCChamberSpecs &)
 Calculates k1, k2, k3, h per chamber type, if necessary. More...
 

Private Attributes

double h
 
double k1
 
double k2
 
double k3
 
double norm
 
double sqrtk3
 
const CSCChamberSpecsthePreviousSpecs
 

Detailed Description

Represent functional form of charge distribution over strips in Endcap Muon CSC's.

Author
Rick Wilkinson

This is required in building RecHits from strips in CSCRecHit and for distributing charge over strips in CSCDigitizer.

It was ported from FORTRAN in CMSISM to C++ in ORCA and then CMSSW.

Function: describes the cathode signal using
the single-parameter Gatti formula:

1 - tanh(K_2 * lambda)**2
Gamma(lambda) = K_1 * -------------------------------
1 + K_3 * tanh (K_2 *lambda)**2
lambda = x/h, h is anode cathode spacing
K_2 = pi/2*(1 - 0.5*sqrt(K_3))
K_2*sqrt(K_3)
K_1 = -------------------
4 * atan(sqrt(K_3))
References : E.Gatti, A.Longoni, NIM 163 (1979) 82-93.
For K_3, "It is used parametrization from Fig.2 from E.Mathieson
J.S.Gordon, "Cathode charge distributions in multi-
wire chambers", NIM 227 (1984) 277-282"
(comment from GATTI3 in cmsim/src/mc_uty/.)

Definition at line 42 of file CSCGattiFunction.h.

Constructor & Destructor Documentation

◆ CSCGattiFunction()

CSCGattiFunction::CSCGattiFunction ( )

Definition at line 9 of file CSCGattiFunction.cc.

9 : k1(0.), k2(0.), k3(0.), h(0.), norm(0.), sqrtk3(0.), thePreviousSpecs(nullptr) {}

Member Function Documentation

◆ binValue()

double CSCGattiFunction::binValue ( double  x,
double  stripWidth 
) const

Returns the fraction of charge on a strip centered a distance of x away from the center of the shower, at zero. Note that the user is responsible for making sure the constants have been initialized using the chamber specs.

Definition at line 30 of file CSCGattiFunction.cc.

30  {
31  double tanh1 = tanh(k2 * (x + stripWidth * 0.5) / h);
32  double tanh2 = tanh(k2 * (x - stripWidth * 0.5) / h);
33  return norm * (std::atan(sqrtk3 * tanh1) - std::atan(sqrtk3 * tanh2));
34 }

References k2, norm, sqrtk3, and x.

Referenced by CSCStripHitSim::simulate().

◆ initChamberSpecs()

void CSCGattiFunction::initChamberSpecs ( const CSCChamberSpecs chamberSpecs)

Calculates k1, k2, k3, h per chamber type, if necessary.

Definition at line 11 of file CSCGattiFunction.cc.

11  {
12  if (&chamberSpecs != thePreviousSpecs) {
13  LogTrace("CSCGattiFunction") << "CSCGattiFunction::initChamberSpecs setting new values.";
14  h = chamberSpecs.anodeCathodeSpacing();
15  double s = chamberSpecs.wireSpacing();
16  double ra = chamberSpecs.wireRadius();
17  static const double parm[5] = {.1989337e-02, -.6901542e-04, .8665786, 154.6177, -.6801630e-03};
18  k3 = (parm[0] * s / h + parm[1]) * (parm[2] * s / ra + parm[3] + parm[4] * s * s / ra / ra);
19  sqrtk3 = sqrt(k3);
20  norm = 0.5 / std::atan(sqrtk3);
21  k2 = M_PI_2 * (1. - sqrtk3 / 2.);
22  k1 = 0.25 * k2 * sqrtk3 / std::atan(sqrtk3);
23  thePreviousSpecs = &chamberSpecs;
24  }
25 
26  LogTrace("CSCGattiFunction") << "CSCGattiFunction: constants k1=" << k1 << ", k2=" << k2 << ", k3=" << k3
27  << ", h=" << h << ", norm=" << norm;
28 }

References CSCChamberSpecs::anodeCathodeSpacing(), k1, k2, k3, LogTrace, M_PI_2, norm, alignCSCRings::s, mathSSE::sqrt(), sqrtk3, thePreviousSpecs, CSCChamberSpecs::wireRadius(), and CSCChamberSpecs::wireSpacing().

Referenced by CSCStripHitSim::simulate().

Member Data Documentation

◆ h

double CSCGattiFunction::h
private

Definition at line 56 of file CSCGattiFunction.h.

◆ k1

double CSCGattiFunction::k1
private

Definition at line 56 of file CSCGattiFunction.h.

Referenced by initChamberSpecs().

◆ k2

double CSCGattiFunction::k2
private

Definition at line 56 of file CSCGattiFunction.h.

Referenced by binValue(), and initChamberSpecs().

◆ k3

double CSCGattiFunction::k3
private

Definition at line 56 of file CSCGattiFunction.h.

Referenced by initChamberSpecs().

◆ norm

double CSCGattiFunction::norm
private

Definition at line 57 of file CSCGattiFunction.h.

Referenced by binValue(), and initChamberSpecs().

◆ sqrtk3

double CSCGattiFunction::sqrtk3
private

Definition at line 57 of file CSCGattiFunction.h.

Referenced by binValue(), and initChamberSpecs().

◆ thePreviousSpecs

const CSCChamberSpecs* CSCGattiFunction::thePreviousSpecs
private

Definition at line 59 of file CSCGattiFunction.h.

Referenced by initChamberSpecs().

DDAxes::x
CSCChamberSpecs::wireRadius
float wireRadius() const
Definition: CSCChamberSpecs.h:159
CSCChamberSpecs::wireSpacing
float wireSpacing() const
Definition: CSCChamberSpecs.cc:175
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CSCGattiFunction::k2
double k2
Definition: CSCGattiFunction.h:56
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
h
CSCGattiFunction::k3
double k3
Definition: CSCGattiFunction.h:56
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
CSCGattiFunction::norm
double norm
Definition: CSCGattiFunction.h:57
recoMuon::in
Definition: RecoMuonEnumerators.h:6
A
CSCGattiFunction::thePreviousSpecs
const CSCChamberSpecs * thePreviousSpecs
Definition: CSCGattiFunction.h:59
chambers
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
trackerHitRTTI::multi
Definition: trackerHitRTTI.h:14
CSCGattiFunction::sqrtk3
double sqrtk3
Definition: CSCGattiFunction.h:57
M_PI_2
#define M_PI_2
Definition: CSCGattiFunction.cc:6
pi
const Double_t pi
Definition: trackSplitPlot.h:36
CSCGattiFunction::k1
double k1
Definition: CSCGattiFunction.h:56
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
CSCChamberSpecs::anodeCathodeSpacing
float anodeCathodeSpacing() const
Definition: CSCChamberSpecs.h:136
CSCGattiFunction::h
double h
Definition: CSCGattiFunction.h:56