Fork me on GitHub

Changeset 319 in svn for trunk/src


Ignore:
Timestamp:
Mar 10, 2009, 11:59:08 PM (16 years ago)
Author:
Xavier Rouby
Message:

from TRootGenParticle to GenParticle in B-tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SmearUtil.cc

    r307 r319  
    10341034  for(unsigned int i=0; i < tracks.size(); i++) {
    10351035      if(tracks[i].PT < pt_track ) continue;
     1036      //float dr = DeltaR(phi,eta,tracks[i].PhiOuter,tracks[i].EtaOuter);
    10361037      float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
    10371038      if (dr > TAU_track_scone) continue;
     
    10411042  return numbtrack;
    10421043}
    1043 /*
    1044 unsigned int RESOLution::NumTracks(unsigned int& NumTracksR, float& charge, const vector<TRootTracks> &tracks, const float pt_track, const float eta, const float phi, const float R) {
    1045   unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R;
    1046   charge=0;      NumTracksR=0; // total number of tracks
    1047   if (R<TAU_track_scone) cout << "Warning: jet radius smaller than tau-jet radius in RESOLution::NumTracks\n";
    1048   for(unsigned int i=0; i < tracks.size(); i++) {
    1049       if(tracks[i].PT < pt_track ) continue;
    1050       float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
    1051       if (dr > R) continue;
    1052 
    1053       NumTracksR++;
    1054       if(dr < TAU_track_scone) {// previously R==TAU_track_scone, for tau-jets only
    1055         numbtrack++;
    1056         charge += tracks[i].Charge; // total charge in the cone for Tau-jet
    1057       }
    1058 
    1059   }
    1060   return numbtrack;
    1061 }
    1062 */
    1063 
    10641044
    10651045//*** Returns the PID of the particle with the highest energy, in a cone with a radius CONERADIUS and an axis (eta,phi)  *********
    10661046//used by Btaggedjet
    10671047///// Attention : bug removed => CONERADIUS/2 -> CONERADIUS !!
    1068 int RESOLution::Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi) {
     1048int RESOLution::Bjets(const TSimpleArray<GenParticle> &subarray, const float& eta, const float& phi) {
    10691049  float emax=0;
    10701050  int Ppid=0;
     
    10831063
    10841064//******************** Simulates the b-tagging efficiency for real bjet, or the misendentification for other jets****************
    1085 bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray)  {
     1065bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<GenParticle> &subarray) {
    10861066  if(      rand()%100 < (BTAG_b+1)    && Bjets(subarray,JET.Eta(),JET.Phi())==pB ) return true; // b-tag of b-jets is 40%
    10871067  else if( rand()%100 < (BTAG_mistag_c+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pC ) return true; // b-tag of c-jets is 10%
     
    10921072//***********************Isolation criteria***********************
    10931073//****************************************************************
    1094 //bool RESOLution::Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks, const float pt_second_track)
    1095 bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float pt_second_track, const float isolCone)
     1074bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone)
    10961075{
    10971076   bool isolated = false;
     
    11211100                iEta = (eta>0) ? TOWER_eta_edges[i-1] : -TOWER_eta_edges[i];
    11221101                index = i-1;
    1123                 //cout << setw(15) << left << eta << "\t" << iEta << endl;
    11241102                break;
    11251103        }
Note: See TracChangeset for help on using the changeset viewer.