ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ALFA_BeamTransport Class Reference

#include <ALFA_BeamTransport.h>

Inheritance diagram for ALFA_BeamTransport:
Collaboration diagram for ALFA_BeamTransport:

Public Member Functions

 ALFA_BeamTransport (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor. More...
 
 ~ALFA_BeamTransport ()
 Default Destructor. More...
 
StatusCode initialize ()
 standard Athena-Algorithm method More...
 
StatusCode execute ()
 standard Athena-Algorithm method More...
 
StatusCode finalize ()
 standard Athena-Algorithm method More...
 
void MeVToGeV (HepMC::GenEvent &evt)
 convert unit MeV to GeV for energy and momenta More...
 
void GeVToMeV (HepMC::GenEvent &evt)
 convert GeV to MeV for HepMC event record More...
 
int SelectParticles (HepMC::GenEvent *evt)
 Selects particles for beam transported Sets event status code of outgoing particles from generator to status != 1. More...
 
int DoBeamTracking (int evt_number)
 Function which calls BeamTrack class to calcualte Position at RPs. More...
 
int TransportSelectedParticle (HepMC::GenEvent &evt, int evt_number)
 This function is event selection, tracking and HepMC save ine one function. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< McEventCollectionm_MCKey
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
 
FPConfig m_FPConfig
 
FPTracker::Particle m_Particle1
 
FPTracker::Particle m_Particle2
 
ALFA_BeamTrack m_BeamTracker
 
FPTracker::Point m_PosRP1
 
FPTracker::Point m_PosRP3
 
FPTracker::Point m_MomRP1
 
FPTracker::Point m_MomRP3
 
double m_EnergyRP1 = 0.0
 
double m_EnergyRP3 = 0.0
 
std::string m_FPOutputBeam1
 
std::string m_FPOutputBeam2
 
int m_pcount = 0
 
int m_pint = 0
 
double m_EtaCut
 
double m_XiCut
 
std::ofstream m_FileBeam1
 
std::ofstream m_FileBeam2
 
bool m_WriteDebugOutput
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

This is the ALFA Beam Transport package. It is an interface which uses FPTracker for beamtransportation. Getting from the HepMC eventrecord the particle data at the IP it calculates the particle porition at the first RP.

Author
Daniel Pelikan danie.nosp@m.l.pe.nosp@m.likan.nosp@m.@cer.nosp@m.n.ch

Definition at line 49 of file ALFA_BeamTransport.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ALFA_BeamTransport()

ALFA_BeamTransport::ALFA_BeamTransport ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Standard Athena-Algorithm Constructor.

Definition at line 36 of file ALFA_BeamTransport.cxx.

37  :
38  AthAlgorithm(name,pSvcLocator)
39 {
40  declareProperty("ConfDir", m_FPConfig.ConfDir="./config");
41  declareProperty("UseALFA", m_FPConfig.UseALFA=true);
42  declareProperty("Debug", m_WriteDebugOutput=false);
43  declareProperty("IP",m_FPConfig.IP = 1);
44  declareProperty("UseAper",m_FPConfig.useaper = true);
45  declareProperty("apermb",m_FPConfig.apermb = 0.);
46  declareProperty("xcol1",m_FPConfig.xcol1 = 999.);//999e-4 but we need open collimators
47  declareProperty("xcol2",m_FPConfig.xcol2 = 999.);//999e-4
48  declareProperty("BeamEnergy",m_FPConfig.pbeam0 = 7000.);//beam energy
49  declareProperty("RPDistance",m_FPConfig.RPDistance = 237.398);
50  declareProperty("absZMagMax",m_FPConfig.absZMagMax = 500.);//dont read magnets after this value
51 
52  //Cuts for production
53  declareProperty("EtaCut",m_EtaCut = 8.);
54  declareProperty("XiCut",m_XiCut = 0.2);
55 
56  declareProperty("FPOutputBeam1", m_FPOutputBeam1="Beam1");
57  declareProperty("FPOutputBeam2", m_FPOutputBeam2="Beam2");
58 
59 }

◆ ~ALFA_BeamTransport()

ALFA_BeamTransport::~ALFA_BeamTransport ( )

Default Destructor.

Definition at line 61 of file ALFA_BeamTransport.cxx.

61 {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ DoBeamTracking()

int ALFA_BeamTransport::DoBeamTracking ( int  evt_number)

Function which calls BeamTrack class to calcualte Position at RPs.

Definition at line 206 of file ALFA_BeamTransport.cxx.

207 {
208  //do particle tracking for beam 1
209 
210  //tracking funktion
211  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(m_Particle1);//calculates position and momentum at RP1
212  //Position at RP
213  m_PosRP1=m_BeamTracker.ALFA_BeamTrack::PosRP();
214  //Momentum at RP
215  m_MomRP1=m_BeamTracker.ALFA_BeamTrack::MomRP();
216 
217  //do particle tracking for beam 2
218 
219  //tracking funktion
220  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(m_Particle2);//gives position and momentum at RP3
221  //Position at RP
222  m_PosRP3=m_BeamTracker.ALFA_BeamTrack::PosRP();
223  //Momentum at RP
224  m_MomRP3=m_BeamTracker.ALFA_BeamTrack::MomRP();
225 
226  //Write Output
228  {
229  m_FileBeam1 << evt_number << "\t" << std::setprecision(17)
230  << m_PosRP1.x() << std::setprecision(17) << "\t"
231  << m_PosRP1.y() << "\t" << std::setprecision(17)
232  << m_PosRP1.z() << "\t" << std::setprecision(17)
233  << m_MomRP1.x() << std::setprecision(17) << "\t"
234  << m_MomRP1.y() << "\t" << std::setprecision(17)
235  << m_MomRP1.z() << "\t" << std::setprecision(17)
236  << m_EnergyRP1 << std::endl;
237  m_FileBeam2 << evt_number << "\t" << std::setprecision(17)
238  << m_PosRP3.x() << std::setprecision(17) << "\t"
239  << m_PosRP3.y() << "\t" << std::setprecision(17)
240  << m_PosRP3.z() << "\t" << std::setprecision(17)
241  << m_MomRP3.x() << std::setprecision(17) << "\t"
242  << m_MomRP3.y() << "\t" << std::setprecision(17)
243  << m_MomRP3.z() << "\t" << std::setprecision(17)
244  << m_EnergyRP3 << std::endl;
245  }
246 
247  return true;
248 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode ALFA_BeamTransport::execute ( )

standard Athena-Algorithm method

Definition at line 109 of file ALFA_BeamTransport.cxx.

110 {
111  // Code entered here will be executed once per event
112  ATH_MSG_DEBUG ("Executing " << name() << "...");
113  //-----------------------------------------------------------------------------------------
114  int run_number;
115  uint64_t evt_number;
116 
117  //Set particles counter to zero!
118  //counter for particles marked as outgoing in event record
119  m_pcount=0;
120  //counter for particles marked as incomming in event record
121  m_pint=0;
122 
123  //Load event info
124  SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey,getContext());
125  if(!eventInfo.isValid()) {
126  ATH_MSG_ERROR("Could not retrieve EventInfo");
127  return StatusCode::FAILURE;
128  }
129  else {
130  run_number=eventInfo->runNumber();
131  evt_number=eventInfo->eventNumber();
132 
133  ATH_MSG_DEBUG("run: " << run_number << " event: " << evt_number);
134  }
135 
136  SG::ReadHandle<McEventCollection> mcColl(m_MCKey, getContext());
137  if (!mcColl.isValid()) {
138  ATH_MSG_WARNING("Could not retrieve McEventCollection: " << m_MCKey);
139  return StatusCode::SUCCESS;
140  }
141  // Loop over all events in McEventCollectio
142  ATH_MSG_INFO("successful load of HepMC info");
143  for (const HepMC::GenEvent* itr : *mcColl){
144  HepMC::GenEvent evt = (*itr);
145  // convert unit MeV to GeV for energy and momenta
146  MeVToGeV(evt);
147 
148  HepMC::Print::line(std::cout, evt);
149 
150  // Select final state particle from event generator
151  // set event status !=1 (final state)
152  // fill member variables with particle data
153  // ALFA_BeamTransport::SelectParticles(evt);
154 
155  // There should be a check if the first particle is really the
156  // particle for beam 1!!!!
157 
158  // run Funktion which does the beamtracking
159  // ALFA_BeamTransport::DoBeamTracking(evt_number);
160 
161 
162  TransportSelectedParticle(evt, evt_number);
163 
164  // Print new data collection on screen
165  HepMC::Print::line(std::cout, evt);
166  }
167 
168  ATH_MSG_INFO("after running the process function");
169 
170  //-----------------------------------------------------------------------------------------
171 
172  return StatusCode::SUCCESS;
173 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode ALFA_BeamTransport::finalize ( )

standard Athena-Algorithm method

Definition at line 96 of file ALFA_BeamTransport.cxx.

97 {
98  // close outputfiles for FPTracker
99  if (m_WriteDebugOutput) {
100  m_FileBeam1.close();
101  m_FileBeam2.close();
102  }
103  // Code entered here will be executed once at the end of the program run.
104  return StatusCode::SUCCESS;
105 }

◆ GeVToMeV()

void ALFA_BeamTransport::GeVToMeV ( HepMC::GenEvent &  evt)

convert GeV to MeV for HepMC event record

Definition at line 192 of file ALFA_BeamTransport.cxx.

193 {
194  for (const HepMC::GenParticlePtr& p : evt) {
195  const HepMC::FourVector fv(p->momentum().px() * 1000.,
196  p->momentum().py() * 1000.,
197  p->momentum().pz() * 1000.,
198  p->momentum().e() * 1000.);
199 
200  p->set_momentum(fv);
201  }
202 }

◆ initialize()

StatusCode ALFA_BeamTransport::initialize ( )

standard Athena-Algorithm method

Definition at line 64 of file ALFA_BeamTransport.cxx.

65 {
66  ATH_MSG_INFO("Initializing " << name() << "...");
69  // open files for beamtracking output
70  // string in char
71  char* cBeam1Name = new char[m_FPOutputBeam1.length()];
72  strcpy(cBeam1Name, m_FPOutputBeam1.c_str());
73  char* cBeam2Name = new char[m_FPOutputBeam2.length()];
74  strcpy(cBeam2Name, m_FPOutputBeam2.c_str());
75 
76  if (m_WriteDebugOutput) {
77  m_FileBeam1.open(cBeam1Name);
78  m_FileBeam2.open(cBeam2Name);
79  }
80 
81  //delete char arrays
82  delete[] cBeam1Name;
83  delete[] cBeam2Name;
84 
85  //Initialisation of FPTracker
86  m_BeamTracker.ALFA_BeamTrack::initialize(m_FPConfig);
87 
88  //-----------------------------------------------------------------------------------------
89  ATH_MSG_INFO( name() << " initialize()" );
90  ATH_MSG_INFO( "initialize() successful in " << name() );
91  return StatusCode::SUCCESS;
92 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ MeVToGeV()

void ALFA_BeamTransport::MeVToGeV ( HepMC::GenEvent &  evt)

convert unit MeV to GeV for energy and momenta

Definition at line 178 of file ALFA_BeamTransport.cxx.

179 {
180  for (const HepMC::GenParticlePtr& p: evt) {
181  const HepMC::FourVector fv(p->momentum().px() / 1000.,
182  p->momentum().py() / 1000.,
183  p->momentum().pz() / 1000.,
184  p->momentum().e() / 1000.);
185 
186  p->set_momentum(fv);
187  }
188 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ SelectParticles()

int ALFA_BeamTransport::SelectParticles ( HepMC::GenEvent *  evt)

Selects particles for beam transported Sets event status code of outgoing particles from generator to status != 1.

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TransportSelectedParticle()

int ALFA_BeamTransport::TransportSelectedParticle ( HepMC::GenEvent &  evt,
int  evt_number 
)

This function is event selection, tracking and HepMC save ine one function.

Definition at line 250 of file ALFA_BeamTransport.cxx.

250  {
251  HepMC::GenParticlePtr p1{nullptr};
252  HepMC::GenParticlePtr p2{nullptr};
253 
254  std::vector<FPTracker::Point> PosAtRP1;
255  std::vector<FPTracker::Point> PosAtRP3;
256  std::vector<FPTracker::Point> MomAtPR1;
257  std::vector<FPTracker::Point> MomAtPR3;
258  std::vector<double> EnergyRP1;
259  std::vector<double> EnergyRP3;
260 
261 
262  double mom=0.;
263  double eta=0.;
264  double theta=0.;
265 
266  // First we have to select the final state particles from the MC
267  for (const HepMC::GenParticlePtr& p : evt) {
268 
269  // Simple Eta Pt cut to remove particles from BeamTransportation which
270  // have no chance to reach RP plane
271  mom = std::sqrt(std::pow(p->momentum().px(), 2) +
272  std::pow(p->momentum().py(), 2) +
273  std::pow(p->momentum().pz(), 2));
274  theta = std::acos(std::abs(p->momentum().pz()) / mom);
275  eta = -std::log(std::tan(theta / 2));
276 
277  if (MC::isStable(p) && (!p->end_vertex())) {
278 
279  int pid = p->pdg_id();
280  if (eta > m_EtaCut && 1 - std::abs(mom / m_FPConfig.pbeam0) < m_XiCut) {
281 
282  // save a copy of the particles which passed the cut
283  HepMC::FourVector Position = p->production_vertex()->position();
284  HepMC::FourVector Momentum = p->momentum();
285  HepMC::GenVertexPtr Vertex = HepMC::newGenVertexPtr(Position); // copy of the vertex
287 
288  Vertex->add_particle_out(Particle);
289  evt.add_vertex(Vertex);
290 
291  // select direction of particle
292  if (p->momentum().pz() > 0. && pid == 2212) { // Beam1 TODO Tracking only works for protons!!!!
293  p1 = p;
294  // now we want to track the final particle if it's a protons
295  // Positions are given in mm FPTracker needs them in meter
297  p1->production_vertex()->position().x() / 1000.,
298  p1->production_vertex()->position().y() / 1000.,
299  p1->production_vertex()->position().z() / 1000.,
300  p1->momentum().px(),
301  p1->momentum().py(),
302  p1->momentum().pz());
303 
304  // do particle tracking for beam 1
305 
306  // tracking funktion
307  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(m_Particle1); // calculates position and momentum at RP1
308  // Position at RP
309  m_PosRP1 = m_BeamTracker.ALFA_BeamTrack::PosRP();
310  PosAtRP1.push_back(m_PosRP1);
311  // Momentum at RP
312  m_MomRP1 = m_BeamTracker.ALFA_BeamTrack::MomRP();
313  MomAtPR1.push_back(m_MomRP1);
314  // no Energy change between IP and RP
315  m_EnergyRP1 = p1->momentum().e();
316  EnergyRP1.push_back(m_EnergyRP1);
317  if (m_WriteDebugOutput) {
318  m_FileBeam1 << evt_number << "\t" << std::setprecision(17)
319  << m_PosRP1.x() << std::setprecision(17) << "\t"
320  << m_PosRP1.y() << "\t" << std::setprecision(17)
321  << m_PosRP1.z() << "\t" << std::setprecision(17)
322  << m_MomRP1.x() << std::setprecision(17) << "\t"
323  << m_MomRP1.y() << "\t" << std::setprecision(17)
324  << m_MomRP1.z() << "\t" << std::setprecision(17)
325  << m_EnergyRP1 << std::endl;
326  }
327 
328  } else if (p->momentum().pz() < 0. && pid == 2212) { // beam 2
329  p2 = p;
330 
332  p2->production_vertex()->position().x() / 1000.,
333  p2->production_vertex()->position().y() / 1000.,
334  p2->production_vertex()->position().z() / 1000.,
335  p2->momentum().px(),
336  p2->momentum().py(),
337  p2->momentum().pz());
338  // tracking funktion
339  m_BeamTracker.ALFA_BeamTrack::CalculatePosRP(m_Particle2); // gives position and momentum at RP3
340  // Position at RP
341  m_PosRP3 = m_BeamTracker.ALFA_BeamTrack::PosRP();
342  PosAtRP3.push_back(m_PosRP3);
343  // Momentum at RP
344  m_MomRP3 = m_BeamTracker.ALFA_BeamTrack::MomRP();
345  MomAtPR3.push_back(m_MomRP3);
346 
347  m_EnergyRP3 = p2->momentum().e();
348  EnergyRP3.push_back(m_EnergyRP3);
349  // Write Output
350  if (m_WriteDebugOutput) {
351  m_FileBeam2 << evt_number << "\t" << std::setprecision(17)
352  << m_PosRP3.x() << std::setprecision(17) << "\t"
353  << m_PosRP3.y() << "\t" << std::setprecision(17)
354  << m_PosRP3.z() << "\t" << std::setprecision(17)
355  << m_MomRP3.x() << std::setprecision(17) << "\t"
356  << m_MomRP3.y() << "\t" << std::setprecision(17)
357  << m_MomRP3.z() << "\t" << std::setprecision(17)
358  << m_EnergyRP3 << std::endl;
359  }
360 
361  } else {
362  ATH_MSG_ERROR("Strange: Particle rests at IP");
363  }
364 
365  if (pid == 2212) { // Find the protons
366  m_pcount++;
367  if (m_pcount > 2) {
368  ATH_MSG_ERROR("Strange: More than two protons in this event!");
369  }
370  }
371  }
372  }
373  }
374 
375  //from here the transported particles are added to HepMC
376 
377  ATH_MSG_INFO("Add transproted particle into HepMC event record Beam 1");
378  //Add Data for HepMC Collection
379 
380  for(int i=0;i<(int)PosAtRP1.size();i++){//Beam1
381  //The factor 1000 comes from the fact that HepMC saves length in mm
382  HepMC::FourVector PositionVectorRP1 = HepMC::FourVector(PosAtRP1.at(i).x()*1000.,PosAtRP1.at(i).y()*1000.,PosAtRP1.at(i).z()*1000.,0.*1000.);
383  HepMC::FourVector MomentumVectorRP1 = HepMC::FourVector(MomAtPR1.at(i).x(),MomAtPR1.at(i).y(),MomAtPR1.at(i).z(),EnergyRP1.at(i));
384 
385  HepMC::GenVertexPtr VertexRP1 = HepMC::newGenVertexPtr(PositionVectorRP1);
386  HepMC::GenParticlePtr ParticleRP1 = HepMC::newGenParticlePtr(MomentumVectorRP1,2212,1); //save the transported particle with status code 1 (added 120124) preview was 201
387  //Add particle to vertex
388  VertexRP1->add_particle_out(ParticleRP1);
389  //add new vertex to HepMC event record
390  if(m_PosRP1.x()!=-99){ // add vertex to event record if the particle in the first beam was not lost
391  evt.add_vertex(VertexRP1);
392  }
393  }
394  ATH_MSG_INFO ("Add transproted particle into HepMC event record Beam 2" );
395  for(int i=0;i<(int)PosAtRP3.size();i++){
396  HepMC::FourVector PositionVectorRP3 = HepMC::FourVector(PosAtRP3.at(i).x()*1000.,PosAtRP3.at(i).y()*1000.,PosAtRP3.at(i).z()*1000.,0.*1000.);
397  HepMC::FourVector MomentumVectorRP3 = HepMC::FourVector(MomAtPR3.at(i).x(),MomAtPR3.at(i).y(),MomAtPR3.at(i).z(),EnergyRP3.at(i));
398  HepMC::GenVertexPtr VertexRP3 = HepMC::newGenVertexPtr(PositionVectorRP3);
399  HepMC::GenParticlePtr ParticleRP3 = HepMC::newGenParticlePtr(MomentumVectorRP3,2212,1);//save the transported particle with status code 1 (added 120124) preview was 201
400  VertexRP3->add_particle_out(ParticleRP3);
401  if (m_PosRP3.x() != -99) { // add vertex to event record if the // particle in the second beam was not lost
402  evt.add_vertex(VertexRP3);
403  }
404  }
405 
406  //convert HepMC data back to HepMC standart ( momentum and energy in MeV)
408  return true;
409 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_BeamTracker

ALFA_BeamTrack ALFA_BeamTransport::m_BeamTracker
private

Definition at line 99 of file ALFA_BeamTransport.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EnergyRP1

double ALFA_BeamTransport::m_EnergyRP1 = 0.0
private

Definition at line 107 of file ALFA_BeamTransport.h.

◆ m_EnergyRP3

double ALFA_BeamTransport::m_EnergyRP3 = 0.0
private

Definition at line 108 of file ALFA_BeamTransport.h.

◆ m_EtaCut

double ALFA_BeamTransport::m_EtaCut
private

Definition at line 120 of file ALFA_BeamTransport.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> ALFA_BeamTransport::m_eventInfoKey
private
Initial value:
{ this,
"EvtInfo",
"EventInfo",
"EventInfo name" }

Definition at line 87 of file ALFA_BeamTransport.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_FileBeam1

std::ofstream ALFA_BeamTransport::m_FileBeam1
private

Definition at line 124 of file ALFA_BeamTransport.h.

◆ m_FileBeam2

std::ofstream ALFA_BeamTransport::m_FileBeam2
private

Definition at line 125 of file ALFA_BeamTransport.h.

◆ m_FPConfig

FPConfig ALFA_BeamTransport::m_FPConfig
private

Definition at line 94 of file ALFA_BeamTransport.h.

◆ m_FPOutputBeam1

std::string ALFA_BeamTransport::m_FPOutputBeam1
private

Definition at line 110 of file ALFA_BeamTransport.h.

◆ m_FPOutputBeam2

std::string ALFA_BeamTransport::m_FPOutputBeam2
private

Definition at line 111 of file ALFA_BeamTransport.h.

◆ m_MCKey

SG::ReadHandleKey<McEventCollection> ALFA_BeamTransport::m_MCKey
private
Initial value:
{
this,
"McEventCollectionName",
"GEN_EVENT",
"MC Event Collection name"
}

Definition at line 80 of file ALFA_BeamTransport.h.

◆ m_MomRP1

FPTracker::Point ALFA_BeamTransport::m_MomRP1
private

Definition at line 104 of file ALFA_BeamTransport.h.

◆ m_MomRP3

FPTracker::Point ALFA_BeamTransport::m_MomRP3
private

Definition at line 105 of file ALFA_BeamTransport.h.

◆ m_Particle1

FPTracker::Particle ALFA_BeamTransport::m_Particle1
private

Definition at line 97 of file ALFA_BeamTransport.h.

◆ m_Particle2

FPTracker::Particle ALFA_BeamTransport::m_Particle2
private

Definition at line 98 of file ALFA_BeamTransport.h.

◆ m_pcount

int ALFA_BeamTransport::m_pcount = 0
private

Definition at line 116 of file ALFA_BeamTransport.h.

◆ m_pint

int ALFA_BeamTransport::m_pint = 0
private

Definition at line 118 of file ALFA_BeamTransport.h.

◆ m_PosRP1

FPTracker::Point ALFA_BeamTransport::m_PosRP1
private

Definition at line 101 of file ALFA_BeamTransport.h.

◆ m_PosRP3

FPTracker::Point ALFA_BeamTransport::m_PosRP3
private

Definition at line 102 of file ALFA_BeamTransport.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_WriteDebugOutput

bool ALFA_BeamTransport::m_WriteDebugOutput
private

Definition at line 127 of file ALFA_BeamTransport.h.

◆ m_XiCut

double ALFA_BeamTransport::m_XiCut
private

Definition at line 121 of file ALFA_BeamTransport.h.


The documentation for this class was generated from the following files:
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::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
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
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
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
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:83
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:75
ALFA_BeamTransport::m_EnergyRP3
double m_EnergyRP3
Definition: ALFA_BeamTransport.h:108
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
ALFA_BeamTransport::m_pint
int m_pint
Definition: ALFA_BeamTransport.h:118
FPTracker::Point::y
double y() const
Definition: FPTracker/src/Point.cxx:18
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
ALFA_BeamTransport::m_Particle1
FPTracker::Particle m_Particle1
Definition: ALFA_BeamTransport.h:97
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ALFA_BeamTransport::GeVToMeV
void GeVToMeV(HepMC::GenEvent &evt)
convert GeV to MeV for HepMC event record
Definition: ALFA_BeamTransport.cxx:192
ALFA_BeamTransport::m_EnergyRP1
double m_EnergyRP1
Definition: ALFA_BeamTransport.h:107
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
HepMC::Print::line
void line(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:676
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
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
ALFA_BeamTransport::m_MCKey
SG::ReadHandleKey< McEventCollection > m_MCKey
Definition: ALFA_BeamTransport.h:80
FPConfig::xcol2
double xcol2
Definition: ALFA_FPConfig.h:22
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
FPConfig::apermb
double apermb
Definition: ALFA_FPConfig.h:20
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
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:85
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:250
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
FPConfig::RPDistance
float RPDistance
Definition: ALFA_FPConfig.h:25
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
FPConfig::pbeam0
double pbeam0
Definition: ALFA_FPConfig.h:23
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
a
TList * a
Definition: liststreamerinfos.cxx:10
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
h
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:178
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
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
ALFA_BeamTransport::m_PosRP3
FPTracker::Point m_PosRP3
Definition: ALFA_BeamTransport.h:102
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
ALFA_BeamTransport::m_pcount
int m_pcount
Definition: ALFA_BeamTransport.h:116
ServiceHandle< ICondSvc >