Fork me on GitHub

Changeset 1ad8eca in git for modules/TimeOfFlight.cc


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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.