Fork me on GitHub

Changeset 22dc7fd in git for modules/TreeWriter.cc


Ignore:
Timestamp:
Dec 21, 2013, 3:00:11 PM (11 years ago)
Author:
mselvaggi <mselvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
24d005f
Parents:
af88093
Message:

timing implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TreeWriter.cc

    raf88093 r22dc7fd  
    9595      continue;
    9696    }
    97 
     97   
    9898    itClassMap = fClassMap.find(branchClass);
    9999    if(itClassMap == fClassMap.end())
     
    115115void TreeWriter::Finish()
    116116{
    117 
    118117}
    119118
     
    161160  GenParticle *entry = 0;
    162161  Double_t pt, signPz, cosTheta, eta, rapidity;
    163 
     162 
     163  const Double_t c_light = 2.99792458E8;
     164 
    164165  // loop over all particles
    165166  iterator.Reset();
     
    208209    entry->Y = position.Y();
    209210    entry->Z = position.Z();
    210     entry->T = position.T();
     211    entry->T = position.T()*1.0E-3/c_light;
    211212  }
    212213}
     
    219220  Candidate *candidate = 0;
    220221  Vertex *entry = 0;
     222 
     223  const Double_t c_light = 2.99792458E8;
    221224
    222225  // loop over all vertices
     
    231234    entry->Y = position.Y();
    232235    entry->Z = position.Z();
    233     entry->T = position.T();
     236    entry->T = position.T()*1.0E-3/c_light;
    234237  }
    235238}
     
    244247  Track *entry = 0;
    245248  Double_t pt, signz, cosTheta, eta, rapidity;
    246 
     249  const Double_t c_light = 2.99792458E8;
     250 
    247251  // loop over all tracks
    248252  iterator.Reset();
     
    271275    entry->YOuter = position.Y();
    272276    entry->ZOuter = position.Z();
     277    entry->TOuter = position.T()*1.0E-3/c_light;
    273278
    274279    const TLorentzVector &momentum = candidate->Momentum;
     
    290295    entry->Y = initialPosition.Y();
    291296    entry->Z = initialPosition.Z();
     297    entry->T = initialPosition.T()*1.0E-3/c_light;
    292298
    293299    entry->Particle = particle;
     
    303309  Tower *entry = 0;
    304310  Double_t pt, signPz, cosTheta, eta, rapidity;
    305 
     311  const Double_t c_light = 2.99792458E8;
     312 
    306313  // loop over all towers
    307314  iterator.Reset();
     
    309316  {
    310317    const TLorentzVector &momentum = candidate->Momentum;
    311 
     318    const TLorentzVector &position = candidate->Position;
     319   
    312320    pt = momentum.Pt();
    313321    cosTheta = TMath::Abs(momentum.CosTheta());
     
    331339    entry->Edges[2] = candidate->Edges[2];
    332340    entry->Edges[3] = candidate->Edges[3];
    333 
     341   
     342    entry->T = position.T()*1.0E-3/c_light;
     343   
    334344    FillParticles(candidate, &entry->Particles);
    335345  }
     
    344354  Photon *entry = 0;
    345355  Double_t pt, signPz, cosTheta, eta, rapidity;
    346 
     356  const Double_t c_light = 2.99792458E8;
     357 
    347358  array->Sort();
    348359
     
    353364    TIter it1(candidate->GetCandidates());
    354365    const TLorentzVector &momentum = candidate->Momentum;
     366    const TLorentzVector &position = candidate->Position;
     367   
    355368
    356369    pt = momentum.Pt();
     
    366379    entry->PT = pt;
    367380    entry->E = momentum.E();
    368 
     381   
     382    entry->T = position.T()*1.0E-3/c_light;
     383   
    369384    entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9;
    370385
     
    381396  Electron *entry = 0;
    382397  Double_t pt, signPz, cosTheta, eta, rapidity;
    383 
     398  const Double_t c_light = 2.99792458E8;
     399 
    384400  array->Sort();
    385401
     
    389405  {
    390406    const TLorentzVector &momentum = candidate->Momentum;
    391 
     407    const TLorentzVector &position = candidate->Position;
     408   
    392409    pt = momentum.Pt();
    393410    cosTheta = TMath::Abs(momentum.CosTheta());
     
    401418    entry->Phi = momentum.Phi();
    402419    entry->PT = pt;
    403 
     420   
     421    entry->T = position.T()*1.0E-3/c_light;
     422   
    404423    entry->Charge = candidate->Charge;
    405424
     
    418437  Muon *entry = 0;
    419438  Double_t pt, signPz, cosTheta, eta, rapidity;
    420 
     439 
     440  const Double_t c_light = 2.99792458E8;
     441 
    421442  array->Sort();
    422443
     
    426447  {
    427448    const TLorentzVector &momentum = candidate->Momentum;
     449    const TLorentzVector &position = candidate->Position;
     450   
    428451
    429452    pt = momentum.Pt();
     
    442465    entry->PT = pt;
    443466
     467    entry->T = position.T()*1.0E-3/c_light;
     468   
     469   // cout<<entry->PT<<","<<entry->T<<endl;
     470
    444471    entry->Charge = candidate->Charge;
    445472
     
    457484  Double_t pt, signPz, cosTheta, eta, rapidity;
    458485  Double_t ecalEnergy, hcalEnergy;
    459 
     486  const Double_t c_light = 2.99792458E8;
     487 
    460488  array->Sort();
    461489
     
    465493  {
    466494    TIter itConstituents(candidate->GetCandidates());
    467     const TLorentzVector &momentum = candidate->Momentum;
    468 
     495   
     496    const TLorentzVector &momentum = candidate->Momentum;
     497    const TLorentzVector &position = candidate->Position;
     498   
    469499    pt = momentum.Pt();
    470500    cosTheta = TMath::Abs(momentum.CosTheta());
     
    479509    entry->PT = pt;
    480510
     511    entry->T = position.T()*1.0E-3/c_light;
     512   
    481513    entry->Mass = momentum.M();
    482514
Note: See TracChangeset for help on using the changeset viewer.