Changeset df04eb1 in git
- Timestamp:
- Dec 19, 2014, 9:34:12 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- c59be54
- Parents:
- df35033
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/FastJetFinder.cc
rdf35033 rdf04eb1 237 237 Candidate *candidate, *constituent; 238 238 TLorentzVector momentum; 239 240 TLorentzVector constmomentum; 241 239 242 240 Double_t deta, dphi, detaMax, dphiMax; 243 Double_t time, weightTime, avTime;241 Double_t time, timeWeight; 244 242 Int_t number; 245 Double_t rho = 0 ;243 Double_t rho = 0.0; 246 244 PseudoJet jet, area; 247 245 vector<PseudoJet> inputList, outputList; … … 305 303 jet = *itOutputList; 306 304 if(fJetAlgorithm == 7) jet = join(jet.constituents()); 307 305 308 306 momentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E()); 309 307 310 308 area.reset(0.0, 0.0, 0.0, 0.0); 311 309 if(fAreaDefinition) area = itOutputList->area_4vector(); … … 313 311 candidate = factory->NewCandidate(); 314 312 315 time =0;316 weightTime=0;313 time = 0.0; 314 timeWeight = 0.0; 317 315 318 316 inputList.clear(); 319 317 inputList = sequence->constituents(*itOutputList); 320 321 constmomentum.SetPxPyPzE(0.0,0.0,0.0,0.0);;322 318 323 319 for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList) 324 320 { 325 321 constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index())); 326 327 constmomentum += constituent->Momentum;328 322 329 323 deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta()); … … 333 327 334 328 time += TMath::Sqrt(constituent->Momentum.E())*(constituent->Position.T()); 335 weightTime+= TMath::Sqrt(constituent->Momentum.E());329 timeWeight += TMath::Sqrt(constituent->Momentum.E()); 336 330 337 331 candidate->AddCandidate(constituent); 338 332 } 339 333 340 avTime = time/weightTime;341 342 334 candidate->Momentum = momentum; 343 candidate->Position.SetT( avTime);335 candidate->Position.SetT(time/timeWeight); 344 336 candidate->Area.SetPxPyPzE(area.px(), area.py(), area.pz(), area.E()); 345 337
Note:
See TracChangeset
for help on using the changeset viewer.