|
ATLAS Offline Software
|
#include <GSCCalibStep.h>
|
| GSCCalibStep (const std::string &name="GSCCalibStep") |
| Constructor with parameters: More...
|
|
virtual StatusCode | initialize () override |
| Dummy implementation of the initialisation function. More...
|
|
virtual StatusCode | calibrate (xAOD::JetContainer &) const override |
| Apply calibration to a jet container. More...
|
|
virtual void | print () const |
| Print the state of the tool. 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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
virtual StatusCode | getNominalResolutionData (const xAOD::Jet &, const JetHelper::JetContext &, double &) const |
|
virtual StatusCode | getNominalResolutionMC (const xAOD::Jet &, const JetHelper::JetContext &, double &) const |
|
|
float | getChargedFractionResponse (const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const |
|
float | getTile0Response (const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const |
|
float | getEM3Response (const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const |
|
float | getPunchThroughResponse (const xAOD::Jet &jet, const JetHelper::JetContext &jc, double eta_det) const |
|
float | getNTrkResponse (const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const |
|
float | getTrackWIDTHResponse (const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const |
|
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...
|
|
|
ToolHandle< JetHelper::IVarTool > | m_vartool1 {this, "vartool1", "VarTool", "InputVariable instance" } |
|
ToolHandle< JetHelper::IVarTool > | m_vartool2 {this, "vartool2", "VarTool", "InputVariable instance" } |
|
ToolHandle< JetHelper::IVarTool > | m_histTool2D {this, "histTool", "HistoInput2D", "HistoInput2D instance" } |
|
ToolHandleArray< JetHelper::IVarTool > | m_histTool_EM3 = {this , "histTool_EM3", {}, "EM3 histo reader" } |
|
ToolHandleArray< JetHelper::IVarTool > | m_histTool_ChargedFraction = {this , "histTool_CharFrac", {}, "ChargedFraction histo reader" } |
|
ToolHandleArray< JetHelper::IVarTool > | m_histTool_Tile0 = {this , "histTool_Tile0", {}, "Tile0 histo reader" } |
|
ToolHandleArray< JetHelper::IVarTool > | m_histTool_PunchThrough = {this , "histTool_PunchThrough", {}, "PunchThrough histo reader" } |
|
ToolHandleArray< JetHelper::IVarTool > | m_histTool_nTrk = {this , "histTool_nTrk", {}, "nTrk histo reader" } |
|
ToolHandleArray< JetHelper::IVarTool > | m_histTool_trackWIDTH = {this , "histTool_trackWIDTH", {}, "trackWIDTH histo reader" } |
|
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 29 of file GSCCalibStep.h.
◆ StoreGateSvc_t
◆ GSCCalibStep()
GSCCalibStep::GSCCalibStep |
( |
const std::string & |
name = "GSCCalibStep" | ) |
|
◆ calibrate()
Apply calibration to a jet container.
Implements IJetCalibStep.
Definition at line 42 of file GSCCalibStep.cxx.
51 std::vector<float> samplingFrac =
jet->getAttribute<std::vector<float> >(
"EnergyPerSampling");
56 float detectorEta =
jet->getAttribute<
float>(
"DetectorEta");
58 float trackWIDTHPVX = 0;
60 if(TrackWidthPt1000Acc.isAvailable(*
jet))
62 trackWIDTHPVX = TrackWidthPt1000Acc(*jet).at(PVindex);
63 ATH_MSG_DEBUG(
"trackWIDTHPVX found set to: " << trackWIDTHPVX);
65 jc.
setValue(
"trackWIDTH", trackWIDTHPVX);
69 if(NumTrkPt1000Acc.isAvailable(*
jet))
71 nTrkPVX = NumTrkPt1000Acc(*jet).at(PVindex);
76 float ChargedFraction = 0;
78 if(SumPtChargedPFOPt500Acc.isAvailable(*
jet))
80 ChargedFraction = SumPtChargedPFOPt500Acc(*jet).at(PVindex)/jetconstitP4.Pt();
81 ATH_MSG_DEBUG(
"ChargedFraction found set to: " << ChargedFraction);
83 jc.
setValue(
"ChargedFraction", ChargedFraction);
85 float EM3 = (samplingFrac[3]+samplingFrac[7])/jetconstitP4.e();
89 float Tile0 = (samplingFrac[12]+samplingFrac[18])/jetconstitP4.e();
93 double N90Constituents = 0;
95 if(N90ConstituentsAcc.isAvailable(*
jet))
97 N90Constituents = N90ConstituentsAcc(*
jet);
98 ATH_MSG_DEBUG(
"N90Constituents found set to: " << N90Constituents);
100 jc.
setValue(
"N90Constituents", N90Constituents);
102 double caloWIDTH = 0;
104 if(WidthAcc.isAvailable(*
jet))
106 caloWIDTH = WidthAcc(*
jet);
109 jc.
setValue(
"caloWIDTH", caloWIDTH);
111 float TG3 = (samplingFrac[17])/jetconstitP4.e();
117 if(GhostMuonSegmentCountAcc.isAvailable(*
jet))
119 Nsegments = GhostMuonSegmentCountAcc(*
jet);
122 jc.
setValue(
"Nsegments", Nsegments);
126 float getGSCCorrection = 1.0;
127 int etabin = fabs(detectorEta)/0.1;
137 jet->setJetP4(
jet->jetP4()*getGSCCorrection );
139 jet->setJetP4(
jet->jetP4()*getGSCCorrection );
141 jet->setJetP4(
jet->jetP4()*getGSCCorrection );
143 jet->setJetP4(
jet->jetP4()*getGSCCorrection );
149 jet->setJetP4( startingP4*getGSCCorrection );
156 return StatusCode::SUCCESS;
◆ 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]
◆ 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
◆ getChargedFractionResponse()
Definition at line 159 of file GSCCalibStep.cxx.
160 if (jc.
getValue<
float>(
"ChargedFraction")<=0)
return 1;
163 return ChargedFractionResponse;
◆ getEM3Response()
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getNominalResolutionData()
◆ getNominalResolutionMC()
◆ getNTrkResponse()
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ getPunchThroughResponse()
Definition at line 180 of file GSCCalibStep.cxx.
182 std::vector<float> punchThroughEtaBins = {0.0, 1.3, 1.9};
185 ATH_MSG_WARNING(
"Please check that the punch through eta binning is properly set in your config file");
186 if ( eta_det >= punchThroughEtaBins.back() || jc.
getValue<
float>(
"Nsegments") < 20 )
return 1;
187 for (
uint i=0;
i<punchThroughEtaBins.size()-1; ++
i) {
188 if(eta_det >= punchThroughEtaBins[
i] && eta_det < punchThroughEtaBins[
i+1]) etabin =
i;
191 ATH_MSG_WARNING(
"There was a problem determining the eta bin to use for the punch through correction.");
196 if(PunchThroughResponse>1)
return 1;
197 return PunchThroughResponse;
◆ getTile0Response()
◆ getTrackWIDTHResponse()
Definition at line 218 of file GSCCalibStep.cxx.
219 if (jc.
getValue<
float>(
"trackWIDTH")<=0)
return 1;
222 double trackWIDTHResponse;
234 return trackWIDTHResponse;
◆ initialize()
StatusCode GSCCalibStep::initialize |
( |
| ) |
|
|
overridevirtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented from asg::AsgTool.
Definition at line 24 of file GSCCalibStep.cxx.
38 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]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ 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.
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ 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_detStore
◆ m_evtStore
◆ m_histTool2D
◆ m_histTool_ChargedFraction
ToolHandleArray<JetHelper::IVarTool> GSCCalibStep::m_histTool_ChargedFraction = {this , "histTool_CharFrac", {}, "ChargedFraction histo reader" } |
|
private |
◆ m_histTool_EM3
ToolHandleArray<JetHelper::IVarTool> GSCCalibStep::m_histTool_EM3 = {this , "histTool_EM3", {}, "EM3 histo reader" } |
|
private |
◆ m_histTool_nTrk
ToolHandleArray<JetHelper::IVarTool> GSCCalibStep::m_histTool_nTrk = {this , "histTool_nTrk", {}, "nTrk histo reader" } |
|
private |
◆ m_histTool_PunchThrough
ToolHandleArray<JetHelper::IVarTool> GSCCalibStep::m_histTool_PunchThrough = {this , "histTool_PunchThrough", {}, "PunchThrough histo reader" } |
|
private |
◆ m_histTool_Tile0
ToolHandleArray<JetHelper::IVarTool> GSCCalibStep::m_histTool_Tile0 = {this , "histTool_Tile0", {}, "Tile0 histo reader" } |
|
private |
◆ m_histTool_trackWIDTH
ToolHandleArray<JetHelper::IVarTool> GSCCalibStep::m_histTool_trackWIDTH = {this , "histTool_trackWIDTH", {}, "trackWIDTH histo reader" } |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vartool1
◆ m_vartool2
◆ m_vhka
The documentation for this class was generated from the following files:
ToolHandle< JetHelper::IVarTool > m_vartool1
float getEM3Response(const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const
Class JetContext Designed to read AOD information related to the event, N vertices,...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
ToolHandleArray< JetHelper::IVarTool > m_histTool_ChargedFraction
Helper class to provide constant type-safe access to aux data.
ToolHandle< JetHelper::IVarTool > m_histTool2D
ToolHandle< JetHelper::IVarTool > m_vartool2
float getNTrkResponse(const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
float getTile0Response(const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const
ToolHandleArray< JetHelper::IVarTool > m_histTool_nTrk
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float getTrackWIDTHResponse(const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const
float getChargedFractionResponse(const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
ToolHandleArray< JetHelper::IVarTool > m_histTool_trackWIDTH
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ToolHandleArray< JetHelper::IVarTool > m_histTool_PunchThrough
bool setValue(const std::string &name, const T value, bool allowOverwrite=false)
ToolHandleArray< JetHelper::IVarTool > m_histTool_EM3
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ToolHandleArray< JetHelper::IVarTool > m_histTool_Tile0
void getValue(const std::string &name, T &value) const