|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   31     ATH_MSG_WARNING(
"   InSituCalibStep::calibrate : Running over MC, will not calibrate unless expert option CalibrateMC is set to true");
 
   37     return StatusCode::FAILURE;
 
   40   for(
unsigned int i = 0 ; 
i < nHist ; 
i++){
 
   43     TH1D *h_Abs = 
dynamic_cast<TH1D*
>( &histoTool_Abs->
getHistogram());
 
   44     TH2D *h_EtaInter = 
dynamic_cast<TH2D*
>( &histoTool_EtaInter->
getHistogram());
 
   58   return StatusCode::SUCCESS;
 
   66   unsigned int rNumber = 0;
 
   68     return StatusCode::FAILURE;
 
   70     return StatusCode::SUCCESS;
 
   72   unsigned int runNumber = 
static_cast<unsigned int>(rNumber+0.5);
 
   74   unsigned int periodInd = 9999;
 
   75   unsigned int currentInd = 0;
 
   77     unsigned int firstRun = 
static_cast<unsigned int>( 
p + 1.5);
 
   78     unsigned int lastRun = 
static_cast<unsigned int>( *(&
p + 1) +0.5);
 
   81     periodInd = currentInd;
 
   85     return StatusCode::SUCCESS; 
 
   89     jet->setJetP4(jetStartP4);
 
   92         return StatusCode::FAILURE;
 
   94     calibP4 = calibP4 * 
s;
 
   97     jet->setJetP4(calibP4);
 
   99   return StatusCode::SUCCESS;
 
  104   static std::atomic<unsigned int> eventInfoWarnings = 0;
 
  107     eventObj = rhEvtInfo.
cptr();
 
  111     if ( eventInfoWarnings < 20 )
 
  112       ATH_MSG_ERROR(
"   InSituCalibStep::calibrate : Failed to retrieve event information.");
 
  113     return StatusCode::SUCCESS; 
 
  115   return StatusCode::SUCCESS;
 
  129   return StatusCode::SUCCESS;
 
  134   std::unique_ptr<TH2> prod(
static_cast<TH2*
>( h2d->Clone()  ) );
 
  135   for (
int xi=1;xi<=prod->GetNbinsX();xi++) {
 
  136     double pt=prod->GetXaxis()->GetBinCenter(xi);
 
  137     const double R_abs=
h->Interpolate(
pt); 
 
  138     const double inv_R_abs = 1. / R_abs;
 
  140     for (
int yi=1;yi<=prod->GetNbinsY();yi++) {
 
  141       double c_rel = h2d->GetBinContent(xi,yi); 
 
  142       prod->SetBinContent(xi,yi,c_rel*inv_R_abs);
 
  
Gaudi::Property< std::vector< unsigned int > > m_RunNumBoundaries
Class JetContext Designed to read AOD information related to the event, N vertices,...
const_pointer_type cptr()
Dereference the pointer.
Gaudi::Property< bool > m_isMC
Gaudi::Property< std::string > m_jetInScale
StatusCode retrieveEventInfo(unsigned int &r) const
std::vector< std::unique_ptr< const TH2 > > m_insituCorr_vec
uint32_t runNumber() const
The current event's run number.
std::vector< double > m_etaMax_vec
ToolHandle< JetHelper::IVarTool > m_vartool1
InSituCalibStep(const std::string &name="InSituCalibStep")
Constructor with parameters:
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< JetHelper::IVarTool > m_vartool2
virtual StatusCode calibrate(xAOD::JetContainer &) const override
Apply calibration to a jet container.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Gaudi::Property< bool > m_CalibrateMC
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Gaudi::Property< std::string > m_jetOutScale
Class describing the basic event information.
ToolHandleArray< JetHelper::IVarTool > m_histTool_Abs
std::vector< double > m_etaMin_vec
#define ATH_MSG_WARNING(x)
std::vector< double > m_ptMin_vec
StatusCode getInsituCorr(const xAOD::Jet &jet, JetHelper::JetContext &jc, unsigned int periodIndex, double &scale) const
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
std::unique_ptr< const TH2 > combineCalibration(const TH2 *h2d, const TH1 *h)
ToolHandleArray< JetHelper::IVarTool > m_histTool_EtaInter
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
float Interpolate(const float &xval, const std::vector< float > &xtabulated, const std::vector< float > &ytabulated)
Interpolation function.
std::vector< double > m_ptMax_vec