Fork me on GitHub

Changeset 9f38d6a in git


Ignore:
Timestamp:
Nov 20, 2015, 2:36:11 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
fdfe022
Parents:
554a3b3 (diff), 7312b4d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/delphes/delphes

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r554a3b3 r9f38d6a  
    55- added example for pileup generation with Pythia8
    66- moved to loose isolation working points for ATLAS and CMS cards
    7 - moved to pile-up density (rho) corrected isolation variable as default
     7- added UseRhoCorrection switch to decide which isolation variable use for selection (true by default)
    88- switch to Rapidity selector (SelectorRapRange) for pile-up density computation in FastJet to ensure backward compatibility
    99- addressed N-subjettiness warnings in 2.2.1 version
  • cards/delphes_card_ATLAS_PileUp.tcl

    r554a3b3 r9f38d6a  
    500500module Isolation PhotonIsolation {
    501501  set CandidateInputArray PhotonEfficiency/photons
    502   set IsolationInputArray EFlowMerger/eflow
     502  set IsolationInputArray EFlowMergerAllTracks/eflow
    503503  set RhoInputArray Rho/rho
    504504
     
    535535module Isolation ElectronIsolation {
    536536  set CandidateInputArray ElectronEfficiency/electrons
    537   set IsolationInputArray EFlowMerger/eflow
     537  set IsolationInputArray EFlowMergerAllTracks/eflow
    538538  set RhoInputArray Rho/rho
    539539
     
    570570module Isolation MuonIsolation {
    571571  set CandidateInputArray MuonEfficiency/muons
    572   set IsolationInputArray EFlowMerger/eflow
     572  set IsolationInputArray EFlowMergerAllTracks/eflow
    573573  set RhoInputArray Rho/rho
    574574
  • cards/delphes_card_CMS_PileUp.tcl

    r554a3b3 r9f38d6a  
    534534module Isolation PhotonIsolation {
    535535  set CandidateInputArray PhotonEfficiency/photons
    536   set IsolationInputArray EFlowMerger/eflow
     536  set IsolationInputArray EFlowMergerAllTracks/eflow
    537537  set RhoInputArray Rho/rho
    538538
     
    569569module Isolation ElectronIsolation {
    570570  set CandidateInputArray ElectronEfficiency/electrons
    571   set IsolationInputArray EFlowMerger/eflow
     571  set IsolationInputArray EFlowMergerAllTracks/eflow
    572572  set RhoInputArray Rho/rho
    573573
     
    606606module Isolation MuonIsolation {
    607607  set CandidateInputArray MuonEfficiency/muons
    608   set IsolationInputArray EFlowMerger/eflow
     608  set IsolationInputArray EFlowMergerAllTracks/eflow
    609609  set RhoInputArray Rho/rho
    610610
  • modules/Isolation.cc

    r554a3b3 r9f38d6a  
    108108
    109109  fUsePTSum = GetBool("UsePTSum", false);
     110
     111  fUseRhoCorrection = GetBool("UseRhoCorrection", true);
    110112
    111113  fClassifier->fPTMin = GetDouble("PTMin", 0.5);
     
    153155  Candidate *candidate, *isolation, *object;
    154156  TObjArray *isolationArray;
    155   Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr;
     157  Double_t sumChargedNoPU, sumChargedPU, sumNeutral, sumAllParticles;
     158  Double_t sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr, sum, ratio;
    156159  Int_t counter;
    157160  Double_t eta = 0.0;
     
    188191
    189192    // loop over all input tracks
    190    
     193
    191194    sumNeutral = 0.0;
    192     sumCharged = 0.0;
     195    sumChargedNoPU = 0.0;
    193196    sumChargedPU = 0.0;
    194197    sumAllParticles = 0.0;
    195    
     198
    196199    counter = 0;
    197200    itIsolationArray.Reset();
    198    
     201
    199202    while((isolation = static_cast<Candidate*>(itIsolationArray.Next())))
    200203    {
     
    205208      {
    206209        sumAllParticles += isolationMomentum.Pt();
    207         if(isolation->Charge !=0)
    208         {
    209           sumCharged += isolationMomentum.Pt();
    210           if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt();
    211         }
     210        if(isolation->Charge != 0)
     211        {
     212          if(isolation->IsRecoPU)
     213          {
     214            sumChargedPU += isolationMomentum.Pt();
     215          }
     216          else
     217          {
     218            sumChargedNoPU += isolationMomentum.Pt();
     219          }
     220        }
    212221        else
    213         {
    214           sumNeutral += isolationMomentum.Pt();
     222        {
     223          sumNeutral += isolationMomentum.Pt();
    215224        }
    216225        ++counter;
     
    232241    }
    233242
    234      // correct sum for pile-up contamination
    235     sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU,0.0);
    236     sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho,0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0);
     243    // correct sum for pile-up contamination
     244    sumDBeta = sumChargedNoPU + TMath::Max(sumNeutral - 0.5*sumChargedPU, 0.0);
     245    sumRhoCorr = sumChargedNoPU + TMath::Max(sumNeutral - TMath::Max(rho, 0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(), 0.0);
    237246    ratioDBeta = sumDBeta/candidateMomentum.Pt();
    238247    ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt();
    239    
     248
    240249    candidate->IsolationVar = ratioDBeta;
    241250    candidate->IsolationVarRhoCorr = ratioRhoCorr;
    242     candidate->SumPtCharged = sumCharged;
     251    candidate->SumPtCharged = sumChargedNoPU;
    243252    candidate->SumPtNeutral = sumNeutral;
    244253    candidate->SumPtChargedPU = sumChargedPU;
    245254    candidate->SumPt = sumAllParticles;
    246255
    247     if((fUsePTSum && sumRhoCorr > fPTSumMax) || (!fUsePTSum && ratioRhoCorr > fPTRatioMax)) continue;
     256    sum = fUseRhoCorrection ? sumRhoCorr : sumDBeta;
     257    if(fUsePTSum && sum > fPTSumMax) continue;
     258
     259    ratio = fUseRhoCorrection ? ratioRhoCorr : ratioDBeta;
     260    if(!fUsePTSum && ratio > fPTRatioMax) continue;
     261
    248262    fOutputArray->Add(candidate);
    249263  }
  • modules/Isolation.h

    r554a3b3 r9f38d6a  
    5959  Bool_t fUsePTSum;
    6060
     61  Bool_t fUseRhoCorrection;
     62
    6163  IsolationClassifier *fClassifier; //!
    6264
  • modules/TrackPileUpSubtractor.cc

    r554a3b3 r9f38d6a  
    6767void TrackPileUpSubtractor::Init()
    6868{
    69 // import input array
     69  // import input array
    7070
    7171  fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));
    7272  fItVertexInputArray = fVertexInputArray->MakeIterator();
    73  
     73
    7474  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    7575
    7676  fPTMin = GetDouble("PTMin", 0.);
     77
    7778  // import arrays with output from other modules
    78    
     79
    7980  ExRootConfParam param = GetParam("InputArray");
    8081  Long_t i, size;
     
    119120  Double_t z, zvtx=0;
    120121
    121  
     122
    122123  // find z position of primary vertex
    123  
     124
    124125  fItVertexInputArray->Reset();
    125126  while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next())))
     
    127128    if(!candidate->IsPU)
    128129    {
    129     zvtx = candidate->Position.Z();
    130     // break;
     130      zvtx = candidate->Position.Z();
     131      // break;
    131132    }
    132133  }
     
    144145      particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    145146      z = particle->Position.Z();
    146      
     147
    147148      // apply pile-up subtraction
    148149      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    149      
    150       if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1;
    151       else
     150
     151      if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution)
    152152      {
    153          candidate->IsRecoPU = 0;
    154          if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
     153        candidate->IsRecoPU = 1;
     154      }
     155      else
     156      {
     157        candidate->IsRecoPU = 0;
     158        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
    155159      }
    156160    }
  • modules/TrackPileUpSubtractor.h

    r554a3b3 r9f38d6a  
    5050  Double_t fZVertexResolution;
    5151
    52   Double_t fPTMin; 
     52  Double_t fPTMin;
    5353
    5454  std::map< TIterator *, TObjArray * > fInputMap; //!
Note: See TracChangeset for help on using the changeset viewer.