17using Athena::Units::GeV;
31 return StatusCode::SUCCESS;
67 std::list<const xAOD::Jet*> listJets(cont.
begin(), cont.
end());
69 for (
const xAOD::Jet* refjet : *refContainer ){
70 double dr2min = 500000;
72 if (listJets.empty() )
break;
74 std::list<const xAOD::Jet*>::iterator it=listJets.begin();
75 std::list<const xAOD::Jet*>::iterator itmin=listJets.end();
76 for( ; it != listJets.end(); ++it) {
78 if(dr2 < dr2min) { dr2min = dr2; itmin = it ;}
80 if (itmin == listJets.end())
break;
83 listJets.erase(itmin);
85 double dr = std::sqrt(dr2min);
86 double refPt = refjet->pt() /
GeV;
88 m_eff1->Fill(refPt, dr<0.1 ? weight : 0 );
89 m_eff2->Fill(refPt, dr<0.2 ? weight : 0 );
90 m_eff3->Fill(refPt, dr<0.3 ? weight : 0 );
95 double relDiff = -999;
98 relDiff = ( matched->
pt() /
GeV - refPt )/refPt;
101 m_etres->Fill( relDiff, weight );
102 m_etres_eta->Fill( refjet->eta(), relDiff, weight);
#define CHECK(...)
Evaluate an expression and check for errors.
Wrapper to avoid constant divisions when using units.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TProfile * m_etres_noShift_pt
ToolHandleArray< HistoDefinitionTool > m_histoDef
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
std::string m_refContainerName
EfficiencyResponseHistos(const std::string &t)
TProfile * m_etres_noShift_eta
virtual int buildHistos()
virtual int fillHistosFromContainer(const xAOD::JetContainer &cont, float weight)
T * bookHisto(T *h, Interval_t ityp=useToolInterval)
register the histo h in this group (if h!=NULL). The histo name is changed if m_prefixedHistoName==tr...
JetHistoBase(const std::string &t)
virtual double pt() const
The transverse momentum ( ) of the particle.
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".