Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TreeWriter.cc

    r0e0f211 r341014c  
    1717 */
    1818
    19 
    2019/** \class TreeWriter
    2120 *
     
    3231#include "classes/DelphesFormula.h"
    3332
     33#include "ExRootAnalysis/ExRootClassifier.h"
     34#include "ExRootAnalysis/ExRootFilter.h"
    3435#include "ExRootAnalysis/ExRootResult.h"
    35 #include "ExRootAnalysis/ExRootFilter.h"
    36 #include "ExRootAnalysis/ExRootClassifier.h"
    3736#include "ExRootAnalysis/ExRootTreeBranch.h"
    3837
     38#include "TDatabasePDG.h"
     39#include "TFormula.h"
     40#include "TLorentzVector.h"
     41#include "TMath.h"
     42#include "TObjArray.h"
    3943#include "TROOT.h"
    40 #include "TMath.h"
     44#include "TRandom3.h"
    4145#include "TString.h"
    42 #include "TFormula.h"
    43 #include "TRandom3.h"
    44 #include "TObjArray.h"
    45 #include "TDatabasePDG.h"
    46 #include "TLorentzVector.h"
    4746
    4847#include <algorithm>
    49 #include <stdexcept>
    5048#include <iostream>
    5149#include <sstream>
     50#include <stdexcept>
    5251
    5352using namespace std;
     
    8483
    8584  TBranchMap::iterator itBranchMap;
    86   map< TClass *, TProcessMethod >::iterator itClassMap;
     85  map<TClass *, TProcessMethod>::iterator itClassMap;
    8786
    8887  // read branch configuration and
     
    9796
    9897  size = param.GetSize();
    99   for(i = 0; i < size/3; ++i)
    100   {
    101     branchInputArray = param[i*3].GetString();
    102     branchName = param[i*3 + 1].GetString();
    103     branchClassName = param[i*3 + 2].GetString();
     98  for(i = 0; i < size / 3; ++i)
     99  {
     100    branchInputArray = param[i * 3].GetString();
     101    branchName = param[i * 3 + 1].GetString();
     102    branchClassName = param[i * 3 + 2].GetString();
    104103
    105104    branchClass = gROOT->GetClass(branchClassName);
     
    123122    fBranchMap.insert(make_pair(branch, make_pair(itClassMap->second, array)));
    124123  }
    125 
    126124}
    127125
     
    139137  it1.Reset();
    140138  array->Clear();
    141   while((candidate = static_cast<Candidate*>(it1.Next())))
     139  while((candidate = static_cast<Candidate *>(it1.Next())))
    142140  {
    143141    TIter it2(candidate->GetCandidates());
     
    151149
    152150    // track
    153     candidate = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     151    candidate = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
    154152    if(candidate->GetCandidates()->GetEntriesFast() == 0)
    155153    {
     
    160158    // tower
    161159    it2.Reset();
    162     while((candidate = static_cast<Candidate*>(it2.Next())))
     160    while((candidate = static_cast<Candidate *>(it2.Next())))
    163161    {
    164162      array->Add(candidate->GetCandidates()->At(0));
     
    180178  // loop over all particles
    181179  iterator.Reset();
    182   while((candidate = static_cast<Candidate*>(iterator.Next())))
     180  while((candidate = static_cast<Candidate *>(iterator.Next())))
    183181  {
    184182    const TLorentzVector &momentum = candidate->Momentum;
    185183    const TLorentzVector &position = candidate->Position;
    186184
    187     entry = static_cast<GenParticle*>(branch->NewEntry());
     185    entry = static_cast<GenParticle *>(branch->NewEntry());
    188186
    189187    entry->SetBit(kIsReferenced);
     
    193191    cosTheta = TMath::Abs(momentum.CosTheta());
    194192    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    195     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    196     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
     193    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     194    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
    197195
    198196    entry->PID = candidate->PID;
     
    215213    entry->Pz = momentum.Pz();
    216214
    217     entry->D0            = candidate->D0;
    218     entry->DZ            = candidate->DZ;
    219     entry->P             = candidate->P;
    220     entry->PT            = candidate->PT;
    221     entry->CtgTheta      = candidate->CtgTheta;
    222     entry->Phi           = candidate->Phi;
     215    entry->D0 = candidate->D0;
     216    entry->DZ = candidate->DZ;
     217    entry->P = candidate->P;
     218    entry->PT = candidate->PT;
     219    entry->CtgTheta = candidate->CtgTheta;
     220    entry->Phi = candidate->Phi;
    223221
    224222    entry->Eta = eta;
     
    231229    entry->Y = position.Y();
    232230    entry->Z = position.Z();
    233     entry->T = position.T()*1.0E-3/c_light;
     231    entry->T = position.T() * 1.0E-3 / c_light;
    234232  }
    235233}
     
    255253  // loop over all vertices
    256254  iterator.Reset();
    257   while((candidate = static_cast<Candidate*>(iterator.Next())))
     255  while((candidate = static_cast<Candidate *>(iterator.Next())))
    258256  {
    259257
     
    269267    y = candidate->Position.Y();
    270268    z = candidate->Position.Z();
    271     t = candidate->Position.T()*1.0E-3/c_light;
    272 
    273     xError = candidate->PositionError.X ();
    274     yError = candidate->PositionError.Y ();
    275     zError = candidate->PositionError.Z ();
    276     tError = candidate->PositionError.T ()*1.0E-3/c_light;
    277 
    278     entry = static_cast<Vertex*>(branch->NewEntry());
     269    t = candidate->Position.T() * 1.0E-3 / c_light;
     270
     271    xError = candidate->PositionError.X();
     272    yError = candidate->PositionError.Y();
     273    zError = candidate->PositionError.Z();
     274    tError = candidate->PositionError.T() * 1.0E-3 / c_light;
     275
     276    entry = static_cast<Vertex *>(branch->NewEntry());
    279277
    280278    entry->Index = index;
     
    296294    entry->ErrorT = tError;
    297295
    298 
    299296    TIter itConstituents(candidate->GetCandidates());
    300297    itConstituents.Reset();
    301298    entry->Constituents.Clear();
    302     while((constituent = static_cast<Candidate*>(itConstituents.Next())))
     299    while((constituent = static_cast<Candidate *>(itConstituents.Next())))
    303300    {
    304301      entry->Constituents.Add(constituent);
    305302    }
    306 
    307   }
    308 }
    309 
     303  }
     304}
    310305
    311306//------------------------------------------------------------------------------
     
    322317  // loop over all tracks
    323318  iterator.Reset();
    324   while((candidate = static_cast<Candidate*>(iterator.Next())))
     319  while((candidate = static_cast<Candidate *>(iterator.Next())))
    325320  {
    326321    const TLorentzVector &position = candidate->Position;
     
    328323    cosTheta = TMath::Abs(position.CosTheta());
    329324    signz = (position.Pz() >= 0.0) ? 1.0 : -1.0;
    330     eta = (cosTheta == 1.0 ? signz*999.9 : position.Eta());
    331     rapidity = (cosTheta == 1.0 ? signz*999.9 : position.Rapidity());
    332 
    333     entry = static_cast<Track*>(branch->NewEntry());
     325    eta = (cosTheta == 1.0 ? signz * 999.9 : position.Eta());
     326    rapidity = (cosTheta == 1.0 ? signz * 999.9 : position.Rapidity());
     327
     328    entry = static_cast<Track *>(branch->NewEntry());
    334329
    335330    entry->SetBit(kIsReferenced);
     
    346341    entry->YOuter = position.Y();
    347342    entry->ZOuter = position.Z();
    348     entry->TOuter = position.T()*1.0E-3/c_light;
     343    entry->TOuter = position.T() * 1.0E-3 / c_light;
    349344
    350345    entry->L = candidate->L;
    351346
    352     entry->D0            = candidate->D0;
    353     entry->ErrorD0       = candidate->ErrorD0;
    354     entry->DZ            = candidate->DZ;
    355     entry->ErrorDZ       = candidate->ErrorDZ;
    356 
    357     entry->ErrorP        = candidate->ErrorP;
    358     entry->ErrorPT       = candidate->ErrorPT;
     347    entry->D0 = candidate->D0;
     348    entry->ErrorD0 = candidate->ErrorD0;
     349    entry->DZ = candidate->DZ;
     350    entry->ErrorDZ = candidate->ErrorDZ;
     351
     352    entry->ErrorP = candidate->ErrorP;
     353    entry->ErrorPT = candidate->ErrorPT;
    359354    entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
    360     entry->ErrorPhi      = candidate->ErrorPhi;
     355    entry->ErrorPhi = candidate->ErrorPhi;
    361356
    362357    entry->Xd = candidate->Xd;
     
    369364    p = momentum.P();
    370365    phi = momentum.Phi();
    371     ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1/TMath::Tan(momentum.Theta()) : 1e10;
     366    ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1 / TMath::Tan(momentum.Theta()) : 1e10;
    372367
    373368    cosTheta = TMath::Abs(momentum.CosTheta());
    374369    signz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    375     eta = (cosTheta == 1.0 ? signz*999.9 : momentum.Eta());
    376     rapidity = (cosTheta == 1.0 ? signz*999.9 : momentum.Rapidity());
     370    eta = (cosTheta == 1.0 ? signz * 999.9 : momentum.Eta());
     371    rapidity = (cosTheta == 1.0 ? signz * 999.9 : momentum.Rapidity());
    377372
    378373    entry->P = p;
    379     entry->PT  = pt;
     374    entry->PT = pt;
    380375    entry->Eta = eta;
    381376    entry->Phi = phi;
    382377    entry->CtgTheta = ctgTheta;
    383378
    384     particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     379    particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
    385380    const TLorentzVector &initialPosition = particle->Position;
    386381
     
    388383    entry->Y = initialPosition.Y();
    389384    entry->Z = initialPosition.Z();
    390     entry->T = initialPosition.T()*1.0E-3/c_light;
     385    entry->T = initialPosition.T() * 1.0E-3 / c_light;
    391386
    392387    entry->Particle = particle;
    393388
    394389    entry->VertexIndex = candidate->ClusterIndex;
    395 
    396390  }
    397391}
     
    409403  // loop over all towers
    410404  iterator.Reset();
    411   while((candidate = static_cast<Candidate*>(iterator.Next())))
     405  while((candidate = static_cast<Candidate *>(iterator.Next())))
    412406  {
    413407    const TLorentzVector &momentum = candidate->Momentum;
     
    417411    cosTheta = TMath::Abs(momentum.CosTheta());
    418412    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    419     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    420     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    421 
    422     entry = static_cast<Tower*>(branch->NewEntry());
     413    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     414    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     415
     416    entry = static_cast<Tower *>(branch->NewEntry());
    423417
    424418    entry->SetBit(kIsReferenced);
     
    436430    entry->Edges[3] = candidate->Edges[3];
    437431
    438     entry->T = position.T()*1.0E-3/c_light;
     432    entry->T = position.T() * 1.0E-3 / c_light;
    439433    entry->NTimeHits = candidate->NTimeHits;
    440434
     
    457451  // loop over all photons
    458452  iterator.Reset();
    459   while((candidate = static_cast<Candidate*>(iterator.Next())))
     453  while((candidate = static_cast<Candidate *>(iterator.Next())))
    460454  {
    461455    TIter it1(candidate->GetCandidates());
     
    466460    cosTheta = TMath::Abs(momentum.CosTheta());
    467461    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    468     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    469     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    470 
    471     entry = static_cast<Photon*>(branch->NewEntry());
     462    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     463    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     464
     465    entry = static_cast<Photon *>(branch->NewEntry());
    472466
    473467    entry->Eta = eta;
     
    475469    entry->PT = pt;
    476470    entry->E = momentum.E();
    477     entry->T = position.T()*1.0E-3/c_light;
     471    entry->T = position.T() * 1.0E-3 / c_light;
    478472
    479473    // Isolation variables
    480474
    481475    entry->IsolationVar = candidate->IsolationVar;
    482     entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
    483     entry->SumPtCharged = candidate->SumPtCharged ;
    484     entry->SumPtNeutral = candidate->SumPtNeutral ;
    485     entry->SumPtChargedPU = candidate->SumPtChargedPU ;
    486     entry->SumPt = candidate->SumPt ;
    487 
    488     entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9;
     476    entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr;
     477    entry->SumPtCharged = candidate->SumPtCharged;
     478    entry->SumPtNeutral = candidate->SumPtNeutral;
     479    entry->SumPtChargedPU = candidate->SumPtChargedPU;
     480    entry->SumPt = candidate->SumPt;
     481
     482    entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad / candidate->Eem : 999.9;
    489483
    490484    // 1: prompt -- 2: non prompt -- 3: fake
     
    509503  // loop over all electrons
    510504  iterator.Reset();
    511   while((candidate = static_cast<Candidate*>(iterator.Next())))
     505  while((candidate = static_cast<Candidate *>(iterator.Next())))
    512506  {
    513507    const TLorentzVector &momentum = candidate->Momentum;
     
    517511    cosTheta = TMath::Abs(momentum.CosTheta());
    518512    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    519     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    520     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    521 
    522     entry = static_cast<Electron*>(branch->NewEntry());
     513    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     514    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     515
     516    entry = static_cast<Electron *>(branch->NewEntry());
    523517
    524518    entry->Eta = eta;
     
    526520    entry->PT = pt;
    527521
    528     entry->T = position.T()*1.0E-3/c_light;
     522    entry->T = position.T() * 1.0E-3 / c_light;
     523
     524    // displacement
     525    entry->D0 = candidate->D0;
     526    entry->ErrorD0 = candidate->ErrorD0;
     527    entry->DZ = candidate->DZ;
     528    entry->ErrorDZ = candidate->ErrorDZ;
    529529
    530530    // Isolation variables
    531 
    532531    entry->IsolationVar = candidate->IsolationVar;
    533     entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
    534     entry->SumPtCharged = candidate->SumPtCharged ;
    535     entry->SumPtNeutral = candidate->SumPtNeutral ;
    536     entry->SumPtChargedPU = candidate->SumPtChargedPU ;
    537     entry->SumPt = candidate->SumPt ;
    538 
     532    entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr;
     533    entry->SumPtCharged = candidate->SumPtCharged;
     534    entry->SumPtNeutral = candidate->SumPtNeutral;
     535    entry->SumPtChargedPU = candidate->SumPtChargedPU;
     536    entry->SumPt = candidate->SumPt;
    539537
    540538    entry->Charge = candidate->Charge;
     
    561559  // loop over all muons
    562560  iterator.Reset();
    563   while((candidate = static_cast<Candidate*>(iterator.Next())))
     561  while((candidate = static_cast<Candidate *>(iterator.Next())))
    564562  {
    565563    const TLorentzVector &momentum = candidate->Momentum;
     
    569567    cosTheta = TMath::Abs(momentum.CosTheta());
    570568    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    571     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    572     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    573 
    574     entry = static_cast<Muon*>(branch->NewEntry());
     569    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     570    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     571
     572    entry = static_cast<Muon *>(branch->NewEntry());
    575573
    576574    entry->SetBit(kIsReferenced);
     
    581579    entry->PT = pt;
    582580
    583     entry->T = position.T()*1.0E-3/c_light;
     581    entry->T = position.T() * 1.0E-3 / c_light;
     582
     583    // displacement
     584    entry->D0 = candidate->D0;
     585    entry->ErrorD0 = candidate->ErrorD0;
     586    entry->DZ = candidate->DZ;
     587    entry->ErrorDZ = candidate->ErrorDZ;
    584588
    585589    // Isolation variables
    586590
    587591    entry->IsolationVar = candidate->IsolationVar;
    588     entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
    589     entry->SumPtCharged = candidate->SumPtCharged ;
    590     entry->SumPtNeutral = candidate->SumPtNeutral ;
    591     entry->SumPtChargedPU = candidate->SumPtChargedPU ;
    592     entry->SumPt = candidate->SumPt ;
     592    entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr;
     593    entry->SumPtCharged = candidate->SumPtCharged;
     594    entry->SumPtNeutral = candidate->SumPtNeutral;
     595    entry->SumPtChargedPU = candidate->SumPtChargedPU;
     596    entry->SumPt = candidate->SumPt;
    593597
    594598    entry->Charge = candidate->Charge;
     
    614618  // loop over all jets
    615619  iterator.Reset();
    616   while((candidate = static_cast<Candidate*>(iterator.Next())))
     620  while((candidate = static_cast<Candidate *>(iterator.Next())))
    617621  {
    618622    TIter itConstituents(candidate->GetCandidates());
     
    624628    cosTheta = TMath::Abs(momentum.CosTheta());
    625629    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    626     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    627     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    628 
    629     entry = static_cast<Jet*>(branch->NewEntry());
     630    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     631    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     632
     633    entry = static_cast<Jet *>(branch->NewEntry());
    630634
    631635    entry->Eta = eta;
     
    633637    entry->PT = pt;
    634638
    635     entry->T = position.T()*1.0E-3/c_light;
     639    entry->T = position.T() * 1.0E-3 / c_light;
    636640
    637641    entry->Mass = momentum.M();
     
    652656
    653657    entry->TauTag = candidate->TauTag;
     658    entry->TauWeight = candidate->TauWeight;
    654659
    655660    entry->Charge = candidate->Charge;
     
    659664    ecalEnergy = 0.0;
    660665    hcalEnergy = 0.0;
    661     while((constituent = static_cast<Candidate*>(itConstituents.Next())))
     666    while((constituent = static_cast<Candidate *>(itConstituents.Next())))
    662667    {
    663668      entry->Constituents.Add(constituent);
     
    666671    }
    667672
    668     entry->EhadOverEem = ecalEnergy > 0.0 ? hcalEnergy/ecalEnergy : 999.9;
     673    entry->EhadOverEem = ecalEnergy > 0.0 ? hcalEnergy / ecalEnergy : 999.9;
    669674
    670675    //---   Pile-Up Jet ID variables ----
     
    683688    entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped;
    684689
    685     entry->SoftDroppedJet     = candidate->SoftDroppedJet ;
    686     entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1 ;
     690    entry->SoftDroppedJet = candidate->SoftDroppedJet;
     691    entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1;
    687692    entry->SoftDroppedSubJet2 = candidate->SoftDroppedSubJet2;
    688 
    689693
    690694    for(i = 0; i < 5; i++)
    691695    {
    692       entry->FracPt[i] = candidate -> FracPt[i];
    693       entry->Tau[i] = candidate -> Tau[i];
    694       entry->TrimmedP4[i] = candidate -> TrimmedP4[i];
    695       entry->PrunedP4[i] = candidate -> PrunedP4[i];
    696       entry->SoftDroppedP4[i] = candidate -> SoftDroppedP4[i];
     696      entry->FracPt[i] = candidate->FracPt[i];
     697      entry->Tau[i] = candidate->Tau[i];
     698      entry->TrimmedP4[i] = candidate->TrimmedP4[i];
     699      entry->PrunedP4[i] = candidate->PrunedP4[i];
     700      entry->SoftDroppedP4[i] = candidate->SoftDroppedP4[i];
    697701    }
    698702
     
    701705    entry->ExclYmerge34 = candidate->ExclYmerge34;
    702706    entry->ExclYmerge45 = candidate->ExclYmerge45;
    703     entry->ExclYmerge56 = candidate->ExclYmerge56;   
    704 
     707    entry->ExclYmerge56 = candidate->ExclYmerge56;
    705708
    706709    FillParticles(candidate, &entry->Particles);
     
    716719
    717720  // get the first entry
    718   if((candidate = static_cast<Candidate*>(array->At(0))))
    719   {
    720     const TLorentzVector &momentum = candidate->Momentum;
    721 
    722     entry = static_cast<MissingET*>(branch->NewEntry());
     721  if((candidate = static_cast<Candidate *>(array->At(0))))
     722  {
     723    const TLorentzVector &momentum = candidate->Momentum;
     724
     725    entry = static_cast<MissingET *>(branch->NewEntry());
    723726
    724727    entry->Eta = (-momentum).Eta();
     
    736739
    737740  // get the first entry
    738   if((candidate = static_cast<Candidate*>(array->At(0))))
    739   {
    740     const TLorentzVector &momentum = candidate->Momentum;
    741 
    742     entry = static_cast<ScalarHT*>(branch->NewEntry());
     741  if((candidate = static_cast<Candidate *>(array->At(0))))
     742  {
     743    const TLorentzVector &momentum = candidate->Momentum;
     744
     745    entry = static_cast<ScalarHT *>(branch->NewEntry());
    743746
    744747    entry->HT = momentum.Pt();
     
    756759  // loop over all rho
    757760  iterator.Reset();
    758   while((candidate = static_cast<Candidate*>(iterator.Next())))
    759   {
    760     const TLorentzVector &momentum = candidate->Momentum;
    761 
    762     entry = static_cast<Rho*>(branch->NewEntry());
     761  while((candidate = static_cast<Candidate *>(iterator.Next())))
     762  {
     763    const TLorentzVector &momentum = candidate->Momentum;
     764
     765    entry = static_cast<Rho *>(branch->NewEntry());
    763766
    764767    entry->Rho = momentum.E();
     
    776779
    777780  // get the first entry
    778   if((candidate = static_cast<Candidate*>(array->At(0))))
    779   {
    780     const TLorentzVector &momentum = candidate->Momentum;
    781 
    782     entry = static_cast<Weight*>(branch->NewEntry());
     781  if((candidate = static_cast<Candidate *>(array->At(0))))
     782  {
     783    const TLorentzVector &momentum = candidate->Momentum;
     784
     785    entry = static_cast<Weight *>(branch->NewEntry());
    783786
    784787    entry->Weight = momentum.E();
     
    796799  // loop over all roman pot hits
    797800  iterator.Reset();
    798   while((candidate = static_cast<Candidate*>(iterator.Next())))
     801  while((candidate = static_cast<Candidate *>(iterator.Next())))
    799802  {
    800803    const TLorentzVector &position = candidate->Position;
    801804    const TLorentzVector &momentum = candidate->Momentum;
    802805
    803     entry = static_cast<HectorHit*>(branch->NewEntry());
     806    entry = static_cast<HectorHit *>(branch->NewEntry());
    804807
    805808    entry->E = momentum.E();
Note: See TracChangeset for help on using the changeset viewer.