Fork me on GitHub

Changeset 341014c in git for modules/TreeWriter.cc


Ignore:
Timestamp:
Feb 12, 2019, 9:29:17 PM (5 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
6455202
Parents:
45e58be
Message:

apply .clang-format to all .h, .cc and .cpp files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TreeWriter.cc

    r45e58be 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;
    529523
    530524    // displacement
    531     entry->D0            = candidate->D0;
    532     entry->ErrorD0       = candidate->ErrorD0;
    533     entry->DZ            = candidate->DZ;
    534     entry->ErrorDZ       = candidate->ErrorDZ;
     525    entry->D0 = candidate->D0;
     526    entry->ErrorD0 = candidate->ErrorD0;
     527    entry->DZ = candidate->DZ;
     528    entry->ErrorDZ = candidate->ErrorDZ;
    535529
    536530    // Isolation variables
    537531    entry->IsolationVar = candidate->IsolationVar;
    538     entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
    539     entry->SumPtCharged = candidate->SumPtCharged ;
    540     entry->SumPtNeutral = candidate->SumPtNeutral ;
    541     entry->SumPtChargedPU = candidate->SumPtChargedPU ;
    542     entry->SumPt = candidate->SumPt ;
    543 
     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;
    544537
    545538    entry->Charge = candidate->Charge;
     
    566559  // loop over all muons
    567560  iterator.Reset();
    568   while((candidate = static_cast<Candidate*>(iterator.Next())))
     561  while((candidate = static_cast<Candidate *>(iterator.Next())))
    569562  {
    570563    const TLorentzVector &momentum = candidate->Momentum;
     
    574567    cosTheta = TMath::Abs(momentum.CosTheta());
    575568    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    576     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    577     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    578 
    579     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());
    580573
    581574    entry->SetBit(kIsReferenced);
     
    586579    entry->PT = pt;
    587580
    588     entry->T = position.T()*1.0E-3/c_light;
    589 
     581    entry->T = position.T() * 1.0E-3 / c_light;
    590582
    591583    // displacement
    592     entry->D0            = candidate->D0;
    593     entry->ErrorD0       = candidate->ErrorD0;
    594     entry->DZ            = candidate->DZ;
    595     entry->ErrorDZ       = candidate->ErrorDZ;
     584    entry->D0 = candidate->D0;
     585    entry->ErrorD0 = candidate->ErrorD0;
     586    entry->DZ = candidate->DZ;
     587    entry->ErrorDZ = candidate->ErrorDZ;
    596588
    597589    // Isolation variables
    598590
    599591    entry->IsolationVar = candidate->IsolationVar;
    600     entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
    601     entry->SumPtCharged = candidate->SumPtCharged ;
    602     entry->SumPtNeutral = candidate->SumPtNeutral ;
    603     entry->SumPtChargedPU = candidate->SumPtChargedPU ;
    604     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;
    605597
    606598    entry->Charge = candidate->Charge;
     
    626618  // loop over all jets
    627619  iterator.Reset();
    628   while((candidate = static_cast<Candidate*>(iterator.Next())))
     620  while((candidate = static_cast<Candidate *>(iterator.Next())))
    629621  {
    630622    TIter itConstituents(candidate->GetCandidates());
     
    636628    cosTheta = TMath::Abs(momentum.CosTheta());
    637629    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    638     eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
    639     rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    640 
    641     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());
    642634
    643635    entry->Eta = eta;
     
    645637    entry->PT = pt;
    646638
    647     entry->T = position.T()*1.0E-3/c_light;
     639    entry->T = position.T() * 1.0E-3 / c_light;
    648640
    649641    entry->Mass = momentum.M();
     
    672664    ecalEnergy = 0.0;
    673665    hcalEnergy = 0.0;
    674     while((constituent = static_cast<Candidate*>(itConstituents.Next())))
     666    while((constituent = static_cast<Candidate *>(itConstituents.Next())))
    675667    {
    676668      entry->Constituents.Add(constituent);
     
    679671    }
    680672
    681     entry->EhadOverEem = ecalEnergy > 0.0 ? hcalEnergy/ecalEnergy : 999.9;
     673    entry->EhadOverEem = ecalEnergy > 0.0 ? hcalEnergy / ecalEnergy : 999.9;
    682674
    683675    //---   Pile-Up Jet ID variables ----
     
    696688    entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped;
    697689
    698     entry->SoftDroppedJet     = candidate->SoftDroppedJet ;
    699     entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1 ;
     690    entry->SoftDroppedJet = candidate->SoftDroppedJet;
     691    entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1;
    700692    entry->SoftDroppedSubJet2 = candidate->SoftDroppedSubJet2;
    701 
    702693
    703694    for(i = 0; i < 5; i++)
    704695    {
    705       entry->FracPt[i] = candidate -> FracPt[i];
    706       entry->Tau[i] = candidate -> Tau[i];
    707       entry->TrimmedP4[i] = candidate -> TrimmedP4[i];
    708       entry->PrunedP4[i] = candidate -> PrunedP4[i];
    709       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];
    710701    }
    711702
     
    714705    entry->ExclYmerge34 = candidate->ExclYmerge34;
    715706    entry->ExclYmerge45 = candidate->ExclYmerge45;
    716     entry->ExclYmerge56 = candidate->ExclYmerge56;   
    717 
     707    entry->ExclYmerge56 = candidate->ExclYmerge56;
    718708
    719709    FillParticles(candidate, &entry->Particles);
     
    729719
    730720  // get the first entry
    731   if((candidate = static_cast<Candidate*>(array->At(0))))
    732   {
    733     const TLorentzVector &momentum = candidate->Momentum;
    734 
    735     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());
    736726
    737727    entry->Eta = (-momentum).Eta();
     
    749739
    750740  // get the first entry
    751   if((candidate = static_cast<Candidate*>(array->At(0))))
    752   {
    753     const TLorentzVector &momentum = candidate->Momentum;
    754 
    755     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());
    756746
    757747    entry->HT = momentum.Pt();
     
    769759  // loop over all rho
    770760  iterator.Reset();
    771   while((candidate = static_cast<Candidate*>(iterator.Next())))
    772   {
    773     const TLorentzVector &momentum = candidate->Momentum;
    774 
    775     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());
    776766
    777767    entry->Rho = momentum.E();
     
    789779
    790780  // get the first entry
    791   if((candidate = static_cast<Candidate*>(array->At(0))))
    792   {
    793     const TLorentzVector &momentum = candidate->Momentum;
    794 
    795     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());
    796786
    797787    entry->Weight = momentum.E();
     
    809799  // loop over all roman pot hits
    810800  iterator.Reset();
    811   while((candidate = static_cast<Candidate*>(iterator.Next())))
     801  while((candidate = static_cast<Candidate *>(iterator.Next())))
    812802  {
    813803    const TLorentzVector &position = candidate->Position;
    814804    const TLorentzVector &momentum = candidate->Momentum;
    815805
    816     entry = static_cast<HectorHit*>(branch->NewEntry());
     806    entry = static_cast<HectorHit *>(branch->NewEntry());
    817807
    818808    entry->E = momentum.E();
Note: See TracChangeset for help on using the changeset viewer.