DISKinematics.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Projections/DISKinematics.hh" 00003 #include "Rivet/Math/Constants.hh" 00004 00005 namespace Rivet { 00006 00007 00008 void DISKinematics::project(const Event& e) { 00009 // Identify beam hadron 00010 const ParticlePair& inc = applyProjection<Beam>(e, "Beam").beams(); 00011 bool firstIsHadron = PID::isHadron(inc.first.pid()); 00012 bool secondIsHadron = PID::isHadron(inc.second.pid()); 00013 if (firstIsHadron && !secondIsHadron) { 00014 _inHadron = inc.first; 00015 } else if (!firstIsHadron && secondIsHadron) { 00016 _inHadron = inc.second; 00017 } else { 00018 //help! 00019 throw Error("DISKinematics projector could not find the correct beam hadron"); 00020 } 00021 00022 // Get the DIS lepton and store some of its properties 00023 const DISLepton& dislep = applyProjection<DISLepton>(e, "Lepton"); 00024 const FourMomentum pLepIn = dislep.in().momentum(); 00025 const FourMomentum pLepOut = dislep.out().momentum(); 00026 const FourMomentum pHad = _inHadron.momentum(); 00027 const FourMomentum pGamma = pLepIn - pLepOut; 00028 const FourMomentum tothad = pGamma + pHad; 00029 _theQ2 = -pGamma.mass2(); 00030 _theW2 = tothad.mass2(); 00031 _theX = Q2()/(2.0 * pGamma * pHad); 00032 _theY = (pGamma * pHad) / (pLepIn * pHad); 00033 _theS = invariant(pLepIn + pHad); 00034 00035 // Calculate boost vector for boost into HCM-system 00036 LorentzTransform tmp; 00037 tmp.setBoost(-tothad.boostVector()); 00038 00039 // Rotate so the photon is in x-z plane in HCM rest frame 00040 FourMomentum pGammaHCM = tmp.transform(pGamma); 00041 tmp.preMult(Matrix3(Vector3::mkZ(), -pGammaHCM.azimuthalAngle())); 00042 pGammaHCM = tmp.transform(pGamma); 00043 assert(isZero(dot(pGammaHCM.vector3(), Vector3::mkY()))); 00044 00045 // Rotate so the photon is along the positive z-axis 00046 const double rot_angle = pGammaHCM.polarAngle() * (pGammaHCM.px() >= 0 ? -1 : 1); 00047 tmp.preMult(Matrix3(Vector3::mkY(), rot_angle)); 00048 // Check that final HCM photon lies along +ve z as expected 00049 pGammaHCM = tmp.transform(pGamma); 00050 assert(isZero(dot(pGammaHCM.vector3(), Vector3::mkX()), 1e-3)); 00051 assert(isZero(dot(pGammaHCM.vector3(), Vector3::mkY()), 1e-3)); 00052 assert(isZero(angle(pGammaHCM.vector3(), Vector3::mkZ()), 1e-3)); 00053 00054 // Finally rotate so outgoing lepton at phi = 0 00055 FourMomentum pLepOutHCM = tmp.transform(pLepOut); 00056 tmp.preMult(Matrix3(Vector3::mkZ(), -pLepOutHCM.azimuthalAngle())); 00057 assert(isZero(tmp.transform(pLepOut).azimuthalAngle())); 00058 _hcm = tmp; 00059 00060 // Boost to Breit frame (use opposite convention for photon --- along *minus* z) 00061 tmp.preMult(Matrix3(Vector3::mkX(), PI)); 00062 const double bz = 1 - 2*x(); 00063 _breit = LorentzTransform(Vector3::mkZ() * bz).combine(tmp); 00064 assert(isZero(angle(_breit.transform(pGamma).vector3(), -Vector3::mkZ()), 1e-3)); 00065 assert(isZero(_breit.transform(pLepOut).azimuthalAngle(), 1e-3)); 00066 } 00067 00068 00069 int DISKinematics::compare(const Projection & p) const { 00070 const DISKinematics& other = pcast<DISKinematics>(p); 00071 return mkNamedPCmp(other, "Lepton"); 00072 } 00073 00074 00075 } Generated on Thu Mar 10 2016 08:29:50 for The Rivet MC analysis system by ![]() |