// Header file for the Oxbridge Stransverse Mass Library -- oxbridgekinetics. // See http://www.hep.phy.cam.ac.uk/~lester/mt2/index.html // Authors: Christopher Lester and Alan Barr #ifndef MT2_ALPHAT_MULTIJET_CALCULATOR_h #define MT2_ALPHAT_MULTIJET_CALCULATOR_h #include #include "Mt2/Mt2LorentzTransverseVector.h" #include namespace Mt2 { class AlphaT_Multijet_Calculator { public: AlphaT_Multijet_Calculator() { clear(); } // The "clear()" method resets the calculator, clearing its store of // jet momenta. In order to calculate alphaT, first call "clear()" // before pushing_back jet momenta. void clear() { m_jets.clear(); m_tot = Mt2::LorentzTransverseVector(0,0,0); m_sumPt = 0; } void push_back(const Mt2::LorentzTransverseVector & jet) { m_jets.push_back(jet); m_tot = m_tot + jet; m_sumPt += jet.pt(); } // The CMS paper http://cdsweb.cern.ch/record/1194509/files/SUS-09-001-pas.pdf defines H_T in one place to be the scalar some of the pts of the input jets, but elsewhere defines it to be the scalar some of the ETs of the input jets. These two definitions don't agree in the case of massive jets. I am waiting for clarification from someone in CMS as to the nature of the exact definition. For the moment, I am assuming that it is the scalar some of the ETs. double H_T() const { // any sensible person would imagine that this would do: // return m_tot.Et(); // however the CMS definition is return m_sumPt;// see http://cms-physics.web.cern.ch/cms-physics/public/SUS-10-001-pas.pdf } double H_T_Sq() const { const double HT = H_T(); return HT*HT; } double MHT_Sq() /* missing HT magnitude squared */ const { return m_tot.ptsq(); // see http://cms-physics.web.cern.ch/cms-physics/public/SUS-10-001-pas.pdf } // The CMS paper http://cdsweb.cern.ch/record/1194509/files/SUS-09-001-pas.pdf defines H_T^miss_vec as the two vector sum of the negatives of the transverse two momenta of the jets. double alphaT() const { if (m_jets.size()<=1) { return -1; /// This flags some stupid user behavour! }; //assert(m_jets.size()>=2); const unsigned int n = m_jets.size(); unsigned long deltahtevaluations=0; std::vector combinationsPlusTwoOverTwo(n); bszero(combinationsPlusTwoOverTwo); combinationsPlusTwoOverTwo[n-1]=true; // Here we enforce the "Each side has AT LEAST ONE visible particle bool first=true; double smallestDeltaHTSoFar=0; //double HTForPseudoJets=0; std::vector comb(n); bszero(comb); comb[0]=true; // Here we enforce the "Each side has AT LEAST ONE visible particle ... you may want to change that!!! for (; comb != combinationsPlusTwoOverTwo; bsincr(comb)) { LorentzTransverseVector eta(0,0,0); LorentzTransverseVector etb(0,0,0); double hta=0; double htb=0; for (unsigned int bit=0; bit & bs) { for (unsigned int i=0; i & bs) { for(unsigned long bit=0; bit m_jets; Mt2::LorentzTransverseVector m_tot; double m_sumPt; }; } #endif