本文整理汇总了C++中TLorentzVector::Et方法的典型用法代码示例。如果您正苦于以下问题:C++ TLorentzVector::Et方法的具体用法?C++ TLorentzVector::Et怎么用?C++ TLorentzVector::Et使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TLorentzVector
的用法示例。
在下文中一共展示了TLorentzVector::Et方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getMT
float getMT(TLorentzVector pZ, TLorentzVector pH)
{
//take MET from pZ
float myMET = pZ.Pt();
float myMETx = pZ.Px();
float myMETy = pZ.Py();
float Et = pH.Et();
float px = pH.Px();
float py = pH.Py();
float m = pH.M();
float MT = -99;
float MT2 = m*m + 2*( Et * myMET - (px*myMETx + py*myMETy) );
if(MT2>0.) {MT=sqrt(MT2);}
return MT;
}
示例2: PlotTheta
//.........这里部分代码省略.........
outTree->Branch("TTbar_Pt", &TTbar_Pt, "Pt des TTbarsystems Generator/D");
outTree->Branch("RekoTTbar_Pt", &RekoTTbar_Pt, "Pt des TTbarsystems Reko/D");
outTree->Branch("TTbar_M", &TTbar_M, "Masse des TTbarsystems Generator/D");
outTree->Branch("RekoTTbar_M", &RekoTTbar_M, "Masse des TTbarsystems Reko/D");
outTree->Branch("Top_Pt", &Top_Pt, "Pt des Tops Generator/D");
outTree->Branch("Top_M", &Top_M, "M des Tops Generator/D");
outTree->Branch("AntiTop_Pt", &AntiTop_Pt, "Pt des AntiTops Generator/D");
outTree->Branch("AntiTop_M", &AntiTop_M, "M des AntiTops Generator/D");
outTree->Branch("RekoTop_Pt", &RekoTop_Pt, "Pt des Tops Reko/D");
outTree->Branch("RekoAntiTop_Pt", &RekoAntiTop_Pt, "Pt des AntiTops Reko/D");
outTree->Branch("RekoTop_M", &RekoTop_M, "M des Tops Reko/D");
outTree->Branch("RekoAntiTop_M", &RekoAntiTop_M, "M des AntiTops Reko/D");
outTree->Branch("Nu_Px", &Nu_Px, "Px des Neutrinos Generator/D");
outTree->Branch("Nu_Py", &Nu_Py, "Py des Neutrinos Generator/D");
outTree->Branch("Nu_Pz", &Nu_Pz, "Pz des Neutrinos Generator/D");
outTree->Branch("AntiNu_Px", &AntiNu_Px, "Px des AntiNeutrinos Generator/D");
outTree->Branch("AntiNu_Py", &AntiNu_Py, "Py des AntiNeutrinos Generator/D");
outTree->Branch("AntiNu_Pz", &AntiNu_Pz, "Pz des AntiNeutrinos Generator/D");
outTree->Branch("RekoNu_Px", &RekoNu_Px, "Px des Neutrinos Reko/D");
outTree->Branch("RekoNu_Py", &RekoNu_Py, "Py des Neutrinos Reko/D");
outTree->Branch("RekoNu_Pz", &RekoNu_Pz, "Pz des Neutrinos Reko/D");
outTree->Branch("RekoAntiNu_Px", &RekoAntiNu_Px, "Px des AntiNeutrinos Reko/D");
outTree->Branch("RekoAntiNu_Py", &RekoAntiNu_Py, "Py des AntiNeutrinos Reko/D");
outTree->Branch("RekoAntiNu_Pz", &RekoAntiNu_Pz, "Pz des AntiNeutrinos Reko/D");
outTree->Branch("BestNu_Px", &BestNu_Px, "Px des Neutrinos Best/D");
outTree->Branch("BestNu_Py", &BestNu_Py, "Py des Neutrinos Best/D");
outTree->Branch("BestNu_Pz", &BestNu_Pz, "Pz des Neutrinos Best/D");
outTree->Branch("BestAntiNu_Px", &BestAntiNu_Px, "Px des AntiNeutrinos Best/D");
outTree->Branch("BestAntiNu_Py", &BestAntiNu_Py, "Py des AntiNeutrinos Best/D");
outTree->Branch("BestAntiNu_Pz", &BestAntiNu_Pz, "Pz des AntiNeutrinos Best/D");
outTree->Branch("Lepton_Pt", &Lepton_Pt, "kleineres Pt der beiden gewaehlten Leptonen/D");
outTree->Branch("BJet_Et", &BJet_Et,"niedrigieres Et der BJets/D");
outTree->Branch("BJet_Tag_TrkCount", &BJet_Tag_TrkCount,"niedrigierer BTag der BJets/D");
outTree->Branch("BJet_Tag_SVsimple", &BJet_Tag_SVsimple,"niedrigierer BTag der BJets/D");
outTree->Branch("BJet_Tag_SVcomb", &BJet_Tag_SVcomb,"niedrigierer BTag der BJets/D");
outTree->Branch("BJet_Disc", &BJet_Disc,"niedrigierer Discriminator der BJets/D");
outTree->Branch("Lepton1_Id", &Lepton1_Id, "PdgId des ersten Leptons/I");
outTree->Branch("Lepton2_Id", &Lepton2_Id, "PdgId des zweiten Leptons/I");
outTree->Branch("Lepton_Mass", &Lepton_Mass, "inv. Masse der beiden Leptonen/D");
outTree->Branch("BJet_Angle", &BJet_Angle, "Winkel bJet zu Quark/D");
outTree->Branch("BbarJet_Angle", &BbarJet_Angle, "Winkel bbarJet zu Quark/D");
outTree->Branch("LeptonPlus_Angle", &LeptonPlus_Angle, "Winkel LeptonPlus zu Lepton Gen /D");
outTree->Branch("LeptonMinus_Angle", &LeptonMinus_Angle, "Winkel LeptonMinus zu Lepton Gen /D");
outTree->Branch("RekoNu_Angle", &RekoNu_Angle, "Winkel RekoNu zu GenNu/D");
outTree->Branch("RekoAntiNu_Angle", &RekoAntiNu_Angle, "Winkel RekoAntiNu zu GenAntiNu/D");
outTree->Branch("BestNu_Angle", &BestNu_Angle, "Winkel BestNu zu GenNu/D");
outTree->Branch("BestAntiNu_Angle", &BestAntiNu_Angle, "Winkel BestAntiNu zu GenAntiNu/D");
histogram__gen_Correlation->Sumw2();
histogram__Correlation->Sumw2();
histogram__gen_A->Sumw2();
histogram__A->Sumw2();
histogram__gen_N->Sumw2();
histogram__N->Sumw2();
double PatJetsPx[50];
double PatJetsPy[50];
double PatJetsPz[50];
double PatJetsE[50];
double PatJetsEt[50];
示例3: doKinematicFit
bool kanaelec::doKinematicFit(Int_t fflage,
const TLorentzVector mup,
const TLorentzVector nvp,
const TLorentzVector ajp,
const TLorentzVector bjp,
TLorentzVector & fit_mup,
TLorentzVector & fit_nvp,
TLorentzVector & fit_ajp,
TLorentzVector & fit_bjp,
Float_t & fit_chi2,
Int_t & fit_NDF,
Int_t & fit_status)
{
bool OK = false;
Resolution* resolution = new Resolution();
TMatrixD m1(3,3);
TMatrixD m2(3,3);
TMatrixD m3(3,3);
TMatrixD m4(3,3);
m1.Zero();
m2.Zero();
m3.Zero();
m4.Zero();
double etRes, etaRes, phiRes;
// lepton resolution
const std::string& leptonName = "electron"; const TLorentzVector lepton = mup;
if(leptonName == "electron") {
OK = resolution->electronResolution(lepton.Et(), lepton.Eta(), etRes, etaRes, phiRes);
if(!OK) return OK;
} else {
OK = resolution->muonResolution( lepton.Et(), lepton.Eta(), etRes, etaRes, phiRes);
if(!OK) return OK;
}
m1(0,0) = resolution->square(etRes);
m1(1,1) = resolution->square(etaRes);
m1(2,2) = resolution->square(phiRes);
// MET resolution
OK = resolution->PFMETResolution( nvp.Et(), etRes, etaRes, phiRes);
if(!OK) return OK;
m2(0,0) = resolution->square(etRes);
m2(1,1) = 999.9; // resolution->square(etaRes)
m2(2,2) = resolution->square(phiRes);
// Leading Jet resolution
OK = resolution->udscPFJetResolution( ajp.Et(), ajp.Eta(), etRes, etaRes, phiRes);
if(!OK) return OK;
m3(0,0) = resolution->square(etRes);
m3(1,1) = resolution->square(etaRes);
m3(2,2) = resolution->square(phiRes);
// Leading Jet resolution
OK = resolution->udscPFJetResolution( bjp.Et(), bjp.Eta(), etRes, etaRes, phiRes);
if(!OK) return OK;
m4(0,0) = resolution->square(etRes);
m4(1,1) = resolution->square(etaRes);
m4(2,2) = resolution->square(phiRes);
TLorentzVector tmp_mup = mup;
TLorentzVector tmp_nvp = nvp;
TLorentzVector tmp_ajp = ajp;
TLorentzVector tmp_bjp = bjp;
// Fit Particle
TFitParticleEtEtaPhi* particle1 = new TFitParticleEtEtaPhi( "Lepton", "Lepton", &tmp_mup, &m1 );
TFitParticleEtEtaPhi* particle2 = new TFitParticleEtEtaPhi( "Neutrino", "Neutrino", &tmp_nvp, &m2 );
TFitParticleEtEtaPhi* particle3 = new TFitParticleEtEtaPhi( "Jeta", "Jeta", &tmp_ajp, &m3 );
TFitParticleEtEtaPhi* particle4 = new TFitParticleEtEtaPhi( "Jetb", "Jetb", &tmp_bjp, &m4 );
// Constraint
TFitConstraintM *mCons1 = new TFitConstraintM( "WMassConstrainta", "WMass-Constrainta", 0, 0 , 80.4);
mCons1->addParticles1( particle1, particle2 );
TFitConstraintM *mCons2 = new TFitConstraintM( "WMassConstraintb", "WMass-Constraintb", 0, 0 , 80.4);
mCons2->addParticles1( particle3, particle4 );
TFitConstraintEp *pxCons = new TFitConstraintEp( "PxConstraint", "Px-Constraint", 0, TFitConstraintEp::pX , (mup+nvp+ajp+bjp).Px() );
pxCons->addParticles( particle1, particle2, particle3, particle4 );
TFitConstraintEp *pyCons = new TFitConstraintEp( "PyConstraint", "Py-Constraint", 0, TFitConstraintEp::pY , (mup+nvp+ajp+bjp).Py() );
pyCons->addParticles( particle1, particle2, particle3, particle4 );
//Definition of the fitter
TKinFitter* fitter = new TKinFitter("fitter", "fitter");
if (fflage == 1 ){
fitter->addMeasParticle( particle1 );
fitter->addMeasParticle( particle2 );
fitter->addMeasParticle( particle3 );
fitter->addMeasParticle( particle4 );
fitter->addConstraint( pxCons );
fitter->addConstraint( pyCons );
fitter->addConstraint( mCons1 );
fitter->addConstraint( mCons2 );
}else if(fflage == 2 ){
fitter->addMeasParticle( particle1 );
fitter->addMeasParticle( particle2 );
fitter->addConstraint( mCons1 );
}else {return false;}
//Set convergence criteria
//.........这里部分代码省略.........