Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TreeWriter.cc

    r341014c r0e0f211  
    1717 */
    1818
     19
    1920/** \class TreeWriter
    2021 *
     
    3132#include "classes/DelphesFormula.h"
    3233
     34#include "ExRootAnalysis/ExRootResult.h"
     35#include "ExRootAnalysis/ExRootFilter.h"
    3336#include "ExRootAnalysis/ExRootClassifier.h"
    34 #include "ExRootAnalysis/ExRootFilter.h"
    35 #include "ExRootAnalysis/ExRootResult.h"
    3637#include "ExRootAnalysis/ExRootTreeBranch.h"
    3738
     39#include "TROOT.h"
     40#include "TMath.h"
     41#include "TString.h"
     42#include "TFormula.h"
     43#include "TRandom3.h"
     44#include "TObjArray.h"
    3845#include "TDatabasePDG.h"
    39 #include "TFormula.h"
    4046#include "TLorentzVector.h"
    41 #include "TMath.h"
    42 #include "TObjArray.h"
    43 #include "TROOT.h"
    44 #include "TRandom3.h"
    45 #include "TString.h"
    4647
    4748#include <algorithm>
     49#include <stdexcept>
    4850#include <iostream>
    4951#include <sstream>
    50 #include <stdexcept>
    5152
    5253using namespace std;
     
    8384
    8485  TBranchMap::iterator itBranchMap;
    85   map<TClass *, TProcessMethod>::iterator itClassMap;
     86  map< TClass *, TProcessMethod >::iterator itClassMap;
    8687
    8788  // read branch configuration and
     
    9697
    9798  size = param.GetSize();
    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();
     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();
    103104
    104105    branchClass = gROOT->GetClass(branchClassName);
     
    122123    fBranchMap.insert(make_pair(branch, make_pair(itClassMap->second, array)));
    123124  }
     125
    124126}
    125127
     
    137139  it1.Reset();
    138140  array->Clear();
    139   while((candidate = static_cast<Candidate *>(it1.Next())))
     141  while((candidate = static_cast<Candidate*>(it1.Next())))
    140142  {
    141143    TIter it2(candidate->GetCandidates());
     
    149151
    150152    // track
    151     candidate = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
     153    candidate = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    152154    if(candidate->GetCandidates()->GetEntriesFast() == 0)
    153155    {
     
    158160    // tower
    159161    it2.Reset();
    160     while((candidate = static_cast<Candidate *>(it2.Next())))
     162    while((candidate = static_cast<Candidate*>(it2.Next())))
    161163    {
    162164      array->Add(candidate->GetCandidates()->At(0));
     
    178180  // loop over all particles
    179181  iterator.Reset();
    180   while((candidate = static_cast<Candidate *>(iterator.Next())))
     182  while((candidate = static_cast<Candidate*>(iterator.Next())))
    181183  {
    182184    const TLorentzVector &momentum = candidate->Momentum;
    183185    const TLorentzVector &position = candidate->Position;
    184186
    185     entry = static_cast<GenParticle *>(branch->NewEntry());
     187    entry = static_cast<GenParticle*>(branch->NewEntry());
    186188
    187189    entry->SetBit(kIsReferenced);
     
    191193    cosTheta = TMath::Abs(momentum.CosTheta());
    192194    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    193     eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
    194     rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     195    eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
     196    rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    195197
    196198    entry->PID = candidate->PID;
     
    213215    entry->Pz = momentum.Pz();
    214216
    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;
     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;
    221223
    222224    entry->Eta = eta;
     
    229231    entry->Y = position.Y();
    230232    entry->Z = position.Z();
    231     entry->T = position.T() * 1.0E-3 / c_light;
     233    entry->T = position.T()*1.0E-3/c_light;
    232234  }
    233235}
     
    253255  // loop over all vertices
    254256  iterator.Reset();
    255   while((candidate = static_cast<Candidate *>(iterator.Next())))
     257  while((candidate = static_cast<Candidate*>(iterator.Next())))
    256258  {
    257259
     
    267269    y = candidate->Position.Y();
    268270    z = candidate->Position.Z();
    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());
     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());
    277279
    278280    entry->Index = index;
     
    294296    entry->ErrorT = tError;
    295297
     298
    296299    TIter itConstituents(candidate->GetCandidates());
    297300    itConstituents.Reset();
    298301    entry->Constituents.Clear();
    299     while((constituent = static_cast<Candidate *>(itConstituents.Next())))
     302    while((constituent = static_cast<Candidate*>(itConstituents.Next())))
    300303    {
    301304      entry->Constituents.Add(constituent);
    302305    }
    303   }
    304 }
     306
     307  }
     308}
     309
    305310
    306311//------------------------------------------------------------------------------
     
    317322  // loop over all tracks
    318323  iterator.Reset();
    319   while((candidate = static_cast<Candidate *>(iterator.Next())))
     324  while((candidate = static_cast<Candidate*>(iterator.Next())))
    320325  {
    321326    const TLorentzVector &position = candidate->Position;
     
    323328    cosTheta = TMath::Abs(position.CosTheta());
    324329    signz = (position.Pz() >= 0.0) ? 1.0 : -1.0;
    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());
     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());
    329334
    330335    entry->SetBit(kIsReferenced);
     
    341346    entry->YOuter = position.Y();
    342347    entry->ZOuter = position.Z();
    343     entry->TOuter = position.T() * 1.0E-3 / c_light;
     348    entry->TOuter = position.T()*1.0E-3/c_light;
    344349
    345350    entry->L = candidate->L;
    346351
    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;
     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;
    354359    entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
    355     entry->ErrorPhi = candidate->ErrorPhi;
     360    entry->ErrorPhi      = candidate->ErrorPhi;
    356361
    357362    entry->Xd = candidate->Xd;
     
    364369    p = momentum.P();
    365370    phi = momentum.Phi();
    366     ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1 / TMath::Tan(momentum.Theta()) : 1e10;
     371    ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1/TMath::Tan(momentum.Theta()) : 1e10;
    367372
    368373    cosTheta = TMath::Abs(momentum.CosTheta());
    369374    signz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    370     eta = (cosTheta == 1.0 ? signz * 999.9 : momentum.Eta());
    371     rapidity = (cosTheta == 1.0 ? signz * 999.9 : momentum.Rapidity());
     375    eta = (cosTheta == 1.0 ? signz*999.9 : momentum.Eta());
     376    rapidity = (cosTheta == 1.0 ? signz*999.9 : momentum.Rapidity());
    372377
    373378    entry->P = p;
    374     entry->PT = pt;
     379    entry->PT  = pt;
    375380    entry->Eta = eta;
    376381    entry->Phi = phi;
    377382    entry->CtgTheta = ctgTheta;
    378383
    379     particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
     384    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    380385    const TLorentzVector &initialPosition = particle->Position;
    381386
     
    383388    entry->Y = initialPosition.Y();
    384389    entry->Z = initialPosition.Z();
    385     entry->T = initialPosition.T() * 1.0E-3 / c_light;
     390    entry->T = initialPosition.T()*1.0E-3/c_light;
    386391
    387392    entry->Particle = particle;
    388393
    389394    entry->VertexIndex = candidate->ClusterIndex;
     395
    390396  }
    391397}
     
    403409  // loop over all towers
    404410  iterator.Reset();
    405   while((candidate = static_cast<Candidate *>(iterator.Next())))
     411  while((candidate = static_cast<Candidate*>(iterator.Next())))
    406412  {
    407413    const TLorentzVector &momentum = candidate->Momentum;
     
    411417    cosTheta = TMath::Abs(momentum.CosTheta());
    412418    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    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());
     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());
    417423
    418424    entry->SetBit(kIsReferenced);
     
    430436    entry->Edges[3] = candidate->Edges[3];
    431437
    432     entry->T = position.T() * 1.0E-3 / c_light;
     438    entry->T = position.T()*1.0E-3/c_light;
    433439    entry->NTimeHits = candidate->NTimeHits;
    434440
     
    451457  // loop over all photons
    452458  iterator.Reset();
    453   while((candidate = static_cast<Candidate *>(iterator.Next())))
     459  while((candidate = static_cast<Candidate*>(iterator.Next())))
    454460  {
    455461    TIter it1(candidate->GetCandidates());
     
    460466    cosTheta = TMath::Abs(momentum.CosTheta());
    461467    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    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());
     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());
    466472
    467473    entry->Eta = eta;
     
    469475    entry->PT = pt;
    470476    entry->E = momentum.E();
    471     entry->T = position.T() * 1.0E-3 / c_light;
     477    entry->T = position.T()*1.0E-3/c_light;
    472478
    473479    // Isolation variables
    474480
    475481    entry->IsolationVar = candidate->IsolationVar;
    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;
     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;
    483489
    484490    // 1: prompt -- 2: non prompt -- 3: fake
     
    503509  // loop over all electrons
    504510  iterator.Reset();
    505   while((candidate = static_cast<Candidate *>(iterator.Next())))
     511  while((candidate = static_cast<Candidate*>(iterator.Next())))
    506512  {
    507513    const TLorentzVector &momentum = candidate->Momentum;
     
    511517    cosTheta = TMath::Abs(momentum.CosTheta());
    512518    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    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());
     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());
    517523
    518524    entry->Eta = eta;
     
    520526    entry->PT = pt;
    521527
    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;
     528    entry->T = position.T()*1.0E-3/c_light;
    529529
    530530    // Isolation variables
     531
    531532    entry->IsolationVar = candidate->IsolationVar;
    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;
     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
    537539
    538540    entry->Charge = candidate->Charge;
     
    559561  // loop over all muons
    560562  iterator.Reset();
    561   while((candidate = static_cast<Candidate *>(iterator.Next())))
     563  while((candidate = static_cast<Candidate*>(iterator.Next())))
    562564  {
    563565    const TLorentzVector &momentum = candidate->Momentum;
     
    567569    cosTheta = TMath::Abs(momentum.CosTheta());
    568570    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    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());
     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());
    573575
    574576    entry->SetBit(kIsReferenced);
     
    579581    entry->PT = pt;
    580582
    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;
     583    entry->T = position.T()*1.0E-3/c_light;
    588584
    589585    // Isolation variables
    590586
    591587    entry->IsolationVar = candidate->IsolationVar;
    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;
     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 ;
    597593
    598594    entry->Charge = candidate->Charge;
     
    618614  // loop over all jets
    619615  iterator.Reset();
    620   while((candidate = static_cast<Candidate *>(iterator.Next())))
     616  while((candidate = static_cast<Candidate*>(iterator.Next())))
    621617  {
    622618    TIter itConstituents(candidate->GetCandidates());
     
    628624    cosTheta = TMath::Abs(momentum.CosTheta());
    629625    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    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());
     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());
    634630
    635631    entry->Eta = eta;
     
    637633    entry->PT = pt;
    638634
    639     entry->T = position.T() * 1.0E-3 / c_light;
     635    entry->T = position.T()*1.0E-3/c_light;
    640636
    641637    entry->Mass = momentum.M();
     
    656652
    657653    entry->TauTag = candidate->TauTag;
    658     entry->TauWeight = candidate->TauWeight;
    659654
    660655    entry->Charge = candidate->Charge;
     
    664659    ecalEnergy = 0.0;
    665660    hcalEnergy = 0.0;
    666     while((constituent = static_cast<Candidate *>(itConstituents.Next())))
     661    while((constituent = static_cast<Candidate*>(itConstituents.Next())))
    667662    {
    668663      entry->Constituents.Add(constituent);
     
    671666    }
    672667
    673     entry->EhadOverEem = ecalEnergy > 0.0 ? hcalEnergy / ecalEnergy : 999.9;
     668    entry->EhadOverEem = ecalEnergy > 0.0 ? hcalEnergy/ecalEnergy : 999.9;
    674669
    675670    //---   Pile-Up Jet ID variables ----
     
    688683    entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped;
    689684
    690     entry->SoftDroppedJet = candidate->SoftDroppedJet;
    691     entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1;
     685    entry->SoftDroppedJet     = candidate->SoftDroppedJet ;
     686    entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1 ;
    692687    entry->SoftDroppedSubJet2 = candidate->SoftDroppedSubJet2;
     688
    693689
    694690    for(i = 0; i < 5; i++)
    695691    {
    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];
     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];
    701697    }
    702698
     
    705701    entry->ExclYmerge34 = candidate->ExclYmerge34;
    706702    entry->ExclYmerge45 = candidate->ExclYmerge45;
    707     entry->ExclYmerge56 = candidate->ExclYmerge56;
     703    entry->ExclYmerge56 = candidate->ExclYmerge56;   
     704
    708705
    709706    FillParticles(candidate, &entry->Particles);
     
    719716
    720717  // get the first entry
    721   if((candidate = static_cast<Candidate *>(array->At(0))))
    722   {
    723     const TLorentzVector &momentum = candidate->Momentum;
    724 
    725     entry = static_cast<MissingET *>(branch->NewEntry());
     718  if((candidate = static_cast<Candidate*>(array->At(0))))
     719  {
     720    const TLorentzVector &momentum = candidate->Momentum;
     721
     722    entry = static_cast<MissingET*>(branch->NewEntry());
    726723
    727724    entry->Eta = (-momentum).Eta();
     
    739736
    740737  // get the first entry
    741   if((candidate = static_cast<Candidate *>(array->At(0))))
    742   {
    743     const TLorentzVector &momentum = candidate->Momentum;
    744 
    745     entry = static_cast<ScalarHT *>(branch->NewEntry());
     738  if((candidate = static_cast<Candidate*>(array->At(0))))
     739  {
     740    const TLorentzVector &momentum = candidate->Momentum;
     741
     742    entry = static_cast<ScalarHT*>(branch->NewEntry());
    746743
    747744    entry->HT = momentum.Pt();
     
    759756  // loop over all rho
    760757  iterator.Reset();
    761   while((candidate = static_cast<Candidate *>(iterator.Next())))
    762   {
    763     const TLorentzVector &momentum = candidate->Momentum;
    764 
    765     entry = static_cast<Rho *>(branch->NewEntry());
     758  while((candidate = static_cast<Candidate*>(iterator.Next())))
     759  {
     760    const TLorentzVector &momentum = candidate->Momentum;
     761
     762    entry = static_cast<Rho*>(branch->NewEntry());
    766763
    767764    entry->Rho = momentum.E();
     
    779776
    780777  // get the first entry
    781   if((candidate = static_cast<Candidate *>(array->At(0))))
    782   {
    783     const TLorentzVector &momentum = candidate->Momentum;
    784 
    785     entry = static_cast<Weight *>(branch->NewEntry());
     778  if((candidate = static_cast<Candidate*>(array->At(0))))
     779  {
     780    const TLorentzVector &momentum = candidate->Momentum;
     781
     782    entry = static_cast<Weight*>(branch->NewEntry());
    786783
    787784    entry->Weight = momentum.E();
     
    799796  // loop over all roman pot hits
    800797  iterator.Reset();
    801   while((candidate = static_cast<Candidate *>(iterator.Next())))
     798  while((candidate = static_cast<Candidate*>(iterator.Next())))
    802799  {
    803800    const TLorentzVector &position = candidate->Position;
    804801    const TLorentzVector &momentum = candidate->Momentum;
    805802
    806     entry = static_cast<HectorHit *>(branch->NewEntry());
     803    entry = static_cast<HectorHit*>(branch->NewEntry());
    807804
    808805    entry->E = momentum.E();
Note: See TracChangeset for help on using the changeset viewer.