ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CscParabola Class Reference

#include <CscParabola.h>

Collaboration diagram for CscParabola:

Public Member Functions

 CscParabola ()
 
void cscParabola (const double *qstr, int &NStrip, double &thr, double &da, int &ncl, double *sig, double *zpos, double &noise)
 

Private Attributes

IMessageSvc * m_msgSvc
 

Detailed Description

Definition at line 19 of file CscParabola.h.

Constructor & Destructor Documentation

◆ CscParabola()

CscParabola::CscParabola ( )

Definition at line 19 of file CscParabola.cxx.

19  {
20  m_msgSvc = nullptr;
21  ISvcLocator* svcLocator = Gaudi::svcLocator();
22  StatusCode sc = svcLocator->service("MessageSvc", m_msgSvc);
23  if (sc.isFailure()) std::cout << "CscParabola::Fail to locate Message Service" << std::endl;
24 }

Member Function Documentation

◆ cscParabola()

void CscParabola::cscParabola ( const double *  qstr,
int &  NStrip,
double &  thr,
double &  da,
int &  ncl,
double *  sig,
double *  zpos,
double &  noise 
)

Find the hits and calculate the positions and the errors on the positions

Look for peaks above the clustering threshold:

Dead strip in the middle of the cluster will mess up the the cluster, but those clusters don't reconstruct well, anyway

These are transverse (phi) hits: charge interpolation not possible Add clusters at the edge of the chamber: This is only meaningful for transverse strips, since they have no charge interpolation.

The strip with the highest charge defines the position of the cluster:

now offer the maxPos result as the only result:

The strip with the highest charge defines the position of the cluster:

The parabola method for position interpolation: The constants are from test beam and may need adjustment

now offer the maxPos, the parabola method and the center of gravity this selection is made in the CscClusterization algorithm

Definition at line 26 of file CscParabola.cxx.

26  {
27  MsgStream mLog(m_msgSvc, "CscParabola");
28 
30 
31  int clusters[96]; // stores the peak channel for each hit.
32  ncl = 0; // number of clusters
33 
38 
39  for (int ch = 1; ch < NStrip - 1; ch++) { // loop over channels
40  if (qstr[ch] > thr) { // there is activity above threshold
41  if ((qstr[ch] > qstr[ch - 1]) && (qstr[ch] > qstr[ch + 1])) { // this is a peak
42  clusters[ncl] = ch; // store the peak channel number
43  ncl++; // count clusters
44  }
45  }
46  } // next channel
47 
48  int L = NStrip; // should be 192 or 48, is used for position relative to center of chamber
49 
50  if (L < 96) { // actually L=48 for the transverse strips.
54  if ((qstr[0] > qstr[1]) && (qstr[0] > thr)) {
55  clusters[ncl] = 0; // store the peak channel number
56  ncl++;
57  }
58  if ((qstr[L - 1] > qstr[L - 2]) && (qstr[L - 1] > thr)) {
59  clusters[ncl] = L - 1; // store the peak channel number
60  ncl++;
61  }
62  // Loop over clusters and calculate their position:
63  for (int ic = 0; ic < ncl; ic++) {
64  int maxStrip = clusters[ic]; // strip with the peak charge
65  double maxPos; // position of that strip
66 
69  maxPos = da * (maxStrip + 0.5 - L / 2); // position of peak channel relative to center of chamber
70 
72  *(zpos + ic * 3) = maxPos; // just the peak channel
73  *(zpos + ic * 3 + 1) = maxPos;
74  *(zpos + ic * 3 + 2) = maxPos;
75  *(sig + ic) = da / sqrt(12.0); // independent of charge.
76  } // next cluster
77 
78  } else { // this is the case for the precision strips
79  // Loop over clusters and calculate their position:
80  for (int ic = 0; ic < ncl; ic++) {
81  int maxStrip = clusters[ic]; // strip with the peak charge
82  double maxPos; // position of that strip
83 
86  maxPos = da * (maxStrip + 0.5 - L / 2); // position of peak channel relative to center of chamber
87 
90  double a = qstr[maxStrip - 1]; // left charge
91  double b = qstr[maxStrip]; // center charge
92  double c = qstr[maxStrip + 1]; // right charge
93  double x = 0.5 * (a - c) / (a + c - 2 * b); // peak position of a parabola through the 3 points (-1,a), (0,b), (1,c).
94  double p = 3.24610e-01 * atan(8.19201 * x) + 1.36329e-01 * x; // corrected pos. in strip width from -0.5 to 0.5
95 
98  //*(zpos+ic) = maxPos; // just the peak channel
99  *(zpos + ic) = maxPos + da * p; // parabola interpolation
100  //*(zpos+ic) = maxPos + da* (c-a)/(a+b+c); // uncorrected center of gravity
101  *(sig + ic) = da / 5000 * 75; // 75 micron eror, 5mm strip pitch, independent of charge.
102 
103  // future improvement:
104  // check distance to other hits and increase errors for close hits.
105 
106  /*****************************************
107  The error of maxPos alone would be
108  *(sig+ic) = da/sqrt(12.0);
109  *****************************************/
110  } // next ic
111  } // if L>96
112 }

Member Data Documentation

◆ m_msgSvc

IMessageSvc* CscParabola::m_msgSvc
private

Definition at line 31 of file CscParabola.h.


The documentation for this class was generated from the following files:
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
CscParabola::m_msgSvc
IMessageSvc * m_msgSvc
Definition: CscParabola.h:31
x
#define x
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
python.BuildSignatureFlags.sig
sig
Definition: BuildSignatureFlags.py:215
grepfile.ic
int ic
Definition: grepfile.py:33
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
dumpNswErrorDb.maxStrip
tuple maxStrip
Definition: dumpNswErrorDb.py:27
a
TList * a
Definition: liststreamerinfos.cxx:10
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
python.compressB64.c
def c
Definition: compressB64.py:93