28 std::cout <<
"%Stage1TauIsolationLUT-E-Unexpected jetLsb " << jetLsb <<
" IsoTau calculation will be broken"<< std::endl;
35 if (jetPt>maxJet) jetPt=maxJet;
36 if (tauPt>maxTau) tauPt=maxTau;
38 unsigned int address= (jetPt <<
nbitsTau) + tauPt;
53 if (address > maxAddress){
54 std::cout <<
"%Stage1TauIsolationLUT-E-Address: " << address
55 <<
" exceeds maximum value allowed. Setting value to maximum (" << maxAddress <<
")" << std::endl;
60 int itauet = address & 0xff;
63 double jet_pt = static_cast <
float> (ijetet);
64 double tau_pt = static_cast <
float> (itauet);
70 if (maxTau == (
unsigned) itauet){
72 }
else if (maxJet == (
unsigned) ijetet){
75 double relativeJetIsolationTau = (jet_pt / tau_pt) -1;
77 double isolCut=tauMaxJetIsolationA;
78 if (tau_pt >= tauMinPtJetIsolationB)isolCut=tauMaxJetIsolationB;
79 if (relativeJetIsolationTau < isolCut) isol=1;
static const unsigned int nbits_data
double tauMaxJetIsolationB() const
double tauMinPtJetIsolationB() const
Abs< T >::type abs(const T &t)
virtual ~Stage1TauIsolationLUT()
Stage1TauIsolationLUT(CaloParamsHelper *params)
static const unsigned int nbitsTau
static const unsigned int nbitsJet
unsigned lutAddress(unsigned int, unsigned int) const
static const unsigned int lut_version
int lutPayload(unsigned int) const
Power< A, B >::type pow(const A &a, const B &b)
CaloParamsHelper *const params_
double tauMaxJetIsolationA() const