Fork me on GitHub

Changeset 9e08f27 in git


Ignore:
Timestamp:
Apr 17, 2021, 10:25:04 AM (4 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
master
Children:
3b3071a
Parents:
08d82fe
Message:

added e/mu mistag rate for taus (need to update partonArray in other than FWLite readers)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/TauTagging.cc

    r08d82fe r9e08f27  
    8383    daughter1 = static_cast<Candidate *>(fParticleInputArray->At(i));
    8484    pdgCode = TMath::Abs(daughter1->PID);
    85     if(pdgCode == 11 || pdgCode == 13 || pdgCode == 15)
    86       return -1;
    87     else if(pdgCode == 24)
     85    //if(pdgCode == 11 || pdgCode == 13 || pdgCode == 15)
     86    //  return -1;
     87    if(pdgCode == 24)
    8888    {
    8989      if(daughter1->D1 < 0) return -1;
     
    9696    }
    9797  }
    98 
    9998  return 0;
    10099}
     
    190189void TauTagging::Process()
    191190{
    192   Candidate *jet, *tau, *daughter;
     191  Candidate *jet, *tau, *daughter, *part;
    193192  TLorentzVector tauMomentum;
    194193  Double_t pt, eta, phi, e, eff;
     
    204203  // loop over all input jets
    205204  fItJetInputArray->Reset();
     205
    206206  while((jet = static_cast<Candidate *>(fItJetInputArray->Next())))
    207207  {
     208
    208209    const TLorentzVector &jetMomentum = jet->Momentum;
    209210    pdgCode = 0;
     
    243244      }
    244245    }
     246   
     247    // fake electrons and muons
     248   
     249    if (pdgCode == 0)
     250    {
     251     
     252      Double_t drMin = fDeltaR;   
     253      fItPartonInputArray->Reset();
     254      while((part = static_cast<Candidate *>(fItPartonInputArray->Next())))
     255      {
     256        if(TMath::Abs(part->PID) == 11 || TMath::Abs(part->PID) == 13)
     257        {
     258            tauMomentum = part->Momentum;
     259            if (tauMomentum.Pt() < fClassifier->fPTMin) continue;
     260            if (TMath::Abs(tauMomentum.Eta()) > fClassifier->fEtaMax) continue;
     261
     262            Double_t dr = jetMomentum.DeltaR(tauMomentum);
     263            if( dr < drMin)
     264            {
     265               drMin = dr;
     266               pdgCode = TMath::Abs(part->PID);
     267               charge = part->Charge;
     268            } 
     269        }
     270      }
     271    }
     272
    245273    // find an efficency formula
    246274    itEfficiencyMap = fEfficiencyMap.find(pdgCode);
  • readers/DelphesCMSFWLite.cpp

    r08d82fe r9e08f27  
    217217      // Prevent duplicated particle.
    218218      if(!isMiniAOD) stableParticleOutputArray->Add(candidate);
    219     }
    220     else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15)
     219      if (pdgCode == 11 || pdgCode == 13) partonOutputArray->Add(candidate);
     220    }
     221    //else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15)
     222    else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 11 || pdgCode == 13 || pdgCode == 15)
    221223    {
    222224      partonOutputArray->Add(candidate);
Note: See TracChangeset for help on using the changeset viewer.