Implements edm::EDAnalyzer.
Definition at line 598 of file myJetAna.cc.
References funct::abs(), edm::EventBase::bunchCrossing(), caloEta, caloEtaEt, CaloJetAlgorithm, caloPhi, HLT_25ns10e33_v2_cff::caloTowers, funct::cos(), gather_cfg::cout, DEBUG, HLT_25ns10e33_v2_cff::depth, dijetMass, EBEne, EBEneTh, EBEneX, EBEneY, EBTime, EBTimeTh, EBTimeX, EBTimeY, EBvHB, EcalBarrel, EcalEndcap, RBX_struct::ecalTime, HPD_struct::ecalTime, ECALvHCAL, ECALvHCALEta1, ECALvHCALEta2, ECALvHCALEta3, EEEne, EEEneTh, EEEneX, EEEneY, EETime, EETimeTh, EETimeX, EETimeY, EEvHE, emEneLeadJetEta1, emEneLeadJetEta2, emEneLeadJetEta3, RBX_struct::emEnergy, HPD_struct::emEnergy, EMF_Eta, EMF_EtaX, EMF_Phi, EMF_PhiX, relval_parameters_module::energy, RBX_struct::et, HPD_struct::et, ETime, edm::EventID::event(), Exception, edm::Event::getByLabel(), edm::Event::getManyByType(), h_ClusteredE, h_EmEnergy, h_EMFracCal, h_et, h_eta, h_etaCal, h_HadEnergy, h_jet1Eta, h_jet1Pt, h_jet1PtHLT, h_jet2Eta, h_jet2Pt, h_jetEt, h_nCalJets, h_nTowersCal, h_phi, h_phiCal, h_pt, h_ptCal, h_ptHPD, h_ptRBX, h_ptTower, h_TotalClusteredE, h_TotalUnclusteredE, h_TotalUnclusteredEt, h_Trk_NTrk, h_Trk_pt, h_UnclusteredE, h_UnclusteredEt, h_UnclusteredEts, h_Vx, h_Vy, h_Vz, hadEneLeadJetEta1, hadEneLeadJetEta2, hadEneLeadJetEta3, RBX_struct::hadEnergy, HPD_struct::hadEnergy, hadFracEta1, hadFracEta2, hadFracEta3, HBEne, HBEneOOT, HBEneOOTTh, HBEneOOTTh1, HBEneTh, HBEneTh1, HBEneTThr, HBEneX, HBEneY, HcalCaloFlagLabels::HBHETimingShapedCutsBits, HBocc, HBoccOOT, HBTime, HBTimeFlagged, HBTimeFlagged2, HBTimeTh, HBTimeTh1, HBTimeTh1Flagged, HBTimeTh1Flagged2, HBTimeTh1R, HBTimeTh2, HBTimeTh2Flagged, HBTimeTh2Flagged2, HBTimeTh2R, HBTimeTh3, HBTimeTh3R, HBTimeThFlagged, HBTimeThFlagged2, HBTimeThR, HBTimeX, HBTimeY, HBTvsE, HcalBarrel, HcalEndcap, HcalForward, hcalNoiseSummaryTag_, HcalOuter, RBX_struct::hcalTime, HPD_struct::hcalTime, HEEne, HEEneOOT, HEEneOOTTh, HEEneOOTTh1, HEEneTh, HEEneTh1, HEEneTThr, HEEneX, HEEneY, HEnegEne, HEnegTime, HEocc, HEoccOOT, HEposEne, HEposTime, HETime, HETimeFlagged, HETimeFlagged2, HETimeTh, HETimeTh1, HETimeTh1Flagged, HETimeTh1Flagged2, HETimeTh1R, HETimeTh2, HETimeTh2Flagged, HETimeTh2Flagged2, HETimeTh2R, HETimeTh3, HETimeTh3R, HETimeThFlagged, HETimeThFlagged2, HETimeThR, HETimeX, HETimeY, HETvsE, hf_sumTowerAllEx, hf_sumTowerAllEy, hf_TowerJetEt, HcalCaloFlagLabels::HFDigiTime, HFDigiTimeEne, HFDigiTimeEta, HFDigiTimeNHits, HFDigiTimePhi, HFDigiTimeTime, HFEne, HFEneFlagged, HFEneFlagged2, HFEneM, HFEneP, HFEnePMT0, HFEnePMT1, HFEnePMT2, HFEneTh, HFEneTh1, HFEneTThr, HFEtaFlagged, HFEtaFlaggedL, HFEtaFlaggedLN, HFEtaFlaggedS, HFEtaFlaggedSN, HFEtaNFlagged, HFEtaPhiNFlagged, HFLEne, HFLEneAll, HFLEneAllF, HFLEneNoS, HFLEneNoSFlagged, HFLEneNoSFlaggedN, HcalCaloFlagLabels::HFLongShort, HFLongShortEne, HFLongShortEta, HFLongShortNHits, HFLongShortPhi, HFLongShortTime, HFLSRatio, HFLTime, HFLvsS, HFMET, HFocc, HFoccFlagged, HFoccFlagged2, HFoccOOT, HFoccTime, HFOERatio, HFRecHitEne, HFRecHitEneClean, HFRecHitTime, HFSEne, HFSEneAll, HFSEneAllF, HFSEneNoL, HFSEneNoLFlagged, HFSEneNoLFlaggedN, HFSTime, HFSumEt, HFTime, HFTimeFlagged, HFTimeFlagged2, HFTimeFlagged3, HFTimeM, HFTimeP, HFTimePM, HFTimePMa, HFTimePMT0, HFTimePMT1, HFTimePMT2, HFTimeTh, HFTimeTh1, HFTimeTh1Flagged2, HFTimeTh1Flagged3, HFTimeTh1R, HFTimeTh2, HFTimeTh2Flagged, HFTimeTh2Flagged2, HFTimeTh2Flagged3, HFTimeTh2R, HFTimeTh3, HFTimeTh3Flagged, HFTimeTh3Flagged2, HFTimeTh3Flagged3, HFTimeTh3R, HFTimeThFlagged, HFTimeThFlagged2, HFTimeThFlagged3, HFTimeThFlaggedR, HFTimeThFlaggedR1, HFTimeThFlaggedR2, HFTimeThFlaggedR3, HFTimeThFlaggedR4, HFTimeThFlaggedRM, HFTimeThR, HFTimeVsiEtaM, HFTimeVsiEtaM20, HFTimeVsiEtaM5, HFTimeVsiEtaP, HFTimeVsiEtaP20, HFTimeVsiEtaP5, HFTvsE, HFTvsEFlagged, HFTvsEFlagged2, HFTvsEFlagged2Thr, HFTvsEThr, HFvsZ, hitEta, hitPhi, HOEne, HOEneTh, HOEneTh1, HOHEne, HOHr0Ene, HOHr0Time, HOHrm1Ene, HOHrm1Time, HOHrm2Ene, HOHrm2Time, HOHrp1Ene, HOHrp1Time, HOHrp2Ene, HOHrp2Time, HOHTime, HOocc, HOSEne, HOSTime, HOTime, HOTimeTh, HOTvsE, HPD_et, HPD_hadEnergy, HPD_hcalTime, HPD_N, HPD_nTowers, HPDColl, HTime, i, edm::EventBase::id(), HcalDetId::ieta(), INVALID, edm::HandleBase::isValid(), j, jetEMFraction, reco::btau::jetEta, jetHOEne, reco::btau::jetPhi, reco::btau::jetPt, edm::EventBase::luminosityBlock(), MET_HPD, MET_RBX, MET_Tower, METPhi, reco::MET::mEtSig(), METSig, MEx, MEy, HLT_25ns10e33_v2_cff::minJetPt, gen::n, nBNC, NPass, NTime, NTotal, RBX_struct::nTowers, ecaldqm::nTowers, HPD_struct::nTowers, NTowers, nTowers1, nTowers2, nTowers3, nTowers4, nTowersLeadJetPt1, nTowersLeadJetPt2, nTowersLeadJetPt3, nTowersLeadJetPt4, OERMET, edm::EventBase::orbitNumber(), Pass, phi, reco::LeafCandidate::phi(), PMTHits, edm::Handle< T >::product(), edm::errors::ProductNotFound, reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), dttmaxenums::R, RBX_et, RBX_hadEnergy, RBX_hcalTime, RBX_N, RBX_nTowers, RBXColl, edm::EventID::run(), pileupReCalc_HLTpaths::scale, SiClusters, funct::sin(), mathSSE::sqrt(), st_Constituents, st_EmEnergy, st_Energy, st_Eta, st_Frac, st_HadEnergy, st_iEta, st_iPhi, st_OuterEnergy, st_Phi, st_Pt, reco::MET::sumEt(), SumEt, edmLumisInFiles::summary, lumiQTWidget::t, theTriggerResultsLabel, totBNC, totEneLeadJetEta1, totEneLeadJetEta2, totEneLeadJetEta3, towerEmEn, towerEmEnHB, towerEmEnHE, towerEmEnHF, towerEmFrac, towerHadEn, towerHadEnHB, towerHadEnHE, towerHadEnHF, towerOuterEn, HLT_25ns10e33_v2_cff::trackCollection, triggerResults, TrkMultFlagged0, TrkMultFlagged1, TrkMultFlagged2, TrkMultFlagged3, TrkMultFlagged4, TrkMultFlaggedM, and GoodVertex_cfg::vertexCollection.
602 bool Pass, Pass_HFTime, Pass_DiJet, Pass_BunchCrossing, Pass_Vertex;
604 int EtaOk10, EtaOk13, EtaOk40;
609 int HFRecHitFlag[100][100][2];
611 double towerEtCut, towerECut, towerE;
616 unsigned int StableRun = 123732;
618 double HBHEThreshold = 2.0;
619 double HFThreshold = 2.0;
620 double HOThreshold = 2.0;
621 double EBEEThreshold = 2.0;
623 double HBHEThreshold1 = 4.0;
624 double HFThreshold1 = 4.0;
625 double HOThreshold1 = 4.0;
628 double HBHEThreshold2 = 10.0;
629 double HFThreshold2 = 10.0;
633 double HBHEThreshold3 = 40.0;
634 double HFThreshold3 = 40.0;
639 float minJetPt10 = 10.;
640 int jetInd, allJetInd;
696 for (
unsigned int i=0;
i!=
n;
i++) {
729 edm::LogInfo(
"myJetAna") <<
"TriggerResults::HLT not found, "
730 "automatically select events";
750 if (evt.
id().
run() == 122294)
753 if (evt.
id().
run() == 122314)
756 if (evt.
id().
run() == 123575)
758 if (evt.
id().
run() == 123596)
762 if (evt.
id().
run() == 124009) {
770 if (evt.
id().
run() == 124020) {
778 if (evt.
id().
run() == 124024) {
792 Pass_BunchCrossing =
true;
794 Pass_BunchCrossing =
false;
802 double HFM_ETime, HFP_ETime;
811 for (
int i=0;
i<100;
i++) {
812 for (
int j=0;
j<100;
j++) {
815 HFRecHitFlag[
i][
j][0] = 0;
816 HFRecHitFlag[
i][
j][1] = 0;
822 int NHFLongShortHits;
824 NHFLongShortHits = 0;
830 std::vector<edm::Handle<HFRecHitCollection> > colls;
833 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
834 for (i=colls.begin(); i!=colls.end(); i++) {
867 float en =
j->energy();
868 float time =
j->time();
869 if ((en > 20.) && (time>20.)) {
874 int ieta =
id.
ieta();
875 int iphi =
id.iphi();
876 int depth =
id.depth();
881 HFRecHit[ieta+41][iphi][depth-1] = en;
882 HFRecHitFlag[ieta+41][iphi][depth-1] =
j->flagField(0);
890 if (
j->id().ieta()<0) {
891 if (
j->energy() > HFThreshold) {
892 HFM_ETime +=
j->energy()*
j->time();
893 HFM_E +=
j->energy();
896 if (
j->energy() > HFThreshold) {
897 HFP_ETime +=
j->energy()*
j->time();
898 HFP_E +=
j->energy();
907 cout <<
"No HF RecHits." << endl;
910 cout <<
"N HF Hits" << NHFLongShortHits <<
" " << NHFDigiTimeHits << endl;
916 double OER = 0, OddEne, EvenEne;
919 for (
int iphi=0; iphi<100; iphi++) {
920 OddEne = EvenEne = 0.;
923 for (
int ieta=0; ieta<100; ieta++) {
924 if (
HFRecHit[ieta][iphi][0] > 1.0) {
933 if (
HFRecHit[ieta][iphi][1] > 1.0) {
943 if (((OddEne + EvenEne) > 10.) && (nOdd > 1) && (nEven > 1)) {
944 OER = (OddEne - EvenEne) / (OddEne + EvenEne);
949 if ((HFP_E > 0.) && (HFM_E > 0.)) {
950 HF_PMM = (HFP_ETime / HFP_E) - (HFM_ETime / HFM_E);
957 if (fabs(HF_PMM) < 10.) {
980 for( CaloJetCollection::const_iterator cal = caloJets->begin(); cal != caloJets->end(); ++ cal ) {
983 if (nJet == 0) p4tmp[0] = cal->p4();
984 if (nJet == 1) p4tmp[1] = cal->p4();
986 if ( (cal->pt() > 3.) &&
987 (fabs(cal->eta()) < 3.0) ) {
1017 for (reco::VertexCollection::const_iterator vertex=vC.begin(); vertex!=vC.end(); vertex++){
1021 if ( (fabs(VTX) < 20.) && (nVTX > 0) ){
1024 Pass_Vertex =
false;
1050 evt.
getByLabel(
"siPixelClusters", hClusterColl);
1051 auto const & clustColl = *(hClusterColl.product());
1063 if (evt.
id().
run() == 1) {
1064 if ( (Pass_DiJet) &&
1073 if ( (Pass_BunchCrossing) &&
1098 if ((tC.size() > 100) && (clustColl.size() > 1000))
Pass =
true;
1115 if(!summary_h.isValid()) {
1122 bool Pass_NoiseSummary;
1123 Pass_NoiseSummary =
true;
1124 if(
summary.minE2Over10TS()<0.7) {
1125 Pass_NoiseSummary =
false;
1127 if(
summary.maxE2Over10TS()>0.96) {
1128 Pass_NoiseSummary =
false;
1130 if(
summary.maxHPDHits()>=17) {
1131 Pass_NoiseSummary =
false;
1133 if(
summary.maxRBXHits()>=999) {
1134 Pass_NoiseSummary =
false;
1136 if(
summary.maxHPDNoOtherHits()>=10) {
1137 Pass_NoiseSummary =
false;
1140 Pass_NoiseSummary =
false;
1142 if(
summary.min25GeVHitTime()<-9999.0) {
1143 Pass_NoiseSummary =
false;
1145 if(
summary.max25GeVHitTime()>9999.0) {
1146 Pass_NoiseSummary =
false;
1148 if(
summary.minRBXEMF()<0.01) {
1151 if (Pass_NoiseSummary) {
1171 for (
int i=0;i<36;i++) {
1179 for (
int i=0;i<144;i++) {
1188 double ETotal, emFrac;
1189 double HCALTotalCaloTowerE, ECALTotalCaloTowerE;
1190 double HCALTotalCaloTowerE_Eta1, ECALTotalCaloTowerE_Eta1;
1191 double HCALTotalCaloTowerE_Eta2, ECALTotalCaloTowerE_Eta2;
1192 double HCALTotalCaloTowerE_Eta3, ECALTotalCaloTowerE_Eta3;
1197 HCALTotalCaloTowerE = 0;
1198 ECALTotalCaloTowerE = 0;
1199 HCALTotalCaloTowerE_Eta1 = 0.;
1200 ECALTotalCaloTowerE_Eta1 = 0.;
1201 HCALTotalCaloTowerE_Eta2 = 0.;
1202 ECALTotalCaloTowerE_Eta2 = 0.;
1203 HCALTotalCaloTowerE_Eta3 = 0.;
1204 ECALTotalCaloTowerE_Eta3 = 0.;
1207 tower != caloTowers->end(); tower++) {
1208 ETotal += tower->hadEnergy();
1209 ETotal += tower->emEnergy();
1213 tower != caloTowers->end(); tower++) {
1216 if (
abs(tower->ieta()) < 100)
EMF_Eta->Fill(tower->ieta(), emFrac);
1218 if (
abs(tower->ieta()) < 15) {
1222 if ( (
abs(tower->ieta()) > 17) && ((
abs(tower->ieta()) < 30)) ){
1226 if (
abs(tower->ieta()) > 29) {
1239 if ((tower->emEnergy()+tower->hadEnergy()) != 0) {
1240 emFrac = tower->emEnergy()/(tower->emEnergy()+tower->hadEnergy());
1255 if (
abs(tower->iphi()) < 100)
EMF_Phi->Fill(tower->iphi(), emFrac);
1256 if (
abs(tower->ieta()) < 100)
EMF_Eta->Fill(tower->ieta(), emFrac);
1257 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
1262 if (
abs(tower->iphi()) < 100)
EMF_PhiX->Fill(tower->iphi(), emFrac);
1263 if (
abs(tower->ieta()) < 100)
EMF_EtaX->Fill(tower->ieta(), emFrac);
1266 HCALTotalCaloTowerE += tower->hadEnergy();
1267 ECALTotalCaloTowerE += tower->emEnergy();
1269 towerE = tower->hadEnergy() + tower->emEnergy();
1270 if (tower->et() > towerEtCut)
caloEtaEt->Fill(tower->eta());
1271 if (towerE > towerECut)
caloEta->Fill(tower->eta());
1274 if (fabs(tower->eta()) < 1.3) {
1275 HCALTotalCaloTowerE_Eta1 += tower->hadEnergy();
1276 ECALTotalCaloTowerE_Eta1 += tower->emEnergy();
1278 if ((fabs(tower->eta()) >= 1.3) && (fabs(tower->eta()) < 2.5)) {
1279 HCALTotalCaloTowerE_Eta2 += tower->hadEnergy();
1280 ECALTotalCaloTowerE_Eta2 += tower->emEnergy();
1282 if (fabs(tower->eta()) > 2.5) {
1283 HCALTotalCaloTowerE_Eta3 += tower->hadEnergy();
1284 ECALTotalCaloTowerE_Eta3 += tower->emEnergy();
1295 if ((tower->hadEnergy() + tower->emEnergy()) > 2.0) {
1297 int iRBX = tower->iphi();
1299 if (iRBX == 0) iRBX = 17;
1300 if (iRBX == -1) iRBX = 18;
1303 if (tower->ieta() < 0) iRBX += 18;
1318 int iHPD = tower->iphi();
1319 if (tower->ieta() < 0) iHPD = iHPD + 72;
1339 ECALvHCAL->Fill(HCALTotalCaloTowerE, ECALTotalCaloTowerE);
1340 ECALvHCALEta1->Fill(HCALTotalCaloTowerE_Eta1, ECALTotalCaloTowerE_Eta1);
1341 ECALvHCALEta2->Fill(HCALTotalCaloTowerE_Eta2, ECALTotalCaloTowerE_Eta2);
1342 ECALvHCALEta3->Fill(HCALTotalCaloTowerE_Eta3, ECALTotalCaloTowerE_Eta3);
1366 for (
int i=0;i<36;i++) {
1371 if (
RBXColl[i].hadEnergy > 3.0) {
1377 if ( (nRBX == 1) && (nTowers > 24) ) {
1383 for (
int i=0;i<144;i++) {
1388 if (
HPDColl[i].hadEnergy > 3.0) {
1394 if ( (nHPD == 1) && (nTowers > 6) ) {
1396 cout <<
" nHPD = " << nHPD
1397 <<
" Towers = " << nTowers
1398 <<
" Type = " << evtType
1410 Int_t JetLoPass = 0;
1412 if (triggerResults.
isValid()) {
1416 unsigned int n = triggerResults->size();
1417 for (
unsigned int i=0; i!=
n; i++) {
1441 triggerResults = (*tr);
1448 edm::LogInfo(
"myJetAna") <<
"TriggerResults::HLT not found, "
1449 "automatically select events";
1489 for( CaloJetCollection::const_iterator cal = caloJets->begin(); cal != caloJets->end(); ++ cal ) {
1493 double corPt = scale*cal->pt();
1497 if (corPt>highestPt) {
1499 p4cortmp[1] = p4cortmp[0];
1501 p4cortmp[0] = scale*cal->p4();
1502 }
else if (corPt>nextPt) {
1504 p4cortmp[1] = scale*cal->p4();
1508 if (allJetInd == 1) {
1511 if (JetLoPass != 0)
h_jet1PtHLT->Fill( cal->pt() );
1512 p4tmp[0] = cal->p4();
1513 if ( fabs(cal->eta()) < 1.0) EtaOk10++;
1514 if ( fabs(cal->eta()) < 1.3) EtaOk13++;
1515 if ( fabs(cal->eta()) < 4.0) EtaOk40++;
1517 if (allJetInd == 2) {
1520 p4tmp[1] = cal->p4();
1521 if ( fabs(cal->eta()) < 1.0) EtaOk10++;
1522 if ( fabs(cal->eta()) < 1.3) EtaOk13++;
1523 if ( fabs(cal->eta()) < 4.0) EtaOk40++;
1527 const std::vector<CaloTowerPtr> jetCaloRefs = cal->getCaloConstituents();
1528 int nConstituents = jetCaloRefs.size();
1541 LeadMass = (p4tmp[0]+p4tmp[1]).mass();
1550 int nTow1, nTow2, nTow3, nTow4;
1557 for ( CaloJetCollection::const_iterator ijet=caloJets->begin(); ijet!=caloJets->end(); ijet++) {
1560 float hadEne = ijet->hadEnergyInHB() + ijet->hadEnergyInHO() +
1561 ijet->hadEnergyInHE() + ijet->hadEnergyInHF();
1562 float emEne = ijet->emEnergyInEB() + ijet->emEnergyInEE() + ijet->emEnergyInHF();
1563 float had = ijet->energyFractionHadronic();
1564 float j_et = ijet->et();
1567 if (fabs(ijet->eta()) < 1.3) {
1571 if (ijet->pt() > minJetPt10)
hadFracEta1->Fill(had);
1575 if ((fabs(ijet->eta()) > 1.3) && (fabs(ijet->eta()) < 3.) ) {
1579 if (ijet->pt() > minJetPt10)
hadFracEta2->Fill(had);
1583 if (fabs(ijet->eta()) > 3.) {
1587 if (ijet->pt() > minJetPt10)
hadFracEta3->Fill(had);
1591 const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
1592 int nConstituents = jetCaloRefs.size();
1597 nTow1 = nTow2 = nTow3 = nTow4 = 0;
1598 for (
int i = 0; i <nConstituents ; i++){
1600 float et = jetCaloRefs[
i]->et();
1602 if (et > 0.5) nTow1++;
1603 if (et > 1.0) nTow2++;
1604 if (et > 1.5) nTow3++;
1605 if (et > 2.0) nTow4++;
1627 double SumEtNotJets(0);
1628 double SumEtJets(0);
1629 double SumEtTowers(0);
1630 double TotalClusteredE(0);
1631 double TotalUnclusteredE(0);
1636 double sumTowerAllPx(0);
1637 double sumTowerAllPy(0);
1639 double sumTowerAllEx(0);
1640 double sumTowerAllEy(0);
1643 double HBTotalE, HETotalE, HOTotalE, HFTotalE;
1645 double EBTotalE, EETotalE;
1647 std::vector<CaloTowerPtr> UsedTowerList;
1648 std::vector<CaloTower> TowerUsedInJets;
1649 std::vector<CaloTower> TowerNotUsedInJets;
1658 HBTotalE = HETotalE = HOTotalE = HFTotalE = 0.;
1660 std::vector<edm::Handle<HBHERecHitCollection> > colls;
1662 std::vector<edm::Handle<HBHERecHitCollection> >::iterator
i;
1663 for (i=colls.begin(); i!=colls.end(); i++) {
1669 HBEne->Fill(
j->energy());
1673 HBTvsE->Fill(
j->energy(),
j->time());
1675 if (
j->time() > 20.)
HBEneTThr->Fill(
j->energy());
1677 if ((
j->time()<-25.) || (
j->time()>75.)) {
1679 if (
j->energy() > HBHEThreshold)
HBEneOOTTh->Fill(
j->energy());
1680 if (
j->energy() > HBHEThreshold1)
HBEneOOTTh1->Fill(
j->energy());
1682 if (
j->energy() > HBHEThreshold) {
1689 HBTotalE +=
j->energy();
1690 HBocc->Fill(
j->id().ieta(),
j->id().iphi());
1694 if (
j->energy() > HBHEThreshold1) {
1701 if ((
j->time()<-25.) || (
j->time()>75.)) {
1702 HBoccOOT->Fill(
j->id().ieta(),
j->id().iphi());
1705 if (
j->energy() > HBHEThreshold2) {
1712 if (
j->energy() > HBHEThreshold3) {
1716 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
1718 if (
j->energy() > HBHEThreshold)
HBTimeX->Fill(
j->time());
1720 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457) ) {
1722 if (
j->energy() > HBHEThreshold)
HBTimeY->Fill(
j->time());
1726 HEEne->Fill(
j->energy());
1730 HETvsE->Fill(
j->energy(),
j->time());
1732 if (
j->time() > 20.)
HEEneTThr->Fill(
j->energy());
1734 if ((
j->time()<-25.) || (
j->time()>75.)) {
1736 if (
j->energy() > HBHEThreshold)
HEEneOOTTh->Fill(
j->energy());
1737 if (
j->energy() > HBHEThreshold1)
HEEneOOTTh1->Fill(
j->energy());
1740 if (
j->energy() > HBHEThreshold) {
1747 HETotalE +=
j->energy();
1748 HEocc->Fill(
j->id().ieta(),
j->id().iphi());
1752 if (
j->energy() > HBHEThreshold1) {
1758 if ((
j->time()<-25.) || (
j->time()>75.)) {
1759 HEoccOOT->Fill(
j->id().ieta(),
j->id().iphi());
1762 if (
j->energy() > HBHEThreshold2) {
1768 if (
j->energy() > HBHEThreshold3) {
1773 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
1775 if (
j->energy() > HBHEThreshold)
HETimeX->Fill(
j->time());
1777 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457) ) {
1779 if (
j->energy() > HBHEThreshold)
HETimeY->Fill(
j->time());
1783 if (
j->id().ieta()<0) {
1785 if (
j->energy() > HBHEThreshold) {
1790 if (
j->energy() > HBHEThreshold) {
1809 cout <<
"No HB/HE RecHits." << endl;
1821 std::vector<edm::Handle<HFRecHitCollection> > colls;
1823 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
1824 for (i=colls.begin(); i!=colls.end(); i++) {
1834 cout <<
"No HF RecHits." << endl;
1841 std::vector<edm::Handle<HFRecHitCollection> > colls;
1843 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
1844 for (i=colls.begin(); i!=colls.end(); i++) {
1859 if (NPMTHits == 1) {
1870 if (
j->energy() > 20.) {
1871 if (NPMTHits == 0) {
1875 if (NPMTHits == 1) {
1894 if (
j->energy() > 5.) {
1899 if (
j->energy() > 20.) {
1904 HFEne->Fill(
j->energy());
1906 HFTvsE->Fill(
j->energy(),
j->time());
1908 if (
j->time() > 20.)
HFEneTThr->Fill(
j->energy());
1910 if (
j->energy() > 10.)
HFTvsEThr->Fill(
j->energy(),
j->time());
1937 if (
j->energy() > HFThreshold) {
1952 if (evt.
id().
run() >= StableRun) {
1961 HFTotalE +=
j->energy();
1962 HFocc->Fill(
j->id().ieta(),
j->id().iphi());
1967 if (
j->energy() > HFThreshold1) {
1973 if ((
j->time()<-20.) || (
j->time()>20.)) {
1974 HFoccOOT->Fill(
j->id().ieta(),
j->id().iphi());
1977 if (
j->energy() > HFThreshold2) {
1983 if (
j->energy() > HFThreshold3) {
1990 if (
j->id().ieta()<0) {
1991 if (
j->energy() > HFThreshold) {
1994 HFM_ETime +=
j->energy()*
j->time();
1995 HFM_E +=
j->energy();
1998 if (
j->energy() > HFThreshold) {
2001 HFP_ETime +=
j->energy()*
j->time();
2002 HFP_E +=
j->energy();
2007 if (
j->id().depth() == 1){
2009 if (
j->energy() > HFThreshold)
HFLTime->Fill(
j->time());
2012 if (
j->energy() > HFThreshold)
HFSTime->Fill(
j->time());
2021 cout <<
"No HF RecHits." << endl;
2026 for (
int ieta=0; ieta<100; ieta++) {
2027 for (
int iphi=0; iphi<100; iphi++) {
2028 double longF, shortF;
2029 if (
HFRecHit[ieta][iphi][0] == -10.) {
2034 if (
HFRecHit[ieta][iphi][1] == -10.) {
2042 if (shortF > 0.)
HFSEneAll->Fill(shortF);
2045 if ((longF > 20.) || (shortF > 20.)) {
2046 double R = (longF-shortF)/(longF+shortF);
2048 if (fabs(R) > 0.995) {
2052 if (longF > (162.4-10.19*
abs(ieta-41)+.21*
abs(ieta-41)*
abs(ieta-41)) ) {
2061 if (shortF > (129.9-6.61*
abs(ieta-41)+0.1153*
abs(ieta-41)*
abs(ieta-41)) ) {
2079 if ( (
HFRecHit[ieta][iphi][1] == -10.) && (
HFRecHit[ieta][iphi][0] != -10.) ) {
2083 if ( (
HFRecHit[ieta][iphi][0] == -10.) && (
HFRecHit[ieta][iphi][1] != -10.) ) {
2091 if (HFP_E > 0.)
HFTimeP->Fill(HFP_ETime / HFP_E);
2092 if (HFM_E > 0.)
HFTimeM->Fill(HFM_ETime / HFM_E);
2094 if ((HFP_E > 0.) && (HFM_E > 0.)) {
2095 HF_PMM = (HFP_ETime / HFP_E) - (HFM_ETime / HFM_E);
2104 std::vector<edm::Handle<HORecHitCollection> > colls;
2106 std::vector<edm::Handle<HORecHitCollection> >::iterator
i;
2107 for (i=colls.begin(); i!=colls.end(); i++) {
2110 HOEne->Fill(
j->energy());
2112 HOTvsE->Fill(
j->energy(),
j->time());
2113 if (
j->energy() > HOThreshold1) {
2116 if (
j->energy() > HOThreshold) {
2119 HOTotalE +=
j->energy();
2120 HOocc->Fill(
j->id().ieta(),
j->id().iphi());
2124 if (((
j->id().iphi()>=59 &&
j->id().iphi()<=70 &&
2125 j->id().ieta()>=11 &&
j->id().ieta()<=15) ||
2126 (
j->id().iphi()>=47 &&
j->id().iphi()<=58 &&
2127 j->id().ieta()>=5 &&
j->id().ieta()<=10)))
2130 if (
j->energy() > HOThreshold)
HOSTime->Fill(
j->time());
2131 }
else if ((
j->id().iphi()<59 ||
j->id().iphi()>70 ||
2132 j->id().ieta()<11 ||
j->id().ieta()>15) &&
2133 (
j->id().iphi()<47 ||
j->id().iphi()>58 ||
2134 j->id().ieta()<5 ||
j->id().ieta()>10))
2137 if (
j->energy() > HOThreshold)
HOHTime->Fill(
j->time());
2139 if (
j->id().ieta()<= -11){
2141 if (
j->energy() > HOThreshold)
HOHrm2Time->Fill(
j->time());
2142 }
else if (
j->id().ieta()>= -10 &&
j->id().ieta() <= -5) {
2144 if (
j->energy() > HOThreshold)
HOHrm1Time->Fill(
j->time());
2145 }
else if (
j->id().ieta()>= -4 &&
j->id().ieta() <= 4) {
2147 if (
j->energy() > HOThreshold)
HOHr0Time->Fill(
j->time());
2148 }
else if (
j->id().ieta()>= 5 &&
j->id().ieta() <= 10) {
2150 if (
j->energy() > HOThreshold)
HOHrp1Time->Fill(
j->time());
2151 }
else if (
j->id().ieta()>= 11) {
2153 if (
j->energy() > HOThreshold)
HOHrp2Time->Fill(
j->time());
2155 std::cout <<
"Finding events that are in no ring !?!" << std::endl;
2156 std::cout <<
"eta = " <<
j->id().ieta() << std::endl;
2160 std::cout <<
"Finding events that are neither SiPM nor HPD!?" << std::endl;
2170 cout <<
"No HO RecHits." << endl;
2175 EBTotalE = EETotalE = 0.;
2179 std::vector<edm::Handle<EcalRecHitCollection> > colls;
2181 std::vector<edm::Handle<EcalRecHitCollection> >::iterator
i;
2182 for (i=colls.begin(); i!=colls.end(); i++) {
2185 EBEne->Fill(
j->energy());
2187 if (
j->energy() > EBEEThreshold) {
2191 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
2195 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457) ) {
2199 EBTotalE +=
j->energy();
2202 EEEne->Fill(
j->energy());
2204 if (
j->energy() > EBEEThreshold) {
2208 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
2212 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457 ) ) {
2216 EETotalE +=
j->energy();
2223 cout <<
"No ECAL RecHits." << endl;
2226 EBvHB->Fill(HBTotalE, EBTotalE);
2227 EEvHE->Fill(HETotalE, EETotalE);
2281 if ( (EBTotalE > 320000) && (EBTotalE < 330000) &&
2282 (HBTotalE > 2700000) && (HBTotalE < 2800000) ) {
2305 nTow1 = nTow2 = nTow3 = nTow4 = 0;
2307 double sum_et = 0.0;
2308 double sum_ex = 0.0;
2309 double sum_ey = 0.0;
2311 double HFsum_et = 0.0;
2312 double HFsum_ex = 0.0;
2313 double HFsum_ey = 0.0;
2320 tower != caloTowers->end(); tower++) {
2322 Double_t et = tower->et();
2323 Double_t phix = tower->phi();
2325 if (et > 0.5) nTow1++;
2326 if (et > 1.0) nTow2++;
2327 if (et > 1.5) nTow3++;
2328 if (et > 2.0) nTow4++;
2334 if (tower->emEnergy() > 2.0) {
2335 h_EmEnergy->Fill (tower->ieta(), tower->iphi(), tower->emEnergy());
2337 if (tower->hadEnergy() > 2.0) {
2338 h_HadEnergy->Fill (tower->ieta(), tower->iphi(), tower->hadEnergy());
2341 if (fabs(tower->ieta()) > 29) {
2343 HFsum_ex += et*
cos(phix);
2344 HFsum_ey += et*
sin(phix);
2350 ETime->Fill(tower->ecalTime());
2351 HTime->Fill(tower->hcalTime());
2360 sum_ex += et*
cos(phix);
2361 sum_ey += et*
sin(phix);
2364 Double_t
phi = tower->phi();
2365 SumEtTowers += tower->et();
2367 sumTowerAllEx += et*
cos(phi);
2368 sumTowerAllEy += et*
sin(phi);
2378 HFMET->Fill(
sqrt( HFsum_ex*HFsum_ex + HFsum_ey*HFsum_ey));
2392 UsedTowerList.clear();
2393 TowerUsedInJets.clear();
2394 TowerNotUsedInJets.clear();
2398 for ( CaloJetCollection::const_iterator ijet=caloJets->begin(); ijet!=caloJets->end(); ijet++) {
2400 Double_t
jetPt = ijet->pt();
2401 Double_t
jetEta = ijet->eta();
2402 Double_t
jetPhi = ijet->phi();
2406 Double_t jetPx = jetPt*
cos(jetPhi);
2407 Double_t jetPy = jetPt*
sin(jetPhi);
2412 const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
2413 int nConstituents = jetCaloRefs.size();
2414 for (
int i = 0; i <nConstituents ; i++){
2416 UsedTowerList.push_back(jetCaloRefs[i]);
2423 if ( (jetPt>80.0) && (fabs(jetEta) < 1.3) ){
2424 st_Pt->Fill( jetPt );
2425 int nConstituents = ijet->getCaloConstituents().size();
2431 for(
unsigned twr=0; twr<ijet->getCaloConstituents().size(); ++twr){
2432 CaloTowerPtr tower = (ijet->getCaloConstituents())[twr];
2434 if( tower->et()>0. ){
2436 if (tower->energy() > maxEne) maxEne = tower->energy();
2437 totEne += tower->energy();
2444 st_Eta->Fill( tower->eta() );
2445 st_Phi->Fill( tower->phi() );
2447 st_iEta->Fill( tower->ieta() );
2448 st_iPhi->Fill( tower->iphi() );
2466 st_Frac->Fill( maxEne / totEne );
2472 int NTowersUsed = UsedTowerList.size();
2476 tower != caloTowers->end(); tower++) {
2479 Double_t et = tower->et();
2483 Double_t phi = tower->phi();
2484 SumEtTowers += tower->et();
2486 sumTowerAllPx += et*
cos(phi);
2487 sumTowerAllPy += et*
sin(phi);
2491 for(
int i=0; i<NTowersUsed; i++){
2492 if(tower->
id() == UsedTowerList[
i]->
id()){
2499 TowerUsedInJets.push_back(t);
2501 TowerNotUsedInJets.push_back(t);
2506 int nUsed = TowerUsedInJets.size();
2507 int nNotUsed = TowerNotUsedInJets.size();
2511 TotalClusteredE = 0;
2512 TotalUnclusteredE = 0;
2514 for(
int i=0;i<nUsed;i++){
2515 SumEtJets += TowerUsedInJets[
i].et();
2517 if (TowerUsedInJets[i].
energy() > 1.0)
2518 TotalClusteredE += TowerUsedInJets[
i].energy();
2522 for(
int i=0;i<nNotUsed;i++){
2523 if (TowerNotUsedInJets[i].et() > 0.5)
2524 SumEtNotJets += TowerNotUsedInJets[
i].et();
2528 if (TowerNotUsedInJets[i].
energy() > 1.0)
2529 TotalUnclusteredE += TowerNotUsedInJets[
i].energy();
2545 calomet = &(calometcol->front());
2547 double caloSumET = calomet->
sumEt();
2548 double caloMET = calomet->
pt();
2549 double caloMETSig = calomet->
mEtSig();
2550 double caloMEx = calomet->
px();
2551 double caloMEy = calomet->
py();
2552 double caloMETPhi = calomet->
phi();
2554 SumEt->Fill(caloSumET);
2558 if (evtType == 0)
MET_Tower->Fill(caloMET);
2559 if (evtType == 1)
MET_RBX->Fill(caloMET);
2560 if (evtType == 2)
MET_HPD->Fill(caloMET);
2561 METSig->Fill(caloMETSig);
2564 METPhi->Fill(caloMETPhi);
2591 evt.
getByLabel(
"offlinePrimaryVertices", vertexCollection);
2597 for (reco::VertexCollection::const_iterator vertex=vC.begin(); vertex!=vC.end(); vertex++){
2599 h_Vx->Fill(vertex->x());
2600 h_Vy->Fill(vertex->y());
2601 h_Vz->Fill(vertex->z());
2608 if ((HF_PMM !=
INVALID) || (nVTX > 0)) {
2609 HFvsZ->Fill(HF_PMM,VTX);
2666 for (reco::TrackCollection::const_iterator track=tC.begin(); track!=tC.end(); track++){
2725 for( CaloJetCollection::const_iterator ijet = caloJets->begin(); ijet != caloJets->end(); ++ ijet ) {
2739 h_pt->Fill(ijet->pt());
2740 if (evtType == 0)
h_ptTower->Fill(ijet->pt());
2741 if (evtType == 1)
h_ptRBX->Fill(ijet->pt());
2742 if (evtType == 2)
h_ptHPD->Fill(ijet->pt());
2743 h_et->Fill(ijet->et());
2744 h_eta->Fill(ijet->eta());
2745 h_phi->Fill(ijet->phi());
2747 jetHOEne->Fill(ijet->hadEnergyInHO());
TProfile * HFTimeVsiEtaM20
void getManyByType(std::vector< Handle< PROD > > &results) const
EventNumber_t event() const
TProfile * HFTimeVsiEtaP20
Sin< T >::type sin(const T &t)
std::vector< HFRecHit >::const_iterator const_iterator
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
virtual double phi() const final
momentum azimuthal angle
std::vector< Vertex > VertexCollection
collection of Vertex objects
TH1F * h_TotalUnclusteredE
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::string CaloJetAlgorithm
TH1F * h_TotalUnclusteredEt
edm::InputTag theTriggerResultsLabel
Cos< T >::type cos(const T &t)
int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
virtual double py() const final
y coordinate of momentum vector
static std::string const triggerResults
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
ProductID id() const
Accessor for product ID.
TProfile * HFTimeVsiEtaM5
edm::InputTag hcalNoiseSummaryTag_
virtual double px() const final
x coordinate of momentum vector
TProfile * HFTimeVsiEtaP5
virtual double pt() const final
transverse momentum