ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
EvgenProdTools
EvgenProdTools
EvgenOTFTopUpSvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef XAOD_ANALYSIS
6
7
#ifndef EVGENPRODTOOLS_EVGENOTFTOPUPSVC_H
8
#define EVGENPRODTOOLS_EVGENOTFTOPUPSVC_H
9
10
#include "
AthenaBaseComps/AthService.h
"
11
#include "
GenInterfaces/IEvgenOTFTopUpSvc.h
"
12
#include <string>
13
18
class
EvgenOTFTopUpSvc
:
public
extends<AthService, IEvgenOTFTopUpSvc> {
19
public
:
20
21
// Constructor and destructor
22
EvgenOTFTopUpSvc
(
const
std::string& name, ISvcLocator* pSvcLocator);
23
24
~EvgenOTFTopUpSvc
() {;}
25
26
// Standard sequence functions - don't actually need an excecute
27
// Could use init() as a chance to run OTF for the first time,
28
// but that applied to the OTF algorithm, not this service
29
virtual
StatusCode
finalize
()
override
;
30
31
// Getters
32
virtual
long
getNPerFile
()
const override
{
return
m_nPerFile
; }
33
virtual
long
getNUsedSoFar
()
const override
{
return
m_nUsedSoFar
; }
34
virtual
double
getEfficiency
()
const override
{
return
m_efficiency
; }
35
virtual
bool
getNewFileFlag
()
const override
{
return
m_newFileFlag
; }
36
37
// Setters - first for Pythia/Herwig to call when they use up events
38
virtual
void
usedEvents
()
override
{ ++
m_nUsedSoFar
; }
39
virtual
void
usedEvents
(
const
int
n )
override
{
m_nUsedSoFar
+=n; }
40
41
// New file created by the OTF generator algorithm
42
virtual
void
newFile
( std::string& s )
override
43
{ ++
m_nIterations
;
m_newFileFlag
=
true
;
m_newFileName
=s;
m_nUsedSoFar
=0; }
44
45
// New file grabbed by the showering generator
46
virtual
const
std::string&
getFile
()
override
47
{
m_newFileFlag
=
false
;
return
m_newFileName
; }
48
49
private
:
50
51
bool
m_execDuringInit
;
52
long
m_nPerFile
;
53
long
m_nUsedSoFar
;
54
double
m_efficiency
;
55
bool
m_newFileFlag
;
56
std::string
m_newFileName
;
57
58
long
m_nTotal
;
59
long
m_nIterations
;
60
};
61
62
#endif
63
64
#endif
AthService.h
IEvgenOTFTopUpSvc.h
EvgenOTFTopUpSvc::finalize
virtual StatusCode finalize() override
Definition
EvgenOTFTopUpSvc.cxx:22
EvgenOTFTopUpSvc::m_nUsedSoFar
long m_nUsedSoFar
Number of events used so far by Pythia/Herwig (counter).
Definition
EvgenOTFTopUpSvc.h:53
EvgenOTFTopUpSvc::newFile
virtual void newFile(std::string &s) override
Definition
EvgenOTFTopUpSvc.h:42
EvgenOTFTopUpSvc::m_nTotal
long m_nTotal
Book-keeping: total number of generated events.
Definition
EvgenOTFTopUpSvc.h:58
EvgenOTFTopUpSvc::getNPerFile
virtual long getNPerFile() const override
Definition
EvgenOTFTopUpSvc.h:32
EvgenOTFTopUpSvc::m_efficiency
double m_efficiency
Rough efficiency in Pythia/Herwig (Set in JO).
Definition
EvgenOTFTopUpSvc.h:54
EvgenOTFTopUpSvc::~EvgenOTFTopUpSvc
~EvgenOTFTopUpSvc()
Nothing to delete...
Definition
EvgenOTFTopUpSvc.h:24
EvgenOTFTopUpSvc::usedEvents
virtual void usedEvents(const int n) override
Definition
EvgenOTFTopUpSvc.h:39
EvgenOTFTopUpSvc::EvgenOTFTopUpSvc
EvgenOTFTopUpSvc(const std::string &name, ISvcLocator *pSvcLocator)
Definition
EvgenOTFTopUpSvc.cxx:9
EvgenOTFTopUpSvc::usedEvents
virtual void usedEvents() override
Definition
EvgenOTFTopUpSvc.h:38
EvgenOTFTopUpSvc::m_nIterations
long m_nIterations
Book-keeping: total number of OTF iterations.
Definition
EvgenOTFTopUpSvc.h:59
EvgenOTFTopUpSvc::m_newFileName
std::string m_newFileName
Name of the new OTF generated file.
Definition
EvgenOTFTopUpSvc.h:56
EvgenOTFTopUpSvc::getEfficiency
virtual double getEfficiency() const override
Definition
EvgenOTFTopUpSvc.h:34
EvgenOTFTopUpSvc::getFile
virtual const std::string & getFile() override
Definition
EvgenOTFTopUpSvc.h:46
EvgenOTFTopUpSvc::m_nPerFile
long m_nPerFile
Number of events per LHE file (Set in JO).
Definition
EvgenOTFTopUpSvc.h:52
EvgenOTFTopUpSvc::m_newFileFlag
bool m_newFileFlag
Just produced a new file with the OTF generator.
Definition
EvgenOTFTopUpSvc.h:55
EvgenOTFTopUpSvc::getNewFileFlag
virtual bool getNewFileFlag() const override
Definition
EvgenOTFTopUpSvc.h:35
EvgenOTFTopUpSvc::getNUsedSoFar
virtual long getNUsedSoFar() const override
Definition
EvgenOTFTopUpSvc.h:33
EvgenOTFTopUpSvc::m_execDuringInit
bool m_execDuringInit
Execute OTF during initialization?
Definition
EvgenOTFTopUpSvc.h:51
Generated on
for ATLAS Offline Software by
1.17.0