Fork me on GitHub

Changeset 1345 in svn for trunk/modules/FastJetFinder.cc


Ignore:
Timestamp:
Dec 21, 2013, 3:00:11 PM (11 years ago)
Author:
Michele Selvaggi
Message:

timing implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/FastJetFinder.cc

    r1335 r1345  
    193193  TLorentzVector momentum;
    194194  Double_t deta, dphi, detaMax, dphiMax;
     195  Double_t time, weightTime, avTime;
    195196  Int_t number;
    196197  Double_t rho = 0;
     
    259260    candidate = factory->NewCandidate();
    260261
     262    time=0;
     263    weightTime=0;
     264
    261265    inputList.clear();
    262266    inputList = sequence->constituents(*itOutputList);
     
    269273      if(deta > detaMax) detaMax = deta;
    270274      if(dphi > dphiMax) dphiMax = dphi;
    271 
     275     
     276      time += TMath::Sqrt(constituent->Momentum.E())*(constituent->Position.T());
     277      weightTime += TMath::Sqrt(constituent->Momentum.E());
     278   
    272279      candidate->AddCandidate(constituent);
    273280    }
     281   
     282    avTime = time/weightTime;
    274283
    275284    candidate->Momentum = momentum;
     285    candidate->Position.SetT(avTime);
    276286    candidate->Area.SetPxPyPzE(area.px(), area.py(), area.pz(), area.E());
    277287
Note: See TracChangeset for help on using the changeset viewer.