ATLAS Offline Software
ALFA_BeamTransport.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // ALFA_BeamTransport.cxx, (c) ATLAS Detector software
8 
9 #include "ALFA_BeamTransport.h"
10 #include "StoreGate/StoreGateSvc.h"
11 
12 
13 
15 #include "GaudiKernel/ServiceHandle.h"
16 
17 // FrameWork includes
18 #include "GaudiKernel/ITHistSvc.h"
19 #include "Gaudi/Property.h"
20 
21 
22 #include "AtlasHepMC/GenEvent.h"
24 #include "AtlasHepMC/GenParticle.h"
26 
27 //ROOT headers
28 #include "TFile.h"
29 #include "TH1.h"
30 #include "TString.h"
31 
32 
33 #include <iostream>
34 #include <vector>
35 
36 //================ Constructor =================================================
37 
38 ALFA_BeamTransport::ALFA_BeamTransport(const std::string& name, ISvcLocator* pSvcLocator)
39  :
40  AthAlgorithm(name,pSvcLocator)
41 {
42  declareProperty("ConfDir", m_FPConfig.ConfDir="./config");
43  declareProperty("UseALFA", m_FPConfig.UseALFA=true);
44  declareProperty("Debug", m_WriteDebugOutput=false);
45  declareProperty("IP",m_FPConfig.IP = 1);
46  declareProperty("UseAper",m_FPConfig.useaper = true);
47  declareProperty("apermb",m_FPConfig.apermb = 0.);
48  declareProperty("xcol1",m_FPConfig.xcol1 = 999.);//999e-4 but we need open collimators
49  declareProperty("xcol2",m_FPConfig.xcol2 = 999.);//999e-4
50  declareProperty("BeamEnergy",m_FPConfig.pbeam0 = 7000.);//beam energy
51  declareProperty("RPDistance",m_FPConfig.RPDistance = 237.398);
52  declareProperty("absZMagMax",m_FPConfig.absZMagMax = 500.);//dont read magnets after this value
53 
54  //Cuts for production
55  declareProperty("EtaCut",m_EtaCut = 8.);
56  declareProperty("XiCut",m_XiCut = 0.2);
57 
58  declareProperty("FPOutputBeam1", m_FPOutputBeam1="Beam1");
59  declareProperty("FPOutputBeam2", m_FPOutputBeam2="Beam2");
60 
61 }
62 
63 //================ Destructor =================================================
64 
66 {}
67 
68 
69 //================ Initialisation =================================================
70 
72 {
73  ATH_MSG_INFO("Initializing " << name() << "...");
76  // open files for beamtracking output
77  // string in char
78  char* cBeam1Name = new char[m_FPOutputBeam1.length()];
79  strcpy(cBeam1Name, m_FPOutputBeam1.c_str());
80  char* cBeam2Name = new char[m_FPOutputBeam2.length()];
81  strcpy(cBeam2Name, m_FPOutputBeam2.c_str());
82 
83  if (m_WriteDebugOutput) {
84  m_FileBeam1.open(cBeam1Name);
85  m_FileBeam2.open(cBeam2Name);
86  }
87 
88  //delete char arrays
89  delete[] cBeam1Name;
90  delete[] cBeam2Name;
91 
92  //Initialisation of FPTracker
93  m_BeamTracker.ALFA_BeamTrack::initialize(m_FPConfig);
94 
95  //-----------------------------------------------------------------------------------------
96  ATH_MSG_INFO( name() << " initialize()" );
97  ATH_MSG_INFO( "initialize() successful in " << name() );
98  return StatusCode::SUCCESS;
99 }
100 
101 //================ Finalisation =================================================
102 
104 {
105  // close outputfiles for FPTracker
106  if (m_WriteDebugOutput) {
107  m_FileBeam1.close();
108  m_FileBeam2.close();
109  }
110  // Code entered here will be executed once at the end of the program run.
111  return StatusCode::SUCCESS;
112 }
113 
114 //================ Execution ====================================================
115 
117 {
118  // Code entered here will be executed once per event
119  ATH_MSG_DEBUG ("Executing " << name() << "...");
120  //-----------------------------------------------------------------------------------------
121  int run_number;
122  uint64_t evt_number;
123 
124  //Set particles counter to zero!
125  //counter for particles marked as outgoing in event record
126  m_pcount=0;
127  //counter for particles marked as incomming in event record
128  m_pint=0;
129 
130  //Load event info
131  SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey,getContext());
132  if(!eventInfo.isValid()) {
133  ATH_MSG_ERROR("Could not retrieve EventInfo");
134  return StatusCode::FAILURE;
135  }
136  else {
137  run_number=eventInfo->runNumber();
138  evt_number=eventInfo->eventNumber();
139 
140  ATH_MSG_DEBUG("run: " << run_number << " event: " << evt_number);
141  }
142 
143  SG::ReadHandle<McEventCollection> mcColl(m_MCKey, getContext());
144  if (!mcColl.isValid()) {
145  ATH_MSG_WARNING("Could not retrieve McEventCollection: " << m_MCKey);
146  return StatusCode::SUCCESS;
147  }
148  // Loop over all events in McEventCollectio
149  ATH_MSG_INFO("successful load of HepMC info");
150  for (const HepMC::GenEvent* itr : *mcColl){
151  HepMC::GenEvent evt = (*itr);
152  // convert unit MeV to GeV for energy and momenta
153  MeVToGeV(evt);
154 
155  HepMC::Print::line(std::cout, evt);
156 
157  // Select final state particle from event generator
158  // set event status !=1 (final state)
159  // fill member variables with particle data
160  // ALFA_BeamTransport::SelectParticles(evt);
161 
162  // There should be a check if the first particle is really the
163  // particle for beam 1!!!!
164 
165  // run Funktion which does the beamtracking
166  // ALFA_BeamTransport::DoBeamTracking(evt_number);
167 
168 
169  TransportSelectedParticle(evt, evt_number);
170 
171  // Print new data collection on screen
172  HepMC::Print::line(std::cout, evt);
173  }
174 
175  ATH_MSG_INFO("after running the process function");
176 
177  //-----------------------------------------------------------------------------------------
178 
179  return StatusCode::SUCCESS;
180 }
181 
182 
183 //convert unit MeV to GeV for energy and momenta
185 void ALFA_BeamTransport::MeVToGeV (HepMC::GenEvent& evt)
186 {
187  for (const HepMC::GenParticlePtr& p: evt) {
188  const HepMC::FourVector fv(p->momentum().px() / 1000.,
189  p->momentum().py() / 1000.,
190  p->momentum().pz() / 1000.,
191  p->momentum().e() / 1000.);
192 
193  p->set_momentum(fv);
194  }
195 }
196 
197 //convert unit MeV to GeV for energy and momenta
199 void ALFA_BeamTransport::GeVToMeV (HepMC::GenEvent& evt)
200 {
201  for (const HepMC::GenParticlePtr& p : evt) {
202  const HepMC::FourVector fv(p->momentum().px() * 1000.,
203  p->momentum().py() * 1000.,
204  p->momentum().pz() * 1000.,
205  p->momentum().e() * 1000.);
206 
207  p->set_momentum(fv);
208  }
209 }
210 
211 
212 
214 {
215  //do particle tracking for beam 1
216 
217  //tracking funktion
218  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(m_Particle1);//calculates position and momentum at RP1
219  //Position at RP
220  m_PosRP1=m_BeamTracker.ALFA_BeamTrack::PosRP();
221  //Momentum at RP
222  m_MomRP1=m_BeamTracker.ALFA_BeamTrack::MomRP();
223 
224  //do particle tracking for beam 2
225 
226  //tracking funktion
227  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(m_Particle2);//gives position and momentum at RP3
228  //Position at RP
229  m_PosRP3=m_BeamTracker.ALFA_BeamTrack::PosRP();
230  //Momentum at RP
231  m_MomRP3=m_BeamTracker.ALFA_BeamTrack::MomRP();
232 
233  //Write Output
235  {
236  m_FileBeam1 << evt_number << "\t" << std::setprecision(17)
237  << m_PosRP1.x() << std::setprecision(17) << "\t"
238  << m_PosRP1.y() << "\t" << std::setprecision(17)
239  << m_PosRP1.z() << "\t" << std::setprecision(17)
240  << m_MomRP1.x() << std::setprecision(17) << "\t"
241  << m_MomRP1.y() << "\t" << std::setprecision(17)
242  << m_MomRP1.z() << "\t" << std::setprecision(17)
243  << m_EnergyRP1 << std::endl;
244  m_FileBeam2 << evt_number << "\t" << std::setprecision(17)
245  << m_PosRP3.x() << std::setprecision(17) << "\t"
246  << m_PosRP3.y() << "\t" << std::setprecision(17)
247  << m_PosRP3.z() << "\t" << std::setprecision(17)
248  << m_MomRP3.x() << std::setprecision(17) << "\t"
249  << m_MomRP3.y() << "\t" << std::setprecision(17)
250  << m_MomRP3.z() << "\t" << std::setprecision(17)
251  << m_EnergyRP3 << std::endl;
252  }
253 
254  return true;
255 }
256 
257 int ALFA_BeamTransport::TransportSelectedParticle(HepMC::GenEvent& evt, int evt_number){
258  HepMC::GenParticlePtr p1{nullptr};
259  HepMC::GenParticlePtr p2{nullptr};
260 
261 
262  std::vector<FPTracker::Point> PosAtRP1;
263  std::vector<FPTracker::Point> PosAtRP3;
264  std::vector<FPTracker::Point> MomAtPR1;
265  std::vector<FPTracker::Point> MomAtPR3;
266  std::vector<double> EnergyRP1;
267  std::vector<double> EnergyRP3;
268 
269 
270  double mom=0.;
271  double eta=0.;
272  double theta=0.;
273 
274  // First we have to select the final state particles from the MC
275  for (const HepMC::GenParticlePtr& p : evt) {
276 
277  // Simple Eta Pt cut to remove particles from BeamTransportation which
278  // have no chance to reach RP plane
279  mom = std::sqrt(std::pow(p->momentum().px(), 2) +
280  std::pow(p->momentum().py(), 2) +
281  std::pow(p->momentum().pz(), 2));
282  theta = std::acos(std::abs(p->momentum().pz()) / mom);
283  eta = -std::log(std::tan(theta / 2));
284 
285  if (MC::isStable(p) &&
286  (!p->end_vertex())) { // TODO What is end_vertex()???
287  // Change the status code from Pythia (1) to 201 //added 120124
288  p->set_status(HepMC::PYTHIA8NOENDVERTEXSTATUS);
289 
290  int pid = p->pdg_id();
291  if (eta > m_EtaCut &&
292  1 - std::abs(mom / m_FPConfig.pbeam0) < m_XiCut) {
293 
294  // save a copy of the particles which passed the cut
295  HepMC::FourVector Position = p->production_vertex()->position();
296 
297  HepMC::FourVector Momentum = p->momentum();
298 
300  HepMC::newGenVertexPtr(Position); // copy of the vertex
302  HepMC::newGenParticlePtr(Momentum, pid, 202);
303 
304  Vertex->add_particle_out(Particle);
305  evt.add_vertex(Vertex);
306 
307  // select direction of particle
308  if (p->momentum().pz() > 0. &&
309  pid == 2212) { // Beam1 TODO Tracking only works for protons!!!!
310  p1 = p;
311  // now we want to track the final particle if it's a protons
312  // Positions are given in mm FPTracker needs them in meter
314  p1->production_vertex()->position().x() / 1000.,
315  p1->production_vertex()->position().y() / 1000.,
316  p1->production_vertex()->position().z() / 1000.,
317  p1->momentum().px(),
318  p1->momentum().py(),
319  p1->momentum().pz());
320 
321  // do particle tracking for beam 1
322 
323  // tracking funktion
324  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(
325  m_Particle1); // calculates position and momentum at RP1
326  // Position at RP
327  m_PosRP1 = m_BeamTracker.ALFA_BeamTrack::PosRP();
328  PosAtRP1.push_back(m_PosRP1);
329  // Momentum at RP
330  m_MomRP1 = m_BeamTracker.ALFA_BeamTrack::MomRP();
331  MomAtPR1.push_back(m_MomRP1);
332  // no Energy change between IP and RP
333  m_EnergyRP1 = p1->momentum().e();
334  EnergyRP1.push_back(m_EnergyRP1);
335  if (m_WriteDebugOutput) {
336  m_FileBeam1 << evt_number << "\t" << std::setprecision(17)
337  << m_PosRP1.x() << std::setprecision(17) << "\t"
338  << m_PosRP1.y() << "\t" << std::setprecision(17)
339  << m_PosRP1.z() << "\t" << std::setprecision(17)
340  << m_MomRP1.x() << std::setprecision(17) << "\t"
341  << m_MomRP1.y() << "\t" << std::setprecision(17)
342  << m_MomRP1.z() << "\t" << std::setprecision(17)
343  << m_EnergyRP1 << std::endl;
344  }
345 
346  } else if (p->momentum().pz() < 0. && pid == 2212) { // beam 2
347  p2 = p;
348 
350  p2->production_vertex()->position().x() / 1000.,
351  p2->production_vertex()->position().y() / 1000.,
352  p2->production_vertex()->position().z() / 1000.,
353  p2->momentum().px(),
354  p2->momentum().py(),
355  p2->momentum().pz());
356  // tracking funktion
357  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(
358  m_Particle2); // gives position and momentum at RP3
359  // Position at RP
360  m_PosRP3 = m_BeamTracker.ALFA_BeamTrack::PosRP();
361  PosAtRP3.push_back(m_PosRP3);
362  // Momentum at RP
363  m_MomRP3 = m_BeamTracker.ALFA_BeamTrack::MomRP();
364  MomAtPR3.push_back(m_MomRP3);
365 
366  m_EnergyRP3 = p2->momentum().e();
367  EnergyRP3.push_back(m_EnergyRP3);
368  // Write Output
369  if (m_WriteDebugOutput) {
370  m_FileBeam2 << evt_number << "\t" << std::setprecision(17)
371  << m_PosRP3.x() << std::setprecision(17) << "\t"
372  << m_PosRP3.y() << "\t" << std::setprecision(17)
373  << m_PosRP3.z() << "\t" << std::setprecision(17)
374  << m_MomRP3.x() << std::setprecision(17) << "\t"
375  << m_MomRP3.y() << "\t" << std::setprecision(17)
376  << m_MomRP3.z() << "\t" << std::setprecision(17)
377  << m_EnergyRP3 << std::endl;
378  }
379 
380  } else {
381  ATH_MSG_ERROR("Strange: Particle rests at IP");
382  }
383 
384  if (pid == 2212) { // Find the protons
385  // change status code
386  // (*p)->set_status(201); //Todo here we have to find a convetion
387  m_pcount++;
388  if (m_pcount > 2) {
389  ATH_MSG_ERROR("Strange: More than two protons in this event!");
390  }
391  }
392  }
393  }
394  }
395 
396  //from here the transported particles are added to HepMC
397 
398  ATH_MSG_INFO("Add transproted particle into HepMC event record Beam 1");
399  //Add Data for HepMC Collection
400 
401  for(int i=0;i<(int)PosAtRP1.size();i++){//Beam1
402 
403 
404  //The factor 1000 comes from the fact that HepMC saves length in mm
405 
406  HepMC::FourVector PositionVectorRP1 = HepMC::FourVector(PosAtRP1.at(i).x()*1000.,PosAtRP1.at(i).y()*1000.,PosAtRP1.at(i).z()*1000.,0.*1000.);
407 
408  HepMC::FourVector MomentumVectorRP1 = HepMC::FourVector(MomAtPR1.at(i).x(),MomAtPR1.at(i).y(),MomAtPR1.at(i).z(),EnergyRP1.at(i));
409 
410  HepMC::GenVertexPtr VertexRP1 = HepMC::newGenVertexPtr(PositionVectorRP1);
411  HepMC::GenParticlePtr ParticleRP1 = HepMC::newGenParticlePtr(MomentumVectorRP1,2212,1); //save the transported particle with status code 1 (added 120124) preview was 201
412  //Add particle to vertex
413  VertexRP1->add_particle_out(ParticleRP1);
414  //add new vertex to HepMC event record
415  if(m_PosRP1.x()!=-99){ // add vertex to event record if the particle in the first beam was not lost
416  evt.add_vertex(VertexRP1);
417  }
418  }
419  ATH_MSG_INFO ("Add transproted particle into HepMC event record Beam 2" );
420  for(int i=0;i<(int)PosAtRP3.size();i++){
421 
422  //Add Data for HepMC Collection
423 
424  //RP3
425  HepMC::FourVector PositionVectorRP3 = HepMC::FourVector(PosAtRP3.at(i).x()*1000.,PosAtRP3.at(i).y()*1000.,PosAtRP3.at(i).z()*1000.,0.*1000.);
426 
427  HepMC::FourVector MomentumVectorRP3 = HepMC::FourVector(MomAtPR3.at(i).x(),MomAtPR3.at(i).y(),MomAtPR3.at(i).z(),EnergyRP3.at(i));
428 
429  HepMC::GenVertexPtr VertexRP3 = HepMC::newGenVertexPtr(PositionVectorRP3);
430  HepMC::GenParticlePtr ParticleRP3 = HepMC::newGenParticlePtr(MomentumVectorRP3,2212,1);//save the transported particle with status code 1 (added 120124) preview was 201
431 
432  VertexRP3->add_particle_out(ParticleRP3);
433 
434  if (m_PosRP3.x() != -99) { // add vertex to event record if the
435  // particle in the second beam was not lost
436  evt.add_vertex(VertexRP3);
437  }
438 
439  }
440 
441  //convert HepMC data back to HepMC standart ( momentum and energy in MeV)
443 
444  return true;
445 }
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
ALFA_BeamTransport::m_BeamTracker
ALFA_BeamTrack m_BeamTracker
Definition: ALFA_BeamTransport.h:99
FPConfig::IP
int IP
Definition: ALFA_FPConfig.h:17
ALFA_BeamTransport.h
ALFA_BeamTransport::m_FileBeam1
std::ofstream m_FileBeam1
Definition: ALFA_BeamTransport.h:124
ALFA_BeamTransport::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: ALFA_BeamTransport.h:87
FPConfig::UseALFA
bool UseALFA
Definition: ALFA_FPConfig.h:12
ALFA_BeamTransport::m_WriteDebugOutput
bool m_WriteDebugOutput
Definition: ALFA_BeamTransport.h:127
GenEvent.h
ALFA_BeamTransport::m_FPOutputBeam1
std::string m_FPOutputBeam1
Definition: ALFA_BeamTransport.h:110
HepMC::PYTHIA8NOENDVERTEXSTATUS
constexpr int PYTHIA8NOENDVERTEXSTATUS
Definition: MagicNumbers.h:45
ALFA_BeamTransport::m_FPOutputBeam2
std::string m_FPOutputBeam2
Definition: ALFA_BeamTransport.h:111
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
FPTracker::Point::x
double x() const
Definition: FPTracker/src/Point.cxx:17
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
ALFA_BeamTransport::m_FileBeam2
std::ofstream m_FileBeam2
Definition: ALFA_BeamTransport.h:125
ALFA_BeamTransport::m_MomRP3
FPTracker::Point m_MomRP3
Definition: ALFA_BeamTransport.h:105
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ALFA_BeamTransport::~ALFA_BeamTransport
~ALFA_BeamTransport()
Default Destructor.
Definition: ALFA_BeamTransport.cxx:65
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
FPConfig::ConfDir
std::string ConfDir
Definition: ALFA_FPConfig.h:13
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
ALFA_BeamTransport::m_EnergyRP3
double m_EnergyRP3
Definition: ALFA_BeamTransport.h:108
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
ALFA_BeamTransport::ALFA_BeamTransport
ALFA_BeamTransport(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Definition: ALFA_BeamTransport.cxx:38
ALFA_BeamTransport::initialize
StatusCode initialize()
standard Athena-Algorithm method
Definition: ALFA_BeamTransport.cxx:71
ALFA_BeamTransport::m_pint
int m_pint
Definition: ALFA_BeamTransport.h:118
FPTracker::Point::y
double y() const
Definition: FPTracker/src/Point.cxx:18
ALFA_BeamTransport::m_Particle1
FPTracker::Particle m_Particle1
Definition: ALFA_BeamTransport.h:97
ALFA_BeamTransport::GeVToMeV
void GeVToMeV(HepMC::GenEvent &evt)
convert GeV to MeV for HepMC event record
Definition: ALFA_BeamTransport.cxx:199
ALFA_BeamTransport::m_EnergyRP1
double m_EnergyRP1
Definition: ALFA_BeamTransport.h:107
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
HepMC::Print::line
void line(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:554
ALFA_BeamTransport::finalize
StatusCode finalize()
standard Athena-Algorithm method
Definition: ALFA_BeamTransport.cxx:103
GenParticle.h
ALFA_BeamTransport::m_MomRP1
FPTracker::Point m_MomRP1
Definition: ALFA_BeamTransport.h:104
xAOD::Particle
Particle_v1 Particle
Define the latest version of the particle class.
Definition: Event/xAOD/xAODParticleEvent/xAODParticleEvent/Particle.h:17
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
AthAlgorithm.h
ALFA_BeamTransport::m_MCKey
SG::ReadHandleKey< McEventCollection > m_MCKey
Definition: ALFA_BeamTransport.h:80
FPConfig::xcol2
double xcol2
Definition: ALFA_FPConfig.h:22
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
FPConfig::apermb
double apermb
Definition: ALFA_FPConfig.h:20
SimpleVector.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ALFA_BeamTransport::TransportSelectedParticle
int TransportSelectedParticle(HepMC::GenEvent &evt, int evt_number)
This function is event selection, tracking and HepMC save ine one function.
Definition: ALFA_BeamTransport.cxx:257
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
FPConfig::xcol1
double xcol1
Definition: ALFA_FPConfig.h:21
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
ALFA_BeamTransport::m_PosRP1
FPTracker::Point m_PosRP1
Definition: ALFA_BeamTransport.h:101
FPConfig::absZMagMax
float absZMagMax
Definition: ALFA_FPConfig.h:28
ALFA_BeamTransport::m_EtaCut
double m_EtaCut
Definition: ALFA_BeamTransport.h:120
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
FPTracker::Point::z
double z() const
Definition: FPTracker/src/Point.cxx:19
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
FPConfig::RPDistance
float RPDistance
Definition: ALFA_FPConfig.h:25
ALFA_BeamTransport::execute
StatusCode execute()
standard Athena-Algorithm method
Definition: ALFA_BeamTransport.cxx:116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
FPConfig::pbeam0
double pbeam0
Definition: ALFA_FPConfig.h:23
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
FPConfig::useaper
bool useaper
Definition: ALFA_FPConfig.h:19
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ALFA_BeamTransport::m_Particle2
FPTracker::Particle m_Particle2
Definition: ALFA_BeamTransport.h:98
ALFA_BeamTransport::MeVToGeV
void MeVToGeV(HepMC::GenEvent &evt)
convert unit MeV to GeV for energy and momenta
Definition: ALFA_BeamTransport.cxx:185
ALFA_BeamTransport::m_XiCut
double m_XiCut
Definition: ALFA_BeamTransport.h:121
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ALFA_BeamTransport::m_FPConfig
FPConfig m_FPConfig
Definition: ALFA_BeamTransport.h:94
ALFA_BeamTransport::m_PosRP3
FPTracker::Point m_PosRP3
Definition: ALFA_BeamTransport.h:102
ALFA_BeamTransport::DoBeamTracking
int DoBeamTracking(int evt_number)
Function which calls BeamTrack class to calcualte Position at RPs.
Definition: ALFA_BeamTransport.cxx:213
StoreGateSvc.h
HepMCHelpers.h
ALFA_BeamTransport::m_pcount
int m_pcount
Definition: ALFA_BeamTransport.h:116