ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/src/JetTools.cc
(Generate patch)

Comparing UserCode/MitPhysics/Utils/src/JetTools.cc (file contents):
Revision 1.2 by ceballos, Fri Jul 23 20:24:22 2010 UTC vs.
Revision 1.3 by ceballos, Fri Jul 30 20:23:31 2010 UTC

# Line 164 | Line 164 | Double_t JetTools::Razor(const ParticleO
164   }
165  
166   //Cosine Omega
167 < Double_t JetTools::CosineOmega(const ParticleOArr *particles){
168 <  if(particles->GetEntries() < 2) return -999.;
167 > Double_t JetTools::CosineOmega(const Particle *particles0, const Particle *particles1){
168  
169 <  TLorentzVector v_L1(particles->At(0)->Px(),particles->At(0)->Py(),particles->At(0)->Pz(),particles->At(0)->E());
170 <  TLorentzVector v_L2(particles->At(1)->Px(),particles->At(1)->Py(),particles->At(1)->Pz(),particles->At(1)->E());
169 >  TLorentzVector v_L1(particles0->Px(),particles0->Py(),particles0->Pz(),particles0->E());
170 >  TLorentzVector v_L2(particles1->Px(),particles1->Py(),particles1->Pz(),particles1->E());
171  
172    Double_t beta = (v_L1.P()-v_L2.P())/(v_L1.Pz()-v_L2.Pz());
173  
# Line 184 | Line 183 | Double_t JetTools::CosineOmega(const Par
183   }
184  
185   //Transverse Higgs mass
186 < Double_t JetTools::MtHiggs(const CompositeParticle *dilepton, const Met *met, int nsel){
186 > Double_t JetTools::MtHiggs(const ParticleOArr * leptons,
187 >                           const Met *met, int nsel){
188 >  if(leptons->Entries() < 2) return -999.0;
189 >
190    double mtHiggs = -999.0;
191 <  double enell,enenn,enex,eney,mll,mnu;
191 >  double enell = 0.0;
192 >  double enenn = 0.0;
193 >  double enex  = 0.0;
194 >  double eney  = 0.0;
195 >  double mll   = 0.0;
196 >  double mnu   = 0.0;
197 >  CompositeParticle *dilepton = new CompositeParticle();
198 >  dilepton->AddDaughter(leptons->At(0));
199 >  dilepton->AddDaughter(leptons->At(1));
200    
201    if     (nsel == 0){ // Use of Mt mass and mnu == mll
202      enell = TMath::Sqrt(dilepton->Pt()*dilepton->Pt() + dilepton->Mt()*dilepton->Mt());
# Line 220 | Line 230 | Double_t JetTools::MtHiggs(const Composi
230      mll   = dilepton->Mass();
231      mnu   = 0.0;
232    }
233 <  else {
234 <    return -999.;
233 >  else if(nsel == 4){ // Use the formula from hep-ph:1006.4998
234 >    mtHiggs = 2*leptons->At(0)->Pt()*leptons->At(0)->Pt() + 2*leptons->At(1)->Pt()*leptons->At(1)->Pt() + 3 * (
235 >      leptons->At(0)->Pt()*leptons->At(1)->Pt() + met->Pt()*(leptons->At(0)->Pt()+leptons->At(1)->Pt())
236 >      - met->Px()*dilepton->Px() - met->Py()*dilepton->Py()
237 >      - leptons->At(0)->Px()*leptons->At(1)->Px() - leptons->At(0)->Py()*leptons->At(1)->Py());
238    }
239  
240 <  mtHiggs = mll*mll + mnu*mnu + 2.0*(enell*enenn - enex*enex - eney*eney);
240 >  if(nsel >= 0 && nsel <= 3){
241 >    mtHiggs = mll*mll + mnu*mnu + 2.0*(enell*enenn - enex*enex - eney*eney);
242 >  }
243    if(mtHiggs <= 0) mtHiggs = 0.0;
244    else             mtHiggs = TMath::Sqrt(mtHiggs);
245  
246 +  delete dilepton;
247 +
248    return mtHiggs;
249   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines