Fork me on GitHub

Changeset 2118a6a in git


Ignore:
Timestamp:
May 18, 2016, 5:17:11 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
b291b0b
Parents:
bc4bff0
Message:

fixed missing vertexing variables

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesClasses.cc

    rbc4bff0 r2118a6a  
    121121  Charge(0), Mass(0.0),
    122122  IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0),
     123  ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0),
    123124  Flavor(0), FlavorAlgo(0), FlavorPhys(0),
    124125  BTag(0), BTagAlgo(0), BTagPhys(0),
     
    127128  Momentum(0.0, 0.0, 0.0, 0.0),
    128129  Position(0.0, 0.0, 0.0, 0.0),
    129   InitialPosition(0.0, 0.0, 0.0, 0.0),
     130  PositionError(0.0, 0.0, 0.0, 0.0),
     131  InitialPosition(0.0, 0.0, 0.0, 0.0),
    130132  Area(0.0, 0.0, 0.0, 0.0),
    131133  L(0),
     
    253255  object.IsConstituent = IsConstituent;
    254256  object.IsFromConversion = IsFromConversion;
     257  object.ClusterIndex = ClusterIndex;
     258  object.ClusterNDF = ClusterNDF;
     259  object.ClusterSigma = ClusterSigma;
     260  object.SumPT2 = SumPT2;
     261  object.BTVSumPT2 = BTVSumPT2;
     262  object.GenDeltaZ = GenDeltaZ;
     263  object.GenSumPT2 = GenSumPT2;
    255264  object.Flavor = Flavor;
    256265  object.FlavorAlgo = FlavorAlgo;
     
    270279  object.Momentum = Momentum;
    271280  object.Position = Position;
    272   object.InitialPosition = Position;
     281  object.InitialPosition = InitialPosition;
     282  object.PositionError = PositionError;
    273283  object.Area = Area;
    274284  object.L = L;
  • modules/PileUpMerger.cc

    rbc4bff0 r2118a6a  
    115115  TDatabasePDG *pdg = TDatabasePDG::Instance();
    116116  TParticlePDG *pdgParticle;
    117   Int_t pid;
     117  Int_t pid, nch, nvtx = -1;
    118118  Float_t x, y, z, t, vx, vy;
    119   Float_t px, py, pz, e;
    120   Double_t dz, dphi, dt;
     119  Float_t px, py, pz, e, pt;
     120  Double_t dz, dphi, dt, sumpt2;
    121121  Int_t numberOfEvents, event, numberOfParticles;
    122122  Long64_t allEntries, entry;
     
    137137  vy = 0.0;
    138138  numberOfParticles = fInputArray->GetEntriesFast();
     139  nch = 0;
     140  sumpt2 = 0.0;
     141   
    139142  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    140143  {
     
    143146    z = candidate->Position.Z();
    144147    t = candidate->Position.T();
     148    pt = candidate->Momentum.Pt();
    145149    candidate->Position.SetZ(z + dz);
    146150    candidate->Position.SetT(t + dt);
    147151    fParticleOutputArray->Add(candidate);
     152 
     153    if(TMath::Abs(candidate->Charge) >  1.0E-9)
     154    {
     155      nch++;   
     156      sumpt2 += pt*pt;
     157    } 
    148158  }
    149159
     
    154164  }
    155165
     166  nvtx++;
    156167  factory = GetFactory();
    157168
    158169  vertex = factory->NewCandidate();
    159170  vertex->Position.SetXYZT(vx, vy, dz, dt);
     171  vertex->ClusterIndex = nvtx;
     172  vertex->ClusterNDF = nch;
     173  vertex->SumPT2 = sumpt2;
     174  vertex->GenSumPT2 = sumpt2; 
     175 
    160176  fVertexOutputArray->Add(vertex);
    161177
     
    201217    vx = 0.0;
    202218    vy = 0.0;
     219   
    203220    numberOfParticles = 0;
     221    sumpt2 = 0.0;
     222   
    204223    while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    205224    {
     
    227246      vx += candidate->Position.X();
    228247      vy += candidate->Position.Y();
     248     
    229249      ++numberOfParticles;
    230 
     250      if(TMath::Abs(candidate->Charge) >  1.0E-9)
     251      {
     252        nch++;   
     253        sumpt2 += pt*pt;
     254      }
     255       
    231256      fParticleOutputArray->Add(candidate);
    232257    }
     
    237262      vy /= numberOfParticles;
    238263    }
     264   
     265    nvtx++;
    239266
    240267    vertex = factory->NewCandidate();
    241268    vertex->Position.SetXYZT(vx, vy, dz, dt);
     269   
     270    vertex->ClusterIndex = nvtx;
     271    vertex->ClusterNDF = nch;
     272    vertex->SumPT2 = sumpt2;
     273    vertex->GenSumPT2 = sumpt2;
     274   
    242275    vertex->IsPU = 1;
    243276
    244277    fVertexOutputArray->Add(vertex);
    245   }
    246 }
    247 
    248 //------------------------------------------------------------------------------
     278   
     279  }
     280}
     281
     282//------------------------------------------------------------------------------
  • modules/VertexFinder.cc

    rbc4bff0 r2118a6a  
    278278                continue;
    279279               
    280               Double_t sz_tr =  track->second.at ("ez") *  track->second.at ("z");
    281               Double_t sz_vt =  clusterIDToDouble.at (clusterIndex).at ("ez") *  clusterIDToDouble.at (clusterIndex).at ("z");
    282                
    283280              Double_t distance = fabs (clusterIDToDouble.at (clusterIndex).at ("z") - track->second.at ("z")) / hypot (clusterIDToDouble.at (clusterIndex).at ("ez"), track->second.at ("ez"));
    284281              if (nearestDistance < 0.0 || distance < nearestDistance)
  • modules/VertexSorter.cc

    rbc4bff0 r2118a6a  
    5353void VertexSorter::Init()
    5454{
    55   fInputArray = ImportArray(GetString("InputArray", "VertexFinder/clusters"));
     55  fInputArray = ImportArray(GetString("InputArray", "VertexFinder/vertices"));
    5656
    5757  fTrackInputArray = ImportArray(GetString("TrackInputArray", "VertexFinder/tracks"));
Note: See TracChangeset for help on using the changeset viewer.