Fork me on GitHub

Changeset 1ad8eca in git


Ignore:
Timestamp:
Aug 24, 2021, 11:53:15 AM (3 years ago)
Author:
michele <michele.selvaggi@…>
Branches:
master
Children:
61dccd3
Parents:
5c257a5
Message:

fixed momentum cut and generalised to neutrals

Location:
modules
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • modules/TimeOfFlight.cc

    r5c257a5 r1ad8eca  
    5252
    5353TimeOfFlight::TimeOfFlight() :
    54   fItTrackInputArray(0), fItVertexInputArray(0)
     54  fItInputArray(0), fItVertexInputArray(0)
    5555{
    5656}
     
    7171
    7272  // import track input array
    73   fTrackInputArray = ImportArray(GetString("TrackInputArray", "MuonMomentumSmearing/muons"));
    74   fItTrackInputArray = fTrackInputArray->MakeIterator();
     73  fInputArray = ImportArray(GetString("InputArray", "MuonMomentumSmearing/muons"));
     74  fItInputArray = fInputArray->MakeIterator();
    7575
    7676  // import vertex input array
     
    8686void TimeOfFlight::Finish()
    8787{
    88   if(fItTrackInputArray) delete fItTrackInputArray;
     88  if(fItInputArray) delete fItInputArray;
    8989  if(fItVertexInputArray) delete fItVertexInputArray;
    9090}
     
    103103  ComputeVertexMomenta();
    104104
    105   fItTrackInputArray->Reset();
    106   while((candidate = static_cast<Candidate *>(fItTrackInputArray->Next())))
     105  fItInputArray->Reset();
     106  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    107107  {
    108108
     
    116116    // time at vertex from MC truth
    117117    t_truth = candidateInitialPosition.T() * 1.0E-3 / c_light;
    118 
    119     if (candidate->Position.Vect().Mag() < 5.) continue;
    120118
    121119    // various options on how to calculate the vertex time
     
    210208    while((constituent = static_cast<Candidate *>(itGenParts.Next())))
    211209    {
    212       fItTrackInputArray->Reset();
    213       while((track = static_cast<Candidate *>(fItTrackInputArray->Next())))
     210      fItInputArray->Reset();
     211      while((track = static_cast<Candidate *>(fItInputArray->Next())))
    214212      {
    215213        // get gen part that generated track
  • modules/TimeOfFlight.h

    r5c257a5 r1ad8eca  
    4848  Int_t fVertexTimeMode;
    4949
    50   TIterator *fItTrackInputArray; //!
     50  TIterator *fItInputArray; //!
    5151  TIterator *fItVertexInputArray; //!
    5252
    53   const TObjArray *fTrackInputArray; //!
     53  const TObjArray *fInputArray; //!
    5454  const TObjArray *fVertexInputArray; //!
    5555
  • modules/TimeSmearing.cc

    r5c257a5 r1ad8eca  
    5252
    5353TimeSmearing::TimeSmearing() :
    54   fItTrackInputArray(0), fResolutionFormula(0)
     54  fItInputArray(0), fResolutionFormula(0)
    5555{
    5656        fResolutionFormula = new DelphesFormula;
     
    7474
    7575  // import track input array
    76   fTrackInputArray = ImportArray(GetString("TrackInputArray", "MuonMomentumSmearing/muons"));
    77   fItTrackInputArray = fTrackInputArray->MakeIterator();
     76  fInputArray = ImportArray(GetString("InputArray", "MuonMomentumSmearing/muons"));
     77  fItInputArray = fInputArray->MakeIterator();
    7878
    7979
     
    8686void TimeSmearing::Finish()
    8787{
    88   if(fItTrackInputArray) delete fItTrackInputArray;
     88  if(fItInputArray) delete fItInputArray;
    8989}
    9090
     
    100100  const Double_t c_light = 2.99792458E8;
    101101
    102   fItTrackInputArray->Reset();
    103   while((candidate = static_cast<Candidate *>(fItTrackInputArray->Next())))
     102  fItInputArray->Reset();
     103  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    104104  {
    105105
  • modules/TimeSmearing.h

    r5c257a5 r1ad8eca  
    4949  Int_t fVertexTimeMode;
    5050
    51   TIterator *fItTrackInputArray; //!
     51  TIterator *fItInputArray; //!
    5252
    53   const TObjArray *fTrackInputArray; //!
     53  const TObjArray *fInputArray; //!
    5454
    5555  TObjArray *fOutputArray; //!
Note: See TracChangeset for help on using the changeset viewer.