3 #include "StjDijetListTriggerBJP.h"
6 #include <StjTrgBEMCJetPatchTowerIdMap.h>
18 if( ! _trg->passed() )
return retList;
20 double maxEt3 = getMaxEtForBEMCJetPatchThatPassedBJP(item.jet3);
21 double maxEt4 = getMaxEtForBEMCJetPatchThatPassedBJP(item.jet4);
23 if(maxEt3 == 0 && maxEt4 == 0)
return retList;
29 dijet.jetSameSide = item.jet3;
30 dijet.jetAwaySide = item.jet4;
31 dijet.neuRtSameSide = item.jet3.neuRt;
32 dijet.neuRtAwaySide = item.jet4.neuRt;
36 dijet.jetSameSide = item.jet4;
37 dijet.jetAwaySide = item.jet3;
38 dijet.neuRtSameSide = item.jet4.neuRt;
39 dijet.neuRtAwaySide = item.jet3.neuRt;
42 retList.push_back(dijet);
47 double StjDijetListTriggerBJP::getMaxEtForBEMCJetPatchThatPassedBJP(
const StjJet& jet)
50 for(StjFourVecList::const_iterator it = jet.fourVecList.begin(); it != jet.fourVecList.end(); ++it)
52 double jetPatchEt = getJetPatchEtIfFiredBJP(*it);
53 if(jetPatchEt > ret) ret = jetPatchEt;
58 double StjDijetListTriggerBJP::getJetPatchEtIfFiredBJP(
const StjFourVec& p4)
60 if(p4.type != 2)
return 0;
61 if(p4.detectorId != 9)
return 0;
62 int jp = _jetPatchTowerMap->getJetPatchIdForTower(p4.towerId);
63 vector<int> jetPatches = _trg->jetPatches();
64 vector<double> jetPatchEt = _trg->jetPatchEt();
65 for(
size_t i = 0; i != jetPatches.size(); ++i)
67 if(jp == jetPatches[i])
return jetPatchEt[i];