27 JetExtractor::JetExtractor() {}
33 theThreshold(par.getParameter<double>(
"Threshold")),
34 theDR_Veto(par.getParameter<double>(
"DR_Veto")),
35 theDR_Max(par.getParameter<double>(
"DR_Max")),
36 theExcludeMuonVeto(par.getParameter<
bool>(
"ExcludeMuonVeto")),
38 theAssociator(nullptr),
39 thePrintTimeReport(par.getUntrackedParameter<
bool>(
"PrintTimeReport")) {
73 depJet.setVeto(Veto(vetoDirection,
theDR_Veto));
79 CaloJetCollection::const_iterator jetCI = caloJetsH->begin();
80 for (; jetCI != caloJetsH->end(); ++jetCI) {
88 std::vector<CaloTowerPtr> jetConstituents = jetCI->getCaloConstituents();
90 std::vector<DetId>::const_iterator crossedCI = mInfo.
crossedTowerIds.begin();
91 std::vector<CaloTowerPtr>::const_iterator jetTowCI = jetConstituents.begin();
93 double sumEtExcluded = 0;
94 for (; jetTowCI != jetConstituents.end(); ++jetTowCI) {
95 bool isExcluded =
false;
100 for (; !isExcluded && crossedCI != mInfo.
crossedTowerIds.end(); ++crossedCI) {
101 if (crossedCI->rawId() == (*jetTowCI)->id().rawId()) {
106 sumEtExcluded += (*jetTowCI)->et();
113 double depositEt = jetCI->et();
115 depositEt = depositEt - sumEtExcluded;
118 depJet.addDeposit(jetDir, depositEt);
121 std::vector<const CaloTower*>::const_iterator crossedCI = mInfo.
crossedTowers.begin();
123 for (; crossedCI != mInfo.
crossedTowers.end(); ++crossedCI) {
124 muSumEt += (*crossedCI)->et();
126 depJet.addCandEnergy(muSumEt);