 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 const IInterface*
p) :
23 declareProperty(
"OutputName",
m_outputName =
"LVL1EnergySumRoI_KF");
24 declareProperty(
"LUTFile",
m_LUTFileName =
"LUT_data15.root");
25 declareProperty(
"L1METName",
m_L1METName =
"LVL1EnergySumRoI");
26 declareProperty(
"L1JetName",
m_L1JetName =
"LVL1JetRoIs");
33 if (fullLUTFileName.empty() ) {
35 return StatusCode::FAILURE;
38 TFile* lutFile = TFile::Open(fullLUTFileName.c_str() );
39 if (lutFile->IsZombie() )
return StatusCode::FAILURE;
42 lutFile->GetObject(
"LUT", lutFromFile);
45 return StatusCode::FAILURE;
48 m_LUT.reset(
dynamic_cast<TH2*
>(lutFromFile->Clone() ) );
49 m_LUT->SetDirectory(0);
51 return StatusCode::SUCCESS;
56 return StatusCode::SUCCESS;
66 if (evtStore()->contains<xAOD::EnergySumRoI>(
m_outputName) )
return StatusCode::SUCCESS;
86 float KFMETx = l1_kf->
exMiss();
87 float KFMETy = l1_kf->
eyMiss();
88 float KFSumEt = l1_kf->
energyT();
90 for (
const auto jet : *l1Jets) {
92 int ptBin =
m_LUT->GetYaxis()->FindBin( log2(
jet->et8x8() / 1000.) );
93 if (ptBin==0) ptBin=1;
94 float KFweight =
m_LUT->GetBinContent(
etaBin, ptBin);
95 float jetContribution =
jet->et8x8() * KFweight;
97 KFMETx -= jetContribution *
cos(
jet->phi() );
98 KFMETy -= jetContribution *
sin(
jet->phi() );
99 KFSumEt += jetContribution;
108 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
void setEnergyX(float value)
Set the total energy deposited in the X direction.
float energyT() const
The deposited total transverse energy.
EnergySumRoIAuxInfo_v2 EnergySumRoIAuxInfo
Declare the most recent version of the energy-sum auxiliary info.
Auxiliary store for an EnergySum RoI object.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
::StatusCode StatusCode
StatusCode definition for legacy code.
void setEnergyY(float value)
Set the total energy deposited in the Y direction.
void setEnergyT(float value)
Set the deposited total transverse energy.
float exMiss() const
The missing energy in the X direction.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
EnergySumRoI_v2 EnergySumRoI
float eyMiss() const
The missing energy in the Y direction.
Class describing a LVL1 energy-sum "RoI".