Kalanand's May 2011 Log

   April 2011   
May 2011
SuMoTuWeThFrSa
1234567
891011121314
15161718192021
22232425262728
293031    
   June 2011   

May 4th

To access trigger object 4-vectors

Instructions on how to access the trigger object p4's passing a filter in AOD:

https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHLTAnalysis

Other useful HLT twiki pages:

https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideOnSel
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHighLevelTrigger
https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookHLTTutorial

May 19th

Re-running trigger lists on MC

For emulation of triggers in MC using already existing triggers in MC, there is a handy 'hltSummaryFilter' tool:

http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/HLTrigger/HLTfilters/python/hltSummaryFilter_cfi.py

May 26th

Jet color coherence: pull angle variable

Paper by Jason Gallicchio, Matt Schwartz: http://arxiv.org/abs/1001.5027

In order to compute pull angle you need information (rapidity, phi, pt) about the charged tracks inside the jet.

Code to calculate the pull and the helicity angle (Higgs system):
pat::Jet *leadingJet;

pat::Jet *secondLeadingJet;

leadingDeltaTheta = TMath::Abs( getDeltaTheta( leadingJet ,
secondLeadingJet ) );

where

//the pull vector is going to be calculated using j1

double ZH_channel::getDeltaTheta( pat::Jet* j1, pat::Jet* j2 ){

 double deltaTheta = 1e10;
 TLorentzVector pi(0,0,0,0);
 TLorentzVector v_j1(0,0,0,0);
 TLorentzVector v_j2(0,0,0,0);

//re-reconstruct the jet direction with the charged tracks

 std::vector< reco::PFCandidatePtr>
   j1pfc = j1->getPFConstituents();
 for(size_t idx = 0; idx < j1pfc.size(); idx++){
   if( j1pfc.at(idx)->charge() != 0 ){
     pi.SetPtEtaPhiE( j1pfc.at(idx)->pt(), j1pfc.at(idx)->eta(),
j1pfc.at(idx)->phi(), j1pfc.at(idx)->energy() );
     v_j1 += pi;
   }
 }

//re-reconstruct the jet direction with the charged tracks

 std::vector< reco::PFCandidatePtr>
   j2pfc = j2->getPFConstituents();
 for(size_t idx = 0; idx < j2pfc.size(); idx++){
   if( j2pfc.at(idx)->charge() != 0 ){
     pi.SetPtEtaPhiE( j2pfc.at(idx)->pt(), j2pfc.at(idx)->eta(),
j2pfc.at(idx)->phi(), j2pfc.at(idx)->energy() );
     v_j2 += pi;
   }
 }

 if( v_j2.Mag() < == 0
     or v_j1.Mag() < == 0 )
   return deltaTheta = 1e10;

 TVector2 v2_j1( v_j1.Rapidity(), v_j1.Phi());
 TVector2 v2_j2( v_j2.Rapidity(), v_j2.Phi());
//use j1 to calculate the pull vector

 TVector2 t = getTvect(j1);

 if( t.Mod() == 0 )
   return deltaTheta = 1e10;

 Double_t deltaphi = Geom::deltaPhi( v_j2.Phi(), v_j1.Phi() );
 Double_t deltaeta = v_j2.Rapidity() - v_j1.Rapidity();
 TVector2 BBdir( deltaeta, deltaphi );

 deltaTheta = t.DeltaPhi(BBdir);

 return deltaTheta;

}

which needs

TVector2 ZH_channel::getTvect( pat::Jet* patJet ){

 TVector2 t_Vect(0,0);
 TVector2 null(0,0);
 TVector2 ci(0,0);
 TLorentzVector pi(0,0,0,0);
 TLorentzVector J(0,0,0,0);
 TVector2 r(0,0);
 double patJetpfcPt = 1e10;
 double r_mag = 1e10;
 unsigned int nOfconst = 0;

//re-reconstruct the jet direction with the charged tracks
 std::vector< reco::PFCandidatePtr>
   patJetpfc = patJet->getPFConstituents();
 for(size_t idx = 0; idx < patJetpfc.size(); idx++){
   if( patJetpfc.at(idx)->charge() != 0 ){
     pi.SetPtEtaPhiE( patJetpfc.at(idx)->pt(),
patJetpfc.at(idx)->eta(), patJetpfc.at(idx)->phi(),
patJetpfc.at(idx)->energy() );
     J += pi;
     nOfconst++;
   }
 }

// if there are less than two charged tracks do not calculate the pull
(there is not enough info). It returns a null vector

 if( nOfconst < 2 )
   return null;

 TVector2 v_J( J.Rapidity(), J.Phi() );
//calculate TVector using only charged tracks
 for(size_t idx = 0; idx < patJetpfc.size(); idx++){
   if( patJetpfc.at(idx)->charge() != 0  ){
     patJetpfcPt = patJetpfc.at(idx)->pt();
     pi.SetPtEtaPhiE( patJetpfc.at(idx)->pt(),
patJetpfc.at(idx)->eta(), patJetpfc.at(idx)->phi(),
patJetpfc.at(idx)->energy() );
     r.Set( pi.Rapidity() - J.Rapidity(), Geom::deltaPhi(
patJetpfc.at(idx)->phi(), J.Phi() ) );
     r_mag = r.Mod();
     t_Vect += ( patJetpfcPt / J.Pt() ) * r_mag * r;
   }
 }

 return t_Vect;

}

The code for cos(theta*) is:

TVector3 higgsBoost;
 higgsBoost = higgsP4.BoostVector();
 leading_higgsHelicity = getHelicity( leadingJet, higgsBoost );
 secondLeading_higgsHelicity = getHelicity( secondLeadingJet, higgsBoost );

double ZH_channel::getHelicity( pat::Jet* jet , TVector3 boost ){
 double hel = 1e10;
 TLorentzVector j;
 j.SetPtEtaPhiE( jet->pt(), jet->eta(), jet->phi(), jet->energy() );
 j.Boost( -boost );
 hel = TMath::Cos( j.Vect().Angle( boost ) );
 return hel;
}

Go to April's log


Last modified: Thu May 26 22:04:44 CST 2011