|
ATLAS Offline Software
|
#include <LArMinBiasAlg.h>
|
| LArMinBiasAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Athena-Algorithm Constructor. More...
|
|
| ~LArMinBiasAlg () |
| Default Destructor. More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | stop () override |
|
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 |
|
|
int | m_datasetID_lowPt |
|
int | m_datasetID_highPt |
|
double | m_weight_lowPt |
|
double | m_weight_highPt |
|
SG::ReadCondHandleKey< LArMCSym > | m_mcSymKey { this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" } |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"} |
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey |
|
const LArEM_ID * | m_larem_id = nullptr |
|
const CaloCell_ID * | m_calo_id = nullptr |
|
std::vector< double > | m_eCell |
|
ServiceHandle< ITHistSvc > | m_thistSvc {this,"THistSvc","THistSvc"} |
|
TTree * | m_tree = nullptr |
|
int | m_nevt_total = 0 |
|
int | m_n1 = 0 |
|
int | m_n2 = 0 |
|
int | m_nsymcell = 0 |
|
double | m_nevt [MAX_SYM_CELLS] {} |
|
int | m_layer [MAX_SYM_CELLS] {} |
|
int | m_region [MAX_SYM_CELLS] {} |
|
int | m_identifier [MAX_SYM_CELLS] {} |
|
int | m_ieta [MAX_SYM_CELLS] {} |
|
float | m_eta [MAX_SYM_CELLS] {} |
|
float | m_phi [MAX_SYM_CELLS] {} |
|
double | m_average [MAX_SYM_CELLS] {} |
|
double | m_rms [MAX_SYM_CELLS] {} |
|
double | m_offset [MAX_SYM_CELLS] {} |
|
std::vector< CellInfo > | m_CellList |
|
std::vector< int > | m_symCellIndex |
|
float | m_first |
|
int | m_ncell = 0 |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this,"EvtInfo", "EventInfo", "EventInfo name"} |
|
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 |
|
Definition at line 36 of file LArMinBiasAlg.h.
◆ StoreGateSvc_t
◆ LArMinBiasAlg()
LArMinBiasAlg::LArMinBiasAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArMinBiasAlg()
LArMinBiasAlg::~LArMinBiasAlg |
( |
| ) |
|
|
default |
◆ addCell()
void LArMinBiasAlg::addCell |
( |
int |
index, |
|
|
double |
e1, |
|
|
double |
e2, |
|
|
double |
wt = 1. |
|
) |
| |
|
private |
Definition at line 247 of file LArMinBiasAlg.cxx.
249 if (index < m_ncell && index>=0) {
262 double Anew =
weight+oldN;
264 double deltaE =
energy-newAverage;
265 double newRMS =
frac*(oldRMS + (newAverage-oldAverage)*(newAverage-oldAverage)) +
weight*deltaE*deltaE/Anew;
267 double newAverage2 =
frac*oldAverage2 +
weight*eshift/Anew;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArMinBiasAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 106 of file LArMinBiasAlg.cxx.
112 const EventContext& ctx = Gaudi::Hive::currentContext();
124 return StatusCode::FAILURE;
131 std::vector<int> doneCell;
154 if (doneCell[i2]>=0) {
187 if (!eventInfo.isValid()) {
189 return StatusCode::FAILURE;
191 int channelNumber = eventInfo->mcChannelNumber();
208 ATH_MSG_WARNING(
" Neither low nor high Pt MinBias sample " << channelNumber <<
" set weight to 1.0 ");
222 for (
unsigned int iHitContainer=0;iHitContainer<
HitContainer.size();iHitContainer++)
226 for (
const LArHit* hit : *hit_container)
229 double energy = hit->energy();
230 double time =hit->time();
232 if (index < m_ncell && index>=0 && fabs(
time)<25.) {
244 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ fillNtuple()
void LArMinBiasAlg::fillNtuple |
( |
| ) |
|
|
private |
◆ finalize()
StatusCode LArMinBiasAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode LArMinBiasAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 39 of file LArMinBiasAlg.cxx.
47 m_tree =
new TTree(
"m_tree",
"Offset ntuple");
65 return StatusCode::SUCCESS;
87 return StatusCode::SUCCESS;
◆ inputHandles()
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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ stop()
StatusCode LArMinBiasAlg::stop |
( |
| ) |
|
|
overridevirtual |
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_average
◆ m_cablingKey
◆ m_calo_id
◆ m_caloMgrKey
Initial value:{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }
Definition at line 66 of file LArMinBiasAlg.h.
◆ m_CellList
std::vector<CellInfo> LArMinBiasAlg::m_CellList |
|
private |
◆ m_datasetID_highPt
int LArMinBiasAlg::m_datasetID_highPt |
|
private |
◆ m_datasetID_lowPt
int LArMinBiasAlg::m_datasetID_lowPt |
|
private |
◆ m_detStore
◆ m_eCell
std::vector<double> LArMinBiasAlg::m_eCell |
|
private |
◆ m_eta
◆ m_eventInfoKey
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_first
float LArMinBiasAlg::m_first |
|
private |
◆ m_identifier
◆ m_ieta
◆ m_larem_id
◆ m_layer
◆ m_mcSymKey
◆ m_n1
int LArMinBiasAlg::m_n1 = 0 |
|
private |
◆ m_n2
int LArMinBiasAlg::m_n2 = 0 |
|
private |
◆ m_ncell
int LArMinBiasAlg::m_ncell = 0 |
|
private |
◆ m_nevt
◆ m_nevt_total
int LArMinBiasAlg::m_nevt_total = 0 |
|
private |
◆ m_nsymcell
int LArMinBiasAlg::m_nsymcell = 0 |
|
private |
◆ m_offset
◆ m_phi
◆ m_region
◆ m_rms
◆ m_symCellIndex
std::vector<int> LArMinBiasAlg::m_symCellIndex |
|
private |
◆ m_thistSvc
ServiceHandle<ITHistSvc> LArMinBiasAlg::m_thistSvc {this,"THistSvc","THistSvc"} |
|
private |
◆ m_tree
TTree* LArMinBiasAlg::m_tree = nullptr |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_weight_highPt
double LArMinBiasAlg::m_weight_highPt |
|
private |
◆ m_weight_lowPt
double LArMinBiasAlg::m_weight_lowPt |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
SG::ReadCondHandleKey< LArMCSym > m_mcSymKey
std::vector< double > m_eCell
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
void addCell(int index, double e1, double e2, double wt=1.)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double m_nevt[MAX_SYM_CELLS]
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
double m_offset[MAX_SYM_CELLS]
vector< DHit > HitContainer
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
const LArEM_ID * m_larem_id
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
double m_rms[MAX_SYM_CELLS]
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< CellInfo > m_CellList
int m_identifier[MAX_SYM_CELLS]
virtual StatusCode sysInitialize() override
Override sysInitialize.
This class initializes the Calo (LAr and Tile) offline identifiers.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
double m_average[MAX_SYM_CELLS]
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloCell_ID * m_calo_id
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::vector< int > m_symCellIndex
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
StatusCode initialize(bool used=true)
Class to store hit energy and time in LAr cell from G4 simulation.
ServiceHandle< ITHistSvc > m_thistSvc
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
float m_phi[MAX_SYM_CELLS]
DataObjIDColl m_extendedExtraObjects
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
int m_region[MAX_SYM_CELLS]
int m_ieta[MAX_SYM_CELLS]
int m_layer[MAX_SYM_CELLS]
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float eta() const
cell eta
AthAlgorithm()
Default constructor:
float phi() const
cell phi
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float m_eta[MAX_SYM_CELLS]
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size