Fork me on GitHub

Changeset d07e957 in git for modules


Ignore:
Timestamp:
Nov 8, 2013, 5:09:58 PM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
87cadbd
Parents:
984cd31
Message:

add vertex block

Location:
modules
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • modules/PileUpMerger.cc

    r984cd31 rd07e957  
    7070
    7171  // create output arrays
    72   fOutputArray = ExportArray(GetString("OutputArray", "stableParticles"));
     72  fParticleOutputArray = ExportArray(GetString("ParticleOutputArray", "stableParticles"));
     73  fVertexOutputArray = ExportArray(GetString("VertexOutputArray", "vertices"));
    7374}
    7475
     
    9899  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    99100  {
    100     fOutputArray->Add(candidate);
     101    fParticleOutputArray->Add(candidate);
    101102  }
    102103
     
    131132    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    132133
     134    candidate = factory->NewCandidate();
     135    candidate->Position.SetXYZT(0.0, 0.0, dz, 0.0);
     136    fVertexOutputArray->Add(candidate);
     137
    133138    while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    134139    {
     
    151156      candidate->Position.RotateZ(dphi);
    152157
    153       fOutputArray->Add(candidate);
     158      fParticleOutputArray->Add(candidate);
    154159    }
    155160  }
  • modules/PileUpMerger.h

    r984cd31 rd07e957  
    4343  const TObjArray *fInputArray; //!
    4444
    45   TObjArray *fOutputArray; //!
     45  TObjArray *fParticleOutputArray; //!
     46  TObjArray *fVertexOutputArray; //!
    4647
    4748  ClassDef(PileUpMerger, 1)
  • modules/TreeWriter.cc

    r984cd31 rd07e957  
    213213//------------------------------------------------------------------------------
    214214
     215void TreeWriter::ProcessVertices(ExRootTreeBranch *branch, TObjArray *array)
     216{
     217  TIter iterator(array);
     218  Candidate *candidate = 0;
     219  Vertex *entry = 0;
     220
     221  // loop over all vertices
     222  iterator.Reset();
     223  while((candidate = static_cast<Candidate*>(iterator.Next())))
     224  {
     225    const TLorentzVector &position = candidate->Position;
     226
     227    entry = static_cast<Vertex*>(branch->NewEntry());
     228
     229    entry->X = position.X();
     230    entry->Y = position.Y();
     231    entry->Z = position.Z();
     232    entry->T = position.T();
     233  }
     234}
     235
     236//------------------------------------------------------------------------------
     237
    215238void TreeWriter::ProcessTracks(ExRootTreeBranch *branch, TObjArray *array)
    216239{
     
    221244  Double_t pt, signz, cosTheta, eta, rapidity;
    222245
    223   // loop over all jets
     246  // loop over all tracks
    224247  iterator.Reset();
    225248  while((candidate = static_cast<Candidate*>(iterator.Next())))
     
    280303  Double_t pt, signPz, cosTheta, eta, rapidity;
    281304
    282   // loop over all jets
     305  // loop over all towers
    283306  iterator.Reset();
    284307  while((candidate = static_cast<Candidate*>(iterator.Next())))
  • modules/TreeWriter.h

    r984cd31 rd07e957  
    4141
    4242  void ProcessParticles(ExRootTreeBranch *branch, TObjArray *array);
     43  void ProcessVertices(ExRootTreeBranch *branch, TObjArray *array);
    4344  void ProcessTracks(ExRootTreeBranch *branch, TObjArray *array);
    4445  void ProcessTowers(ExRootTreeBranch *branch, TObjArray *array);
Note: See TracChangeset for help on using the changeset viewer.