ATLAS Offline Software
ForwardDetectors
FPTracker
src
magnetStrength.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
FPTracker/magnetStrength.h
"
6
#include <cassert>
7
namespace
FPTracker
{
8
double
magnetStrength
(
int
type
,
double
length
,
double
strength,
double
brho) {
9
// calculate qpole gradient from formula g = K1L brho /L
10
// K1L from CERN database
11
// brho = 23349. = 3.345*7000 - now pbeam0/speedOflight (12//11/09)
12
// L = mag length
13
14
assert(
type
>=0 and
type
<5);
15
16
if
(
type
==0 ||
type
==4)
return
strength;
17
strength = brho*strength/
length
;
18
19
if
(
type
== 1){
return
strength;}
20
if
(
type
== 2){
return
-strength;}
21
//itype == 3 only remains....
22
return
strength >=0. ? strength:-strength;
23
24
// strength = bend angle for dipoles, -> gradient for quadrupoles
25
// type = 0 for dipole,
26
// 1 for hor focussing qpoles,
27
// 2 for vert focussing qpoles.
28
}
29
}
magnetStrength.h
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
FPTracker
Definition:
FPTracker/FPTracker/Beamline.h:12
FPTracker::magnetStrength
double magnetStrength(int type, double length, double strength, double Brho)
Definition:
magnetStrength.cxx:8
length
double length(const pvec &v)
Definition:
FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
Generated on Tue Dec 24 2024 21:14:03 for ATLAS Offline Software by
1.8.18