Fork me on GitHub

Changeset 1352 in svn


Ignore:
Timestamp:
Jan 20, 2014, 12:23:57 PM (11 years ago)
Author:
Pavel Demin
Message:

fix formatting in PileUpMerger

Location:
trunk/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/PileUpMerger.cc

    r1345 r1352  
    6363
    6464  fMeanPileUp  = GetDouble("MeanPileUp", 10);
    65  
     65
    6666  fZVertexSpread = GetDouble("ZVertexSpread", 0.15);
    6767  fTVertexSpread = GetDouble("TVertexSpread", 1.5E-09);
    6868
    6969  // read vertex smearing formula
    70        
     70
    7171  fFunction->Compile(GetString("VertexDistributionFormula", "0.0"));
    72   fFunction->SetRange(-fZVertexSpread,-fTVertexSpread,fZVertexSpread,fTVertexSpread);
    73  
     72  fFunction->SetRange(-fZVertexSpread, -fTVertexSpread, fZVertexSpread, fTVertexSpread);
     73
    7474  fileName = GetString("PileUpFile", "MinBias.pileup");
    7575  fReader = new DelphesPileUpReader(fileName);
     
    105105  Candidate *candidate, *vertexcandidate;
    106106  DelphesFactory *factory;
    107  
     107
    108108  const Double_t c_light = 2.99792458E8;
    109109
    110110  fItInputArray->Reset();
    111  
    112     // --- Deal with Primary vertex first  ------
    113  
    114   fFunction->GetRandom2(dz,dt);
    115  
    116   dt *= c_light*1.0E3; //necessary in order to make t in mm/c
    117   dz *= 1.0E3; //necessary in order to make z in mm
    118  
     111
     112  // --- Deal with Primary vertex first  ------
     113
     114  fFunction->GetRandom2(dz, dt);
     115
     116  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
     117  dz *= 1.0E3; // necessary in order to make z in mm
     118
    119119  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    120120  {
     
    124124
    125125  factory = GetFactory();
    126  
     126
    127127  vertexcandidate = factory->NewCandidate();
    128128  vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt);
    129129  fVertexOutputArray->Add(vertexcandidate);
    130  
    131  
     130
    132131  // --- Then with pile-up vertices  ------
    133  
     132
    134133  switch(fPileUpDistribution)
    135134  {
     
    146145
    147146  allEntries = fReader->GetEntries();
    148  
     147
    149148  for(event = 0; event < numberOfEvents; ++event)
    150149  {
     
    156155
    157156    fReader->ReadEntry(entry);
    158  
    159    // --- Pile-up vertex smearing 
    160    
    161     fFunction->GetRandom2(dz,dt);
    162  
    163     dt *= c_light*1.0E3; //necessary in order to make t in mm/c
    164     dz *= 1.0E3; //necessary in order to make z in mm
    165  
     157
     158   // --- Pile-up vertex smearing
     159
     160    fFunction->GetRandom2(dz, dt);
     161
     162    dt *= c_light*1.0E3; // necessary in order to make t in mm/c
     163    dz *= 1.0E3; // necessary in order to make z in mm
     164
    166165    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    167166
     
    169168    vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt);
    170169    vertexcandidate->IsPU = 1;
    171    
     170
    172171    fVertexOutputArray->Add(vertexcandidate);
    173172
     
    185184
    186185      candidate->IsPU = 1;
    187    
     186
    188187      candidate->Momentum.SetPxPyPzE(px, py, pz, e);
    189188      candidate->Momentum.RotateZ(dphi);
     
    191190      candidate->Position.SetXYZT(x, y, z+dz, t+dt);
    192191      candidate->Position.RotateZ(dphi);
    193      
     192
    194193      fParticleOutputArray->Add(candidate);
    195194    }
  • trunk/modules/PileUpMerger.h

    r1345 r1352  
    3636  Int_t fPileUpDistribution;
    3737  Double_t fMeanPileUp;
    38  
     38
    3939  Double_t fZVertexSpread;
    4040  Double_t fTVertexSpread;
    4141
    4242  DelphesPileUpReader *fReader;
    43  
     43
    4444  DelphesTF2 *fFunction; //!
    45  
     45
    4646  TIterator *fItInputArray; //!
    4747
Note: See TracChangeset for help on using the changeset viewer.