3 #include "StjRunJetFinder.h"
5 #include <StJetFinder/StJetFinder.h>
6 #include <StJetFinder/StJetPars.h>
8 #include <StjFourVecForJetFinder.h>
10 #include <StjEtaToDetectorEta.h>
12 #include <TLorentzVector.h>
22 _jetFinder = pars->constructJetFinder();
26 StjJetList StjRunJetFinder::operator()(
const StjFourVecList& fourVecList)
28 typedef std::list<StProtoJet> ProtoJetList;
29 typedef std::vector<const AbstractFourVec*> FourList;
33 for(StjFourVecList::const_iterator p4 = fourVecList.begin(); p4 != fourVecList.end(); ++p4) {
37 ProtoJetList protoJetList;
39 _jetFinder->findJets(protoJetList, fourList);
44 for(list<StProtoJet>::iterator it = protoJetList.begin(); it != protoJetList.end(); ++it) {
49 jet.pt = protoJet.pt();
50 jet.eta = protoJet.eta();
51 jet.phi = protoJet.phi();
52 jet.m = protoJet.mass();
54 FourList parList = protoJet.list();
55 for(FourList::const_iterator it = parList.begin(); it != parList.end(); ++it) {
57 jet.runNumber = fourVec.runNumber;
58 jet.eventId = fourVec.eventId;
59 jet.vertexZ = fourVec.vertexZ;
60 jet.fourVecList.push_back(fourVec);
62 jet.neuRt = computeNeuRt(jet.fourVecList);
64 jet.detectorEta = eta2deta(jet.eta, jet.vertexZ);
65 jetList.push_back(jet);
68 for(FourList::iterator it = fourList.begin(); it != fourList.end(); ++it) {
75 double StjRunJetFinder::computeNeuRt(
const StjFourVecList& fourList)
78 double neutralEt = 0.0;
79 for(StjFourVecList::const_iterator it = fourList.begin(); it != fourList.end(); ++it) {
81 p4.SetPtEtaPhiM((*it).pt, (*it).eta, (*it).phi, (*it).m);
83 if((*it).type == 2) neutralEt += p4.Et();
85 return (totalEt) ? neutralEt/totalEt: 0.0;