ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
EMBAccordionDetails::Clockwork Class Reference
Collaboration diagram for EMBAccordionDetails::Clockwork:

Public Member Functions

int phiGap (double radius, double xhit, double yhit) const
 compute number (0 to 1023) of closest electrode according to nominal accordion geometry More...
 
void getRPhi ()
 initialization routine More...
 
double phi0 (double radius) const
 phi of first absorber as function of radius for nominal accordion geometry (before sagging). More...
 
double Distance_Ele (const double &x, const double &y, const int &PhiC, int &Num_Straight, const int &Num_Coude, double &xl)
 Compute the distance to the electrode. More...
 
double Distance_Abs (const double &x, const double &y, const int &nabs, const int &Num_Straight, const int &Num_Coude)
 Compute the distance to the absorber. More...
 

Public Attributes

double gam0
 
double Rmin
 
double Rmax
 
double dR
 
double Rphi [5000]
 
int NRphi
 
int Nbrt
 
int Nbrt1
 
double rint_eleFib
 
double delta [15]
 
double rc [15]
 
double phic [15]
 
double xc [15]
 
double yc [15]
 
double rMinAccordion
 
double rMaxAccordion
 
double zMinBarrel
 
double zMaxBarrel
 
double etaMaxBarrel
 
int NCellTot
 
int NCellMax
 
const GeoStraightAccSectionelectrodeStraightSection
 
const GeoStraightAccSectionabsorberStraightSection
 
ServiceHandle< StoreGateSvcdetStore {"DetectorStore","DetectorStore"}
 

Detailed Description

Definition at line 19 of file EMBAccordionDetails.cxx.

Member Function Documentation

◆ Distance_Abs()

double EMBAccordionDetails::Clockwork::Distance_Abs ( const double &  x,
const double &  y,
const int &  nabs,
const int &  Num_Straight,
const int &  Num_Coude 
)

Compute the distance to the absorber.

◆ Distance_Ele()

double EMBAccordionDetails::Clockwork::Distance_Ele ( const double &  x,
const double &  y,
const int &  PhiC,
int &  Num_Straight,
const int &  Num_Coude,
double &  xl 
)

Compute the distance to the electrode.

◆ getRPhi()

void EMBAccordionDetails::Clockwork::getRPhi ( )

initialization routine

Definition at line 77 of file EMBAccordionDetails.cxx.

78 {
79  const double dl=0.001;
80  const double inv_dl = 1 / dl;
81  double cenx[15],ceny[15];
82  double sum1[5000],sumx[5000];
83  NRphi=5000;
84  Rmin=1500.;
85  dR=0.10;
86  Rmax=0.;
87 
88  const double rint= rint_eleFib;
89  const double inv_rint = 1. / rint;
90  const double dt=dl * inv_rint;
91  const double inv_dt = 1. / dt;
92 
93  for (int i=0;i<NRphi;i++) {
94  sum1[i]=0.;
95  sumx[i]=0.;
96  }
97  for (int i=0;i<15;i++) {
98  cenx[i]=rc[i]*cos(phic[i]);
99  ceny[i]=rc[i]*sin(phic[i]);
100  }
101 
102  for (int i=0; i<15; i++) {
103 
104 // fold
105  double phi0,phi1;
106  if (i==0) {
107  phi0=-M_PI/2.;
108  phi1=-M_PI/2.+delta[0];
109  }
110  else if (i==14) {
111  phi0=-M_PI+delta[13];
112  phi1=-M_PI/2.;
113  }
114  else {
115  if (i%2==1) {
116  phi0=delta[i];
117  phi1=M_PI-delta[i-1];
118  }
119  else {
120  phi0=-M_PI+delta[i-1];
121  phi1=-delta[i];
122  }
123  }
124  int nstep=int((phi1-phi0) * inv_dt)+1;
125  for (int ii=0;ii<nstep;ii++) {
126  double phi=phi0+dt*((double)ii);
127  double x=cenx[i]+rint*cos(phi);
128  double y=ceny[i]+rint*sin(phi);
129  double radius=sqrt(x*x+y*y);
130  if (radius>Rmax) Rmax=radius;
131  double phid=atan(y/x);
132  int ir=((int) ((radius-Rmin)/dR) );
133  if (ir>=0 && ir < NRphi) {
134  sum1[ir]+=1.;
135  sumx[ir]+=phid;
136  }
137  }
138 
139 // straight section
140  if (i<14) {
141  double dx=cenx[i+1]-cenx[i];
142  double dy=ceny[i+1]-ceny[i];
143  double along=dx*dx+dy*dy-4.*rint*rint;
144  along=sqrt(along);
145  double x0=0.5*(cenx[i+1]+cenx[i]);
146  double y0=0.5*(ceny[i+1]+ceny[i]);
147  double phi;
148  if (i%2==0) phi=M_PI/2-delta[i];
149  else phi=-M_PI/2.+delta[i];
150  double x1=x0-0.5*along*cos(phi);
151  double y1=y0-0.5*along*sin(phi);
152  int nstep=int(along * inv_dl)+1;
153  for (int ii=0;ii<nstep;ii++) {
154  double x=x1+dl*((double)ii)*cos(phi);
155  double y=y1+dl*((double)ii)*sin(phi);
156  double radius=sqrt(x*x+y*y);
157  if (radius>Rmax) Rmax=radius;
158  double phid=atan(y/x);
159  int ir=((int) ((radius-Rmin)/dR) );
160  if (ir>=0 && ir < NRphi) {
161  sum1[ir]+=1.;
162  sumx[ir]+=phid;
163  }
164  }
165  }
166  }
167  for (int i=0; i<NRphi; i++) {
168  if (sum1[i]>0) {
169  Rphi[i]=sumx[i]/sum1[i];
170  }
171  else Rphi[i]=0.;
172  }
173 }

◆ phi0()

double EMBAccordionDetails::Clockwork::phi0 ( double  radius) const

phi of first absorber as function of radius for nominal accordion geometry (before sagging).

Definition at line 279 of file EMBAccordionDetails.cxx.

280 {
281  int ir;
282  if (radius < Rmin) ir=0;
283  else {
284  if (radius > Rmax) radius=Rmax-0.0001;
285  ir=((int) ((radius-Rmin)/dR) );
286  }
287  return Rphi[ir];
288 }

◆ phiGap()

int EMBAccordionDetails::Clockwork::phiGap ( double  radius,
double  xhit,
double  yhit 
) const

compute number (0 to 1023) of closest electrode according to nominal accordion geometry

Definition at line 179 of file EMBAccordionDetails.cxx.

180 {
181  const double m2pi = 2.0*Gaudi::Units::pi;
182  double phi_0=phi0(radius)+gam0; // from -M_PI to M_PI
183  double phi_hit=atan2(yhit,xhit); // from -M_PI to M_PI
184  double dphi=phi_hit-phi_0;
185 // bring back to 0-2pi
186  if (dphi<0) dphi=dphi+m2pi;
187  if (dphi>=m2pi) dphi=dphi-m2pi;
188  dphi=dphi*(1024/m2pi);
189  int ngap=((int) dphi);
190  return ngap;
191 }

Member Data Documentation

◆ absorberStraightSection

const GeoStraightAccSection* EMBAccordionDetails::Clockwork::absorberStraightSection

Definition at line 72 of file EMBAccordionDetails.cxx.

◆ delta

double EMBAccordionDetails::Clockwork::delta[15]

Definition at line 58 of file EMBAccordionDetails.cxx.

◆ detStore

ServiceHandle<StoreGateSvc> EMBAccordionDetails::Clockwork::detStore {"DetectorStore","DetectorStore"}

Definition at line 74 of file EMBAccordionDetails.cxx.

◆ dR

double EMBAccordionDetails::Clockwork::dR

Definition at line 52 of file EMBAccordionDetails.cxx.

◆ electrodeStraightSection

const GeoStraightAccSection* EMBAccordionDetails::Clockwork::electrodeStraightSection

Definition at line 71 of file EMBAccordionDetails.cxx.

◆ etaMaxBarrel

double EMBAccordionDetails::Clockwork::etaMaxBarrel

Definition at line 67 of file EMBAccordionDetails.cxx.

◆ gam0

double EMBAccordionDetails::Clockwork::gam0

Definition at line 49 of file EMBAccordionDetails.cxx.

◆ Nbrt

int EMBAccordionDetails::Clockwork::Nbrt

Definition at line 55 of file EMBAccordionDetails.cxx.

◆ Nbrt1

int EMBAccordionDetails::Clockwork::Nbrt1

Definition at line 56 of file EMBAccordionDetails.cxx.

◆ NCellMax

int EMBAccordionDetails::Clockwork::NCellMax

Definition at line 69 of file EMBAccordionDetails.cxx.

◆ NCellTot

int EMBAccordionDetails::Clockwork::NCellTot

Definition at line 68 of file EMBAccordionDetails.cxx.

◆ NRphi

int EMBAccordionDetails::Clockwork::NRphi

Definition at line 54 of file EMBAccordionDetails.cxx.

◆ phic

double EMBAccordionDetails::Clockwork::phic[15]

Definition at line 60 of file EMBAccordionDetails.cxx.

◆ rc

double EMBAccordionDetails::Clockwork::rc[15]

Definition at line 59 of file EMBAccordionDetails.cxx.

◆ rint_eleFib

double EMBAccordionDetails::Clockwork::rint_eleFib

Definition at line 57 of file EMBAccordionDetails.cxx.

◆ Rmax

double EMBAccordionDetails::Clockwork::Rmax

Definition at line 51 of file EMBAccordionDetails.cxx.

◆ rMaxAccordion

double EMBAccordionDetails::Clockwork::rMaxAccordion

Definition at line 64 of file EMBAccordionDetails.cxx.

◆ Rmin

double EMBAccordionDetails::Clockwork::Rmin

Definition at line 50 of file EMBAccordionDetails.cxx.

◆ rMinAccordion

double EMBAccordionDetails::Clockwork::rMinAccordion

Definition at line 63 of file EMBAccordionDetails.cxx.

◆ Rphi

double EMBAccordionDetails::Clockwork::Rphi[5000]

Definition at line 53 of file EMBAccordionDetails.cxx.

◆ xc

double EMBAccordionDetails::Clockwork::xc[15]

Definition at line 61 of file EMBAccordionDetails.cxx.

◆ yc

double EMBAccordionDetails::Clockwork::yc[15]

Definition at line 62 of file EMBAccordionDetails.cxx.

◆ zMaxBarrel

double EMBAccordionDetails::Clockwork::zMaxBarrel

Definition at line 66 of file EMBAccordionDetails.cxx.

◆ zMinBarrel

double EMBAccordionDetails::Clockwork::zMinBarrel

Definition at line 65 of file EMBAccordionDetails.cxx.


The documentation for this class was generated from the following file:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TestSUSYToolsAlg.dl
dl
Definition: TestSUSYToolsAlg.py:81
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
M_PI
#define M_PI
Definition: ActiveFraction.h:11
EMBAccordionDetails::Clockwork::rint_eleFib
double rint_eleFib
Definition: EMBAccordionDetails.cxx:57
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
x
#define x
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
pi
#define pi
Definition: TileMuonFitter.cxx:65
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
EMBAccordionDetails::Clockwork::rc
double rc[15]
Definition: EMBAccordionDetails.cxx:59
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
EMBAccordionDetails::Clockwork::Rmin
double Rmin
Definition: EMBAccordionDetails.cxx:50
EMBAccordionDetails::Clockwork::NRphi
int NRphi
Definition: EMBAccordionDetails.cxx:54
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
MuonR4::SegmentFit::ParamDefs::x0
@ x0
EMBAccordionDetails::Clockwork::dR
double dR
Definition: EMBAccordionDetails.cxx:52
MuonR4::SegmentFit::ParamDefs::y0
@ y0
EMBAccordionDetails::Clockwork::phi0
double phi0(double radius) const
phi of first absorber as function of radius for nominal accordion geometry (before sagging).
Definition: EMBAccordionDetails.cxx:279
EMBAccordionDetails::Clockwork::Rmax
double Rmax
Definition: EMBAccordionDetails.cxx:51
EMBAccordionDetails::Clockwork::gam0
double gam0
Definition: EMBAccordionDetails.cxx:49
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
y
#define y
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
EMBAccordionDetails::Clockwork::delta
double delta[15]
Definition: EMBAccordionDetails.cxx:58
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
EMBAccordionDetails::Clockwork::phic
double phic[15]
Definition: EMBAccordionDetails.cxx:60
EMBAccordionDetails::Clockwork::Rphi
double Rphi[5000]
Definition: EMBAccordionDetails.cxx:53