Fork me on GitHub

Changeset b1fd38d in git


Ignore:
Timestamp:
Jan 23, 2017, 12:21:21 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
4b4207e
Parents:
273735d
Message:

put formula instead of constant value for z vertex res.

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackPileUpSubtractor.cc

    r273735d rb1fd38d  
    5353//------------------------------------------------------------------------------
    5454
    55 TrackPileUpSubtractor::TrackPileUpSubtractor()
     55TrackPileUpSubtractor::TrackPileUpSubtractor() :
     56fFormula(0)
    5657{
     58  fFormula = new DelphesFormula;
    5759}
    5860
     
    6163TrackPileUpSubtractor::~TrackPileUpSubtractor()
    6264{
     65  if(fFormula) delete fFormula;
    6366}
    6467
     
    7275  fItVertexInputArray = fVertexInputArray->MakeIterator();
    7376
    74   fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
     77  // read resolution formula in m
     78  fFormula->Compile(GetString("ZVertexResolution", "0.001"));
    7579
    7680  fPTMin = GetDouble("PTMin", 0.);
     
    119123  TObjArray *array;
    120124  Double_t z, zvtx=0;
     125  Double_t pt, eta, phi, e;
    121126
    122127
     
    144149    {
    145150      particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     151      const TLorentzVector &candidateMomentum = particle->Momentum;
     152
     153      eta = candidateMomentum.Eta();
     154      pt = candidateMomentum.Pt();
     155      phi = candidateMomentum.Phi();
     156      e = candidateMomentum.E();
     157     
    146158      z = particle->Position.Z();
    147159
     
    149161      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    150162
    151       if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution)
     163      if(candidate->IsPU && TMath::Abs(z-zvtx) > fFormula->Eval(pt, eta, phi, e)* 1.0e3)
    152164      {
    153165        candidate->IsRecoPU = 1;
  • modules/TrackPileUpSubtractor.h

    r273735d rb1fd38d  
    3434class TIterator;
    3535class TObjArray;
     36class DelphesFormula;
    3637
    3738class TrackPileUpSubtractor: public DelphesModule
     
    4849private:
    4950
    50   Double_t fZVertexResolution;
     51  DelphesFormula *fFormula; //!
    5152
    5253  Double_t fPTMin;
Note: See TracChangeset for help on using the changeset viewer.