 |
ATLAS Offline Software
|
#include <HIClusterGeo_HistoFiller.h>
|
| | HIClusterGeo_HistoFiller (const std::string &name, ISvcLocator *pSvcLocator) |
| |
| virtual | ~HIClusterGeo_HistoFiller ()=default |
| |
| virtual StatusCode | initialize () override |
| |
| virtual StatusCode | execute () override |
| |
| virtual StatusCode | finalize () 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, V, H > &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 |
| |
|
| TH1 * | regAndGetTHF (const std::string &histName, const std::string &histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax) |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| ServiceHandle< ITHistSvc > | m_thistSvc {this, "THistSvc", "THistSvc"} |
| |
| Gaudi::Property< std::string > | m_histStream {this, "HistStream", "CLUSTERGEOFILLERSTREAM"} |
| |
| Gaudi::Property< float > | m_minFCalET {this, "minFCalET", 0.0, "minimum allowed FCal ET in TeV"} |
| |
| Gaudi::Property< float > | m_maxFCalET {this, "maxFCalET", 5.4, "maximum allowed FCal ET in TeV"} |
| |
| SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this, "EventInfoKey", "EventInfo", "name of EventInfo container"} |
| |
| SG::ReadHandleKey< xAOD::VertexContainer > | m_vertexContainerKey {this, "VertexContainerKey", "PrimaryVertices", "name of VertexContainer"} |
| |
| SG::ReadHandleKey< xAOD::CaloClusterContainer > | m_caloClusterContainerKey {this, "CaloClusterContainerKey", "HIClusters", "name of CaloClusterContainer"} |
| |
| SG::ReadHandleKey< xAOD::HIEventShapeContainer > | m_hiEventShapeKey {this, "HIEventShapeKey", "CaloSums", "name of HIEventShapeContainer"} |
| |
| std::unordered_map< int, TH2F * > | m_histTileWeights |
| |
| const int | m_etaBins =100 |
| |
| const int | m_phiBins =64 |
| |
| const int | m_totalBins = (m_etaBins+2)*(m_phiBins+2) |
| |
| TH2F * | m_etaPhiMapping |
| |
| 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 27 of file HIClusterGeo_HistoFiller.h.
◆ StoreGateSvc_t
◆ HIClusterGeo_HistoFiller()
| HIClusterGeo_HistoFiller::HIClusterGeo_HistoFiller |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~HIClusterGeo_HistoFiller()
| virtual HIClusterGeo_HistoFiller::~HIClusterGeo_HistoFiller |
( |
| ) |
|
|
virtualdefault |
◆ 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 HIClusterGeo_HistoFiller::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 49 of file HIClusterGeo_HistoFiller.cxx.
51 const EventContext& ctx = Gaudi::Hive::currentContext();
54 if (!eventInfo.isValid())
57 return StatusCode::SUCCESS;
64 return StatusCode::SUCCESS;
73 if(!vertices.isValid())
76 return StatusCode::SUCCESS;
78 if(vertices->size() <= 1)
81 return StatusCode::SUCCESS;
85 if (!caloClusters.isValid())
88 return StatusCode::SUCCESS;
92 if (!hiEventShape.isValid())
95 return StatusCode::SUCCESS;
98 int currentLB = eventInfo->lumiBlock();
99 int currentRun = eventInfo->runNumber();
105 TH2F * newHistTileWeights =
static_cast<TH2F*
>(
regAndGetTHF(Form(
"h_clusterET_fcalET_%d_%d",currentRun,currentLB),
";bin ID;sum FCalET/clusterET/FCalET^2/clusterET^2/FCalET*clusterET/n_{events}",
m_totalBins, -0.5,
m_totalBins-0.5, 6,0.5,6.5));
106 if (newHistTileWeights ==
nullptr)
108 ATH_MSG_WARNING(
"Could not create histogram "<<Form(
"h_clusterET_fcalET_%d_%d",currentRun,currentLB)<<
" that was supposed to be used for Run "<<currentRun<<
" LB "<<currentLB);
109 return StatusCode::SUCCESS;
117 float fcalEt = hiEventShape->at(5)->et()*1
e-6;
121 return StatusCode::SUCCESS;
124 for(
const auto* cluster : *caloClusters)
126 float eta = cluster->eta();
127 float phi = cluster->phi();
129 float ET = cluster->e() * 1
e-3 / std::cosh(
eta);
131 currentHistTileWeights->Fill(binID, 1, fcalEt);
132 currentHistTileWeights->Fill(binID, 2, ET);
133 currentHistTileWeights->Fill(binID, 3, fcalEt*fcalEt);
134 currentHistTileWeights->Fill(binID, 4, ET*ET);
135 currentHistTileWeights->Fill(binID, 5, fcalEt*ET);
136 currentHistTileWeights->Fill(binID, 6, 1.);
139 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();
◆ finalize()
| StatusCode HIClusterGeo_HistoFiller::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
| StatusCode HIClusterGeo_HistoFiller::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ regAndGetTHF()
| TH1 * HIClusterGeo_HistoFiller::regAndGetTHF |
( |
const std::string & |
histName, |
|
|
const std::string & |
histTitle, |
|
|
int |
numBinsX, |
|
|
double |
xMin, |
|
|
double |
xMax, |
|
|
int |
numBinsY, |
|
|
double |
yMin, |
|
|
double |
yMax |
|
) |
| |
|
private |
◆ renounce()
◆ renounceArray()
◆ 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_caloClusterContainerKey
◆ m_detStore
◆ m_etaBins
| const int HIClusterGeo_HistoFiller::m_etaBins =100 |
|
private |
◆ m_etaPhiMapping
| TH2F* HIClusterGeo_HistoFiller::m_etaPhiMapping |
|
private |
◆ m_eventInfoKey
◆ m_evtStore
◆ m_extendedExtraObjects
| DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hiEventShapeKey
◆ m_histStream
| Gaudi::Property<std::string> HIClusterGeo_HistoFiller::m_histStream {this, "HistStream", "CLUSTERGEOFILLERSTREAM"} |
|
private |
◆ m_histTileWeights
| std::unordered_map<int, TH2F*> HIClusterGeo_HistoFiller::m_histTileWeights |
|
private |
◆ m_maxFCalET
| Gaudi::Property<float> HIClusterGeo_HistoFiller::m_maxFCalET {this, "maxFCalET", 5.4, "maximum allowed FCal ET in TeV"} |
|
private |
◆ m_minFCalET
| Gaudi::Property<float> HIClusterGeo_HistoFiller::m_minFCalET {this, "minFCalET", 0.0, "minimum allowed FCal ET in TeV"} |
|
private |
◆ m_phiBins
| const int HIClusterGeo_HistoFiller::m_phiBins =64 |
|
private |
◆ m_thistSvc
| ServiceHandle<ITHistSvc> HIClusterGeo_HistoFiller::m_thistSvc {this, "THistSvc", "THistSvc"} |
|
private |
◆ m_totalBins
◆ m_varHandleArraysDeclared
◆ m_vertexContainerKey
◆ m_vhka
The documentation for this class was generated from the following files:
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerKey
Scalar phi() const
phi method
ServiceHandle< ITHistSvc > m_thistSvc
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_hiEventShapeKey
Scalar eta() const
pseudorapidity method
Gaudi::Property< std::string > m_histStream
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
const std::string & key() const
Return the StoreGate ID for the referenced object.
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
@ LAr
The LAr calorimeter.
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Gaudi::Property< float > m_minFCalET
virtual void setOwner(IDataHandleHolder *o)=0
@ Error
The sub-detector issued an error.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
def tmpHist(what, wmin=-1e10, wmax=+1e10)
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
TH1 * regAndGetTHF(const std::string &histName, const std::string &histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DataObjIDColl m_extendedExtraObjects
@ Tile
The Tile calorimeter.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::unordered_map< int, TH2F * > m_histTileWeights
AthAlgorithm()
Default constructor:
Gaudi::Property< float > m_maxFCalET
@ Core
Core flags describing the event.