Implements edm::EDAnalyzer.
Definition at line 599 of file myJetAna.cc.
References funct::abs(), edm::EventBase::bunchCrossing(), caloEta, caloEtaEt, CaloJetAlgorithm, FamosSequences_cff::caloJets, caloPhi, HiRecoJets_cff::caloTowers, funct::cos(), gather_cfg::cout, DEBUG, 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(), edm::hlt::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, n, nBNC, NPass, NTime, NTotal, ecaldqm::nTowers, RBX_struct::nTowers, HPD_struct::nTowers, NTowers, nTowers1, nTowers2, nTowers3, nTowers4, nTowersLeadJetPt1, nTowersLeadJetPt2, nTowersLeadJetPt3, nTowersLeadJetPt4, OERMET, edm::EventBase::orbitNumber(), edm::hlt::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, edmStreamStallGrapher::t, theTriggerResultsLabel, cond::rpcobgas::time, totBNC, totEneLeadJetEta1, totEneLeadJetEta2, totEneLeadJetEta3, towerEmEn, towerEmEnHB, towerEmEnHE, towerEmEnHF, towerEmFrac, towerHadEn, towerHadEnHB, towerHadEnHE, towerHadEnHF, towerOuterEn, triggerResults, TrkMultFlagged0, TrkMultFlagged1, TrkMultFlagged2, TrkMultFlagged3, TrkMultFlagged4, TrkMultFlaggedM, and GoodVertex_cfg::vertexCollection.
603 bool Pass, Pass_HFTime, Pass_DiJet, Pass_BunchCrossing, Pass_Vertex;
605 int EtaOk10, EtaOk13, EtaOk40;
610 int HFRecHitFlag[100][100][2];
612 double towerEtCut, towerECut, towerE;
617 unsigned int StableRun = 123732;
619 double HBHEThreshold = 2.0;
620 double HFThreshold = 2.0;
621 double HOThreshold = 2.0;
622 double EBEEThreshold = 2.0;
624 double HBHEThreshold1 = 4.0;
625 double HFThreshold1 = 4.0;
626 double HOThreshold1 = 4.0;
629 double HBHEThreshold2 = 10.0;
630 double HFThreshold2 = 10.0;
634 double HBHEThreshold3 = 40.0;
635 double HFThreshold3 = 40.0;
639 float minJetPt = 20.;
640 float minJetPt10 = 10.;
641 int jetInd, allJetInd;
697 for (
unsigned int i=0;
i!=
n;
i++) {
730 edm::LogInfo(
"myJetAna") <<
"TriggerResults::HLT not found, "
731 "automatically select events";
751 if (evt.
id().
run() == 122294)
754 if (evt.
id().
run() == 122314)
757 if (evt.
id().
run() == 123575)
759 if (evt.
id().
run() == 123596)
763 if (evt.
id().
run() == 124009) {
771 if (evt.
id().
run() == 124020) {
779 if (evt.
id().
run() == 124024) {
793 Pass_BunchCrossing =
true;
795 Pass_BunchCrossing =
false;
803 double HFM_ETime, HFP_ETime;
812 for (
int i=0;
i<100;
i++) {
813 for (
int j=0;
j<100;
j++) {
816 HFRecHitFlag[
i][
j][0] = 0;
817 HFRecHitFlag[
i][
j][1] = 0;
823 int NHFLongShortHits;
825 NHFLongShortHits = 0;
831 std::vector<edm::Handle<HFRecHitCollection> > colls;
834 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
835 for (i=colls.begin(); i!=colls.end(); i++) {
868 float en =
j->energy();
869 float time =
j->time();
870 if ((en > 20.) && (time>20.)) {
875 int ieta =
id.
ieta();
876 int iphi =
id.iphi();
877 int depth =
id.depth();
882 HFRecHit[ieta+41][iphi][depth-1] = en;
883 HFRecHitFlag[ieta+41][iphi][depth-1] =
j->flagField(0);
891 if (
j->id().ieta()<0) {
892 if (
j->energy() > HFThreshold) {
893 HFM_ETime +=
j->energy()*
j->time();
894 HFM_E +=
j->energy();
897 if (
j->energy() > HFThreshold) {
898 HFP_ETime +=
j->energy()*
j->time();
899 HFP_E +=
j->energy();
908 cout <<
"No HF RecHits." << endl;
911 cout <<
"N HF Hits" << NHFLongShortHits <<
" " << NHFDigiTimeHits << endl;
917 double OER = 0, OddEne, EvenEne;
920 for (
int iphi=0; iphi<100; iphi++) {
921 OddEne = EvenEne = 0.;
924 for (
int ieta=0; ieta<100; ieta++) {
925 if (
HFRecHit[ieta][iphi][0] > 1.0) {
934 if (
HFRecHit[ieta][iphi][1] > 1.0) {
944 if (((OddEne + EvenEne) > 10.) && (nOdd > 1) && (nEven > 1)) {
945 OER = (OddEne - EvenEne) / (OddEne + EvenEne);
950 if ((HFP_E > 0.) && (HFM_E > 0.)) {
951 HF_PMM = (HFP_ETime / HFP_E) - (HFM_ETime / HFM_E);
958 if (fabs(HF_PMM) < 10.) {
981 for( CaloJetCollection::const_iterator cal =
caloJets->begin(); cal !=
caloJets->end(); ++ cal ) {
984 if (nJet == 0) p4tmp[0] = cal->p4();
985 if (nJet == 1) p4tmp[1] = cal->p4();
987 if ( (cal->pt() > 3.) &&
988 (fabs(cal->eta()) < 3.0) ) {
1018 for (reco::VertexCollection::const_iterator vertex=vC.begin(); vertex!=vC.end(); vertex++){
1022 if ( (fabs(VTX) < 20.) && (nVTX > 0) ){
1025 Pass_Vertex =
false;
1051 evt.
getByLabel(
"siPixelClusters", hClusterColl);
1055 evt.
getByLabel(
"generalTracks", trackCollection);
1064 if (evt.
id().
run() == 1) {
1065 if ( (Pass_DiJet) &&
1074 if ( (Pass_BunchCrossing) &&
1099 if ((tC.size() > 100) && (clustColl.size() > 1000))
Pass =
true;
1116 if(!summary_h.isValid()) {
1123 bool Pass_NoiseSummary;
1124 Pass_NoiseSummary =
true;
1125 if(
summary.minE2Over10TS()<0.7) {
1126 Pass_NoiseSummary =
false;
1128 if(
summary.maxE2Over10TS()>0.96) {
1129 Pass_NoiseSummary =
false;
1131 if(
summary.maxHPDHits()>=17) {
1132 Pass_NoiseSummary =
false;
1134 if(
summary.maxRBXHits()>=999) {
1135 Pass_NoiseSummary =
false;
1137 if(
summary.maxHPDNoOtherHits()>=10) {
1138 Pass_NoiseSummary =
false;
1141 Pass_NoiseSummary =
false;
1143 if(
summary.min25GeVHitTime()<-9999.0) {
1144 Pass_NoiseSummary =
false;
1146 if(
summary.max25GeVHitTime()>9999.0) {
1147 Pass_NoiseSummary =
false;
1149 if(
summary.minRBXEMF()<0.01) {
1152 if (Pass_NoiseSummary) {
1172 for (
int i=0;i<36;i++) {
1180 for (
int i=0;i<144;i++) {
1189 double ETotal, emFrac;
1190 double HCALTotalCaloTowerE, ECALTotalCaloTowerE;
1191 double HCALTotalCaloTowerE_Eta1, ECALTotalCaloTowerE_Eta1;
1192 double HCALTotalCaloTowerE_Eta2, ECALTotalCaloTowerE_Eta2;
1193 double HCALTotalCaloTowerE_Eta3, ECALTotalCaloTowerE_Eta3;
1198 HCALTotalCaloTowerE = 0;
1199 ECALTotalCaloTowerE = 0;
1200 HCALTotalCaloTowerE_Eta1 = 0.;
1201 ECALTotalCaloTowerE_Eta1 = 0.;
1202 HCALTotalCaloTowerE_Eta2 = 0.;
1203 ECALTotalCaloTowerE_Eta2 = 0.;
1204 HCALTotalCaloTowerE_Eta3 = 0.;
1205 ECALTotalCaloTowerE_Eta3 = 0.;
1208 tower != caloTowers->end(); tower++) {
1209 ETotal += tower->hadEnergy();
1210 ETotal += tower->emEnergy();
1214 tower != caloTowers->end(); tower++) {
1217 if (
abs(tower->ieta()) < 100)
EMF_Eta->Fill(tower->ieta(), emFrac);
1219 if (
abs(tower->ieta()) < 15) {
1223 if ( (
abs(tower->ieta()) > 17) && ((
abs(tower->ieta()) < 30)) ){
1227 if (
abs(tower->ieta()) > 29) {
1240 if ((tower->emEnergy()+tower->hadEnergy()) != 0) {
1241 emFrac = tower->emEnergy()/(tower->emEnergy()+tower->hadEnergy());
1256 if (
abs(tower->iphi()) < 100)
EMF_Phi->Fill(tower->iphi(), emFrac);
1257 if (
abs(tower->ieta()) < 100)
EMF_Eta->Fill(tower->ieta(), emFrac);
1258 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
1263 if (
abs(tower->iphi()) < 100)
EMF_PhiX->Fill(tower->iphi(), emFrac);
1264 if (
abs(tower->ieta()) < 100)
EMF_EtaX->Fill(tower->ieta(), emFrac);
1267 HCALTotalCaloTowerE += tower->hadEnergy();
1268 ECALTotalCaloTowerE += tower->emEnergy();
1270 towerE = tower->hadEnergy() + tower->emEnergy();
1271 if (tower->et() > towerEtCut)
caloEtaEt->Fill(tower->eta());
1272 if (towerE > towerECut)
caloEta->Fill(tower->eta());
1275 if (fabs(tower->eta()) < 1.3) {
1276 HCALTotalCaloTowerE_Eta1 += tower->hadEnergy();
1277 ECALTotalCaloTowerE_Eta1 += tower->emEnergy();
1279 if ((fabs(tower->eta()) >= 1.3) && (fabs(tower->eta()) < 2.5)) {
1280 HCALTotalCaloTowerE_Eta2 += tower->hadEnergy();
1281 ECALTotalCaloTowerE_Eta2 += tower->emEnergy();
1283 if (fabs(tower->eta()) > 2.5) {
1284 HCALTotalCaloTowerE_Eta3 += tower->hadEnergy();
1285 ECALTotalCaloTowerE_Eta3 += tower->emEnergy();
1296 if ((tower->hadEnergy() + tower->emEnergy()) > 2.0) {
1298 int iRBX = tower->iphi();
1300 if (iRBX == 0) iRBX = 17;
1301 if (iRBX == -1) iRBX = 18;
1304 if (tower->ieta() < 0) iRBX += 18;
1319 int iHPD = tower->iphi();
1320 if (tower->ieta() < 0) iHPD = iHPD + 72;
1340 ECALvHCAL->Fill(HCALTotalCaloTowerE, ECALTotalCaloTowerE);
1341 ECALvHCALEta1->Fill(HCALTotalCaloTowerE_Eta1, ECALTotalCaloTowerE_Eta1);
1342 ECALvHCALEta2->Fill(HCALTotalCaloTowerE_Eta2, ECALTotalCaloTowerE_Eta2);
1343 ECALvHCALEta3->Fill(HCALTotalCaloTowerE_Eta3, ECALTotalCaloTowerE_Eta3);
1367 for (
int i=0;i<36;i++) {
1372 if (
RBXColl[i].hadEnergy > 3.0) {
1378 if ( (nRBX == 1) && (nTowers > 24) ) {
1384 for (
int i=0;i<144;i++) {
1389 if (
HPDColl[i].hadEnergy > 3.0) {
1395 if ( (nHPD == 1) && (nTowers > 6) ) {
1397 cout <<
" nHPD = " << nHPD
1398 <<
" Towers = " << nTowers
1399 <<
" Type = " << evtType
1411 Int_t JetLoPass = 0;
1413 if (triggerResults.
isValid()) {
1417 unsigned int n = triggerResults->size();
1418 for (
unsigned int i=0; i!=
n; i++) {
1442 triggerResults = (*tr);
1449 edm::LogInfo(
"myJetAna") <<
"TriggerResults::HLT not found, "
1450 "automatically select events";
1490 for( CaloJetCollection::const_iterator cal = caloJets->begin(); cal != caloJets->end(); ++ cal ) {
1494 double corPt = scale*cal->pt();
1498 if (corPt>highestPt) {
1500 p4cortmp[1] = p4cortmp[0];
1502 p4cortmp[0] = scale*cal->p4();
1503 }
else if (corPt>nextPt) {
1505 p4cortmp[1] = scale*cal->p4();
1509 if (allJetInd == 1) {
1512 if (JetLoPass != 0)
h_jet1PtHLT->Fill( cal->pt() );
1513 p4tmp[0] = cal->p4();
1514 if ( fabs(cal->eta()) < 1.0) EtaOk10++;
1515 if ( fabs(cal->eta()) < 1.3) EtaOk13++;
1516 if ( fabs(cal->eta()) < 4.0) EtaOk40++;
1518 if (allJetInd == 2) {
1521 p4tmp[1] = cal->p4();
1522 if ( fabs(cal->eta()) < 1.0) EtaOk10++;
1523 if ( fabs(cal->eta()) < 1.3) EtaOk13++;
1524 if ( fabs(cal->eta()) < 4.0) EtaOk40++;
1527 if ( cal->pt() > minJetPt) {
1528 const std::vector<CaloTowerPtr> jetCaloRefs = cal->getCaloConstituents();
1529 int nConstituents = jetCaloRefs.size();
1542 LeadMass = (p4tmp[0]+p4tmp[1]).mass();
1551 int nTow1, nTow2, nTow3, nTow4;
1558 for ( CaloJetCollection::const_iterator ijet=caloJets->begin(); ijet!=caloJets->end(); ijet++) {
1561 float hadEne = ijet->hadEnergyInHB() + ijet->hadEnergyInHO() +
1562 ijet->hadEnergyInHE() + ijet->hadEnergyInHF();
1563 float emEne = ijet->emEnergyInEB() + ijet->emEnergyInEE() + ijet->emEnergyInHF();
1564 float had = ijet->energyFractionHadronic();
1565 float j_et = ijet->et();
1568 if (fabs(ijet->eta()) < 1.3) {
1572 if (ijet->pt() > minJetPt10)
hadFracEta1->Fill(had);
1576 if ((fabs(ijet->eta()) > 1.3) && (fabs(ijet->eta()) < 3.) ) {
1580 if (ijet->pt() > minJetPt10)
hadFracEta2->Fill(had);
1584 if (fabs(ijet->eta()) > 3.) {
1588 if (ijet->pt() > minJetPt10)
hadFracEta3->Fill(had);
1592 const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
1593 int nConstituents = jetCaloRefs.size();
1598 nTow1 = nTow2 = nTow3 = nTow4 = 0;
1599 for (
int i = 0; i <nConstituents ; i++){
1601 float et = jetCaloRefs[
i]->et();
1603 if (et > 0.5) nTow1++;
1604 if (et > 1.0) nTow2++;
1605 if (et > 1.5) nTow3++;
1606 if (et > 2.0) nTow4++;
1628 double SumEtNotJets(0);
1629 double SumEtJets(0);
1630 double SumEtTowers(0);
1631 double TotalClusteredE(0);
1632 double TotalUnclusteredE(0);
1637 double sumTowerAllPx(0);
1638 double sumTowerAllPy(0);
1640 double sumTowerAllEx(0);
1641 double sumTowerAllEy(0);
1644 double HBTotalE, HETotalE, HOTotalE, HFTotalE;
1646 double EBTotalE, EETotalE;
1648 std::vector<CaloTowerPtr> UsedTowerList;
1649 std::vector<CaloTower> TowerUsedInJets;
1650 std::vector<CaloTower> TowerNotUsedInJets;
1659 HBTotalE = HETotalE = HOTotalE = HFTotalE = 0.;
1661 std::vector<edm::Handle<HBHERecHitCollection> > colls;
1663 std::vector<edm::Handle<HBHERecHitCollection> >::iterator
i;
1664 for (i=colls.begin(); i!=colls.end(); i++) {
1670 HBEne->Fill(
j->energy());
1674 HBTvsE->Fill(
j->energy(),
j->time());
1676 if (
j->time() > 20.)
HBEneTThr->Fill(
j->energy());
1678 if ((
j->time()<-25.) || (
j->time()>75.)) {
1680 if (
j->energy() > HBHEThreshold)
HBEneOOTTh->Fill(
j->energy());
1681 if (
j->energy() > HBHEThreshold1)
HBEneOOTTh1->Fill(
j->energy());
1683 if (
j->energy() > HBHEThreshold) {
1690 HBTotalE +=
j->energy();
1691 HBocc->Fill(
j->id().ieta(),
j->id().iphi());
1695 if (
j->energy() > HBHEThreshold1) {
1702 if ((
j->time()<-25.) || (
j->time()>75.)) {
1703 HBoccOOT->Fill(
j->id().ieta(),
j->id().iphi());
1706 if (
j->energy() > HBHEThreshold2) {
1713 if (
j->energy() > HBHEThreshold3) {
1717 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
1719 if (
j->energy() > HBHEThreshold)
HBTimeX->Fill(
j->time());
1721 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457) ) {
1723 if (
j->energy() > HBHEThreshold)
HBTimeY->Fill(
j->time());
1727 HEEne->Fill(
j->energy());
1731 HETvsE->Fill(
j->energy(),
j->time());
1733 if (
j->time() > 20.)
HEEneTThr->Fill(
j->energy());
1735 if ((
j->time()<-25.) || (
j->time()>75.)) {
1737 if (
j->energy() > HBHEThreshold)
HEEneOOTTh->Fill(
j->energy());
1738 if (
j->energy() > HBHEThreshold1)
HEEneOOTTh1->Fill(
j->energy());
1741 if (
j->energy() > HBHEThreshold) {
1748 HETotalE +=
j->energy();
1749 HEocc->Fill(
j->id().ieta(),
j->id().iphi());
1753 if (
j->energy() > HBHEThreshold1) {
1759 if ((
j->time()<-25.) || (
j->time()>75.)) {
1760 HEoccOOT->Fill(
j->id().ieta(),
j->id().iphi());
1763 if (
j->energy() > HBHEThreshold2) {
1769 if (
j->energy() > HBHEThreshold3) {
1774 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
1776 if (
j->energy() > HBHEThreshold)
HETimeX->Fill(
j->time());
1778 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457) ) {
1780 if (
j->energy() > HBHEThreshold)
HETimeY->Fill(
j->time());
1784 if (
j->id().ieta()<0) {
1786 if (
j->energy() > HBHEThreshold) {
1791 if (
j->energy() > HBHEThreshold) {
1810 cout <<
"No HB/HE RecHits." << endl;
1822 std::vector<edm::Handle<HFRecHitCollection> > colls;
1824 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
1825 for (i=colls.begin(); i!=colls.end(); i++) {
1835 cout <<
"No HF RecHits." << endl;
1842 std::vector<edm::Handle<HFRecHitCollection> > colls;
1844 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
1845 for (i=colls.begin(); i!=colls.end(); i++) {
1860 if (NPMTHits == 1) {
1871 if (
j->energy() > 20.) {
1872 if (NPMTHits == 0) {
1876 if (NPMTHits == 1) {
1895 if (
j->energy() > 5.) {
1900 if (
j->energy() > 20.) {
1905 HFEne->Fill(
j->energy());
1907 HFTvsE->Fill(
j->energy(),
j->time());
1909 if (
j->time() > 20.)
HFEneTThr->Fill(
j->energy());
1911 if (
j->energy() > 10.)
HFTvsEThr->Fill(
j->energy(),
j->time());
1938 if (
j->energy() > HFThreshold) {
1953 if (evt.
id().
run() >= StableRun) {
1962 HFTotalE +=
j->energy();
1963 HFocc->Fill(
j->id().ieta(),
j->id().iphi());
1968 if (
j->energy() > HFThreshold1) {
1974 if ((
j->time()<-20.) || (
j->time()>20.)) {
1975 HFoccOOT->Fill(
j->id().ieta(),
j->id().iphi());
1978 if (
j->energy() > HFThreshold2) {
1984 if (
j->energy() > HFThreshold3) {
1991 if (
j->id().ieta()<0) {
1992 if (
j->energy() > HFThreshold) {
1995 HFM_ETime +=
j->energy()*
j->time();
1996 HFM_E +=
j->energy();
1999 if (
j->energy() > HFThreshold) {
2002 HFP_ETime +=
j->energy()*
j->time();
2003 HFP_E +=
j->energy();
2008 if (
j->id().depth() == 1){
2010 if (
j->energy() > HFThreshold)
HFLTime->Fill(
j->time());
2013 if (
j->energy() > HFThreshold)
HFSTime->Fill(
j->time());
2022 cout <<
"No HF RecHits." << endl;
2027 for (
int ieta=0; ieta<100; ieta++) {
2028 for (
int iphi=0; iphi<100; iphi++) {
2029 double longF, shortF;
2030 if (
HFRecHit[ieta][iphi][0] == -10.) {
2035 if (
HFRecHit[ieta][iphi][1] == -10.) {
2043 if (shortF > 0.)
HFSEneAll->Fill(shortF);
2046 if ((longF > 20.) || (shortF > 20.)) {
2047 double R = (longF-shortF)/(longF+shortF);
2049 if (fabs(R) > 0.995) {
2053 if (longF > (162.4-10.19*
abs(ieta-41)+.21*
abs(ieta-41)*
abs(ieta-41)) ) {
2062 if (shortF > (129.9-6.61*
abs(ieta-41)+0.1153*
abs(ieta-41)*
abs(ieta-41)) ) {
2080 if ( (
HFRecHit[ieta][iphi][1] == -10.) && (
HFRecHit[ieta][iphi][0] != -10.) ) {
2084 if ( (
HFRecHit[ieta][iphi][0] == -10.) && (
HFRecHit[ieta][iphi][1] != -10.) ) {
2092 if (HFP_E > 0.)
HFTimeP->Fill(HFP_ETime / HFP_E);
2093 if (HFM_E > 0.)
HFTimeM->Fill(HFM_ETime / HFM_E);
2095 if ((HFP_E > 0.) && (HFM_E > 0.)) {
2096 HF_PMM = (HFP_ETime / HFP_E) - (HFM_ETime / HFM_E);
2105 std::vector<edm::Handle<HORecHitCollection> > colls;
2107 std::vector<edm::Handle<HORecHitCollection> >::iterator
i;
2108 for (i=colls.begin(); i!=colls.end(); i++) {
2111 HOEne->Fill(
j->energy());
2113 HOTvsE->Fill(
j->energy(),
j->time());
2114 if (
j->energy() > HOThreshold1) {
2117 if (
j->energy() > HOThreshold) {
2120 HOTotalE +=
j->energy();
2121 HOocc->Fill(
j->id().ieta(),
j->id().iphi());
2125 if (((
j->id().iphi()>=59 &&
j->id().iphi()<=70 &&
2126 j->id().ieta()>=11 &&
j->id().ieta()<=15) ||
2127 (
j->id().iphi()>=47 &&
j->id().iphi()<=58 &&
2128 j->id().ieta()>=5 &&
j->id().ieta()<=10)))
2131 if (
j->energy() > HOThreshold)
HOSTime->Fill(
j->time());
2132 }
else if ((
j->id().iphi()<59 ||
j->id().iphi()>70 ||
2133 j->id().ieta()<11 ||
j->id().ieta()>15) &&
2134 (
j->id().iphi()<47 ||
j->id().iphi()>58 ||
2135 j->id().ieta()<5 ||
j->id().ieta()>10))
2138 if (
j->energy() > HOThreshold)
HOHTime->Fill(
j->time());
2140 if (
j->id().ieta()<= -11){
2142 if (
j->energy() > HOThreshold)
HOHrm2Time->Fill(
j->time());
2143 }
else if (
j->id().ieta()>= -10 &&
j->id().ieta() <= -5) {
2145 if (
j->energy() > HOThreshold)
HOHrm1Time->Fill(
j->time());
2146 }
else if (
j->id().ieta()>= -4 &&
j->id().ieta() <= 4) {
2148 if (
j->energy() > HOThreshold)
HOHr0Time->Fill(
j->time());
2149 }
else if (
j->id().ieta()>= 5 &&
j->id().ieta() <= 10) {
2151 if (
j->energy() > HOThreshold)
HOHrp1Time->Fill(
j->time());
2152 }
else if (
j->id().ieta()>= 11) {
2154 if (
j->energy() > HOThreshold)
HOHrp2Time->Fill(
j->time());
2156 std::cout <<
"Finding events that are in no ring !?!" << std::endl;
2157 std::cout <<
"eta = " <<
j->id().ieta() << std::endl;
2161 std::cout <<
"Finding events that are neither SiPM nor HPD!?" << std::endl;
2171 cout <<
"No HO RecHits." << endl;
2176 EBTotalE = EETotalE = 0.;
2180 std::vector<edm::Handle<EcalRecHitCollection> > colls;
2182 std::vector<edm::Handle<EcalRecHitCollection> >::iterator
i;
2183 for (i=colls.begin(); i!=colls.end(); i++) {
2186 EBEne->Fill(
j->energy());
2188 if (
j->energy() > EBEEThreshold) {
2192 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
2196 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457) ) {
2200 EBTotalE +=
j->energy();
2203 EEEne->Fill(
j->energy());
2205 if (
j->energy() > EBEEThreshold) {
2209 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 453) ) {
2213 if ( (evt.
id().
run() == 120020) && (evt.
id().
event() == 457 ) ) {
2217 EETotalE +=
j->energy();
2224 cout <<
"No ECAL RecHits." << endl;
2227 EBvHB->Fill(HBTotalE, EBTotalE);
2228 EEvHE->Fill(HETotalE, EETotalE);
2282 if ( (EBTotalE > 320000) && (EBTotalE < 330000) &&
2283 (HBTotalE > 2700000) && (HBTotalE < 2800000) ) {
2306 nTow1 = nTow2 = nTow3 = nTow4 = 0;
2308 double sum_et = 0.0;
2309 double sum_ex = 0.0;
2310 double sum_ey = 0.0;
2312 double HFsum_et = 0.0;
2313 double HFsum_ex = 0.0;
2314 double HFsum_ey = 0.0;
2321 tower != caloTowers->end(); tower++) {
2323 Double_t et = tower->et();
2324 Double_t phix = tower->phi();
2326 if (et > 0.5) nTow1++;
2327 if (et > 1.0) nTow2++;
2328 if (et > 1.5) nTow3++;
2329 if (et > 2.0) nTow4++;
2335 if (tower->emEnergy() > 2.0) {
2336 h_EmEnergy->Fill (tower->ieta(), tower->iphi(), tower->emEnergy());
2338 if (tower->hadEnergy() > 2.0) {
2339 h_HadEnergy->Fill (tower->ieta(), tower->iphi(), tower->hadEnergy());
2342 if (fabs(tower->ieta()) > 29) {
2344 HFsum_ex += et*
cos(phix);
2345 HFsum_ey += et*
sin(phix);
2351 ETime->Fill(tower->ecalTime());
2352 HTime->Fill(tower->hcalTime());
2361 sum_ex += et*
cos(phix);
2362 sum_ey += et*
sin(phix);
2365 Double_t
phi = tower->phi();
2366 SumEtTowers += tower->et();
2368 sumTowerAllEx += et*
cos(phi);
2369 sumTowerAllEy += et*
sin(phi);
2379 HFMET->Fill(
sqrt( HFsum_ex*HFsum_ex + HFsum_ey*HFsum_ey));
2393 UsedTowerList.clear();
2394 TowerUsedInJets.clear();
2395 TowerNotUsedInJets.clear();
2399 for ( CaloJetCollection::const_iterator ijet=caloJets->begin(); ijet!=caloJets->end(); ijet++) {
2401 Double_t
jetPt = ijet->pt();
2402 Double_t
jetEta = ijet->eta();
2403 Double_t
jetPhi = ijet->phi();
2407 Double_t jetPx = jetPt*
cos(jetPhi);
2408 Double_t jetPy = jetPt*
sin(jetPhi);
2413 const std::vector<CaloTowerPtr> jetCaloRefs = ijet->getCaloConstituents();
2414 int nConstituents = jetCaloRefs.size();
2415 for (
int i = 0; i <nConstituents ; i++){
2417 UsedTowerList.push_back(jetCaloRefs[i]);
2424 if ( (jetPt>80.0) && (fabs(jetEta) < 1.3) ){
2425 st_Pt->Fill( jetPt );
2426 int nConstituents = ijet->getCaloConstituents().size();
2432 for(
unsigned twr=0; twr<ijet->getCaloConstituents().size(); ++twr){
2433 CaloTowerPtr tower = (ijet->getCaloConstituents())[twr];
2435 if( tower->et()>0. ){
2437 if (tower->energy() > maxEne) maxEne = tower->energy();
2438 totEne += tower->energy();
2445 st_Eta->Fill( tower->eta() );
2446 st_Phi->Fill( tower->phi() );
2448 st_iEta->Fill( tower->ieta() );
2449 st_iPhi->Fill( tower->iphi() );
2467 st_Frac->Fill( maxEne / totEne );
2473 int NTowersUsed = UsedTowerList.size();
2477 tower != caloTowers->end(); tower++) {
2480 Double_t et = tower->et();
2484 Double_t phi = tower->phi();
2485 SumEtTowers += tower->et();
2487 sumTowerAllPx += et*
cos(phi);
2488 sumTowerAllPy += et*
sin(phi);
2492 for(
int i=0; i<NTowersUsed; i++){
2493 if(tower->
id() == UsedTowerList[
i]->
id()){
2500 TowerUsedInJets.push_back(t);
2502 TowerNotUsedInJets.push_back(t);
2507 int nUsed = TowerUsedInJets.size();
2508 int nNotUsed = TowerNotUsedInJets.size();
2512 TotalClusteredE = 0;
2513 TotalUnclusteredE = 0;
2515 for(
int i=0;i<nUsed;i++){
2516 SumEtJets += TowerUsedInJets[
i].et();
2518 if (TowerUsedInJets[i].
energy() > 1.0)
2519 TotalClusteredE += TowerUsedInJets[
i].energy();
2523 for(
int i=0;i<nNotUsed;i++){
2524 if (TowerNotUsedInJets[i].et() > 0.5)
2525 SumEtNotJets += TowerNotUsedInJets[
i].et();
2529 if (TowerNotUsedInJets[i].
energy() > 1.0)
2530 TotalUnclusteredE += TowerNotUsedInJets[
i].energy();
2546 calomet = &(calometcol->front());
2548 double caloSumET = calomet->
sumEt();
2549 double caloMET = calomet->
pt();
2550 double caloMETSig = calomet->
mEtSig();
2551 double caloMEx = calomet->
px();
2552 double caloMEy = calomet->
py();
2553 double caloMETPhi = calomet->
phi();
2555 SumEt->Fill(caloSumET);
2559 if (evtType == 0)
MET_Tower->Fill(caloMET);
2560 if (evtType == 1)
MET_RBX->Fill(caloMET);
2561 if (evtType == 2)
MET_HPD->Fill(caloMET);
2562 METSig->Fill(caloMETSig);
2565 METPhi->Fill(caloMETPhi);
2592 evt.
getByLabel(
"offlinePrimaryVertices", vertexCollection);
2598 for (reco::VertexCollection::const_iterator vertex=vC.begin(); vertex!=vC.end(); vertex++){
2600 h_Vx->Fill(vertex->x());
2601 h_Vy->Fill(vertex->y());
2602 h_Vz->Fill(vertex->z());
2609 if ((HF_PMM !=
INVALID) || (nVTX > 0)) {
2610 HFvsZ->Fill(HF_PMM,VTX);
2667 for (reco::TrackCollection::const_iterator track=tC.begin(); track!=tC.end(); track++){
2726 for( CaloJetCollection::const_iterator ijet = caloJets->begin(); ijet != caloJets->end(); ++ ijet ) {
2740 h_pt->Fill(ijet->pt());
2741 if (evtType == 0)
h_ptTower->Fill(ijet->pt());
2742 if (evtType == 1)
h_ptRBX->Fill(ijet->pt());
2743 if (evtType == 2)
h_ptHPD->Fill(ijet->pt());
2744 h_et->Fill(ijet->et());
2745 h_eta->Fill(ijet->eta());
2746 h_phi->Fill(ijet->phi());
2748 jetHOEne->Fill(ijet->hadEnergyInHO());
TProfile * HFTimeVsiEtaM20
void getManyByType(std::vector< Handle< PROD > > &results) const
EventNumber_t event() const
TProfile * HFTimeVsiEtaP20
virtual float pt() const
transverse momentum
virtual float phi() const
momentum azimuthal angle
Sin< T >::type sin(const T &t)
std::vector< Track > TrackCollection
collection of Tracks
std::vector< HFRecHit >::const_iterator const_iterator
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
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
ProductID id() const
Accessor for product ID.
Cos< T >::type cos(const T &t)
int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
static std::string const triggerResults
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual double px() const
x coordinate of momentum vector
T const * product() const
TProfile * HFTimeVsiEtaM5
edm::InputTag hcalNoiseSummaryTag_
TProfile * HFTimeVsiEtaP5
virtual double py() const
y coordinate of momentum vector