Fork me on GitHub

Changeset c7e90d8 in git


Ignore:
Timestamp:
Jan 26, 2020, 3:26:13 PM (5 years ago)
Author:
michele <michele.selvaggi@…>
Branches:
Timing
Children:
9e3f2fb
Parents:
62764fb
Message:

fixed PileUpSubtractor4D

Location:
modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • modules/ModulesLinkDef.h

    r62764fb rc7e90d8  
    5656#include "modules/PileUpMerger.h"
    5757#include "modules/JetPileUpSubtractor.h"
    58 #include "modules/TrackTimingPileUpSubtractor.h"
     58#include "modules/TrackPileUpSubtractor.h"
    5959#include "modules/TaggingParticlesSkimmer.h"
    6060#include "modules/PileUpJetID.h"
     61#include "modules/PileUpSubtractor4D.h"
    6162#include "modules/PhotonID.h"
    6263#include "modules/ConstituentFilter.h"
     
    113114#pragma link C++ class PileUpMerger+;
    114115#pragma link C++ class JetPileUpSubtractor+;
    115 #pragma link C++ class TrackTimingPileUpSubtractor+;
     116#pragma link C++ class TrackPileUpSubtractor+;
    116117#pragma link C++ class TaggingParticlesSkimmer+;
    117118#pragma link C++ class PileUpJetID+;
     119#pragma link C++ class PileUpSubtractor4D+;
    118120#pragma link C++ class PhotonID+;
    119121#pragma link C++ class ConstituentFilter+;
  • modules/PileUpSubtractor4D.cc

    r62764fb rc7e90d8  
    1717 */
    1818
    19 /** \class TrackPileUpSubtractor
     19/** \class PileUpSubtractor4D
    2020 *
    21  *  Subtract pile-up contribution from tracks.
     21 *  Subtract pile-up contribution from tracks using both spatial and timing
     22 *  information
    2223 *
    23  *  \author P. Demin - UCL, Louvain-la-Neuve
     24 *  \author M. Selvaggi - CERN
    2425 *
    2526 */
     
    5253//------------------------------------------------------------------------------
    5354
    54 PileUpSubtractor4D::PileUpSubtractor4D() :
    55   fFormula(0)
     55PileUpSubtractor4D::PileUpSubtractor4D()
    5656{
    57   fFormula = new DelphesFormula;
    5857}
    5958
     
    6261PileUpSubtractor4D::~PileUpSubtractor4D()
    6362{
    64   if(fFormula) delete fFormula;
    6563}
    6664
     
    107105  {
    108106    iterator = itInputMap->first;
    109 
    110107    if(iterator) delete iterator;
    111108  }
     
    118115void PileUpSubtractor4D::Process()
    119116{
    120   Candidate *candidate, *particle;
     117  Candidate *candidate;
    121118  map<TIterator *, TObjArray *>::iterator itInputMap;
    122119  TIterator *iterator;
    123120  TObjArray *array;
    124121  Double_t z, zvtx = 0;
    125   Double_t z_err, zvtx_err = 0;
     122  Double_t zvtx_err = 0;
    126123  Double_t t, tvtx = 0;
    127   Double_t t_err, tvtx_err = 0;
     124  Double_t tvtx_err = 0;
    128125  Double_t sumPTSquare = 0;
    129126  Double_t tempPTSquare = 0;
    130   Double_t pt, eta, phi, e;
    131127  Double_t distanceCharged, distanceNeutral = 0;
    132128
     
    144140      tvtx = candidate->Position.T();
    145141      tvtx_err = candidate->PositionError.T();
    146     } 
     142    }
    147143  }
    148144
     
    157153    while((candidate = static_cast<Candidate *>(iterator->Next())))
    158154    {
    159       particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
    160       const TLorentzVector &candidateMomentum = particle->Momentum;
    161155
    162       eta = candidateMomentum.Eta();
    163       pt = candidateMomentum.Pt();
    164       phi = candidateMomentum.Phi();
    165       e = candidateMomentum.E();
    166 
    167       z = particle->Position.Z();
    168       z_err = particle->PositionError.Z();
    169       t = particle->InitialPosition.T();
    170       t_err = particle->PositionError.T();
     156      z = candidate->Position.Z();
     157      t = candidate->InitialPosition.T();
    171158
    172159      distanceCharged = TMath::Sqrt(pow((zvtx - z),2)/pow((zvtx_err),2) + pow((tvtx - t),2)/pow((tvtx_err),2));
     
    176163      {
    177164        candidate->IsRecoPU = 0;
     165        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
    178166      }
    179167      else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
    180168      {
    181169        candidate->IsRecoPU = 0;
    182       } 
     170        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
     171      }
    183172      else
    184173      {
    185174        candidate->IsRecoPU = 1;
    186         if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
    187175      }
    188176    }
  • modules/PileUpSubtractor4D.h

    r62764fb rc7e90d8  
    3434class TIterator;
    3535class TObjArray;
    36 class DelphesFormula;
    3736
    3837class PileUpSubtractor4D: public DelphesModule
     
    4746
    4847private:
    49   DelphesFormula *fFormula; //!
    5048
    5149  Double_t fChargedMinSignificance;
    5250  Double_t fNeutralMinSignificance;
    53 
    5451  Double_t fPTMin;
    5552
    5653  std::map<TIterator *, TObjArray *> fInputMap; //!
    5754
     55  TIterator *fItVertexInputArray; //!
     56
     57  const TObjArray *fVertexInputArray; //!
     58
    5859  ClassDef(PileUpSubtractor4D, 1)
    5960
    60     TIterator *fItVertexInputArray; //!
    61 
    62   const TObjArray *fVertexInputArray; //!
    6361};
    6462
Note: See TracChangeset for help on using the changeset viewer.