|
ATLAS Offline Software
|
#include <SuperCellVsCaloCellTestAlg.h>
|
| SuperCellVsCaloCellTestAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~SuperCellVsCaloCellTestAlg () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
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 |
|
◆ StoreGateSvc_t
◆ SuperCellVsCaloCellTestAlg()
SuperCellVsCaloCellTestAlg::SuperCellVsCaloCellTestAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~SuperCellVsCaloCellTestAlg()
SuperCellVsCaloCellTestAlg::~SuperCellVsCaloCellTestAlg |
( |
| ) |
|
|
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 SuperCellVsCaloCellTestAlg::execute |
( |
| ) |
|
|
virtual |
Definition at line 119 of file SuperCellVsCaloCellTestAlg.cxx.
131 return StatusCode::FAILURE;
135 for(
const auto *scell : *scells) {
141 double scellEt = scell->e()*scell->sinTh()*1
e-3;
144 std::vector<Identifier> ccellIds =
m_sc2ccMappingTool->superCellToOfflineID( scell->ID() );
147 for(
auto& ccellId : ccellIds) {
150 if(ccell->
e()>0) cellEt += ccell->
e()*ccell->
sinTh();
152 if(cellEt>0)
m_etReso[samplingEnum]->Fill(cellEt*1
e-3,scellEt*1000./cellEt);
154 if ( TMath::Abs(cellEt)>1 )
resolution = 100*(scellEt - cellEt*1
e-3 ) / (cellEt*1
e-3);
155 if ( TMath::Abs(cellEt)>150 ) {
165 double tscellEt = tscell->
e()*tscell->
sinTh()*1
e-3;
166 if(tscellEt>0)
m_etResoTruth[samplingEnum]->Fill(tscellEt,scellEt/tscellEt);
169 if( (tscellEt>1. && scellEt/tscellEt<0.25) || (scellEt>1. && tscellEt/scellEt<0.25) ) {
193 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 SuperCellVsCaloCellTestAlg::finalize |
( |
| ) |
|
|
virtual |
Definition at line 90 of file SuperCellVsCaloCellTestAlg.cxx.
109 TGraph*
g =
new TGraph(graphPointsX.second.size(),&graphPointsX.second[0],&
m_graphsY[graphPointsX.first][0]);
110 g->SetTitle(graphPointsX.first);
111 g->SetMarkerStyle(6);
116 return StatusCode::SUCCESS;
◆ initialize()
StatusCode SuperCellVsCaloCellTestAlg::initialize |
( |
| ) |
|
|
virtual |
Definition at line 46 of file SuperCellVsCaloCellTestAlg.cxx.
53 double etBins[11] = {0.1,0.25,0.5,0.75,1.,1.5,2.,3.,4.,5.,10.};
57 m_etReso.back()->SetDirectory(
nullptr);
69 m_tree =
new TTree(
"debug",
"debug");
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()
◆ 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_cablingKey
◆ m_ccIdHelper
◆ m_ccKey
std::string SuperCellVsCaloCellTestAlg::m_ccKey |
|
private |
◆ m_detStore
◆ m_digitKey
std::string SuperCellVsCaloCellTestAlg::m_digitKey |
|
private |
◆ m_etReso
std::vector<TProfile*> SuperCellVsCaloCellTestAlg::m_etReso |
|
private |
◆ m_etResoTruth
std::vector<TProfile*> SuperCellVsCaloCellTestAlg::m_etResoTruth |
|
private |
◆ m_eventNumber
int SuperCellVsCaloCellTestAlg::m_eventNumber =0 |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_graphsX
std::map<TString,std::vector<float> > SuperCellVsCaloCellTestAlg::m_graphsX |
|
private |
◆ m_graphsY
std::map<TString,std::vector<float> > SuperCellVsCaloCellTestAlg::m_graphsY |
|
private |
◆ m_Linear_SCet_vs_et
std::vector<TH2F*> SuperCellVsCaloCellTestAlg::m_Linear_SCet_vs_et |
|
private |
◆ m_Reso_et
std::vector<TH1F*> SuperCellVsCaloCellTestAlg::m_Reso_et |
|
private |
◆ m_Reso_et_vs_et
std::vector<TH2F*> SuperCellVsCaloCellTestAlg::m_Reso_et_vs_et |
|
private |
◆ m_Reso_et_vs_eta
std::vector<TH2F*> SuperCellVsCaloCellTestAlg::m_Reso_et_vs_eta |
|
private |
◆ m_sc2ccMappingTool
◆ m_scKey
std::string SuperCellVsCaloCellTestAlg::m_scKey |
|
private |
◆ m_stream
std::string SuperCellVsCaloCellTestAlg::m_stream |
|
private |
◆ m_tree
TTree* SuperCellVsCaloCellTestAlg::m_tree |
|
private |
◆ m_treeChannel
int SuperCellVsCaloCellTestAlg::m_treeChannel =0 |
|
private |
◆ m_treeDigits
std::vector<short int>* SuperCellVsCaloCellTestAlg::m_treeDigits |
|
private |
◆ m_treeEta
float SuperCellVsCaloCellTestAlg::m_treeEta =0 |
|
private |
◆ m_treeSampling
int SuperCellVsCaloCellTestAlg::m_treeSampling =0 |
|
private |
◆ m_treeSCET
float SuperCellVsCaloCellTestAlg::m_treeSCET =0 |
|
private |
◆ m_treeTruthET
float SuperCellVsCaloCellTestAlg::m_treeTruthET =0 |
|
private |
◆ m_tscKey
std::string SuperCellVsCaloCellTestAlg::m_tscKey |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< TProfile * > m_etReso
std::vector< TH2F * > m_Linear_SCet_vs_et
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual double e() const override final
get energy (data member) (synonym to method energy()
std::map< TString, std::vector< float > > m_graphsX
TGraphErrors * GetEntries(TH2F *histo)
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
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)
double resolution[nGasTypes][nParametersResolution]
value_type get_compact() const
Get the compact id.
std::vector< TH2F * > m_Reso_et_vs_eta
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::map< TString, std::vector< float > > m_graphsY
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
std::vector< TProfile * > m_etResoTruth
def TProfile(*args, **kwargs)
std::vector< short int > * m_treeDigits
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< TH1F * > m_Reso_et
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
ToolHandle< ICaloSuperCellIDTool > m_sc2ccMappingTool
virtual void renounce()=0
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initialize(bool used=true)
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Container class for CaloCell.
DataObjIDColl m_extendedExtraObjects
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Container class for LArDigit.
AthAlgorithm()
Default constructor:
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
const CaloCell_ID * m_ccIdHelper
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
std::vector< TH2F * > m_Reso_et_vs_et