ATLAS Offline Software
MagnetData.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/MagnetData.h"
7 namespace FPTracker{
8 
10  magnet_x (std::vector< std::vector<double> >(nside, std::vector<double>())),
11  magnet_y (std::vector< std::vector<double> >(nside, std::vector<double>())),
12  magnet_z (std::vector< std::vector<double> >(nside, std::vector<double>())),
13  magnet_length (std::vector< std::vector<double> >(nside, std::vector<double>())),
14  magnet_strength (std::vector< std::vector<double> >(nside, std::vector<double>())),
15  magnet_xb (std::vector< std::vector<double> >(nside, std::vector<double>())),
16  magnet_aperA (std::vector< std::vector<std::vector<double> > >(nside,
17  std::vector< std::vector<double> >(nmagapergeo,
18  std::vector<double>()
19  )
20  )
21  ),
22 
23  magnet_type (std::vector< std::vector<int> >(nside, std::vector<int>())),
24  magnet_aperclass(std::vector< std::vector<int> >(nside, std::vector<int>())){
25 
26  nmagnet = 0;
27 
28  x0IP = 0;
29  y0IP = 0;
30  ax0IP = 0;
31  ay0IP = 0;
32  }
33 
34 
36  for(int is = 0; is<nside; ++is){
37  magnet_x [is].reserve(nmags);
38  magnet_y [is].reserve(nmags);
39  magnet_z [is].reserve(nmags);
40  magnet_length [is].reserve(nmags);
41  magnet_strength [is].reserve(nmags);
42  magnet_xb [is].reserve(nmags);
43  magnet_type [is].reserve(nmags);
44  magnet_aperclass[is].reserve(nmags);
45 
46  for(int ig = 0; ig<nmagapergeo; ++ig){magnet_aperA[is][ig].reserve(nmags); }
47  }
48  nmagnet = nmags;
49 
50  }
51 
52  std::string MagnetData::toString() const{
53  std::string total = "\n\n------------ MagnetData ----------\n\n";
54  total += "\nmagnet_x:\n";
55  total += array2DToString(magnet_x);
56  total += "\nmagnet_y:\n";
57  total += array2DToString(magnet_y);
58  total += "\nmagnet_z:\n";
59  total += array2DToString(magnet_z);
60  total += "\nmagnet_length:\n";
62  total += "\nmagnet_strength:\n";
64  total += "\nmagnet_xb:\n";
65  total += array2DToString(magnet_xb);
66  total += "\nmagnet_type:\n";
67  total += array2DToString(magnet_type);
68  total += "\nmagnet_aperclass:\n";
70  total += "\nmagnet_aperA:\n";
71  total += array3DToString(magnet_aperA);
72  return total;
73 
74  }
75  std::ostream& operator<<(std::ostream& os, const MagnetData& md){
76  os<<md.toString();
77  return os;
78  }
79 }
80 
FPTracker::MagnetData::toString
std::string toString() const
Definition: MagnetData.cxx:52
FPTracker::MagnetData::x0IP
float x0IP
Definition: MagnetData.h:35
FPTracker::MagnetData
Definition: MagnetData.h:11
FPTracker::operator<<
std::ostream & operator<<(std::ostream &os, const Beamline &bl)
Definition: FPTracker/src/Beamline.cxx:163
FPTracker::MagnetData::magnet_xb
ArrayDouble2D magnet_xb
Definition: MagnetData.h:26
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MagnetData.h
FPTracker::MagnetData::magnet_length
ArrayDouble2D magnet_length
Definition: MagnetData.h:24
FPTracker::MagnetData::MagnetData
MagnetData()
Definition: MagnetData.cxx:9
FPTracker::MagnetData::magnet_aperA
ArrayDouble3D magnet_aperA
Definition: MagnetData.h:28
FPTracker::MagnetData::ay0IP
float ay0IP
Definition: MagnetData.h:38
FPTracker::MagnetData::magnet_z
ArrayDouble2D magnet_z
Definition: MagnetData.h:23
FPTracker::MagnetData::magnet_y
ArrayDouble2D magnet_y
Definition: MagnetData.h:22
FPTracker::MagnetData::magnet_aperclass
ArrayInt2D magnet_aperclass
Definition: MagnetData.h:31
FPTracker::MagnetData::magnet_x
ArrayDouble2D magnet_x
Definition: MagnetData.h:21
FPTracker::array2DToString
std::string array2DToString(const Array2D &arr)
Definition: DataDumperHelpers.h:43
vector
Definition: MultiHisto.h:13
FPTracker::MagnetData::nmagapergeo
static const int nmagapergeo
Definition: MagnetData.h:15
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
FPTracker::MagnetData::ax0IP
float ax0IP
Definition: MagnetData.h:37
FPTracker::MagnetData::nside
static const int nside
Definition: MagnetData.h:14
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
FPTracker::MagnetData::nmagnet
int nmagnet
Definition: MagnetData.h:13
FPTracker::MagnetData::setNumberOfMagnets
void setNumberOfMagnets(int)
Definition: MagnetData.cxx:35
FPTracker::array3DToString
std::string array3DToString(const Array3D &arr)
Definition: DataDumperHelpers.h:56
FPTracker::MagnetData::magnet_type
ArrayInt2D magnet_type
Definition: MagnetData.h:30
DataDumperHelpers.h
FPTracker
Definition: FPTracker/FPTracker/Beamline.h:12
FPTracker::MagnetData::magnet_strength
ArrayDouble2D magnet_strength
Definition: MagnetData.h:25
FPTracker::MagnetData::y0IP
float y0IP
Definition: MagnetData.h:36