ATLAS Offline Software
Loading...
Searching...
No Matches
BenderDipole.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#include <iostream>
10
11namespace ForwardTracker {
12
13 BenderDipole::BenderDipole(Side side, double length, double strength, double beamEnergy, Bendplane bendplane):
14 m_side (side),
16 m_strength (strength),
17 m_beamEnergy(beamEnergy),
18 m_bendplane (bendplane)
19 {}
20
21 void BenderDipole::bend(IParticle& particle) const {
22
23 // Calculate (x, y) position and direction after deflection (charge dependent).
24 // Particle is at magnet front face and is moved to the rear face.
25
26 // -----------------------------------------------------------------------------------------
27 // m_strength = k0 = L/R = L*B*speedoflight/momentum = deflection angle[rad]
28 //
29 // Separation dipoles bring beams to collision from nominal separation (194mm = 2*0.097m)
30 // Main bending dipoles guide beams along the LHC arc (first @ ~270 m)
31 // MBXW separation dipoles (D1): 6 normal conducting (3.40m long, from 59.622m to 84.352m)
32 // MBRC separation dipoles (D2): 1 super conducting (9.45m long, from 153.175m to 162.625m)
33 // MB bending dipoles: 1232 super conducting (14.30m long, first @ ~270m)
34 //
35 // Special case: MB dipoles
36 // k0 = L/radiusLHC/fLHCfilled = (14.3 m)/(4300 m)/(0.8*22km/27km) = 0.0033/0.65 = 0.0051
37 // = L*B*speedoflight/momentum = (14.3 m)*(8.33 Tesla)*(3e8 m/s)/(7e12eV) = 0.0051
38 // = 2*pi/(number of dipoles) = 6.28/1232 = 0.0051
39 //
40 // Position and direction are in the LHC arc frame (relative to on-momentum particles)
41 // -> for on-momentum particles: direction=(0,0,0) and position=(0.097m,0,0) for z>155m
42 // -----------------------------------------------------------------------------------------
43
45 Point& direction = particle.direction_nc();
46 TransversePoint displacement = particle.displacement();
47
48 displacement += m_length*aside/direction[2]*direction.transverse(); // Linear drift
49
50 if (particle.charged()) { // Add effect of bending
51
52 double angleB_on = -m_strength; // Deflection of on-momentum particles (strength<0 => bend in)
53 double angleB_off = angleB_on*m_beamEnergy/particle.momentum(); // Deflection of off-momentum particles (momentum rescaling)
54 bool isMBdipole = (m_length > 10.); // MB dipoles are identified by their length (14.3 m)
55
56 displacement[m_bendplane] -= m_length*tan(aside*angleB_off/2);
57 displacement[m_bendplane] += m_length*tan(aside*angleB_on/2)*isMBdipole;
58
59 direction.rotat(angleB_off - angleB_on*isMBdipole, m_bendplane);
60 }
61
62 particle.updatePositionFromDisplacement(displacement);
63 }
64}
double length(const pvec &v)
void bend(IParticle &) const
BenderDipole(Side side, double length, double strength, double beamEnergy, Bendplane bendplane)
void rotat(double angle, bool bendplane)