|
ATLAS Offline Software
|
Go to the documentation of this file.
38 return StatusCode::SUCCESS;
51 std::vector<float> samplingFrac =
jet->getAttribute<std::vector<float> >(
"EnergyPerSampling");
56 float detectorEta =
jet->getAttribute<
float>(
"DetectorEta");
58 float trackWIDTHPVX = 0;
62 trackWIDTHPVX = TrackWidthPt1000Acc(*jet).at(PVindex);
63 ATH_MSG_DEBUG(
"trackWIDTHPVX found set to: " << trackWIDTHPVX);
65 jc.
setValue(
"trackWIDTH", trackWIDTHPVX);
71 nTrkPVX = NumTrkPt1000Acc(*jet).at(PVindex);
76 float ChargedFraction = 0;
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;
97 N90Constituents = N90ConstituentsAcc(*
jet);
98 ATH_MSG_DEBUG(
"N90Constituents found set to: " << N90Constituents);
100 jc.
setValue(
"N90Constituents", N90Constituents);
102 double caloWIDTH = 0;
106 caloWIDTH = WidthAcc(*
jet);
109 jc.
setValue(
"caloWIDTH", caloWIDTH);
111 float TG3 = (samplingFrac[17])/jetconstitP4.e();
119 Nsegments = GhostMuonSegmentCountAcc(*
jet);
122 jc.
setValue(
"Nsegments", Nsegments);
126 float getGSCCorrection = 1.0;
127 int etabin = fabs(detectorEta)/0.1;
137 jet->setJetP4( startingP4*getGSCCorrection );
139 jet->setJetP4( startingP4*getGSCCorrection );
141 jet->setJetP4( startingP4*getGSCCorrection );
143 jet->setJetP4( startingP4*getGSCCorrection );
149 jet->setJetP4( startingP4*getGSCCorrection );
156 return StatusCode::SUCCESS;
160 if (jc.
getValue<
float>(
"ChargedFraction")<=0)
return 1;
163 return ChargedFractionResponse;
167 if (jc.
getValue<
float>(
"Tile0")<0)
return 1;
170 return Tile0Response;
174 if (jc.
getValue<
float>(
"EM3")<=0)
return 1;
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;
201 if (jc.
getValue<
int>(
"nTrk")<=0)
return 1;
219 if (jc.
getValue<
float>(
"trackWIDTH")<=0)
return 1;
222 double trackWIDTHResponse;
234 return trackWIDTHResponse;
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,...
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
float getTile0Response(const xAOD::Jet &jet, const JetHelper::JetContext &jc, uint etabin) const
GSCCalibStep(const std::string &name="GSCCalibStep")
Constructor with parameters:
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandleArray< JetHelper::IVarTool > m_histTool_nTrk
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
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
ToolHandleArray< JetHelper::IVarTool > m_histTool_trackWIDTH
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
#define ATH_MSG_WARNING(x)
ToolHandleArray< JetHelper::IVarTool > m_histTool_PunchThrough
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
bool setValue(const std::string &name, const T value, bool allowOverwrite=false)
ToolHandleArray< JetHelper::IVarTool > m_histTool_EM3
virtual StatusCode calibrate(xAOD::JetContainer &) const override
Apply calibration to a jet container.
float getPunchThroughResponse(const xAOD::Jet &jet, const JetHelper::JetContext &jc, double eta_det) const
ToolHandleArray< JetHelper::IVarTool > m_histTool_Tile0
void getValue(const std::string &name, T &value) const