ATLAS Offline Software
ALFA_BeamTransport.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // BeamTransport.h, (c) ATLAS Detector software
8 
9 #ifndef ALFA_BEAMTRACKBEAMTRANSPORT_H
10 #define ALFA_BEAMTRACKBEAMTRANSPORT_H
11 
12 // Gaudi includes
14 #include "GaudiKernel/Algorithm.h"
15 #include "GaudiKernel/MsgStream.h"
18 
20 #include "AtlasHepMC/GenEvent.h"
21 #include "TH1.h"
22 
23 // FPTracker
24 #include "FPTracker/Particle.h"
25 #include "FPTracker/Point.h"
26 
27 #include "ALFA_BeamTrack.h"
28 #include "ALFA_FPConfig.h"
29 
30 #include <iostream>
31 #include <string>
32 
33 
34 class AtlasDetectorID;
35 class Identifier;
36 class StoreGateSvc;
37 
50 {
51 public:
53  ALFA_BeamTransport(const std::string& name, ISvcLocator* pSvcLocator);
56 
63 
65  void MeVToGeV(HepMC::GenEvent& evt);
67  void GeVToMeV(HepMC::GenEvent& evt);
70  int SelectParticles(HepMC::GenEvent* evt);
72  int DoBeamTracking(int evt_number);
75  int TransportSelectedParticle(HepMC::GenEvent& evt, int evt_number);
76 
77 private:
78  // some storegate variables
79 
81  this,
82  "McEventCollectionName",
83  "GEN_EVENT",
84  "MC Event Collection name"
85  };
86 
88  "EvtInfo",
89  "EventInfo",
90  "EventInfo name" };
91 
92  // Set FPConfiguration variables
93 
95 
96  // added
100  // Position at RP
103  // Momentum at RP
106 
107  double m_EnergyRP1 = 0.0;
108  double m_EnergyRP3 = 0.0;
109 
110  std::string m_FPOutputBeam1;
111  std::string m_FPOutputBeam2;
112 
113  // The two counters have to be set zero at the beginning at each execute run
114  // since for every new call of the execute() funktion they have to be zero
115  // counter for particles marked as outgoing in event record
116  int m_pcount = 0;
117  // counter for particles marked as incomming in event record
118  int m_pint = 0;
119 
120  double m_EtaCut;
121  double m_XiCut;
122 
123  // debug stuff
124  std::ofstream m_FileBeam1;
125  std::ofstream m_FileBeam2;
126 
128 };
129 
130 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ALFA_BeamTransport::m_BeamTracker
ALFA_BeamTrack m_BeamTracker
Definition: ALFA_BeamTransport.h:99
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
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
ALFA_BeamTransport::m_FPOutputBeam2
std::string m_FPOutputBeam2
Definition: ALFA_BeamTransport.h:111
ALFA_BeamTrack.h
FPConfig
Definition: ALFA_FPConfig.h:10
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
ALFA_BeamTransport::~ALFA_BeamTransport
~ALFA_BeamTransport()
Default Destructor.
Definition: ALFA_BeamTransport.cxx:65
ALFA_BeamTransport::m_EnergyRP3
double m_EnergyRP3
Definition: ALFA_BeamTransport.h:108
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
Point.h
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
SG::ReadHandleKey< McEventCollection >
ALFA_BeamTransport::finalize
StatusCode finalize()
standard Athena-Algorithm method
Definition: ALFA_BeamTransport.cxx:103
ALFA_BeamTrack
Definition: ALFA_BeamTrack.h:29
ALFA_BeamTransport::m_MomRP1
FPTracker::Point m_MomRP1
Definition: ALFA_BeamTransport.h:104
AthAlgorithm.h
ALFA_BeamTransport::m_MCKey
SG::ReadHandleKey< McEventCollection > m_MCKey
Definition: ALFA_BeamTransport.h:80
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
ALFA_FPConfig.h
McEventCollection.h
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
ALFA_BeamTransport::SelectParticles
int SelectParticles(HepMC::GenEvent *evt)
Selects particles for beam transported Sets event status code of outgoing particles from generator to...
ALFA_BeamTransport::m_PosRP1
FPTracker::Point m_PosRP1
Definition: ALFA_BeamTransport.h:101
ALFA_BeamTransport::m_EtaCut
double m_EtaCut
Definition: ALFA_BeamTransport.h:120
FPTracker::Particle
Definition: ForwardDetectors/FPTracker/FPTracker/Particle.h:19
AthAlgorithm
Definition: AthAlgorithm.h:47
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
FPTracker::Point
Definition: FPTracker/FPTracker/Point.h:14
EventInfo.h
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
ALFA_BeamTransport::m_FPConfig
FPConfig m_FPConfig
Definition: ALFA_BeamTransport.h:94
Particle.h
ALFA_BeamTransport
Definition: ALFA_BeamTransport.h:50
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
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
ALFA_BeamTransport::m_pcount
int m_pcount
Definition: ALFA_BeamTransport.h:116