float Event::RsrMax(int iMax, Tau *t) { if (t == NULL) return -1; bool direct= t->IsTau(); // otherwise I suppose inviso float dphietmisstau = TMath::Pi() - fabs(GetMet().DeltaPhi( t ) ); float rsrmax = -1; if (direct){ for(int i=0 ; i< iMax; ++i) { if( GetJet(i) == NULL ) break; float dphietmissjet= TMath::Pi() - fabs( GetMet().DeltaPhi( GetJet(i) ) ) ; float myrsr = sqrt(dphietmisstau*dphietmisstau + dphietmissjet*dphietmissjet) ; // CHECKME, is this correct ? min ? if (rsrmax<0 or myrsr<rsrmax) rsrmax = myrsr; } }else{ for(int i=0 ; i< iMax; ++i) { if( GetJetInvIso(i) == NULL ) break; float dphietmissjet= TMath::Pi() - fabs( GetMet().DeltaPhi( GetJetInvIso(i) ) ) ; float myrsr = sqrt(dphietmisstau*dphietmisstau + dphietmissjet*dphietmissjet) ; // CHECKME, is this correct ? min ? if (rsrmax<0 or myrsr<rsrmax) rsrmax = myrsr; } } return rsrmax; }
float Event::RCollMin(int iMax,Tau *t) { // notice the Pi-... if (t == NULL) return -1; bool direct= t->IsTau(); // otherwise I suppose inviso float dphietmisstau = fabs(GetMet().DeltaPhi( t ) ); float rcollmin = -1; if (direct) { for(int i=0 ; i< iMax; ++i) { if( GetJet(i) == NULL ) break; float dphietmissjet= TMath::Pi() - fabs( GetMet().DeltaPhi( GetJet(i) ) ) ; float myrcoll = sqrt(dphietmisstau*dphietmisstau + dphietmissjet*dphietmissjet) ; if (rcollmin<0 or myrcoll<rcollmin) rcollmin = myrcoll; } }else{ for(int i=0 ; i< iMax; ++i) { if( GetJetInvIso(i) == NULL ) break; float dphietmissjet= TMath::Pi() - fabs( GetMet().DeltaPhi( GetJetInvIso(i) ) ) ; float myrcoll = sqrt(dphietmisstau*dphietmisstau + dphietmissjet*dphietmissjet) ; if (rcollmin<0 or myrcoll<rcollmin) rcollmin = myrcoll; } } return rcollmin; }
int SmearTauScale::smear(Event *e) { // only on data apply Jes //if( not e->IsRealData() ) return SMEAR_NA; TLorentzVector metSystShift; for (auto t : GetTaus(e)) { t->syst = syst_; } // this is not const like in e->GetMet() //#warning NO MET IN JES GetMet(e) . syst = syst_; GetMet(e) . SetSmearType(Smearer::TAUESCALE); if ( not GetMet(e) . IsFilled() ) Log(__FUNCTION__,"WARNING","JES Smearing not filled in MET"); return SMEAR_OK; }
int SmearJes::smear(Event *e) { // only on data apply Jes //if( not e->IsRealData() ) return SMEAR_NA; for (auto j : GetJets(e)) { j->syst = syst_; j->SetSmearType(Smearer::JES); if (not j->IsFilled() ) Log(__FUNCTION__,"WARNING","JES Smearings values not filled in JET"); } // this is not const like in e->GetMet() //#warning NO MET IN JES GetMet(e) . syst = syst_; GetMet(e) . SetSmearType(Smearer::JES); if ( not GetMet(e) . IsFilled() ) Log(__FUNCTION__,"WARNING","JES Smearing not filled in MET"); return SMEAR_OK; }