diff --git a/.gitignore b/.gitignore
index 259148f..8ac3370 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,8 @@
*.exe
*.out
*.app
+
+*.pcm
+
+*.C~
+*.sh~
\ No newline at end of file
diff --git a/README.md b/README.md
index 8389989..0ac2698 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,22 @@
-# dt_analysis_code
\ No newline at end of file
+# dt_analysis_code
+
+
+cmsrel CMSSW_10_2_18
+cd CMSSW_10_2_18
+cd src
+cmsenv
+git cms-init
+git clone git@github.com:dildick/dt_analysis_code.git
+
+
+Running the signal analysis
+
+
+root -l -q -b analyzeSignal_ABCD.C++
+
+
+Running the data analysis
+
+
+root -l -q -b analyzeData_ABCD.C++
+
diff --git a/analyzeData.C b/analyzeData.C
deleted file mode 100644
index b997e86..0000000
--- a/analyzeData.C
+++ /dev/null
@@ -1,2359 +0,0 @@
-R__LOAD_LIBRARY(libTreePlayer)
-
-int getStation(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 400. && hitR < 480.){ return 1; }
- else if(hitR > 485. && hitR < 560.){ return 2; }
- else if(hitR > 590. && hitR < 650.){ return 3; }
- else if(hitR > 690. && hitR < 800.){ return 4; }
- else{ return -1; }
-}
-
-int getWheel(float hitZ){
- if(hitZ > 0){
- if(hitZ < 127.){ return 0; }
- else if(hitZ < 395.){ return 1; }
- else if(hitZ < 661.){ return 2; }
- else{ return -99; }
- }
- else{
- return -1*getWheel(-1.0*hitZ);
- }
-}
-
-int getRPCLayer(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 410. && hitR < 440.){ return 1; }
- else if(hitR > 445. && hitR < 475.){ return 2; }
- else if(hitR > 490. && hitR < 520.){ return 3; }
- else if(hitR > 525. && hitR < 555.){ return 4; }
- else if(hitR > 600. && hitR < 630.){ return 5; }
- else if(hitR > 700. && hitR < 770.){ return 6; }
- else{ return -1; }
-}
-
-void analyzeData_tmp(){
-
- char name[50];
- char title[100];
- char years[4][10] = {"2018","2017","2016"};
- char runNames[3][20] = {"17Sept2018_Run2018","Run2017","Run2016"};
- char dates[3][20] = {"17Sep2018","17Nov2017_v2","07Aug17"};
- TString dir("/mnt/hadoop/store/group/phys_exotica/delayedjets/displacedJetMuonAnalyzer/driftTube/V1p15/Data");
- TFile *_ofile = TFile::Open("outData_altTest4.root","RECREATE");
-
- TH1D *h_dPhiJetMET[4];
- TH1D *h_dPhiJetMET_noVeto[4];
- TH1D *h_dPhiJetMET_jetVeto[4];
- TH1D *h_dPhiJetMET_muonVeto[4];
- TH1D *h_dPhiJetMET_MB1Veto[4];
- TH1D *h_dPhiJetMET_noMB1Veto[4];
- TH1D *h_dPhiJetMET_fullVeto[4];
- TH1D *h_dPhiJetMET_fullHOVeto[4];
- TH1D *h_jetMet_dPhiMin4[4];
- TH1D *h_MET[4];
- TH1D *h_jetPt[4];
-
- TH1D *h_nDtRechitClusters_noVeto[4];
- TH1D *h_dtRechitClusterSize_noVeto[4];
- TH1D *h_nTotalClusteredRechits_noVeto[4];
- TH1D *h_dtRechitClusterMaxStation_noVeto[4];
- TH1D *h_dtRechitClusterNStation_noVeto[4];
- TH1D *h_dPhiClusterMET_noVeto[4];
- TH1D *h_dtRechitClusterXSpread_noVeto[4];
- TH1D *h_dtRechitClusterYSpread_noVeto[4];
- TH1D *h_dtRechitClusterZSpread_noVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_noVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_noVeto[4];
- TH1D *h_nRPCMatched_noVeto[4];
- TH1D *h_RPCMatchedBx_noVeto[4];
- TH1D *h_RPCMatchedBxSpread_noVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_noVeto[4];
- TH1D *h_nRPCMatched_Spread0_noVeto[4];
-
- TH1D *h_nDtRechitClusters_muonVeto[4];
- TH1D *h_dtRechitClusterSize_muonVeto[4];
- TH1D *h_nTotalClusteredRechits_muonVeto[4];
- TH1D *h_dtRechitClusterMaxStation_muonVeto[4];
- TH1D *h_dtRechitClusterNStation_muonVeto[4];
- TH1D *h_dPhiClusterMET_muonVeto[4];
- TH1D *h_dtRechitClusterXSpread_muonVeto[4];
- TH1D *h_dtRechitClusterYSpread_muonVeto[4];
- TH1D *h_dtRechitClusterZSpread_muonVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_muonVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_muonVeto[4];
- TH1D *h_nRPCMatched_muonVeto[4];
- TH1D *h_RPCMatchedBx_muonVeto[4];
- TH1D *h_RPCMatchedBxSpread_muonVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_muonVeto[4];
- TH1D *h_nRPCMatched_Spread0_muonVeto[4];
-
- TH1D *h_nDtRechitClusters_jetVeto[4];
- TH1D *h_dtRechitClusterSizeBarrel_jetVeto[4];
- TH1D *h_dtRechitClusterSizeMagnet_jetVeto[4];
- TH1D *h_dtRechitClusterSizeAll_jetVeto[4];
- TH1D *h_dtRechitClusterSize_jetVeto[4];
- TH1D *h_nTotalClusteredRechits_jetVeto[4];
- TH1D *h_dtRechitClusterMaxStation_jetVeto[4];
- TH1D *h_dtRechitClusterNStation_jetVeto[4];
- TH1D *h_dPhiClusterMET_jetVeto[4];
- TH1D *h_dtRechitClusterXSpread_jetVeto[4];
- TH1D *h_dtRechitClusterYSpread_jetVeto[4];
- TH1D *h_dtRechitClusterZSpread_jetVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_jetVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_jetVeto[4];
- TH1D *h_nRPCMatched_jetVeto[4];
- TH1D *h_nRPCMatchedLayer1_jetVeto[4];
- TH1D *h_nRPCMatchedLayer2_jetVeto[4];
- TH1D *h_nRPCMatchedLayer3_jetVeto[4];
- TH1D *h_nRPCMatchedLayer4_jetVeto[4];
- TH1D *h_nRPCMatchedLayer1_fullHOVeto[4];
- TH1D *h_nRPCMatchedLayer2_fullHOVeto[4];
- TH1D *h_nRPCMatchedLayer3_fullHOVeto[4];
- TH1D *h_nRPCMatchedLayer4_fullHOVeto[4];
- TH1D *h_RPCMatchedBx_jetVeto[4];
- TH1D *h_RPCMatchedBxSpread_jetVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_jetVeto[4];
- TH1D *h_nRPCMatched_Spread0_jetVeto[4];
-
- TH1D *h_nDtRechitClusters_MB1Veto[4];
- TH1D *h_dtRechitClusterSizeBarrel_MB1Veto[4];
- TH1D *h_dtRechitClusterSizeMagnet_MB1Veto[4];
- TH1D *h_dtRechitClusterSizeAll_MB1Veto[4];
- TH1D *h_dtRechitClusterSize_MB1Veto[4];
- TH1D *h_nTotalClusteredRechits_MB1Veto[4];
- TH1D *h_nTotalClusteredRechits_noMB1Veto[4];
- TH1D *h_dtRechitClusterMaxStation_MB1Veto[4];
- TH1D *h_dtRechitClusterNStation_MB1Veto[4];
- TH1D *h_dPhiClusterMET_MB1Veto[4];
- TH1D *h_dtRechitClusterXSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterYSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterZSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterEtaSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterPhiSpread_MB1Veto[4];
- TH1D *h_nRPCMatched_MB1Veto[4];
- TH1D *h_RPCMatchedBx_MB1Veto[4];
- TH1D *h_RPCMatchedBxSpread_MB1Veto[4];
- TH1D *h_nRPCMatched_Spread0_MB1Veto[4];
- TH1D *h_RPCMatchedBx_Spread0_MB1Veto[4];
-
- TH1D *h_nDtRechitClusters_fullVeto[4];
- TH1D *h_dtRechitClusterSizeBarrel_fullVeto[4];
- TH1D *h_dtRechitClusterSizeMagnet_fullVeto[4];
- TH1D *h_dtRechitClusterSizeAll_fullVeto[4];
- TH1D *h_dtRechitClusterSize_fullVeto[4];
- TH1D *h_nTotalClusteredRechits_fullVeto[4];
- TH1D *h_dtRechitClusterMaxStation_fullVeto[4];
- TH1D *h_dtRechitClusterMaxStation_fullHOVeto[4];
- TH1D *h_dtRechitClusterNStation_fullVeto[4];
- TH1D *h_dtRechitClusterNStationUnclustered_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshStation_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshStationUnclustered_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshLowStation_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshLowStationUnclustered_fullVeto[4];
- TH1D *h_dPhiClusterMET_fullVeto[4];
- TH1D *h_dPhiClusterMET_fullHOVeto[4];
- TH1D *h_dtRechitClusterXSpread_fullVeto[4];
- TH1D *h_dtRechitClusterYSpread_fullVeto[4];
- TH1D *h_dtRechitClusterZSpread_fullVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_fullVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_fullVeto[4];
- TH1D *h_nRPCMatched_fullVeto[4];
- TH1D *h_nRPCMatched_fullHOVeto[4];
- TH1D *h_RPCMatchedBx_fullVeto[4];
- TH1D *h_RPCMatchedBxSpread_fullVeto[4];
- TH1D *h_RPCMatchedBxSpread_fullHOVeto[4];
- TH1D *h_nRPCMatched_Spread0_fullVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_fullVeto[4];
-
- TH1D *h_dtRechitClusterEta_fullVeto[4];
- TH1D *h_dtRechitClusterPhi_fullVeto[4];
- TH1D *h_dtRechitClusterR_fullVeto[4];
- TH1D *h_dtRechitClusterZ_fullVeto[4];
- TH2D *h_dtRechitClusterRZ_fullVeto[4];
- TH2D *h_dtRechitClusterRZFine_fullVeto[4];
- TH2D *h_dtRechitClusterEtaPhi_fullVeto[4];
- TH2D *h_dtRechitClusterEtaPhiFine_fullVeto[4];
- TH1D *h_dtRechitClusterNWheels50_fullVeto[4];
- TH1D *h_dtRechitClusterNWheels25_fullVeto[4];
- TH1D *h_dtRechitClusterNWheels1_fullVeto[4];
- TH1D *h_dtRechitClusterMaxWheel_fullVeto[4];
- TH2D *h_npv_nDtRechitClusters_fullVeto[4];
- TH2D *h_npv_nDtRechitClusters_noVeto[4];
-
- TH1D *h_nHOMatched_fullVeto[4];
- TH1D *h_HOMatchedEnergy_fullVeto[4];
- TH1D *h_HOMatchedTime_fullVeto[4];
- TH2D *h_HOMatchedTime_RPCMatchedBx_fullVeto[4];
- TH1D *h_nHOMatched_invertedJetVeto[4];
- TH1D *h_HOMatchedEnergy_invertedJetVeto[4];
- TH1D *h_HOMatchedTime_invertedJetVeto[4];
- TH2D *h_HOMatchedTime_RPCMatchedBx_invertedJetVeto[4];
- TH1D *h_nHOMatched_noMB1Veto[4];
- TH1D *h_HOMatchedEnergy_noMB1Veto[4];
- TH1D *h_HOMatchedEnergyCluster280_noMB1Veto[4];
- TH1D *h_HOMatchedTime_noMB1Veto[4];
- TH2D *h_HOMatchedTime_RPCMatchedBx_noMB1Veto[4];
- TH1D *h_nHOMatched_invertedJet_noMB1Veto[4];
- TH1D *h_HOMatchedEnergy_invertedJet_noMB1Veto[4];
- TH1D *h_HOMatchedTime_invertedJet_noMB1Veto[4];
- TH2D *h_HOMatchedTime_RPCMatchedBx_invertedJet_noMB1Veto[4];
-
- TH1D *h_RPCMatchedBx_invertedJetVeto[4];
- TH1D *h_RPCMatchedBx_invertedMuonVeto[4];
- TH1D *h_RPCMatchedBx_invertedMuJetVeto[4];
-
- TH1D *h_dtRechitClusterSize_noMB1Veto[4];
- TH1D *h_dtRechitClusterNStation_noMB1Veto[4];
- TH1D *h_dtRechitClusterNRechitsMB1_noMB1Veto[4];
- TH1D *h_dtRechitClusterPercentRechitsMB1_noMB1Veto[4];
- TH1D *h_nRPCMatched_noMB1Veto[4];
- TH1D *h_nRPCMatchedLayer1_noMB1Veto[4];
- TH1D *h_nRPCMatchedLayer2_noMB1Veto[4];
- TH1D *h_nRPCMatchedLayer12_noMB1Veto[4];
- TH1D *h_RPCMatchedBxSpread_noMB1Veto[4];
-
- TH1D *h_dtRechitClusterSize_HOVeto[4];
- TH1D *h_nTotalClusteredRechits_HOVeto[4];
- TH1D *h_nTotalClusteredRechits_fullHOVeto[4];
- TH1D *h_nTotalClusteredRechits_fullHOVetoPlus[4];
- TH1D *h_dtRechitClusterSize_fullHOVeto[4];
- TH1D *h_dtRechitClusterSize_RPCMatch[4];
- TH1D *h_dtRechitClusterSize_RPCSpread0[4];
-
- TH1D *h_nTotalClusteredRechits_fullVetoPlus[4];
- TH1D *h_dtRechitClusterXSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterYSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterZSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterEtaSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterPhiSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterEta_fullVetoPlus[4];
- TH1D *h_dtRechitClusterPhi_fullVetoPlus[4];
- TH2D *h_dtRechitClusterEtaPhi_fullVetoPlus[4];
- TH1D *h_dtRechitClusterNStation_fullVetoPlus[4];
- TH1D *h_dtRechitClusterNWheel_fullVetoPlus[4];
- TH1D *h_dtRechitClusterSizeRatio_fullVetoPlus[4];
- TH1D *h_dtRechitClusterSizeRatio_fullVetoMinus[4];
-
- TH1D *h_dtRechitClusterEta_fullHOVetoPlus[4];
- TH1D *h_dtRechitClusterPhi_fullHOVetoPlus[4];
- TH2D *h_dtRechitClusterEtaPhi_fullHOVetoPlus[4];
- TH1D *h_dtRechitClusterNStation_fullHOVetoPlus[4];
- TH1D *h_dtRechitClusterNWheel_fullHOVetoPlus[4];
-
- TH1D *h_HOTime_fullHOVeto[4];
-
- TH1D *h_muonPt_jetMB1Veto[4];
- TH1D *h_jetPt_muonMB1Veto[4];
- TH1D *h_MB1Rechits_jetMuonVeto[4];
- TH1D *h_muonPt_jetHOVeto[4];
- TH1D *h_jetPt_muonHOVeto[4];
- TH1D *h_HOEnergy_jetMuonVeto[4];
-
- TH1D *h_HOEnergy_jetVeto[4];
-
- TH1D *h_muonDR_fullVeto[4];
- TH1D *h_muonDR_RPCMatch[4];
- TH1D *h_muonDR_RPCSpread0[4];
- TH1D *h_jetDR_fullVeto[4];
- TH1D *h_jetDR_RPCMatch[4];
- TH1D *h_jetDR_RPCSpread0[4];
- TH1D *h_muonDR_fullHOVeto[4];
- TH1D *h_muonDR_HORPCMatch[4];
- TH1D *h_muonDR_HORPCSpread0[4];
- TH1D *h_jetDR_fullHOVeto[4];
- TH1D *h_jetDR_HORPCMatch[4];
- TH1D *h_jetDR_HORPCSpread0[4];
- TH1D *h_jetDR_minDR_fullHOVetoPlus[4];
- TH1D *h_jetPt_minDR_fullHOVetoPlus[4];
- TH1D *h_jetEta_minDR_fullHOVetoPlus[4];
- TH1D *h_jetPhi_minDR_fullHOVetoPlus[4];
- TH1D *h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetMuonEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetDR_minDR_fullHOVetoMinus[4];
- TH1D *h_jetPt_minDR_fullHOVetoMinus[4];
- TH1D *h_jetEta_minDR_fullHOVetoMinus[4];
- TH1D *h_jetPhi_minDR_fullHOVetoMinus[4];
- TH1D *h_jetChargedEMEnergyFraction_minDR_fullHOVetoMinus[4];
- TH1D *h_jetNeutralEMEnergyFraction_minDR_fullHOVetoMinus[4];
- TH1D *h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoMinus[4];
- TH1D *h_jetChargedHadronEnergyFraction_minDR_fullHOVetoMinus[4];
- TH1D *h_jetMuonEnergyFraction_minDR_fullHOVetoMinus[4];
- TH1D *h_jetDR_minDR_vetoJet[4];
- TH1D *h_jetPt_minDR_vetoJet[4];
- TH1D *h_jetEta_minDR_vetoJet[4];
- TH1D *h_jetPhi_minDR_vetoJet[4];
- TH1D *h_jetChargedEMEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetNeutralEMEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetNeutralHadronEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetChargedHadronEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetMuonEnergyFraction_minDR_vetoJet[4];
-
- TH1D *h_dPhiJetMET_noRPCMatch_nRechitsLow[4];
- TH1D *h_dPhiJetMET_noRPCMatch_nRechitsHigh[4];
- TH1D *h_dtRechitClusterSize_noRPCMatch_dPhiLow[4];
- TH1D *h_dtRechitClusterSize_noRPCMatch_dPhiHigh[4];
-
- TH1D *h_nWheels1_noCluster[4];
- TH1D *h_nWheels10_noCluster[4];
- TH1D *h_nWheels20_noCluster[4];
- TH1D *h_nWheels30_noCluster[4];
- TH1D *h_nWheels50_noCluster[4];
- TH1D *h_nWheels150_noCluster[4];
- TH1D *h_nWheels1_noVeto[4];
- TH1D *h_nWheels1_fullVetoPlus[4];
- TH1D *h_nWheels1_fullVetoMinus[4];
- TH1D *h_nWheels10_noVeto[4];
- TH1D *h_nWheels10_fullVetoPlus[4];
- TH1D *h_nWheels10_fullVetoMinus[4];
- TH1D *h_nWheels20_noVeto[4];
- TH1D *h_nWheels20_fullVetoPlus[4];
- TH1D *h_nWheels20_fullVetoMinus[4];
- TH1D *h_nWheels30_noVeto[4];
- TH1D *h_nWheels30_fullVetoPlus[4];
- TH1D *h_nWheels30_fullVetoMinus[4];
- TH1D *h_nWheels50_noVeto[4];
- TH1D *h_nWheels50_fullVetoPlus[4];
- TH1D *h_nWheels50_fullVetoMinus[4];
- TH1D *h_nWheels150_noVeto[4];
- TH1D *h_nWheels150_fullVetoPlus[4];
- TH1D *h_nWheels150_fullVetoMinus[4];
-
- TH1D *h_jetPtMax_noVeto[4];
- TH1D *h_jetPtMax_fullVeto[4];
- TH1D *h_jetPtMax_fullVetoPlus[4];
- TH1D *h_jetPtMax_fullVetoMinus[4];
- TH1D *h_jetPtMET_noVeto[4];
- TH1D *h_jetPtMET_fullVeto[4];
- TH1D *h_jetPtMET_fullVetoPlus[4];
- TH1D *h_jetPtMET_fullVetoMinus[4];
-
- TH1D *h_jetPtMET_noVeto_rpcCR[4];
- TH1D *h_jetPtMET_fullVeto_rpcCR[4];
- TH1D *h_jetPtMET_fullVetoPlus_rpcCR[4];
- TH1D *h_dtRechitClusterPhiStation2_fullVeto_rpcCR[4];
- TH1D *h_dtRechitClusterPhiStation3_fullVeto_rpcCR[4];
- TH1D *h_dtRechitClusterPhiStation4_fullVeto_rpcCR[4];
-
- TH1D *h_runNum_phi = new TH1D("h_runNum_phi","",80,270e3,350e3);
- TH1D *h_runNum_eta = new TH1D("h_runNum_eta","",80,270e3,350e3);
- TH1D *h_runNum_etaphi = new TH1D("h_runNum_etaphi","",80,270e3,350e3);
- TH1D *h_badRun_lumiSec = new TH1D("h_badRun_lumiSec","",3500,0,3500);
- TH1D *h_badRun_dtRechitClusterSize = new TH1D("h_badRun_dtRechitClusterSize","",100,0,1000);
- TH1D *h_badRun_dtRechitClusterNStation = new TH1D("h_badRun_dtRechitClusterNStation","",5,0,5);
- TH1D *h_badRun_dtRechitClusterXSpread = new TH1D("h_badRun_dtRechitClusterXSpread","",40,0,400);
- TH1D *h_badRun_dtRechitClusterYSpread = new TH1D("h_badRun_dtRechitClusterYSpread","",40,0,400);
- TH1D *h_badRun_dtRechitClusterPhiSpread = new TH1D("h_badRun_dtRechitClusterPhiSpread","",40,0,2);
- TH1D *h_badRun_dtRechitClusterNWheel = new TH1D("h_badRun_dtRechitClusterNWheel","",40,0,2);
-
- Int_t rechitCount[5];
- Int_t stationCount[4];
- Int_t rechitWheel = -99;
- Int_t rechitStation = -99;
- Int_t hitWheels1 = -1;
- Int_t hitWheels10 = -1;
- Int_t hitWheels20 = -1;
- Int_t hitWheels30 = -1;
- Int_t hitWheels50 = -1;
- Int_t hitWheels150 = -1;
- Int_t nStationUnclustered = -1;
- Int_t nThreshStation = -1;
- Int_t nThreshLowStation = -1;
- Int_t nThreshStationUnclustered = -1;
- Int_t nThreshLowStationUnclustered = -1;
-
- Double_t dPhi_tmp = 0.0;
- Double_t dPhiClusterMET = 0.0;
- Double_t dPhiClusterMET_max = -1.0;
- Double_t dPhi_min = 999.;
- Double_t dPhi_minTop4 = 999.;
- Double_t dPhi_min20 = 999.;
- Double_t dPhi_min30 = 999.;
- Double_t dPhi_min50 = 999.;
- Double_t clustSizeMax = 0.;
- Double_t dPhi_clust = 999.;
- Double_t jetPt_tmp = 0.0;
- Double_t jetPt_max = 0.0;
- Double_t jetDR_min = 0.0;
- Double_t muonPt_max = 0.0;
- Double_t muonDR_min = 0.0;
- Int_t jetDR_index = -1;
- Int_t muonDR_index = -1;
-
- vector muStatus = {};
- Double_t dR_tmp = 0.0;
- Int_t nMatched = 0;
- vector goodStatus = {1,44,51,52,91};
- vector rpcBx = {};
- vector rpcLayer = {};
- Int_t rpcSpread = 0;
- Float_t rpcMedian = 0;
-
- Int_t evtNum = 0;
- Bool_t goodEvt = false;
- Int_t itr_file = 0;
- Int_t goodJets = 0;
- Bool_t matchJet = false;
- Bool_t matchMuon = false;
- Int_t match = 0;
- Int_t matchLayer1 = 0;
- Int_t matchLayer2 = 0;
- Int_t matchLayer3 = 0;
- Int_t matchLayer4 = 0;
- Int_t matchHO = 0;
- Float_t sumE = 0;
- Float_t weightT = 0;
- Float_t totalSumE = 0;
-
- Bool_t passMuon = false;
- Bool_t passJet = false;
- Bool_t passMB1 = false;
- Bool_t passMB1_alt = false;
- Bool_t passMuon_alt = false;
- Bool_t passHO = false;
- Bool_t passInvertedJet = false;
- Bool_t passInvertedMuon = false;
- Bool_t passInvertedMuJet = false;
- Int_t nPassMuon = 0;
- Int_t nPassMuon_std = 0;
- Int_t nPassMB1_std = 0;
- Int_t nPassMuon_alt = 0;
- Int_t nPassMB1_alt = 0;
- Int_t nPassJet = 0;
- Int_t nPassJetMuon = 0;
- Int_t nPassMB1 = 0;
- Int_t nPassHO = 0;
- Int_t nPassJetMuon_std = 0;
- Int_t nPassJetMB1_std = 0;
- Int_t nPassFull = 0;
- Int_t nPassFull_std = 0;
- Int_t nPassFull_altMuon = 0;
- Int_t nPassFull_altMB1 = 0;
- Int_t nPassFull_altMuonMB1 = 0;
- Int_t nPassFullPlus = 0;
- Int_t nPassFullPlus_rpcCR = 0;
- Int_t nPassFullMinus = 0;
- Int_t nPassFullDT = 0;
- Int_t nPassFullDTPlus_noMuon = 0;
- Int_t nPassFullDTPlus_noMB1 = 0;
- Int_t nPassFullDTPlus_std = 0;
- Int_t nPassFullDTPlus_altMuon = 0;
- Int_t nPassFullDTPlus_altMB1 = 0;
- Int_t nPassFullDTPlus_altMuonMB1 = 0;
- Int_t nPassFullHO = 0;
- Int_t nPassNone = 0;
- Int_t totalClusteredNone = 0;
- Int_t totalClusteredJet = 0;
- Int_t totalClusteredMB1 = 0;
- Int_t totalClusteredNoMB1 = 0;
- Int_t totalClusteredHO = 0;
- Int_t totalClusteredFull = 0;
- Int_t totalClusteredFullHO = 0;
-
- Int_t totalClusteredFullPlus = 0;
- Int_t totalClusteredFullHOPlus = 0;
-
- Int_t nPassMET = 0;
- Int_t nPassDecayDT = 0;
- Int_t nPassDecayHO = 0;
- Bool_t failJetMET = false;
- Bool_t failJetMET_20 = false;
- Bool_t failJetMET_30 = false;
- Bool_t failJetMET_50 = false;
- Bool_t failJetMET_top4 = false;
- Int_t nPassJetMET = 0;
- Int_t nFailJetMET = 0;
- Int_t nFailJetMET_top4 = 0;
- Int_t nFailJetMET_20 = 0;
- Int_t nFailJetMET_30 = 0;
- Int_t nFailJetMET_50 = 0;
- Int_t nPassCluster = 0;
- Int_t nPassMaxStation_dt = 0;
- Int_t nPassDeltaPhi_dt = 0;
- Int_t nPassRPCMatch_dt = 0;
- Int_t nPassRPCSpread_dt = 0;
- Int_t nPassDeltaPhi_ho = 0;
- Int_t nPassRPCMatch_ho = 0;
- Int_t nPassRPCSpread_ho = 0;
-
- ofstream eventList;
- eventList.open("events/fullHOVetoPlusEvents.txt");
-
- for(Int_t itr_year=0; itr_year<3; itr_year++){
- sprintf(name,"h_jetMet_dPhiMin4_%s",years[itr_year]);
- h_jetMet_dPhiMin4[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_%s",years[itr_year]);
- h_dPhiJetMET[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_noVeto_%s",years[itr_year]);
- h_dPhiJetMET_noVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_jetVeto_%s",years[itr_year]);
- h_dPhiJetMET_jetVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_muonVeto_%s",years[itr_year]);
- h_dPhiJetMET_muonVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_MB1Veto_%s",years[itr_year]);
- h_dPhiJetMET_MB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_noMB1Veto_%s",years[itr_year]);
- h_dPhiJetMET_noMB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_fullVeto_%s",years[itr_year]);
- h_dPhiJetMET_fullVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_fullHOVeto_%s",years[itr_year]);
- h_dPhiJetMET_fullHOVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_MET_%s",years[itr_year]);
- h_MET[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_jetPt_%s",years[itr_year]);
- h_jetPt[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nDtRechitClusters_noVeto_%s",years[itr_year]);
- h_nDtRechitClusters_noVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_noVeto_%s",years[itr_year]);
- h_dtRechitClusterSize_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_noVeto_%s",years[itr_year]);
- h_nTotalClusteredRechits_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_noVeto_%s",years[itr_year]);
- h_dtRechitClusterMaxStation_noVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_noVeto_%s",years[itr_year]);
- h_dtRechitClusterNStation_noVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_noVeto_%s",years[itr_year]);
- h_dPhiClusterMET_noVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_noVeto_%s",years[itr_year]);
- h_dtRechitClusterXSpread_noVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_noVeto_%s",years[itr_year]);
- h_dtRechitClusterYSpread_noVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_noVeto_%s",years[itr_year]);
- h_dtRechitClusterZSpread_noVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_noVeto_%s",years[itr_year]);
- h_dtRechitClusterEtaSpread_noVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_noVeto_%s",years[itr_year]);
- h_dtRechitClusterPhiSpread_noVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_noVeto_%s",years[itr_year]);
- h_RPCMatchedBx_noVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_noVeto_%s",years[itr_year]);
- h_nRPCMatched_noVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_noVeto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_noVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_noVeto_%s",years[itr_year]);
- h_RPCMatchedBx_Spread0_noVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_noVeto_%s",years[itr_year]);
- h_nRPCMatched_Spread0_noVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_muonVeto_%s",years[itr_year]);
- h_nDtRechitClusters_muonVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterSize_muonVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_muonVeto_%s",years[itr_year]);
- h_nTotalClusteredRechits_muonVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterMaxStation_muonVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterNStation_muonVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_muonVeto_%s",years[itr_year]);
- h_dPhiClusterMET_muonVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterXSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterYSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterZSpread_muonVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterEtaSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_muonVeto_%s",years[itr_year]);
- h_dtRechitClusterPhiSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_muonVeto_%s",years[itr_year]);
- h_RPCMatchedBx_muonVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_muonVeto_%s",years[itr_year]);
- h_nRPCMatched_muonVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_muonVeto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_muonVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_muonVeto_%s",years[itr_year]);
- h_RPCMatchedBx_Spread0_muonVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_muonVeto_%s",years[itr_year]);
- h_nRPCMatched_Spread0_muonVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_jetVeto_%s",years[itr_year]);
- h_nDtRechitClusters_jetVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterSize_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_jetVeto_%s",years[itr_year]);
- h_nTotalClusteredRechits_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterMaxStation_jetVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterNStation_jetVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_jetVeto_%s",years[itr_year]);
- h_dPhiClusterMET_jetVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterXSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterYSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterZSpread_jetVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterEtaSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_jetVeto_%s",years[itr_year]);
- h_dtRechitClusterPhiSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_jetVeto_%s",years[itr_year]);
- h_RPCMatchedBx_jetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_jetVeto_%s",years[itr_year]);
- h_nRPCMatched_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer1_jetVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer1_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer2_jetVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer2_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer3_jetVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer3_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer4_jetVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer4_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer1_fullHOVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer1_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer2_fullHOVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer2_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer3_fullHOVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer3_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedLayer4_fullHOVeto_%s",years[itr_year]);
- h_nRPCMatchedLayer4_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_RPCMatchedBxSpread_jetVeto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_jetVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_jetVeto_%s",years[itr_year]);
- h_RPCMatchedBx_Spread0_jetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_jetVeto_%s",years[itr_year]);
- h_nRPCMatched_Spread0_jetVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_MB1Veto_%s",years[itr_year]);
- h_nDtRechitClusters_MB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterSize_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_MB1Veto_%s",years[itr_year]);
- h_nTotalClusteredRechits_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_noMB1Veto_%s",years[itr_year]);
- h_nTotalClusteredRechits_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterMaxStation_MB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterNStation_MB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_MB1Veto_%s",years[itr_year]);
- h_dPhiClusterMET_MB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterXSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterYSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterZSpread_MB1Veto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterEtaSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_MB1Veto_%s",years[itr_year]);
- h_dtRechitClusterPhiSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_MB1Veto_%s",years[itr_year]);
- h_RPCMatchedBx_MB1Veto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_MB1Veto_%s",years[itr_year]);
- h_nRPCMatched_MB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_MB1Veto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_MB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_MB1Veto_%s",years[itr_year]);
- h_RPCMatchedBx_Spread0_MB1Veto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_MB1Veto_%s",years[itr_year]);
- h_nRPCMatched_Spread0_MB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_fullVeto_%s",years[itr_year]);
- h_nDtRechitClusters_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterSize_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_fullVeto_%s",years[itr_year]);
- h_nTotalClusteredRechits_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterMaxStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterMaxStation_fullHOVeto_%s",years[itr_year]);
- h_dtRechitClusterMaxStation_fullHOVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStationUnclustered_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNStationUnclustered_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshStation_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNThreshStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshLowStation_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNThreshLowStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshStationUnclustered_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNThreshStationUnclustered_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshLowStationUnclustered_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNThreshLowStationUnclustered_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_fullVeto_%s",years[itr_year]);
- h_dPhiClusterMET_fullVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiClusterMET_fullHOVeto_%s",years[itr_year]);
- h_dPhiClusterMET_fullHOVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterXSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterYSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterZSpread_fullVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterEtaSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterPhiSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_fullVeto_%s",years[itr_year]);
- h_RPCMatchedBx_fullVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_fullVeto_%s",years[itr_year]);
- h_nRPCMatched_fullVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatched_fullHOVeto_%s",years[itr_year]);
- h_nRPCMatched_fullHOVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_fullVeto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_fullVeto[itr_file] = new TH1D(name,"",10,0,10);
-
- sprintf(name,"h_RPCMatchedBxSpread_fullHOVeto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_fullHOVeto[itr_file] = new TH1D(name,"",10,0,10);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_fullVeto_%s",years[itr_year]);
- h_RPCMatchedBx_Spread0_fullVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_fullVeto_%s",years[itr_year]);
- h_nRPCMatched_Spread0_fullVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_dtRechitClusterEta_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterEta_fullVeto[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_dtRechitClusterPhi_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterPhi_fullVeto[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterR_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterR_fullVeto[itr_file] = new TH1D(name,"",40,0,800);
-
- sprintf(name,"h_dtRechitClusterZ_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterZ_fullVeto[itr_file] = new TH1D(name,"",120,-600,600);
-
- sprintf(name,"h_dtRechitClusterRZ_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterRZ_fullVeto[itr_file] = new TH2D(name,"",120,-600,600,40,400,800);
-
- sprintf(name,"h_dtRechitClusterRZFine_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterRZFine_fullVeto[itr_file] = new TH2D(name,"",1200,-600,600,400,400,800);
-
- sprintf(name,"h_dtRechitClusterEtaPhi_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterEtaPhi_fullVeto[itr_file] = new TH2D(name,"",16,-2,2,70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterEtaPhiFine_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterEtaPhiFine_fullVeto[itr_file] = new TH2D(name,"",16,-2,2,140,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterNWheels50_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNWheels50_fullVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitClusterNWheels25_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNWheels25_fullVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitClusterNWheels1_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterNWheels1_fullVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitClusterMaxWheel_fullVeto_%s",years[itr_year]);
- h_dtRechitClusterMaxWheel_fullVeto[itr_file] = new TH1D(name,"",6,-3,3);
-
- sprintf(name,"h_npv_nDtRechitClusters_fullVeto_%s",years[itr_year]);
- h_npv_nDtRechitClusters_fullVeto[itr_file] = new TH2D(name,"",50,0,100,5,0,5);
-
- sprintf(name,"h_nHOMatched_fullVeto_%s",years[itr_year]);
- h_nHOMatched_fullVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_HOMatchedEnergy_fullVeto_%s",years[itr_year]);
- h_HOMatchedEnergy_fullVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOMatchedTime_fullVeto_%s",years[itr_year]);
- h_HOMatchedTime_fullVeto[itr_file] = new TH1D(name,"",60,-60,60);
-
- sprintf(name,"h_HOMatchedTime_RPCMatchedBx_fullVeto_%s",years[itr_year]);
- h_HOMatchedTime_RPCMatchedBx_fullVeto[itr_file] = new TH2D(name,"",60,-60,60,13,-6.5,6.5);
-
- sprintf(name,"h_nHOMatched_invertedJetVeto_%s",years[itr_year]);
- h_nHOMatched_invertedJetVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_HOMatchedEnergy_invertedJetVeto_%s",years[itr_year]);
- h_HOMatchedEnergy_invertedJetVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOMatchedTime_invertedJetVeto_%s",years[itr_year]);
- h_HOMatchedTime_invertedJetVeto[itr_file] = new TH1D(name,"",60,-60,60);
-
- sprintf(name,"h_HOMatchedTime_RPCMatchedBx_invertedJetVeto_%s",years[itr_year]);
- h_HOMatchedTime_RPCMatchedBx_invertedJetVeto[itr_file] = new TH2D(name,"",60,-60,60,13,-6.5,6.5);
-
- sprintf(name,"h_nHOMatched_noMB1Veto_%s",years[itr_year]);
- h_nHOMatched_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_HOMatchedEnergy_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedEnergy_noMB1Veto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOMatchedEnergyCluster280_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedEnergyCluster280_noMB1Veto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOMatchedTime_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedTime_noMB1Veto[itr_file] = new TH1D(name,"",60,-60,60);
-
- sprintf(name,"h_HOMatchedTime_RPCMatchedBx_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedTime_RPCMatchedBx_noMB1Veto[itr_file] = new TH2D(name,"",60,-60,60,13,-6.5,6.5);
-
- sprintf(name,"h_nHOMatched_invertedJet_noMB1Veto_%s",years[itr_year]);
- h_nHOMatched_invertedJet_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_HOMatchedEnergy_invertedJet_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedEnergy_invertedJet_noMB1Veto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOMatchedTime_invertedJet_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedTime_invertedJet_noMB1Veto[itr_file] = new TH1D(name,"",60,-60,60);
-
- sprintf(name,"h_HOMatchedTime_RPCMatchedBx_invertedJet_noMB1Veto_%s",years[itr_year]);
- h_HOMatchedTime_RPCMatchedBx_invertedJet_noMB1Veto[itr_file] = new TH2D(name,"",60,-60,60,13,-6.5,6.5);
-
- sprintf(name,"h_npv_nDtRechitClusters_noVeto_%s",years[itr_year]);
- h_npv_nDtRechitClusters_noVeto[itr_file] = new TH2D(name,"",50,0,100,5,0,5);
-
- sprintf(name,"h_RPCMatchedBx_invertedJetVeto_%s",years[itr_year]);
- h_RPCMatchedBx_invertedJetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_RPCMatchedBx_invertedMuonVeto_%s",years[itr_year]);
- h_RPCMatchedBx_invertedMuonVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_RPCMatchedBx_invertedMuJetVeto_%s",years[itr_year]);
- h_RPCMatchedBx_invertedMuJetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_dtRechitClusterSize_noMB1Veto_%s",years[itr_year]);
- h_dtRechitClusterSize_noMB1Veto[itr_file] = new TH1D(name,"",50,0,500);
-
- sprintf(name,"h_dtRechitClusterNStation_noMB1Veto_%s",years[itr_year]);
- h_dtRechitClusterNStation_noMB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNRechitsMB1_noMB1Veto_%s",years[itr_year]);
- h_dtRechitClusterNRechitsMB1_noMB1Veto[itr_file] = new TH1D(name,"",50,0,500);
-
- sprintf(name,"h_dtRechitClusterPercentRechitsMB1_noMB1Veto_%s",years[itr_year]);
- h_dtRechitClusterPercentRechitsMB1_noMB1Veto[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_nRPCMatched_noMB1Veto_%s",years[itr_year]);
- h_nRPCMatched_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedLayer1_noMB1Veto_%s",years[itr_year]);
- h_nRPCMatchedLayer1_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedLayer2_noMB1Veto_%s",years[itr_year]);
- h_nRPCMatchedLayer2_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedLayer12_noMB1Veto_%s",years[itr_year]);
- h_nRPCMatchedLayer12_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_noMB1Veto_%s",years[itr_year]);
- h_RPCMatchedBxSpread_noMB1Veto[itr_file] = new TH1D(name,"",10,0,10);
-
- sprintf(name,"h_dtRechitClusterSize_HOVeto_%s",years[itr_year]);
- h_dtRechitClusterSize_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_fullHOVeto_%s",years[itr_year]);
- h_dtRechitClusterSize_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_HOVeto_%s",years[itr_year]);
- h_nTotalClusteredRechits_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_fullHOVeto_%s",years[itr_year]);
- h_nTotalClusteredRechits_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_fullVetoPlus_%s",years[itr_year]);
- h_nTotalClusteredRechits_fullVetoPlus[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_fullHOVetoPlus_%s",years[itr_year]);
- h_nTotalClusteredRechits_fullHOVetoPlus[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterXSpread_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterXSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterYSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterZSpread_fullVetoPlus[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterEtaSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterPhiSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterEta_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterEta_fullVetoPlus[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_dtRechitClusterPhi_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterPhi_fullVetoPlus[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterEtaPhi_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterEtaPhi_fullVetoPlus[itr_file] = new TH2D(name,"",70,-3.5,3.5,60,-3,3);
-
- sprintf(name,"h_dtRechitClusterNStation_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterNStation_fullVetoPlus[itr_file] = new TH1D(name,"",4,0,4);
-
- sprintf(name,"h_dtRechitClusterNWheel_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterNWheel_fullVetoPlus[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNWheel_fullHOVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterNWheel_fullHOVetoPlus[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSizeRatio_fullVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterSizeRatio_fullVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_dtRechitClusterSizeRatio_fullVetoMinus_%s",years[itr_year]);
- h_dtRechitClusterSizeRatio_fullVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_dtRechitClusterEta_fullHOVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterEta_fullHOVetoPlus[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_dtRechitClusterPhi_fullHOVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterPhi_fullHOVetoPlus[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterEtaPhi_fullHOVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterEtaPhi_fullHOVetoPlus[itr_file] = new TH2D(name,"",70,-3.5,3.5,60,-3,3);
-
- sprintf(name,"h_dtRechitClusterNStation_fullHOVetoPlus_%s",years[itr_year]);
- h_dtRechitClusterNStation_fullHOVetoPlus[itr_file] = new TH1D(name,"",4,0,4);
-
- sprintf(name,"h_dtRechitClusterSize_RPCMatch_%s",years[itr_year]);
- h_dtRechitClusterSize_RPCMatch[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_RPCSpread0_%s",years[itr_year]);
- h_dtRechitClusterSize_RPCSpread0[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_HOTime_fullHOVeto_%s",years[itr_year]);
- h_HOTime_fullHOVeto[itr_file] = new TH1D(name,"",60,-60,60);
-
- sprintf(name,"h_muonPt_jetMB1Veto_%s",years[itr_year]);
- h_muonPt_jetMB1Veto[itr_file] = new TH1D(name,"",50,0,100);
-
- sprintf(name,"h_jetPt_muonMB1Veto_%s",years[itr_year]);
- h_jetPt_muonMB1Veto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_MB1Rechits_jetMuonVeto_%s",years[itr_year]);
- h_MB1Rechits_jetMuonVeto[itr_file] = new TH1D(name,"",200,0,200);
-
- sprintf(name,"h_muonPt_jetHOVeto_%s",years[itr_year]);
- h_muonPt_jetHOVeto[itr_file] = new TH1D(name,"",50,0,100);
-
- sprintf(name,"h_jetPt_muonHOVeto_%s",years[itr_year]);
- h_jetPt_muonHOVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOEnergy_jetMuonVeto_%s",years[itr_year]);
- h_HOEnergy_jetMuonVeto[itr_file] = new TH1D(name,"",40,0,200);
-
- sprintf(name,"h_HOEnergy_jetVeto_%s",years[itr_year]);
- h_HOEnergy_jetVeto[itr_file] = new TH1D(name,"",40,0,200);
-
- sprintf(name,"h_muonDR_fullVeto_%s",years[itr_year]);
- h_muonDR_fullVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_RPCMatch_%s",years[itr_year]);
- h_muonDR_RPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_RPCSpread0_%s",years[itr_year]);
- h_muonDR_RPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_fullVeto_%s",years[itr_year]);
- h_jetDR_fullVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_RPCMatch_%s",years[itr_year]);
- h_jetDR_RPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_RPCSpread0_%s",years[itr_year]);
- h_jetDR_RPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_fullHOVeto_%s",years[itr_year]);
- h_muonDR_fullHOVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_HORPCMatch_%s",years[itr_year]);
- h_muonDR_HORPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_HORPCSpread0_%s",years[itr_year]);
- h_muonDR_HORPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_fullHOVeto_%s",years[itr_year]);
- h_jetDR_fullHOVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_HORPCMatch_%s",years[itr_year]);
- h_jetDR_HORPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_HORPCSpread0_%s",years[itr_year]);
- h_jetDR_HORPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetDR_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetPt_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetPt_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetEta_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetEta_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_jetPhi_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetPhi_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetMuonEnergyFraction_minDR_fullHOVetoPlus_%s",years[itr_year]);
- h_jetMuonEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetDR_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetDR_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetPt_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetPt_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetEta_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetEta_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_jetPhi_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetPhi_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_jetChargedEMEnergyFraction_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetChargedEMEnergyFraction_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralEMEnergyFraction_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetNeutralEMEnergyFraction_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetChargedHadronEnergyFraction_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetChargedHadronEnergyFraction_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetMuonEnergyFraction_minDR_fullHOVetoMinus_%s",years[itr_year]);
- h_jetMuonEnergyFraction_minDR_fullHOVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetDR_minDR_vetoJet_%s",years[itr_year]);
- h_jetDR_minDR_vetoJet[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetPt_minDR_vetoJet_%s",years[itr_year]);
- h_jetPt_minDR_vetoJet[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetEta_minDR_vetoJet_%s",years[itr_year]);
- h_jetEta_minDR_vetoJet[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_jetPhi_minDR_vetoJet_%s",years[itr_year]);
- h_jetPhi_minDR_vetoJet[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_jetChargedEMEnergyFraction_minDR_vetoJet_%s",years[itr_year]);
- h_jetChargedEMEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralEMEnergyFraction_minDR_vetoJet_%s",years[itr_year]);
- h_jetNeutralEMEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetChargedHadronEnergyFraction_minDR_vetoJet_%s",years[itr_year]);
- h_jetChargedHadronEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralHadronEnergyFraction_minDR_vetoJet_%s",years[itr_year]);
- h_jetNeutralHadronEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetMuonEnergyFraction_minDR_vetoJet_%s",years[itr_year]);
- h_jetMuonEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_dPhiJetMET_noRPCMatch_nRechitsLow_%s",years[itr_year]);
- h_dPhiJetMET_noRPCMatch_nRechitsLow[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_noRPCMatch_nRechitsHigh_%s",years[itr_year]);
- h_dPhiJetMET_noRPCMatch_nRechitsHigh[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterSize_noRPCMatch_dPhiLow_%s",years[itr_year]);
- h_dtRechitClusterSize_noRPCMatch_dPhiLow[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_noRPCMatch_dPhiHigh_%s",years[itr_year]);
- h_dtRechitClusterSize_noRPCMatch_dPhiHigh[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nWheels1_noCluster_%s",years[itr_year]);
- h_nWheels1_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_noCluster_%s",years[itr_year]);
- h_nWheels10_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_noCluster_%s",years[itr_year]);
- h_nWheels20_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_noCluster_%s",years[itr_year]);
- h_nWheels30_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_noCluster_%s",years[itr_year]);
- h_nWheels50_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_noCluster_%s",years[itr_year]);
- h_nWheels150_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels1_noVeto_%s",years[itr_year]);
- h_nWheels1_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels1_fullVetoPlus_%s",years[itr_year]);
- h_nWheels1_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels1_fullVetoMinus_%s",years[itr_year]);
- h_nWheels1_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_noVeto_%s",years[itr_year]);
- h_nWheels10_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_fullVetoPlus_%s",years[itr_year]);
- h_nWheels10_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_fullVetoMinus_%s",years[itr_year]);
- h_nWheels10_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_noVeto_%s",years[itr_year]);
- h_nWheels20_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_fullVetoPlus_%s",years[itr_year]);
- h_nWheels20_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_fullVetoMinus_%s",years[itr_year]);
- h_nWheels20_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_noVeto_%s",years[itr_year]);
- h_nWheels30_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_fullVetoPlus_%s",years[itr_year]);
- h_nWheels30_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_fullVetoMinus_%s",years[itr_year]);
- h_nWheels30_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_noVeto_%s",years[itr_year]);
- h_nWheels50_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_fullVetoPlus_%s",years[itr_year]);
- h_nWheels50_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_fullVetoMinus_%s",years[itr_year]);
- h_nWheels50_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_noVeto_%s",years[itr_year]);
- h_nWheels150_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_fullVetoPlus_%s",years[itr_year]);
- h_nWheels150_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_fullVetoMinus_%s",years[itr_year]);
- h_nWheels150_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_jetPtMax_noVeto_%s",years[itr_year]);
- h_jetPtMax_noVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMax_fullVeto_%s",years[itr_year]);
- h_jetPtMax_fullVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMax_fullVetoPlus_%s",years[itr_year]);
- h_jetPtMax_fullVetoPlus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMax_fullVetoMinus_%s",years[itr_year]);
- h_jetPtMax_fullVetoMinus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_noVeto_%s",years[itr_year]);
- h_jetPtMET_noVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVeto_%s",years[itr_year]);
- h_jetPtMET_fullVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVetoPlus_%s",years[itr_year]);
- h_jetPtMET_fullVetoPlus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVetoMinus_%s",years[itr_year]);
- h_jetPtMET_fullVetoMinus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_noVeto_rpcCR_%s",years[itr_year]);
- h_jetPtMET_noVeto_rpcCR[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVeto_rpcCR_%s",years[itr_year]);
- h_jetPtMET_fullVeto_rpcCR[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVetoPlus_rpcCR_%s",years[itr_year]);
- h_jetPtMET_fullVetoPlus_rpcCR[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_dtRechitClusterPhiStation2_fullVeto_rpcCR_%s",years[itr_year]);
- h_dtRechitClusterPhiStation2_fullVeto_rpcCR[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterPhiStation3_fullVeto_rpcCR_%s",years[itr_year]);
- h_dtRechitClusterPhiStation3_fullVeto_rpcCR[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterPhiStation4_fullVeto_rpcCR_%s",years[itr_year]);
- h_dtRechitClusterPhiStation4_fullVeto_rpcCR[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- TFile *_file;
- if(strcmp(years[itr_year],"All")==0){
- _file = TFile::Open(dir+years[itr_year]+"/v4/v4/normalized/Run2_displacedJetMuonNtupler_V1p15_Data2016_Data2017_Data2018-HighMET_goodLumi.root");
- }
- else{
- _file = TFile::Open(dir+years[itr_year]+"/v5/normalized/Run2_displacedJetMuonNtupler_V1p15_Data"+years[itr_year]+"_"+runNames[itr_year]+"-HighMET-"+dates[itr_year]+"_goodLumi.root");
- }
-
- TTreeReader treeReader("MuonSystem",_file);
-
- TTreeReaderValue runNum(treeReader,"runNum");
- TTreeReaderValue lumiSec(treeReader,"lumiSec");
- TTreeReaderValue eventNum(treeReader,"evtNum");
- TTreeReaderValue npv(treeReader,"npv");
- TTreeReaderValue MET(treeReader,"met");
- TTreeReaderValue METphi(treeReader,"metPhi");
- TTreeReaderValue jetMet_dPhiMin4(treeReader,"jetMet_dPhiMin4");
-
- TTreeReaderValue nDtRechitClusters(treeReader,"nDtRechitClusters");
- TTreeReaderArray dtRechitClusterX(treeReader,"dtRechitClusterX");
- TTreeReaderArray dtRechitClusterY(treeReader,"dtRechitClusterY");
- TTreeReaderArray dtRechitClusterZ(treeReader,"dtRechitClusterZ");
- TTreeReaderArray dtRechitClusterPhi(treeReader,"dtRechitClusterPhi");
- TTreeReaderArray dtRechitClusterEta(treeReader,"dtRechitClusterEta");
- TTreeReaderArray dtRechitClusterXSpread(treeReader,"dtRechitClusterXSpread");
- TTreeReaderArray dtRechitClusterYSpread(treeReader,"dtRechitClusterYSpread");
- TTreeReaderArray dtRechitClusterZSpread(treeReader,"dtRechitClusterZSpread");
- TTreeReaderArray dtRechitClusterPhiSpread(treeReader,"dtRechitClusterPhiSpread");
- TTreeReaderArray dtRechitClusterEtaSpread(treeReader,"dtRechitClusterEtaSpread");
- TTreeReaderArray dtRechitClusterJetVetoPt(treeReader,"dtRechitClusterJetVetoPt");
- TTreeReaderArray dtRechitClusterMuonVetoPt(treeReader,"dtRechitClusterMuonVetoPt");
- TTreeReaderArray dtRechitClusterSize(treeReader,"dtRechitClusterSize");
- TTreeReaderArray dtRechitClusterNSegmentStation1(treeReader,"dtRechitClusterNSegmentStation1");
- TTreeReaderArray dtRechitClusterNSegmentStation2(treeReader,"dtRechitClusterNSegmentStation2");
- TTreeReaderArray dtRechitClusterNSegmentStation3(treeReader,"dtRechitClusterNSegmentStation3");
- TTreeReaderArray dtRechitClusterNSegmentStation4(treeReader,"dtRechitClusterNSegmentStation4");
- TTreeReaderArray dtRechitClusterMaxStation(treeReader,"dtRechitClusterMaxStation");
- TTreeReaderArray dtRechitClusterNStation(treeReader,"dtRechitClusterNStation");
- TTreeReaderArray dtRechitClusterMaxChamber(treeReader,"dtRechitClusterMaxChamber");
- TTreeReaderArray dtRechitClusterNChamber(treeReader,"dtRechitClusterNChamber");
-
- TTreeReaderValue nDtRechits(treeReader,"nDtRechits");
- TTreeReaderArray dtRechitX(treeReader,"dtRechitX");
- TTreeReaderArray dtRechitY(treeReader,"dtRechitY");
- TTreeReaderArray dtRechitZ(treeReader,"dtRechitZ");
- TTreeReaderArray dtRechitEta(treeReader,"dtRechitEta");
- TTreeReaderArray dtRechitPhi(treeReader,"dtRechitPhi");
- TTreeReaderArray dtRechitStation(treeReader,"dtRechitStation");
- TTreeReaderArray dtRechitWheel(treeReader,"dtRechitWheel");
-
- TTreeReaderValue nJets(treeReader,"nJets");
- TTreeReaderArray jetPt(treeReader,"jetPt");
- TTreeReaderArray jetEta(treeReader,"jetEta");
- TTreeReaderArray jetPhi(treeReader,"jetPhi");
- TTreeReaderArray jetChargedEMEnergyFraction(treeReader,"jetChargedEMEnergyFraction");
- TTreeReaderArray jetNeutralEMEnergyFraction(treeReader,"jetNeutralEMEnergyFraction");
- TTreeReaderArray jetNeutralHadronEnergyFraction(treeReader,"jetNeutralHadronEnergyFraction");
- TTreeReaderArray jetChargedHadronEnergyFraction(treeReader,"jetChargedHadronEnergyFraction");
- //TTreeReaderArray jetMuonEnergyFraction(treeReader,"jetMuonEnergyFraction");
-
- TTreeReaderValue nLeptons(treeReader,"nLeptons");
- TTreeReaderArray lepPassLooseIso(treeReader,"lepPassLooseIso");
- TTreeReaderValue nMuons(treeReader,"nMuons");
- TTreeReaderArray muonEta(treeReader,"muonEta");
- TTreeReaderArray muonPhi(treeReader,"muonPhi");
- TTreeReaderArray muonPt(treeReader,"muonPt");
-
- TTreeReaderValue nRPCRechits(treeReader,"nRpc");
- TTreeReaderArray RPCRechitX(treeReader,"rpcX");
- TTreeReaderArray RPCRechitY(treeReader,"rpcY");
- TTreeReaderArray RPCRechitZ(treeReader,"rpcZ");
- TTreeReaderArray RPCRechitPhi(treeReader,"rpcPhi");
- TTreeReaderArray RPCRechitBx(treeReader,"rpcBx");
-
- TTreeReaderValue nHORechits(treeReader,"nHORechits");
- TTreeReaderArray HORechitE(treeReader,"hoRechit_E");
- TTreeReaderArray HORechitT(treeReader,"hoRechit_T");
- TTreeReaderArray HORechitEta(treeReader,"hoRechit_Eta");
- TTreeReaderArray HORechitPhi(treeReader,"hoRechit_Phi");
-
- _ofile->cd();
- evtNum = 0;
- cout << "Data" << years[itr_year] << endl;
- while(treeReader.Next()){
- fill_n(rechitCount, 5, 0);
- hitWheels1 = 0;
- hitWheels10 = 0;
- hitWheels20 = 0;
- hitWheels30 = 0;
- hitWheels50 = 0;
- hitWheels150 = 0;
- goodEvt = false;
- clustSizeMax = 0.;
- failJetMET = false;
- failJetMET_20 = false;
- failJetMET_30 = false;
- failJetMET_50 = false;
- failJetMET_top4 = false;
- dPhi_min = 999.;
- dPhi_minTop4 = 999.;
- dPhi_min20 = 999.;
- dPhi_min30 = 999.;
- dPhi_min50 = 999.;
- jetPt_tmp = 0.0;
- nPassMuon = 0;
- nPassJet = 0;
- nPassJetMuon = 0;
- nPassMB1 = 0;
- nPassHO = 0;
- nPassFull = 0;
- nPassFullPlus = 0;
- nPassFullMinus = 0;
- //nPassFullHO = 0;
- nPassNone = 0;
- totalSumE = 0.0;
- totalClusteredNone = 0;
- totalClusteredJet = 0;
- totalClusteredMB1 = 0;
- totalClusteredNoMB1 = 0;
- totalClusteredHO = 0;
- totalClusteredFull = 0;
- totalClusteredFullHO = 0;
- totalClusteredFullPlus = 0;
- totalClusteredFullHOPlus = 0;
- if(evtNum%100000==0){ cout << evtNum << " of " << treeReader.GetEntries(1) << endl; }
-
- if(*MET > 200){
- nPassMET+=1;
- h_jetMet_dPhiMin4[itr_file]->Fill(*jetMet_dPhiMin4);
- dPhiClusterMET_max = -1.;
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
- if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
- }
- if(*nJets>0){
- goodJets=0;
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(fabs(jetEta[itr_jet])<3.0){
- dPhi_tmp = jetPhi[itr_jet] - *METphi;
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp) < dPhi_min){
- dPhi_min = fabs(dPhi_tmp);
- jetPt_tmp = jetPt[itr_jet];
- if(goodJets<4){ dPhi_minTop4 = fabs(dPhi_tmp); }
- if(jetPt[itr_jet]>50.0){ dPhi_min50 = fabs(dPhi_tmp); }
- if(jetPt[itr_jet]>30.0){ dPhi_min30 = fabs(dPhi_tmp); }
- if(jetPt[itr_jet]>20.0){ dPhi_min20 = fabs(dPhi_tmp); }
- }
- goodJets+=1;
- //if(goodJets==4){ break; }
- }
- }
- }
- if(fabs(dPhi_min)>0.6 && fabs(dPhi_min)<999.){ failJetMET += true; }
- if(fabs(dPhi_minTop4)>0.6 && fabs(dPhi_minTop4)<999.){ failJetMET_top4 += true; }
- if(fabs(dPhi_min50)>0.6 && fabs(dPhi_min50)<999.){ failJetMET_50 += true; }
- if(fabs(dPhi_min30)>0.6 && fabs(dPhi_min30)<999.){ failJetMET_30 += true; }
- if(fabs(dPhi_min20)>0.6 && fabs(dPhi_min20)<999.){ failJetMET_20 += true; }
-
- dPhi_min=dPhi_minTop4;
- if(dPhi_min!=999.){ h_dPhiJetMET[itr_file]->Fill(fabs(dPhi_min)); }
- if(fabs(dPhi_min)<0.6){
- //if(fabs(dPhiClusterMET_max)>1.0){
- nPassJetMET+=1;
- h_MET[itr_file]->Fill(*MET);
- h_jetPt[itr_file]->Fill(jetPt_tmp);
- //cout << "starting counting";
- //for(int i=0; i=0 && rechitWheel<5){
- rechitCount[rechitWheel] += 1;
- }
- }
- }
- else{
- fill_n(rechitCount, 5, 150);
- }
- //cout << "done counting";
- //for(int i=0; i 0){ hitWheels1 += 1; }
- if(rechitCount[itr_wheel] > 9){ hitWheels10 += 1; }
- if(rechitCount[itr_wheel] > 19){ hitWheels20 += 1; }
- if(rechitCount[itr_wheel] > 29){ hitWheels30 += 1; }
- if(rechitCount[itr_wheel] > 49){ hitWheels50 += 1; }
- if(rechitCount[itr_wheel] > 149){ hitWheels150 += 1; }
- }
- h_nWheels1_noCluster[itr_file]->Fill(hitWheels1);
- h_nWheels10_noCluster[itr_file]->Fill(hitWheels10);
- h_nWheels20_noCluster[itr_file]->Fill(hitWheels20);
- h_nWheels30_noCluster[itr_file]->Fill(hitWheels30);
- h_nWheels50_noCluster[itr_file]->Fill(hitWheels50);
- h_nWheels150_noCluster[itr_file]->Fill(hitWheels150);
-
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- match = 0;
- matchLayer1 = 0;
- matchLayer2 = 0;
- matchLayer3 = 0;
- matchLayer4 = 0;
- fill_n(stationCount, 4, 0);
- nStationUnclustered = 0;
- nThreshStation = 0;
- nThreshLowStation = 0;
- nThreshStationUnclustered = 0;
- nThreshLowStationUnclustered = 0;
- matchHO = 0;
- sumE = 0.0;
- weightT = 0.0;
- rpcBx.clear();
- rpcLayer.clear();
- matchJet = false;
- matchMuon = false;
- goodEvt = true;
- passMuon = false;
- passJet = false;
- passMB1 = false;
- passMB1_alt = false;
- passMuon_alt = false;
- passHO = false;
- passInvertedJet = false;
- passInvertedMuon = false;
- passInvertedMuJet = false;
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
-
- /*passJet = true;
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(jetPt[itr_jet]>20.){
- dPhi_tmp = RPCRechitPhi[itr_jet] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr_jet]-dtRechitClusterEta[itr_clust],2))<0.5){
- passJet = false;
- break;
- }
- }
- }
- if(!passJet){ passInvertedJet = true; }
- */
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- else{ passInvertedJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- else{ passInvertedMuon = true; }
- if(dtRechitClusterNSegmentStation1[itr_clust]==0){ passMB1 = true; }
-
- passMB1_alt = true;
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- if(sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))>400. && sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))<480.){
- dPhi_tmp = dtRechitPhi[itr_dt] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(dtRechitEta[itr_dt]-dtRechitClusterEta[itr_clust],2))<0.4){
- passMB1_alt = false;
- break;
- }
- }
- }
- passMuon_alt = true;
- for(Int_t itr_lep = 0; itr_lep<*nLeptons; itr_lep++){
- if(lepPassLooseIso[itr_lep]){
- passMuon_alt = false;
- break;
- }
- }
- //if(*nLeptons==0){ passMuon_alt = true; }
-
- if(dtRechitClusterSize[itr_clust]>50 && ((dtRechitClusterPhi[itr_clust]<0.4 || dtRechitClusterPhi[itr_clust]>0.6) || (*runNum<275.75e3 || *runNum>275.95e3))){
-
- nPassNone+=1;
- totalClusteredNone+=dtRechitClusterSize[itr_clust];
-
- for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
- dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(RPCRechitZ[itr_rpc] - dtRechitClusterZ[itr_clust])<5. && fabs(dPhi_tmp)<0.4){
- match+=1;
- rpcBx.push_back(RPCRechitBx[itr_rpc]);
- rpcLayer.push_back(getRPCLayer(RPCRechitX[itr_rpc],RPCRechitY[itr_rpc]));
- }
- }
- if(!rpcLayer.empty()){
- for(Int_t itr = 0; itr12){ nThreshStation+=1; }
- if(dtRechitClusterNSegmentStation3[itr_clust]>12){ nThreshStation+=1; }
- if(dtRechitClusterNSegmentStation4[itr_clust]>8){ nThreshStation+=1; }
-
- if(dtRechitClusterNSegmentStation2[itr_clust]>4){ nThreshLowStation+=1; }
- if(dtRechitClusterNSegmentStation3[itr_clust]>4){ nThreshLowStation+=1; }
- if(dtRechitClusterNSegmentStation4[itr_clust]>2){ nThreshLowStation+=1; }
-
- for(Int_t itr_ho = 0; itr_ho<*nHORechits; itr_ho++){
- dPhi_tmp = HORechitPhi[itr_ho] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(HORechitEta[itr_ho]-dtRechitClusterEta[itr_clust],2))<0.5){
- matchHO+=1;
- sumE += HORechitE[itr_ho];
- weightT += HORechitT[itr_ho]*HORechitE[itr_ho];
- }
- }
- if(passJet){
- h_HOEnergy_jetVeto[itr_file]->Fill(sumE);
- }
- if(sumE>40.){ passHO = true; }
-
- muonPt_max = 0.0;
- muonDR_min = 999.0;
- for(Int_t itr=0; itr<*nMuons; itr++){
- dPhi_tmp = muonPhi[itr] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(muonEta[itr]-dtRechitClusterEta[itr_clust],2))<0.4){
- if(muonPt[itr]>muonPt_max){
- muonPt_max=muonPt[itr];
- }
- }
- if(muonPt[itr]>10.&&sqrt(pow(dPhi_tmp,2)+pow(muonEta[itr]-dtRechitClusterEta[itr_clust],2)) TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2))<0.4){
- if(jetPt[itr]>jetPt_max){
- jetPt_max=jetPt[itr];
- }
- }
- if(jetPt[itr]>20.&&sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2))Fill(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2)));
- h_jetPt_minDR_vetoJet[itr_file]->Fill(jetPt[itr]);
- h_jetEta_minDR_vetoJet[itr_file]->Fill(jetEta[itr]);
- h_jetPhi_minDR_vetoJet[itr_file]->Fill(jetPhi[itr]);
- h_jetChargedEMEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetChargedEMEnergyFraction[itr]);
- h_jetNeutralEMEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetNeutralEMEnergyFraction[itr]);
- h_jetChargedHadronEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetChargedHadronEnergyFraction[itr]);
- h_jetNeutralHadronEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetNeutralHadronEnergyFraction[itr]);
- //h_jetMuonEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetMuonEnergyFraction[itr]);
- }
- }
-
- h_dtRechitClusterSize_noVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_noVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_noVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_noVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_noVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_noVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_noVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_noVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_noVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_noVeto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_noVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_noVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_noVeto[itr_file]->Fill(match); }
- }
-
- if(passMuon){
- nPassMuon+=1;
- h_dtRechitClusterSize_muonVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_muonVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_muonVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_muonVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_muonVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_muonVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_muonVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_muonVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_muonVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_muonVeto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_muonVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_muonVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_muonVeto[itr_file]->Fill(match); }
- }
- }
-
- if(passJet){
- nPassJet+=1;
- totalClusteredJet+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_jetVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_jetVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_jetVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_jetVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_jetVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_jetVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_jetVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_jetVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_jetVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_jetVeto[itr_file]->Fill(match);
-
- h_nRPCMatchedLayer1_jetVeto[itr_file]->Fill(matchLayer1);
- h_nRPCMatchedLayer2_jetVeto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedLayer3_jetVeto[itr_file]->Fill(matchLayer3);
- h_nRPCMatchedLayer4_jetVeto[itr_file]->Fill(matchLayer4);
-
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_jetVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_jetVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_jetVeto[itr_file]->Fill(match); }
- }
- }
-
- if(passMB1){
- nPassMB1+=1;
- totalClusteredMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_MB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_MB1Veto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_MB1Veto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_MB1Veto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_MB1Veto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_MB1Veto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_MB1Veto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_MB1Veto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_MB1Veto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_MB1Veto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_MB1Veto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_MB1Veto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_MB1Veto[itr_file]->Fill(match); }
- }
- }
-
- /* if(!passMB1){
- if(!rpcBx.empty()){
- if(rpcBx.size()%2 == 0){ rpcMedian = float(rpcBx[rpcBx.size()/2 - 1] + rpcBx[rpcBx.size()/2]) / 2.0; }
- else{ rpcMedian = rpcBx[rpcBx.size()/2]; }
- }
- h_nHOMatched_noMB1Veto[itr_file]->Fill(matchHO);
- if(sumE>20.){
- h_HOMatchedEnergy_noMB1Veto[itr_file]->Fill(sumE);
- h_HOMatchedTime_noMB1Veto[itr_file]->Fill(weightT/sumE);
- if(!rpcBx.empty()){
- h_HOMatchedTime_RPCMatchedBx_noMB1Veto[itr_file]->Fill(weightT/sumE,rpcMedian);
- }
- }
- }*/
-
- if(passInvertedJet && !passMB1){
- if(!rpcBx.empty()){
- if(rpcBx.size()%2 == 0){ rpcMedian = float(rpcBx[rpcBx.size()/2 - 1] + rpcBx[rpcBx.size()/2]) / 2.0; }
- else{ rpcMedian = rpcBx[rpcBx.size()/2]; }
- }
- h_nHOMatched_invertedJet_noMB1Veto[itr_file]->Fill(matchHO);
- if(sumE>20.){
- h_HOMatchedEnergy_invertedJet_noMB1Veto[itr_file]->Fill(sumE);
- h_HOMatchedTime_invertedJet_noMB1Veto[itr_file]->Fill(weightT/sumE);
- if(!rpcBx.empty()){
- h_HOMatchedTime_RPCMatchedBx_invertedJet_noMB1Veto[itr_file]->Fill(weightT/sumE,rpcMedian);
- }
- }
- }
-
- if(passInvertedJet && passMB1){
- if(!rpcBx.empty()){
- if(rpcBx.size()%2 == 0){ rpcMedian = float(rpcBx[rpcBx.size()/2 - 1] + rpcBx[rpcBx.size()/2]) / 2.0; }
- else{ rpcMedian = rpcBx[rpcBx.size()/2]; }
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- }
- }
- h_nHOMatched_invertedJetVeto[itr_file]->Fill(matchHO);
- if(sumE>20.){
- h_HOMatchedEnergy_invertedJetVeto[itr_file]->Fill(sumE);
- h_HOMatchedTime_invertedJetVeto[itr_file]->Fill(weightT/sumE);
- if(!rpcBx.empty()){
- h_HOMatchedTime_RPCMatchedBx_invertedJetVeto[itr_file]->Fill(weightT/sumE,rpcMedian);
- }
- }
- }
-
- if(passInvertedMuon && passMB1){
- if(!rpcBx.empty()){
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- }
- }
- }
-
- if(passInvertedMuon && passInvertedJet && passMB1){
- if(!rpcBx.empty()){
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- }
- }
- }
-
- if(passMuon && passJet){
- nPassJetMuon+=1;
- totalClusteredNoMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_noMB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterNRechitsMB1_noMB1Veto[itr_file]->Fill(dtRechitClusterNSegmentStation1[itr_clust]);
- h_dtRechitClusterPercentRechitsMB1_noMB1Veto[itr_file]->Fill(float(dtRechitClusterNSegmentStation1[itr_clust]) / dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterNStation_noMB1Veto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_MB1Rechits_jetMuonVeto[itr_file]->Fill(dtRechitClusterNSegmentStation1[itr_clust]);
- h_HOEnergy_jetMuonVeto[itr_file]->Fill(sumE);
- h_nRPCMatched_noMB1Veto[itr_file]->Fill(match);
- if(!rpcLayer.empty()){
- h_RPCMatchedBxSpread_noMB1Veto[itr_file]->Fill(max_element(rpcBx.begin(),rpcBx.end()) - min_element(rpcBx.begin(),rpcBx.end()));
- for(Int_t itr = 0; itrFill(matchLayer1);
- h_nRPCMatchedLayer2_noMB1Veto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedLayer12_noMB1Veto[itr_file]->Fill(matchLayer1+matchLayer2);
- if(dtRechitClusterSize[itr_clust]>=280){
- totalSumE+=sumE;
- }
- }
-
- if(passMuon && passJet && passMB1){
- nPassFull+=1;
-
- if(*nDtRechits<1000){
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- dPhi_tmp = dtRechitPhi[itr_dt] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(dtRechitEta[itr_dt]-dtRechitClusterEta[itr_clust],2))<0.5){
- rechitStation = getStation(dtRechitX[itr_dt],dtRechitY[itr_dt]);
- if(rechitStation>-1){
- stationCount[rechitStation-1] += 1;
- }
- }
- }
- }
- else{
- fill_n(stationCount, 4, 150);
- }
- for(Int_t itr_station=0; itr_station<4; itr_station++){
- if(stationCount[itr_station]>0){ nStationUnclustered+=1; }
- if(itr_station<3){
- if(stationCount[itr_station]>12){ nThreshStationUnclustered+=1; }
- if(stationCount[itr_station]>4){ nThreshLowStationUnclustered+=1; }
- }
- else{
- if(stationCount[itr_station]>8){ nThreshStationUnclustered+=1; }
- if(stationCount[itr_station]>2){ nThreshLowStationUnclustered+=1; }
- }
- }
-
- totalClusteredFull+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_fullVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_fullVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_fullVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dtRechitClusterNThreshStation_fullVeto[itr_file]->Fill(nThreshStation);
-
- h_dtRechitClusterNStation_fullVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dtRechitClusterNStationUnclustered_fullVeto[itr_file]->Fill(nStationUnclustered);
- h_dtRechitClusterNThreshStation_fullVeto[itr_file]->Fill(nThreshStation);
- h_dtRechitClusterNThreshLowStation_fullVeto[itr_file]->Fill(nThreshLowStation);
- h_dtRechitClusterNThreshStationUnclustered_fullVeto[itr_file]->Fill(nThreshStationUnclustered);
- h_dtRechitClusterNThreshLowStationUnclustered_fullVeto[itr_file]->Fill(nThreshLowStationUnclustered);
- h_dPhiClusterMET_fullVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_fullVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_fullVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_fullVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_fullVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_fullVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_fullVeto[itr_file]->Fill(match);
-
- h_dtRechitClusterEta_fullVeto[itr_file]->Fill(dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterPhi_fullVeto[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterR_fullVeto[itr_file]->Fill(sqrt(pow(dtRechitClusterX[itr_clust],2)+pow(dtRechitClusterY[itr_clust],2)));
- h_dtRechitClusterZ_fullVeto[itr_file]->Fill(dtRechitClusterZ[itr_clust]);
- h_dtRechitClusterRZ_fullVeto[itr_file]->Fill(dtRechitClusterZ[itr_clust],sqrt(pow(dtRechitClusterX[itr_clust],2)+pow(dtRechitClusterY[itr_clust],2)));
- h_dtRechitClusterRZFine_fullVeto[itr_file]->Fill(dtRechitClusterZ[itr_clust],sqrt(pow(dtRechitClusterX[itr_clust],2)+pow(dtRechitClusterY[itr_clust],2)));
- h_dtRechitClusterEtaPhi_fullVeto[itr_file]->Fill(dtRechitClusterEta[itr_clust],dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterEtaPhiFine_fullVeto[itr_file]->Fill(dtRechitClusterEta[itr_clust],dtRechitClusterPhi[itr_clust]);
-
- if(dtRechitClusterPhi[itr_clust]>0.4 && dtRechitClusterPhi[itr_clust]<0.6){
- h_runNum_phi->Fill(*runNum);
- if(dtRechitClusterEta[itr_clust]>0.5 && dtRechitClusterEta[itr_clust]<0.6){
- h_runNum_etaphi->Fill(*runNum);
- }
- if(*runNum>275.75e3&&*runNum<275.95e3){
- //eventList << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- h_badRun_lumiSec->Fill(*lumiSec);
- h_badRun_dtRechitClusterSize->Fill(dtRechitClusterSize[itr_clust]);
- h_badRun_dtRechitClusterNStation->Fill(dtRechitClusterNStation[itr_clust]);
- h_badRun_dtRechitClusterNWheel->Fill(dtRechitClusterNChamber[itr_clust]);
- h_badRun_dtRechitClusterXSpread->Fill(dtRechitClusterXSpread[itr_clust]);
- h_badRun_dtRechitClusterYSpread->Fill(dtRechitClusterYSpread[itr_clust]);
- h_badRun_dtRechitClusterPhiSpread->Fill(dtRechitClusterPhiSpread[itr_clust]);
- }
- }
- if(dtRechitClusterEta[itr_file]>0.5 && dtRechitClusterEta[itr_file]<0.6){
- h_runNum_eta->Fill(*runNum);
- }
-
- h_dtRechitClusterNWheels1_fullVeto[itr_file]->Fill(dtRechitClusterNChamber[itr_clust]);
- h_dtRechitClusterMaxWheel_fullVeto[itr_file]->Fill(dtRechitClusterMaxChamber[itr_clust]);
- if(!rpcBx.empty()){
- if(rpcBx.size()%2 == 0){ rpcMedian = float(rpcBx[rpcBx.size()/2 - 1] + rpcBx[rpcBx.size()/2]) / 2.0; }
- else{ rpcMedian = rpcBx[rpcBx.size()/2]; }
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_fullVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_fullVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_fullVeto[itr_file]->Fill(match); }
- }
-
- h_nHOMatched_fullVeto[itr_file]->Fill(matchHO);
- if(sumE>20.){
- h_HOMatchedEnergy_fullVeto[itr_file]->Fill(sumE);
- h_HOMatchedTime_fullVeto[itr_file]->Fill(weightT/sumE);
- if(!rpcBx.empty()){
- h_HOMatchedTime_RPCMatchedBx_fullVeto[itr_file]->Fill(weightT/sumE,rpcMedian);
- }
- }
-
- h_muonDR_fullVeto[itr_file]->Fill(muonDR_min);
- h_jetDR_fullVeto[itr_file]->Fill(jetDR_min);
-
- if(!rpcBx.empty()){
- nPassRPCMatch_dt+=1;
- h_dtRechitClusterSize_RPCMatch[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_muonDR_RPCMatch[itr_file]->Fill(muonDR_min);
- h_jetDR_RPCMatch[itr_file]->Fill(jetDR_min);
- if(rpcSpread==0){
- nPassRPCSpread_dt+=1;
- h_dtRechitClusterSize_RPCSpread0[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_muonDR_RPCSpread0[itr_file]->Fill(muonDR_min);
- h_jetDR_RPCSpread0[itr_file]->Fill(jetDR_min);
- if(dtRechitClusterMaxStation[itr_clust]>2){
- nPassMaxStation_dt+=1;
- if(fabs(dPhiClusterMET)<1 && fabs(dPhi_min)<0.6){
- nPassFullPlus+=1;
- nPassDeltaPhi_dt+=1;
- totalClusteredFullPlus+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterXSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_dtRechitClusterSizeRatio_fullVetoPlus[itr_file]->Fill(dtRechitClusterSize[itr_clust] / float(*nDtRechits));
- //cout << "DT decay: jet DR = " << jetDR_min << ", muon DR = " << muonDR_min << endl;
- //eventList << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- }
- }
- }
- }
- else{
- if(fabs(dPhi_min)<0.6){
- h_dtRechitClusterSize_noRPCMatch_dPhiLow[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- else{
- h_dtRechitClusterSize_noRPCMatch_dPhiHigh[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(dtRechitClusterSize[itr_clust]<100){
- h_dPhiJetMET_noRPCMatch_nRechitsLow[itr_file]->Fill(fabs(dPhi_min));
- }
- else{
- h_dPhiJetMET_noRPCMatch_nRechitsHigh[itr_file]->Fill(fabs(dPhi_min));
- }
- }
-
- if(dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhi_min)<0.6){
- if(fabs(dPhiClusterMET)<1 && (rpcBx.empty() || rpcSpread>0)){
- nPassFullMinus+=1;
- h_dtRechitClusterEta_fullVetoPlus[itr_file]->Fill(dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterPhi_fullVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterEtaPhi_fullVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust],dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterNStation_fullVetoPlus[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dtRechitClusterNWheel_fullVetoPlus[itr_file]->Fill(dtRechitClusterNChamber[itr_clust]);
- h_dtRechitClusterSizeRatio_fullVetoMinus[itr_file]->Fill(dtRechitClusterSize[itr_clust] / float(*nDtRechits));
- }
- }
-
- }
-
- if(passMuon && passJet){
- nPassJetMuon_std+=1;
- if(passMB1_alt){
- nPassFull_altMB1+=1;
- }
- if(!rpcBx.empty() && rpcSpread==0 && dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhiClusterMET)<1 && fabs(dPhi_min)<0.6){
- nPassFullDTPlus_noMB1+=1;
- if(passMB1_alt){
- nPassFullDTPlus_altMB1+=1;
- }
- }
- }
-
- if(passMB1 && passJet){
- nPassJetMB1_std+=1;
- if(passMuon_alt){
- nPassFull_altMuon+=1;
- }
- if(!rpcBx.empty() && rpcSpread==0 && dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhiClusterMET)<1 && fabs(dPhi_min)<0.6){
- nPassFullDTPlus_noMuon+=1;
- if(passMuon_alt){
- nPassFullDTPlus_altMuon+=1;
- }
- }
- }
-
- if(passMuon_alt){
- nPassMuon_alt+=1;
- if(passJet && passMB1_alt){
- nPassFull_altMuonMB1+=1;
- if(!rpcBx.empty()){
- if(rpcSpread==0){
- if(dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhiClusterMET)<1 && fabs(dPhi_min)<0.6){
- nPassFullDTPlus_altMuonMB1+=1;
- }
- }
- }
- }
- }
- }
- if(passMB1_alt){
- nPassMB1_alt+=1;
- }
- if(passMuon){
- nPassMuon_std+=1;
- }
- if(passMB1){
- nPassMB1_std+=1;
- if(passJet && passMuon){
- nPassFull_std+=1;
- if(!rpcBx.empty()){
- if(rpcSpread==0){
- if(dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhiClusterMET)<1 && fabs(dPhi_min)<0.6){
- nPassFullDTPlus_std+=1;
- }
- }
- }
- }
- }
- }
-
- if(passHO){
- nPassHO+=1;
- totalClusteredHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_HOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passJet && passMuon && passHO){
- nPassFullHO+=1;
- totalClusteredFullHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_fullHOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_fullHOVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dPhiClusterMET_fullHOVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_nRPCMatched_fullHOVeto[itr_file]->Fill(match);
- h_RPCMatchedBxSpread_fullHOVeto[itr_file]->Fill(rpcSpread);
- h_HOTime_fullHOVeto[itr_file]->Fill(weightT/sumE);
-
- h_muonDR_fullHOVeto[itr_file]->Fill(muonDR_min);
- h_jetDR_fullHOVeto[itr_file]->Fill(jetDR_min);
-
- h_nRPCMatchedLayer1_fullHOVeto[itr_file]->Fill(matchLayer1);
- h_nRPCMatchedLayer2_fullHOVeto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedLayer3_fullHOVeto[itr_file]->Fill(matchLayer3);
- h_nRPCMatchedLayer4_fullHOVeto[itr_file]->Fill(matchLayer4);
-
- if(!rpcBx.empty()){
- nPassRPCMatch_ho+=1;
- h_muonDR_HORPCMatch[itr_file]->Fill(muonDR_min);
- h_jetDR_HORPCMatch[itr_file]->Fill(jetDR_min);
- if(rpcSpread==0){
- nPassRPCSpread_ho+=1;
- h_muonDR_HORPCSpread0[itr_file]->Fill(muonDR_min);
- h_jetDR_HORPCSpread0[itr_file]->Fill(jetDR_min);
- if(fabs(dPhiClusterMET)<1){
- nPassDeltaPhi_ho+=1;
- totalClusteredFullHOPlus+=dtRechitClusterSize[itr_clust];
- //cout << "HO decay: jet DR = " << jetDR_min << ", muon DR = " << muonDR_min << endl;
- //eventList << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- h_jetDR_minDR_fullHOVetoPlus[itr_file]->Fill(jetDR_min);
- h_jetPt_minDR_fullHOVetoPlus[itr_file]->Fill(jetPt[jetDR_index]);
- h_jetEta_minDR_fullHOVetoPlus[itr_file]->Fill(jetEta[jetDR_index]);
- h_jetPhi_minDR_fullHOVetoPlus[itr_file]->Fill(jetPhi[jetDR_index]);
- if(jetDR_min<0.6){
- h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetChargedEMEnergyFraction[jetDR_index]);
- h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetNeutralEMEnergyFraction[jetDR_index]);
- h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetChargedHadronEnergyFraction[jetDR_index]);
- h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetNeutralHadronEnergyFraction[jetDR_index]);
- //h_jetMuonEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetMuonEnergyFraction[jetDR_index]);
- }
- }
- }
- }
- if((rpcBx.empty() || rpcSpread>0) && fabs(dPhiClusterMET)<1){
- h_dtRechitClusterEta_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterPhi_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterEtaPhi_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust],dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterNStation_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterNWheel_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterNChamber[itr_clust]);
- h_jetDR_minDR_fullHOVetoMinus[itr_file]->Fill(jetDR_min);
- h_jetPt_minDR_fullHOVetoMinus[itr_file]->Fill(jetPt[jetDR_index]);
- h_jetEta_minDR_fullHOVetoMinus[itr_file]->Fill(jetEta[jetDR_index]);
- h_jetPhi_minDR_fullHOVetoMinus[itr_file]->Fill(jetPhi[jetDR_index]);
- if(jetDR_min<0.6){
- h_jetChargedEMEnergyFraction_minDR_fullHOVetoMinus[itr_file]->Fill(jetChargedEMEnergyFraction[jetDR_index]);
- h_jetNeutralEMEnergyFraction_minDR_fullHOVetoMinus[itr_file]->Fill(jetNeutralEMEnergyFraction[jetDR_index]);
- h_jetChargedHadronEnergyFraction_minDR_fullHOVetoMinus[itr_file]->Fill(jetChargedHadronEnergyFraction[jetDR_index]);
- h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoMinus[itr_file]->Fill(jetNeutralHadronEnergyFraction[jetDR_index]);
- //h_jetMuonEnergyFraction_minDR_fullHOVetoMinus[itr_file]->Fill(jetMuonEnergyFraction[jetDR_index]);
- }
- }
- }
-
- if(passMuon && passMB1){
- h_jetPt_muonMB1Veto[itr_file]->Fill(jetPt_max);
- }
-
- if(passJet && passMB1){
- h_muonPt_jetMB1Veto[itr_file]->Fill(muonPt_max);
- }
-
- if(passJet && passHO){
- h_muonPt_jetHOVeto[itr_file]->Fill(muonPt_max);
- }
-
- if(passMuon && passHO){
- h_jetPt_muonHOVeto[itr_file]->Fill(jetPt_max);
- }
-
- }
- }
- h_nDtRechitClusters_noVeto[itr_file]->Fill(nPassNone);
- h_nDtRechitClusters_muonVeto[itr_file]->Fill(nPassMuon);
- h_nDtRechitClusters_jetVeto[itr_file]->Fill(nPassJet);
- h_nDtRechitClusters_MB1Veto[itr_file]->Fill(nPassMB1);
- h_nDtRechitClusters_fullVeto[itr_file]->Fill(nPassFull);
-
- if(nPassNone>0){
- nPassCluster+=1;
- h_dPhiJetMET_noVeto[itr_file]->Fill(dPhi_min);
- h_nWheels1_noVeto[itr_file]->Fill(hitWheels1);
- h_nWheels10_noVeto[itr_file]->Fill(hitWheels10);
- h_nWheels20_noVeto[itr_file]->Fill(hitWheels20);
- h_nWheels30_noVeto[itr_file]->Fill(hitWheels30);
- h_nWheels50_noVeto[itr_file]->Fill(hitWheels50);
- h_nWheels150_noVeto[itr_file]->Fill(hitWheels150);
- h_jetPtMET_noVeto[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_noVeto[itr_file]->Fill(jetPt[0]);
- }
- if(nPassMuon>0){ h_dPhiJetMET_muonVeto[itr_file]->Fill(dPhi_min); }
- if(nPassJet>0){ h_dPhiJetMET_jetVeto[itr_file]->Fill(dPhi_min); }
- if(nPassMB1>0){ h_dPhiJetMET_MB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassJetMuon>0){ h_dPhiJetMET_noMB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassFull>0){
- nPassFullDT+=1;
- h_dPhiJetMET_fullVeto[itr_file]->Fill(dPhi_min);
- h_jetPtMET_fullVeto[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_fullVeto[itr_file]->Fill(jetPt[0]);
- }
- if(nPassFullPlus>0){
- h_nWheels1_fullVetoPlus[itr_file]->Fill(hitWheels1);
- h_nWheels10_fullVetoPlus[itr_file]->Fill(hitWheels10);
- h_nWheels20_fullVetoPlus[itr_file]->Fill(hitWheels20);
- h_nWheels30_fullVetoPlus[itr_file]->Fill(hitWheels30);
- h_nWheels50_fullVetoPlus[itr_file]->Fill(hitWheels50);
- h_nWheels150_fullVetoPlus[itr_file]->Fill(hitWheels150);
- h_jetPtMET_fullVetoPlus[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_fullVetoPlus[itr_file]->Fill(jetPt[0]);
- }
- if(nPassFullMinus>0){
- h_nWheels1_fullVetoMinus[itr_file]->Fill(hitWheels1);
- h_nWheels10_fullVetoMinus[itr_file]->Fill(hitWheels10);
- h_nWheels20_fullVetoMinus[itr_file]->Fill(hitWheels20);
- h_nWheels30_fullVetoMinus[itr_file]->Fill(hitWheels30);
- h_nWheels50_fullVetoMinus[itr_file]->Fill(hitWheels50);
- h_nWheels150_fullVetoMinus[itr_file]->Fill(hitWheels150);
- h_jetPtMET_fullVetoMinus[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_fullVetoMinus[itr_file]->Fill(jetPt[0]);
- }
-
- h_npv_nDtRechitClusters_noVeto[itr_file]->Fill(*npv,nPassNone);
- h_npv_nDtRechitClusters_fullVeto[itr_file]->Fill(*npv,nPassFull);
-
- h_nTotalClusteredRechits_noVeto[itr_file]->Fill(totalClusteredNone);
- h_nTotalClusteredRechits_jetVeto[itr_file]->Fill(totalClusteredJet);
- h_nTotalClusteredRechits_MB1Veto[itr_file]->Fill(totalClusteredMB1);
- h_nTotalClusteredRechits_HOVeto[itr_file]->Fill(totalClusteredHO);
- h_nTotalClusteredRechits_noMB1Veto[itr_file]->Fill(totalClusteredNoMB1);
- h_nTotalClusteredRechits_fullVeto[itr_file]->Fill(totalClusteredFull);
- h_nTotalClusteredRechits_fullHOVeto[itr_file]->Fill(totalClusteredFullHO);
-
- h_nTotalClusteredRechits_fullVetoPlus[itr_file]->Fill(totalClusteredFullPlus);
- h_nTotalClusteredRechits_fullHOVetoPlus[itr_file]->Fill(totalClusteredFullHOPlus);
-
- h_HOMatchedEnergyCluster280_noMB1Veto[itr_file]->Fill(totalSumE);
- }
-
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- match = 0;
- matchLayer1 = 0;
- matchLayer2 = 0;
- matchLayer3 = 0;
- matchLayer4 = 0;
- matchHO = 0;
- sumE = 0.0;
- weightT = 0.0;
- rpcBx.clear();
- rpcLayer.clear();
- rpcSpread = -99;
- matchJet = false;
- matchMuon = false;
- goodEvt = true;
- passMuon = false;
- passJet = false;
- passMB1 = false;
- passMB1_alt = false;
- passMuon_alt = false;
- passHO = false;
- passInvertedJet = false;
- passInvertedMuon = false;
- passInvertedMuJet = false;
-
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- else{ passInvertedJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- else{ passInvertedMuon = true; }
- if(dtRechitClusterNSegmentStation1[itr_clust]==0){ passMB1 = true; }
-
- if(dtRechitClusterSize[itr_clust]>50 && ((dtRechitClusterPhi[itr_clust]<0.4 || dtRechitClusterPhi[itr_clust]>0.6) || (*runNum<275.75e3 || *runNum>275.95e3))){
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
-
- for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
- dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(RPCRechitZ[itr_rpc] - dtRechitClusterZ[itr_clust])<5. && fabs(dPhi_tmp)<0.4){
- match+=1;
- rpcBx.push_back(RPCRechitBx[itr_rpc]);
- rpcLayer.push_back(getRPCLayer(RPCRechitX[itr_rpc],RPCRechitY[itr_rpc]));
- }
- }
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- }
-
- if(rpcBx.empty() || rpcSpread>0){
- nPassNone+=1;
- if(passJet && passMuon && passMB1){
- nPassFull+=1;
- if(dtRechitClusterMaxStation[itr_clust]==2){
- h_dtRechitClusterPhiStation2_fullVeto_rpcCR[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- }
- if(dtRechitClusterMaxStation[itr_clust]==3){
- h_dtRechitClusterPhiStation3_fullVeto_rpcCR[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- }
- if(dtRechitClusterMaxStation[itr_clust]==4){
- h_dtRechitClusterPhiStation4_fullVeto_rpcCR[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- }
- if(dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhiClusterMET)<1.0){
- nPassFullPlus_rpcCR+=1;
- if(failJetMET){ nFailJetMET += 1; }
- if(failJetMET_20){ nFailJetMET_20 += 1; }
- if(failJetMET_30){ nFailJetMET_30 += 1; }
- if(failJetMET_50){ nFailJetMET_50 += 1; }
- if(failJetMET_top4){ nFailJetMET_top4 += 1; }
- }
- }
- }
- }
- }
- if(nPassNone>0){ h_jetPtMET_noVeto_rpcCR[itr_file]->Fill(jetPt_tmp); }
- if(nPassFull>0){ h_jetPtMET_fullVeto_rpcCR[itr_file]->Fill(jetPt_tmp); }
- if(nPassFullPlus>0){ h_jetPtMET_fullVetoPlus_rpcCR[itr_file]->Fill(jetPt_tmp); }
- }
- evtNum+=1;
- }
- itr_file+=1;
-
-
-
- cout << "MET > 200: " << nPassMET << endl;
- cout << "full Plus RPC CR: " << nPassFullPlus_rpcCR << endl;
- cout << "min dPhi(jet,MET) > 0.6: " << nFailJetMET << endl;
- cout << "min dPhi(jet [Top 4],MET) > 0.6: " << nFailJetMET_top4 << endl;
- cout << "min dPhi(jet [20 GeV],MET) > 0.6: " << nFailJetMET_20 << endl;
- cout << "min dPhi(jet [30 GeV],MET) > 0.6: " << nFailJetMET_30 << endl;
- cout << "min dPhi(jet [50 GeV],MET) > 0.6: " << nFailJetMET_50 << endl;
- cout << "min dPhi(jet,MET) < 0.6: " << nPassJetMET << endl;
- cout << "DT cluster: " << nPassCluster << endl;
- cout << " " << endl;
-
- cout << "Full DT Veto: " << nPassFullDT << endl;
- cout << "nRPC Matched > 0: " << nPassRPCMatch_dt << endl;
- cout << "RPC Spread = 0: " << nPassRPCSpread_dt << endl;
- cout << "Max Station > 2: " << nPassMaxStation_dt << endl;
- cout << "dPhi(Cluster,MET) < 1: " << nPassDeltaPhi_dt << endl;
- cout << " " << endl;
-
- cout << "Full HO Veto: " << nPassFullHO << endl;
- cout << "nRPC Matched > 0: " << nPassRPCMatch_ho << endl;
- cout << "RPC Spread = 0: " << nPassRPCSpread_ho << endl;
- cout << "dPhi(Cluster,MET) < 1: " << nPassDeltaPhi_ho << endl;
-
- cout << " " << endl;
- cout << "DT cluster: " << nPassCluster << endl;
- cout << " " << endl;
- cout << "Muon veto: " << nPassMuon_std << endl;
- cout << "MB1 veto: " << nPassMB1_std << endl;
- cout << "Jet+Muon veto: " << nPassJetMuon_std << endl;
- cout << "Jet+MB1 veto: " << nPassJetMB1_std << endl;
- cout << "Full DT Veto: " << nPassFull_std << endl;
- cout << " " << endl;
- cout << "Alt Muon veto: " << nPassMuon_alt << endl;
- cout << "Alt MB1 veto: " << nPassMB1_alt << endl;
- cout << "Alt Muon Full DT veto: " << nPassFull_altMuon << endl;
- cout << "Alt MB1 Full DT veto: " << nPassFull_altMB1 << endl;
- cout << "Alt Muon MB1 Full DT veto: " << nPassFull_altMuonMB1 << endl;
- cout << " " << endl;
- cout << "Full DT Selection No Muon: " << nPassFullDTPlus_noMuon << endl;
- cout << "Full DT Selection No MB1: " << nPassFullDTPlus_noMB1 << endl;
- cout << "Full DT Selection: " << nPassFullDTPlus_std << endl;
- cout << "Alt Muon Full DT Selection: " << nPassFullDTPlus_altMuon << endl;
- cout << "Alt MB1 Full DT Selection: " << nPassFullDTPlus_altMB1 << endl;
- cout << "Alt Muon MB1 Full DT Selection: " << nPassFullDTPlus_altMuonMB1 << endl;
-
- }
-
- _ofile->Write();
- _ofile->Close();
- eventList.close();
-
-}
diff --git a/analyzeData_ABCD.C b/analyzeData_ABCD.C
index 6703759..dc28c2f 100644
--- a/analyzeData_ABCD.C
+++ b/analyzeData_ABCD.C
@@ -1,46 +1,29 @@
R__LOAD_LIBRARY(libTreePlayer)
-int getStation(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 400. && hitR < 480.){ return 1; }
- else if(hitR > 485. && hitR < 560.){ return 2; }
- else if(hitR > 590. && hitR < 650.){ return 3; }
- else if(hitR > 690. && hitR < 800.){ return 4; }
- else{ return -1; }
-}
+#include "helpers.h"
+#include "datafiles.h"
+
+void analyzeData_ABCD(){
-int getWheel(float hitZ){
- if(hitZ > 0){
- if(hitZ < 127.){ return 0; }
- else if(hitZ < 395.){ return 1; }
- else if(hitZ < 661.){ return 2; }
- else{ return -99; }
+ const bool useHDFS(false);
+ const bool useCERN(false);
+ TString fsPreFix;
+ if (useHDFS) {
+ fsPreFix = "/mnt/hadoop";
}
- else{
- return -1*getWheel(-1.0*hitZ);
+ else {
+ fsPreFix = "root://cmsxrootd.fnal.gov/";
+ if (useCERN) fsPreFix = "root://cms-xrd-global.cern.ch//";
}
-}
-
-int getRPCLayer(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 410. && hitR < 440.){ return 1; }
- else if(hitR > 445. && hitR < 475.){ return 2; }
- else if(hitR > 490. && hitR < 520.){ return 3; }
- else if(hitR > 525. && hitR < 555.){ return 4; }
- else if(hitR > 600. && hitR < 630.){ return 5; }
- else if(hitR > 700. && hitR < 770.){ return 6; }
- else{ return -1; }
-}
-void analyzeData_ABCD(){
+ fsPreFix += "/store/user/dildick/delayedjetsanalysis/Data/";
char name[50];
char title[100];
char years[4][10] = {"2018","2017","2016"};
char runNames[3][20] = {"17Sept2018_Run2018","Run2017","Run2016"};
char dates[3][20] = {"17Sep2018","17Nov2017","07Aug17"};
- TString dir("/mnt/hadoop/store/group/phys_exotica/delayedjets/displacedJetMuonAnalyzer/driftTube/V1p17/Data");
- //TString dir("/storage/user/mcitron/skims/");
+ TString dir(fsPreFix + "/store/group/phys_exotica/delayedjets/displacedJetMuonAnalyzer/driftTube/V1p17/Data");
TFile *_ofile = TFile::Open("outData_ABCD.root","RECREATE");
TH1D *h_dtRechitClusterSize_dPhiJetMETLow_rpcCRmuonVeto[4];
@@ -53,7 +36,7 @@ void analyzeData_ABCD(){
TH1D *h_dtRechitClusterSize_dPhiClusterMETHigh_rpcSpreadCRmuonVeto[4];
TH1D *h_dtRechitClusterSize_dPhiClusterMETLow_rpcCRnoLepton[4];
TH1D *h_dtRechitClusterSize_dPhiClusterMETHigh_rpcCRnoLepton[4];
-
+
TH1D *h_dtRechitClusterSize_rpcMatch_jetMETCRmuonVeto[4];
TH1D *h_dtRechitClusterSize_rpcNoMatch_jetMETCRmuonVeto[4];
TH1D *h_dtRechitClusterSize_dPhiClusterMETLow_jetMETCRmuonVeto[4];
@@ -161,7 +144,7 @@ void analyzeData_ABCD(){
Bool_t passMuon_alt = false;
Bool_t passMB1 = false;
Bool_t passJet = false;
-
+
Bool_t passClusterCR = false;
Bool_t passNoVeto_clusterCR = false;
Bool_t passFullVeto_clusterCR = false;
@@ -169,8 +152,8 @@ void analyzeData_ABCD(){
Bool_t passRPCSpread_clusterCR = false;
Bool_t passRPCBx_clusterCR = false;
Bool_t passMaxStation_clusterCR = false;
-
- Bool_t passNoVeto = false;
+
+ Bool_t passNoVeto = false;
Bool_t passFullVeto_rpcCR = false;
Bool_t passRPCCR = false;
Bool_t passClusterMET_rpcCR = false;
@@ -184,8 +167,8 @@ void analyzeData_ABCD(){
Int_t nPassRPCSpread_clusterCR = 0;
Int_t nPassRPCBx_clusterCR = 0;
Int_t nPassMaxStation_clusterCR = 0;
-
- Int_t nPassNoVeto = 0;
+
+ Int_t nPassNoVeto = 0;
Int_t nPassFullVeto_rpcCR = 0;
Int_t nPassRPCCR = 0;
Int_t nPassClusterMET_rpcCR = 0;
@@ -343,7 +326,7 @@ void analyzeData_ABCD(){
sprintf(name,"h_dtRechitClusterSize_rpcNoMatch_clusterMETCRnoLepton_%s",years[itr_year]);
h_dtRechitClusterSize_rpcNoMatch_clusterMETCRnoLepton[itr_year] = new TH1D(name,"",50,0,500);
-
+
sprintf(name,"h_dPhiClusterRPC_fullVeto_%s",years[itr_year]);
h_dPhiClusterRPC_fullVeto[itr_year] = new TH1D(name,"",73,-0.15,3.5);
@@ -362,8 +345,8 @@ void analyzeData_ABCD(){
sprintf(name,"h_rpcSpread_fullVeto_negBx_%s",years[itr_year]);
h_rpcSpread_fullVeto_negBx[itr_year] = new TH1D(name,"",10,0,10);
-
-
+
+
sprintf(name,"h_nRPCMatched_fullVeto_clusterMETCR_%s",years[itr_year]);
h_nRPCMatched_fullVeto_clusterMETCR[itr_year] = new TH1D(name,"",20,0,20);
@@ -394,7 +377,7 @@ void analyzeData_ABCD(){
sprintf(name,"h_dtRechitClusterMaxStation_Nminus1_clusterMETCR_%s",years[itr_year]);
h_dtRechitClusterMaxStation_Nminus1_clusterMETCR[itr_year] = new TH1D(name,"",5,0,5);
-
+
sprintf(name,"h_dPhiClusterMET_fullVeto_rpcCR_%s",years[itr_year]);
h_dPhiClusterMET_fullVeto_rpcCR[itr_year] = new TH1D(name,"",35,0,3.5);
@@ -530,12 +513,12 @@ void analyzeData_ABCD(){
_file = TFile::Open(dir+years[itr_year]+"/v4/v4/normalized/Run2_displacedJetMuonNtupler_V1p15_Data2016_Data2017_Data2018-HighMET_goodLumi.root");
}
else{
- _file = TFile::Open(dir+years[itr_year]+"/v1/v3/normalized/Run2_displacedJetMuonNtupler_V1p17_Data"+years[itr_year]+"_"+runNames[itr_year]+"-HighMET-"+dates[itr_year]+"_goodLumi.root");
- //_file = TFile::Open(dir+"Run2_displacedJetMuonNtupler_V1p17_Data"+years[itr_year]+"_"+runNames[itr_year]+"-HighMET-"+dates[itr_year]+"_goodLumi.root");
+ cout << "Opening " << fsPreFix + TString(datafiles[itr_year]) << endl;
+ _file = TFile::Open(fsPreFix + TString(datafiles[itr_year]));
}
TTreeReader treeReader("MuonSystem",_file);
-
+
TTreeReaderValue runNum(treeReader,"runNum");
TTreeReaderValue lumiSec(treeReader,"lumiSec");
TTreeReaderValue eventNum(treeReader,"evtNum");
@@ -601,7 +584,7 @@ void analyzeData_ABCD(){
event150_rpc = 0;
event100_clusterMET = 0;
event150_clusterMET = 0;
-
+
cout << "Data" << years[itr_year] << endl;
while(treeReader.Next()){
if(evtNum%100000==0){ cout << evtNum << " of " << treeReader.GetEntries(1) << endl; }
@@ -615,286 +598,286 @@ void analyzeData_ABCD(){
passClusterMET_rpcCR = false;
passMaxStation_rpcCR = false;
maxClusterSize=0;
-
+
if(*MET > 200){
- dPhi_min = 999.;
- dPhiClusterMET = 0.0;
- dPhiClusterMET_max = 0.0;
- if(*nDtRechitClusters>0){
- nPassNoVeto+=1;
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
- if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
- if(dtRechitClusterSize[itr_clust]>maxClusterSize){ maxClusterSize = dtRechitClusterSize[itr_clust]; }
- }
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(fabs(jetEta[itr_jet])<3.0 && jetPt[itr_jet]>30.0){
- dPhi_tmp = jetPhi[itr_jet] - *METphi;
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp) < dPhi_min){
- dPhi_min = fabs(dPhi_tmp);
- }
- }
- }
- }
- if(fabs(dPhiClusterMET)>1.0){ nPassClusterCR+=1; }
-
- for(Int_t itr_clust=0; itr_clust<*nDtRechitClusters; itr_clust++){
-
- if(dtRechitClusterSize[itr_clust]>50 && ((dtRechitClusterPhi[itr_clust]<0.4 || dtRechitClusterPhi[itr_clust]>0.6) || (*runNum<275.75e3 || *runNum>275.95e3))){
- passMuon=false;
- passMuon_alt=false;
- passJet=false;
- rpcBx.clear();
- rpcSpread = 99;
- rpcMedian = 99;
- dPhiClusterRPC = -0.1;
- dZClusterRPC = -1.;
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
-
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- if(*nLeptons==0){ passMuon_alt = true; }
-
- passMB1 = true;
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- if(sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))>400. && sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))<480.){
- dPhi_tmp = dtRechitPhi[itr_dt] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(dtRechitEta[itr_dt]-dtRechitClusterEta[itr_clust],2))<0.4){
- passMB1 = false;
- break;
- }
- }
- }
- if(dtRechitClusterNSegmentStation1[itr_clust]>0){ passMB1 = false; }
-
- //cout << "doing rpc" << endl;
- for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
- dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp)0){ passRPCCR=true; }
-
- if(passMB1 && dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhi_min)<0.6){
- if(!passJet){
- h_rpcSpread_invertedJetVeto[itr_year]->Fill(rpcSpread);
- if(passMuon){
- h_rpcSpread_invertedJetVeto_muonVeto[itr_year]->Fill(rpcSpread);
- }
- }
- else{
- if(passMuon){
- h_rpcSpread_fullVeto[itr_year]->Fill(rpcSpread);
- if(rpcMedian<0){
- h_rpcSpread_fullVeto_negBx[itr_year]->Fill(rpcSpread);
- }
- }
- }
- }
-
- if(passJet && passMB1){
-
- if(passMuon){
- h_dPhiClusterRPC_fullVeto[itr_year]->Fill(dPhiClusterRPC);
- h_dZClusterRPC_fullVeto[itr_year]->Fill(dZClusterRPC);
- }
-
- //cout << "doing CRs" << endl;
- if(fabs(dPhi_min)<0.6 && dtRechitClusterMaxStation[itr_clust]>2){
- if(!rpcBx.empty() && rpcSpread==0){
- if(fabs(dPhiClusterMET)<1.0){
- if(passMuon){
- h_dtRechitClusterSize_dPhiClusterMETLow_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSize_rpcMatch_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passMuon_alt){
- h_dtRechitClusterSize_dPhiClusterMETLow_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSize_rpcMatch_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- }
- }
- else{
- if(passMuon){ h_dtRechitClusterSize_dPhiClusterMETHigh_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- if(passMuon_alt){ h_dtRechitClusterSize_dPhiClusterMETHigh_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- else{
- if(fabs(dPhiClusterMET)<1.0){
- if(passMuon){ h_dtRechitClusterSize_rpcNoMatch_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- if(passMuon_alt){ h_dtRechitClusterSize_rpcNoMatch_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- }
-
-
- if(fabs(dPhiClusterMET)>1.0 && dtRechitClusterMaxStation[itr_clust]>2){
- if(!rpcBx.empty() && rpcSpread==0){
- if(fabs(dPhi_min)>0.6){
- if(passMuon){
- h_dtRechitClusterSize_dPhiJetMETHigh_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSize_rpcGood_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(event100_clusterMET<4 && dtRechitClusterSize[itr_clust]>100 && dtRechitClusterSize[itr_clust]<150){
- eventListClusterMET << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- event100_clusterMET+=1;
- }
- else if(event150_clusterMET<4 && dtRechitClusterSize[itr_clust]>150){
- eventListClusterMET << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- event150_clusterMET+=1;
- }
- }
- if(passMuon_alt){
- h_dtRechitClusterSize_dPhiJetMETHigh_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSize_rpcMatch_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- }
- }
- else{
- if(passMuon){ h_dtRechitClusterSize_dPhiJetMETLow_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- if(passMuon_alt){ h_dtRechitClusterSize_dPhiJetMETLow_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- else{
- if(fabs(dPhi_min)>0.6){
- if(passMuon){ h_dtRechitClusterSize_rpcBad_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- if(passMuon_alt){ h_dtRechitClusterSize_rpcNoMatch_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- }
-
-
- if(fabs(dPhiClusterMET)>1.0 && dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhi_min)>0.6){
- if(passMuon){
- if(!rpcBx.empty()){
- h_dtRechitClusterSize_rpcMatch_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(rpcSpread==0){
- h_dtRechitClusterSize_rpcNoSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(rpcMedian<0.0){
- h_dtRechitClusterSize_rpcNegativeNoSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- }
- }
- else{
- h_dtRechitClusterSize_rpcSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(rpcMedian<0.0){
- h_dtRechitClusterSize_rpcNegativeSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- }
- }
- }
- else{ h_dtRechitClusterSize_rpcNoMatch_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- }
-
-
- if(fabs(dPhiClusterMET)>1.0 && passMuon){
- passFullVeto_clusterCR=true;
- h_nRPCMatched_fullVeto_clusterMETCR[itr_year]->Fill(rpcBx.size());
- h_rpcSpread_fullVeto_clusterMETCR[itr_year]->Fill(rpcSpread);
- h_rpcBx_fullVeto_clusterMETCR[itr_year]->Fill(rpcMedian);
- h_dPhiJetMET_fullVeto_clusterMETCR[itr_year]->Fill(fabs(dPhi_min));
- h_dtRechitClusterMaxStation_fullVeto_clusterMETCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]);
-
- if(dtRechitClusterMaxStation[itr_clust]>2){
- passMaxStation_clusterCR=true;
- if(!rpcBx.empty()){
- passRPCMatch_clusterCR=true;
- if(rpcSpread==0){
- passRPCSpread_clusterCR=true;
- if(rpcMedian>=0.){
- passRPCBx_clusterCR=true;
- }
- }
- }
- }
-
- if(!rpcBx.empty() && rpcSpread==0 && rpcMedian>=0.){ h_dtRechitClusterMaxStation_Nminus1_clusterMETCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]); }
- if(!rpcBx.empty() && rpcSpread==0 && rpcMedian>=0.){ h_dPhiJetMET_Nminus1_clusterMETCR[itr_year]->Fill(fabs(dPhi_min)); }
- if(!rpcBx.empty() && rpcSpread==0 && dtRechitClusterMaxStation[itr_clust]>2){ h_rpcBx_Nminus1_clusterMETCR[itr_year]->Fill(rpcMedian); }
- if(!rpcBx.empty() && rpcMedian>=0. && dtRechitClusterMaxStation[itr_clust]>2){ h_rpcSpread_Nminus1_clusterMETCR[itr_year]->Fill(rpcSpread); }
- if(dtRechitClusterMaxStation[itr_clust]>2){ h_nRPCMatched_Nminus1_clusterMETCR[itr_year]->Fill(rpcBx.size()); }
- }
-
- //cout << "doing rpc CRs" << endl;
- if((rpcBx.empty() || rpcSpread>0) && dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhi_min)>0.6){
- if(passMuon){
- h_dtRechitClusterSize_dPhiJetMETHigh_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(fabs(dPhiClusterMET<1.0)){
- h_dtRechitClusterSize_dPhiClusterMETLow_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(dtRechitClusterSize[itr_clust]>100 && dtRechitClusterSize[itr_clust]<150 && event100_rpc<5){
- eventListRPC << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- event100_rpc+=1;
- }
- else if(dtRechitClusterSize[itr_clust]>150 && event150_rpc<5){
- eventListRPC << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
- event150_rpc+=1;
- }
- }
- else{ h_dtRechitClusterSize_dPhiClusterMETHigh_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- if(passMuon_alt){
- h_dtRechitClusterSize_dPhiJetMETHigh_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
- if(fabs(dPhiClusterMET<1.0)){ h_dtRechitClusterSize_dPhiClusterMETLow_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- else{ h_dtRechitClusterSize_dPhiClusterMETHigh_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- else{
- if(passMuon){ h_dtRechitClusterSize_dPhiJetMETLow_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- if(passMuon_alt){ h_dtRechitClusterSize_dPhiJetMETLow_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
-
- //cout << "rpc Spread CR" << endl;
- if(rpcSpread>0 && rpcSpread<99 && dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhi_min)>0.6){
- if(passMuon){
- if(fabs(dPhiClusterMET<1.0)){ h_dtRechitClusterSize_dPhiClusterMETLow_rpcSpreadCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- else{ h_dtRechitClusterSize_dPhiClusterMETHigh_rpcSpreadCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
- }
- }
- }
-
-
- if((rpcBx.empty() || rpcSpread>0) && passMuon){
- passFullVeto_rpcCR=true;
- h_dPhiClusterMET_fullVeto_rpcCR[itr_year]->Fill(fabs(dPhiClusterMET));
- h_dPhiJetMET_fullVeto_rpcCR[itr_year]->Fill(fabs(dPhi_min));
- h_dtRechitClusterMaxStation_fullVeto_rpcCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]);
-
- if(dtRechitClusterMaxStation[itr_clust]>2){
- passMaxStation_rpcCR=true;
- h_dPhiClusterMET_Nminus1_rpcCR[itr_year]->Fill(fabs(dPhiClusterMET));
- h_dPhiJetMET_Nminus1_rpcCR[itr_year]->Fill(fabs(dPhi_min));
- if(fabs(dPhiClusterMET)<1.0){
- passClusterMET_rpcCR=true;
- }
- }
- if(fabs(dPhiClusterMET)<1.0){
- h_dtRechitClusterMaxStation_Nminus1_rpcCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]);
- }
- }
-
-
- }
- }
- }
+ dPhi_min = 999.;
+ dPhiClusterMET = 0.0;
+ dPhiClusterMET_max = 0.0;
+ if(*nDtRechitClusters>0){
+ nPassNoVeto+=1;
+ for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
+ dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
+ if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
+ if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
+ if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
+ if(dtRechitClusterSize[itr_clust]>maxClusterSize){ maxClusterSize = dtRechitClusterSize[itr_clust]; }
+ }
+ for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
+ if(fabs(jetEta[itr_jet])<3.0 && jetPt[itr_jet]>30.0){
+ dPhi_tmp = jetPhi[itr_jet] - *METphi;
+ if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
+ if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
+ if(fabs(dPhi_tmp) < dPhi_min){
+ dPhi_min = fabs(dPhi_tmp);
+ }
+ }
+ }
+ }
+ if(fabs(dPhiClusterMET)>1.0){ nPassClusterCR+=1; }
+
+ for(Int_t itr_clust=0; itr_clust<*nDtRechitClusters; itr_clust++){
+
+ if(dtRechitClusterSize[itr_clust]>50 && ((dtRechitClusterPhi[itr_clust]<0.4 || dtRechitClusterPhi[itr_clust]>0.6) || (*runNum<275.75e3 || *runNum>275.95e3))){
+ passMuon=false;
+ passMuon_alt=false;
+ passJet=false;
+ rpcBx.clear();
+ rpcSpread = 99;
+ rpcMedian = 99;
+ dPhiClusterRPC = -0.1;
+ dZClusterRPC = -1.;
+
+ dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
+ if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
+ if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
+
+ if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
+ if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
+ if(*nLeptons==0){ passMuon_alt = true; }
+
+ passMB1 = true;
+ for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
+ if(sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))>400. && sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))<480.){
+ dPhi_tmp = dtRechitPhi[itr_dt] - dtRechitClusterPhi[itr_clust];
+ if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
+ if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
+ if(sqrt(pow(dPhi_tmp,2)+pow(dtRechitEta[itr_dt]-dtRechitClusterEta[itr_clust],2))<0.4){
+ passMB1 = false;
+ break;
+ }
+ }
+ }
+ if(dtRechitClusterNSegmentStation1[itr_clust]>0){ passMB1 = false; }
+
+ //cout << "doing rpc" << endl;
+ for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
+ dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
+ if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
+ if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
+ if(fabs(dPhi_tmp)0){ passRPCCR=true; }
+
+ if(passMB1 && dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhi_min)<0.6){
+ if(!passJet){
+ h_rpcSpread_invertedJetVeto[itr_year]->Fill(rpcSpread);
+ if(passMuon){
+ h_rpcSpread_invertedJetVeto_muonVeto[itr_year]->Fill(rpcSpread);
+ }
+ }
+ else{
+ if(passMuon){
+ h_rpcSpread_fullVeto[itr_year]->Fill(rpcSpread);
+ if(rpcMedian<0){
+ h_rpcSpread_fullVeto_negBx[itr_year]->Fill(rpcSpread);
+ }
+ }
+ }
+ }
+
+ if(passJet && passMB1){
+
+ if(passMuon){
+ h_dPhiClusterRPC_fullVeto[itr_year]->Fill(dPhiClusterRPC);
+ h_dZClusterRPC_fullVeto[itr_year]->Fill(dZClusterRPC);
+ }
+
+ //cout << "doing CRs" << endl;
+ if(fabs(dPhi_min)<0.6 && dtRechitClusterMaxStation[itr_clust]>2){
+ if(!rpcBx.empty() && rpcSpread==0){
+ if(fabs(dPhiClusterMET)<1.0){
+ if(passMuon){
+ h_dtRechitClusterSize_dPhiClusterMETLow_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ h_dtRechitClusterSize_rpcMatch_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ }
+ if(passMuon_alt){
+ h_dtRechitClusterSize_dPhiClusterMETLow_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ h_dtRechitClusterSize_rpcMatch_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ }
+ }
+ else{
+ if(passMuon){ h_dtRechitClusterSize_dPhiClusterMETHigh_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ if(passMuon_alt){ h_dtRechitClusterSize_dPhiClusterMETHigh_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ else{
+ if(fabs(dPhiClusterMET)<1.0){
+ if(passMuon){ h_dtRechitClusterSize_rpcNoMatch_jetMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ if(passMuon_alt){ h_dtRechitClusterSize_rpcNoMatch_jetMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ }
+
+
+ if(fabs(dPhiClusterMET)>1.0 && dtRechitClusterMaxStation[itr_clust]>2){
+ if(!rpcBx.empty() && rpcSpread==0){
+ if(fabs(dPhi_min)>0.6){
+ if(passMuon){
+ h_dtRechitClusterSize_dPhiJetMETHigh_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ h_dtRechitClusterSize_rpcGood_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(event100_clusterMET<4 && dtRechitClusterSize[itr_clust]>100 && dtRechitClusterSize[itr_clust]<150){
+ eventListClusterMET << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
+ event100_clusterMET+=1;
+ }
+ else if(event150_clusterMET<4 && dtRechitClusterSize[itr_clust]>150){
+ eventListClusterMET << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
+ event150_clusterMET+=1;
+ }
+ }
+ if(passMuon_alt){
+ h_dtRechitClusterSize_dPhiJetMETHigh_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ h_dtRechitClusterSize_rpcMatch_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ }
+ }
+ else{
+ if(passMuon){ h_dtRechitClusterSize_dPhiJetMETLow_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ if(passMuon_alt){ h_dtRechitClusterSize_dPhiJetMETLow_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ else{
+ if(fabs(dPhi_min)>0.6){
+ if(passMuon){ h_dtRechitClusterSize_rpcBad_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ if(passMuon_alt){ h_dtRechitClusterSize_rpcNoMatch_clusterMETCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ }
+
+
+ if(fabs(dPhiClusterMET)>1.0 && dtRechitClusterMaxStation[itr_clust]>2){
+ if(fabs(dPhi_min)>0.6){
+ if(passMuon){
+ if(!rpcBx.empty()){
+ h_dtRechitClusterSize_rpcMatch_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(rpcSpread==0){
+ h_dtRechitClusterSize_rpcNoSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(rpcMedian<0.0){
+ h_dtRechitClusterSize_rpcNegativeNoSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ }
+ }
+ else{
+ h_dtRechitClusterSize_rpcSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(rpcMedian<0.0){
+ h_dtRechitClusterSize_rpcNegativeSpread_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ }
+ }
+ }
+ else{ h_dtRechitClusterSize_rpcNoMatch_clusterMETCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ }
+
+
+ if(fabs(dPhiClusterMET)>1.0 && passMuon){
+ passFullVeto_clusterCR=true;
+ h_nRPCMatched_fullVeto_clusterMETCR[itr_year]->Fill(rpcBx.size());
+ h_rpcSpread_fullVeto_clusterMETCR[itr_year]->Fill(rpcSpread);
+ h_rpcBx_fullVeto_clusterMETCR[itr_year]->Fill(rpcMedian);
+ h_dPhiJetMET_fullVeto_clusterMETCR[itr_year]->Fill(fabs(dPhi_min));
+ h_dtRechitClusterMaxStation_fullVeto_clusterMETCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]);
+
+ if(dtRechitClusterMaxStation[itr_clust]>2){
+ passMaxStation_clusterCR=true;
+ if(!rpcBx.empty()){
+ passRPCMatch_clusterCR=true;
+ if(rpcSpread==0){
+ passRPCSpread_clusterCR=true;
+ if(rpcMedian>=0.){
+ passRPCBx_clusterCR=true;
+ }
+ }
+ }
+ }
+
+ if(!rpcBx.empty() && rpcSpread==0 && rpcMedian>=0.){ h_dtRechitClusterMaxStation_Nminus1_clusterMETCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]); }
+ if(!rpcBx.empty() && rpcSpread==0 && rpcMedian>=0.){ h_dPhiJetMET_Nminus1_clusterMETCR[itr_year]->Fill(fabs(dPhi_min)); }
+ if(!rpcBx.empty() && rpcSpread==0 && dtRechitClusterMaxStation[itr_clust]>2){ h_rpcBx_Nminus1_clusterMETCR[itr_year]->Fill(rpcMedian); }
+ if(!rpcBx.empty() && rpcMedian>=0. && dtRechitClusterMaxStation[itr_clust]>2){ h_rpcSpread_Nminus1_clusterMETCR[itr_year]->Fill(rpcSpread); }
+ if(dtRechitClusterMaxStation[itr_clust]>2){ h_nRPCMatched_Nminus1_clusterMETCR[itr_year]->Fill(rpcBx.size()); }
+ }
+
+ //cout << "doing rpc CRs" << endl;
+ if((rpcBx.empty() || rpcSpread>0) && dtRechitClusterMaxStation[itr_clust]>2){
+ if(fabs(dPhi_min)>0.6){
+ if(passMuon){
+ h_dtRechitClusterSize_dPhiJetMETHigh_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(fabs(dPhiClusterMET<1.0)){
+ h_dtRechitClusterSize_dPhiClusterMETLow_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(dtRechitClusterSize[itr_clust]>100 && dtRechitClusterSize[itr_clust]<150 && event100_rpc<5){
+ eventListRPC << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
+ event100_rpc+=1;
+ }
+ else if(dtRechitClusterSize[itr_clust]>150 && event150_rpc<5){
+ eventListRPC << *runNum << ":" << *lumiSec << ":" << *eventNum << endl;
+ event150_rpc+=1;
+ }
+ }
+ else{ h_dtRechitClusterSize_dPhiClusterMETHigh_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ if(passMuon_alt){
+ h_dtRechitClusterSize_dPhiJetMETHigh_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]);
+ if(fabs(dPhiClusterMET<1.0)){ h_dtRechitClusterSize_dPhiClusterMETLow_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ else{ h_dtRechitClusterSize_dPhiClusterMETHigh_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ else{
+ if(passMuon){ h_dtRechitClusterSize_dPhiJetMETLow_rpcCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ if(passMuon_alt){ h_dtRechitClusterSize_dPhiJetMETLow_rpcCRnoLepton[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+
+ //cout << "rpc Spread CR" << endl;
+ if(rpcSpread>0 && rpcSpread<99 && dtRechitClusterMaxStation[itr_clust]>2){
+ if(fabs(dPhi_min)>0.6){
+ if(passMuon){
+ if(fabs(dPhiClusterMET<1.0)){ h_dtRechitClusterSize_dPhiClusterMETLow_rpcSpreadCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ else{ h_dtRechitClusterSize_dPhiClusterMETHigh_rpcSpreadCRmuonVeto[itr_year]->Fill(dtRechitClusterSize[itr_clust]); }
+ }
+ }
+ }
+
+
+ if((rpcBx.empty() || rpcSpread>0) && passMuon){
+ passFullVeto_rpcCR=true;
+ h_dPhiClusterMET_fullVeto_rpcCR[itr_year]->Fill(fabs(dPhiClusterMET));
+ h_dPhiJetMET_fullVeto_rpcCR[itr_year]->Fill(fabs(dPhi_min));
+ h_dtRechitClusterMaxStation_fullVeto_rpcCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]);
+
+ if(dtRechitClusterMaxStation[itr_clust]>2){
+ passMaxStation_rpcCR=true;
+ h_dPhiClusterMET_Nminus1_rpcCR[itr_year]->Fill(fabs(dPhiClusterMET));
+ h_dPhiJetMET_Nminus1_rpcCR[itr_year]->Fill(fabs(dPhi_min));
+ if(fabs(dPhiClusterMET)<1.0){
+ passClusterMET_rpcCR=true;
+ }
+ }
+ if(fabs(dPhiClusterMET)<1.0){
+ h_dtRechitClusterMaxStation_Nminus1_rpcCR[itr_year]->Fill(dtRechitClusterMaxStation[itr_clust]);
+ }
+ }
+
+
+ }
+ }
+ }
}
if(passFullVeto_clusterCR){ nPassFullVeto_clusterCR+=1; }
if(passRPCMatch_clusterCR){ nPassRPCMatch_clusterCR+=1; }
@@ -911,22 +894,22 @@ void analyzeData_ABCD(){
}
/*cout << "nPassNoVeto: " << nPassNoVeto << endl;
- cout << " " << endl;
- cout << "nPassClusterCR: " << nPassClusterCR << endl;
- cout << "nPassFullVeto_clusterCR: " << nPassFullVeto_clusterCR << endl;
- cout << "nPassMaxStation_clusterCR: " << nPassMaxStation_clusterCR << endl;
- cout << "nPassRPCMatch_clusterCR: " << nPassRPCMatch_clusterCR << endl;
- cout << "nPassRPCSpread_clusterCR: " << nPassRPCSpread_clusterCR << endl;
- cout << "nPassRPCBx_clusterCR: " << nPassRPCBx_clusterCR << endl;
- cout << " " << endl;
- cout << "nPassRPCCR: " << nPassRPCCR << endl;
- cout << "nPassFullVeto_rpcCR: " << nPassFullVeto_rpcCR << endl;
- cout << "nPassMaxStation_rpcCR: " << nPassMaxStation_rpcCR << endl;
- cout << "nPassClusterMET_rpcCR: " << nPassClusterMET_rpcCR << endl;
+ cout << " " << endl;
+ cout << "nPassClusterCR: " << nPassClusterCR << endl;
+ cout << "nPassFullVeto_clusterCR: " << nPassFullVeto_clusterCR << endl;
+ cout << "nPassMaxStation_clusterCR: " << nPassMaxStation_clusterCR << endl;
+ cout << "nPassRPCMatch_clusterCR: " << nPassRPCMatch_clusterCR << endl;
+ cout << "nPassRPCSpread_clusterCR: " << nPassRPCSpread_clusterCR << endl;
+ cout << "nPassRPCBx_clusterCR: " << nPassRPCBx_clusterCR << endl;
+ cout << " " << endl;
+ cout << "nPassRPCCR: " << nPassRPCCR << endl;
+ cout << "nPassFullVeto_rpcCR: " << nPassFullVeto_rpcCR << endl;
+ cout << "nPassMaxStation_rpcCR: " << nPassMaxStation_rpcCR << endl;
+ cout << "nPassClusterMET_rpcCR: " << nPassClusterMET_rpcCR << endl;
*/
_ofile->Write();
_ofile->Close();
eventListRPC.close();
eventListClusterMET.close();
-
+
}
diff --git a/analyzeData_DT.C b/analyzeData_DT.C
deleted file mode 100644
index 78a6608..0000000
--- a/analyzeData_DT.C
+++ /dev/null
@@ -1,476 +0,0 @@
-R__LOAD_LIBRARY(libTreePlayer)
-
-int getStation(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 400. && hitR < 480.){ return 1; }
- else if(hitR > 485. && hitR < 560.){ return 2; }
- else if(hitR > 590. && hitR < 650.){ return 3; }
- else if(hitR > 690. && hitR < 800.){ return 4; }
- else{ return -1; }
-}
-
-int getWheel(float hitZ){
- if(hitZ > 0){
- if(hitZ < 127.){ return 0; }
- else if(hitZ < 395.){ return 1; }
- else if(hitZ < 661.){ return 2; }
- else{ return -99; }
- }
- else{
- return -1*getWheel(-1.0*hitZ);
- }
-}
-
-int getRPCLayer(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 410. && hitR < 440.){ return 1; }
- else if(hitR > 445. && hitR < 475.){ return 2; }
- else if(hitR > 490. && hitR < 520.){ return 3; }
- else if(hitR > 525. && hitR < 555.){ return 4; }
- else if(hitR > 600. && hitR < 630.){ return 5; }
- else if(hitR > 700. && hitR < 770.){ return 6; }
- else{ return -1; }
-}
-
-void analyzeData_beamHalo(){
-
- char name[50];
- char title[100];
- char years[4][10] = {"2018","2017","2016"};
- char runNames[3][20] = {"17Sept2018_Run2018","Run2017","Run2016"};
- char dates[3][20] = {"17Sep2018","17Nov2017","07Aug17"};
- TString dir("/mnt/hadoop/store/group/phys_exotica/delayedjets/displacedJetMuonAnalyzer/driftTube/V1p17/Data");
- TFile *_ofile = TFile::Open("outData_beamHalo.root","RECREATE");
-
- TH2D *h_jetRechitT_jetEta[4];
- TH1D *h_jetPhi[4];
- TH1D *h_nRpcRechits[4];
- TH1D *h_nDtRechits[4];
- TH1D *h_nDtRechits_MB1[4];
- TH1D *h_nDtRechits_MB2[4];
- TH1D *h_nDtRechits_MB3[4];
- TH1D *h_nDtRechits_MB4[4];
- TH1D *h_nDtRechits_Wheelm2[4];
- TH1D *h_nDtRechits_Wheelm1[4];
- TH1D *h_nDtRechits_Wheel0[4];
- TH1D *h_nDtRechits_Wheel1[4];
- TH1D *h_nDtRechits_Wheel2[4];
- TH1D *h_nRpcRechits_Wheelm2[4];
- TH1D *h_nRpcRechits_Wheelm1[4];
- TH1D *h_nRpcRechits_Wheel0[4];
- TH1D *h_nRpcRechits_Wheel1[4];
- TH1D *h_nRpcRechits_Wheel2[4];
- TH1D *h_nRpcRechits_Layer1[4];
- TH1D *h_nRpcRechits_Layer2[4];
- TH1D *h_nRpcRechits_Layer3[4];
- TH1D *h_nRpcRechits_Layer4[4];
- TH1D *h_nRpcRechits_Layer5[4];
- TH1D *h_nRpcRechits_Layer6[4];
- TH1D *h_nStation[4];
- TH1D *h_nStationLowThresh[4];
- TH1D *h_nStationThresh[4];
- TH1D *h_nWheel[4];
- TH1D *h_nWheelLowThresh[4];
- TH1D *h_nWheelThresh[4];
- TH2D *h_dtRechitX_dtRechitY[4];
- TH2D *h_dtRechitZ_dtRechitR[4];
- TH2D *h_rpcRechitX_rpcRechitY[4];
- TH2D *h_rpcRechitZ_rpcRechitR[4];
- TH1D *h_nDtRechitClusters_noVeto[4];
- TH1D *h_nDtRechitClusters_fullVeto[4];
- TH1D *h_nDtRechitClusters_fullVetoPlus[4];
-
- Int_t wheelCount[5];
- Int_t stationCount[4];
- Int_t rpcLayerCount[6];
- Int_t rpcWheelCount[5];
- Int_t rechitWheel = -99;
- Int_t rechitStation = -99;
- Int_t rpcWheel = -99;
- Int_t rpcLayer = -99;
- Int_t nWheel = -1;
- Int_t nWheelLowThresh = -1;
- Int_t nWheelThresh = 1;
- Int_t nStation = -1;
- Int_t nStationLowThresh = -1;
- Int_t nStationThresh = -1;
-
- Double_t dPhi_tmp = 0.0;
- Double_t dPhi_min = 0.0;
- Double_t dPhiClusterMET = 0.0;
- vector rpcBx = {};
- Int_t rpcSpread = 0;
-
- Int_t evtNum = 0;
- Int_t itr_file = 0;
-
- Bool_t passCR = false;
- Bool_t passMuon = false;
- Bool_t passMB1 = false;
- Bool_t passJet = false;
- Int_t nPassNoVeto = 0;
- Int_t nPassFull = 0;
- Int_t nPassFullPlus = 0;
-
- for(Int_t itr_year=0; itr_year<3; itr_year++){
-
- sprintf(name,"h_jetRechitT_jetEta_%s",years[itr_year]);
- h_jetRechitT_jetEta[itr_year] = new TH2D(name,"",300,-15,15,150,-1.5,1.5);
-
- sprintf(name,"h_jetPhi_%s",years[itr_year]);
- h_jetPhi[itr_year] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_nDtRechits_%s",years[itr_year]);
- h_nDtRechits[itr_year] = new TH1D(name,"",500,0,5000);
-
- sprintf(name,"h_nRpcRechits_%s",years[itr_year]);
- h_nRpcRechits[itr_year] = new TH1D(name,"",250,0,500);
-
- sprintf(name,"h_nDtRechits_MB1_%s",years[itr_year]);
- h_nDtRechits_MB1[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_MB2_%s",years[itr_year]);
- h_nDtRechits_MB2[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_MB3_%s",years[itr_year]);
- h_nDtRechits_MB3[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_MB4_%s",years[itr_year]);
- h_nDtRechits_MB4[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_Wheelm2_%s",years[itr_year]);
- h_nDtRechits_Wheelm2[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_Wheelm1_%s",years[itr_year]);
- h_nDtRechits_Wheelm1[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_Wheel0_%s",years[itr_year]);
- h_nDtRechits_Wheel0[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_Wheel1_%s",years[itr_year]);
- h_nDtRechits_Wheel1[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nDtRechits_Wheel2_%s",years[itr_year]);
- h_nDtRechits_Wheel2[itr_year] = new TH1D(name,"",250,0,2500);
-
- sprintf(name,"h_nRpcRechits_Wheelm2_%s",years[itr_year]);
- h_nRpcRechits_Wheelm2[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Wheelm1_%s",years[itr_year]);
- h_nRpcRechits_Wheelm1[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Wheel0_%s",years[itr_year]);
- h_nRpcRechits_Wheel0[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Wheel1_%s",years[itr_year]);
- h_nRpcRechits_Wheel1[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Wheel2_%s",years[itr_year]);
- h_nRpcRechits_Wheel2[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Layer1_%s",years[itr_year]);
- h_nRpcRechits_Layer1[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Layer2_%s",years[itr_year]);
- h_nRpcRechits_Layer2[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Layer3_%s",years[itr_year]);
- h_nRpcRechits_Layer3[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Layer4_%s",years[itr_year]);
- h_nRpcRechits_Layer4[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Layer5_%s",years[itr_year]);
- h_nRpcRechits_Layer5[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nRpcRechits_Layer6_%s",years[itr_year]);
- h_nRpcRechits_Layer6[itr_year] = new TH1D(name,"",500,0,2500);
-
- sprintf(name,"h_nStation_%s",years[itr_year]);
- h_nStation[itr_year] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_nStationLowThresh_%s",years[itr_year]);
- h_nStationLowThresh[itr_year] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_nStationThresh_%s",years[itr_year]);
- h_nStationThresh[itr_year] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_nWheel_%s",years[itr_year]);
- h_nWheel[itr_year] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheelLowThresh_%s",years[itr_year]);
- h_nWheelLowThresh[itr_year] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheelThresh_%s",years[itr_year]);
- h_nWheelThresh[itr_year] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitX_dtRechitY_%s",years[itr_year]);
- h_dtRechitX_dtRechitY[itr_year] = new TH2D(name,"",320,-800,800,320,-800,800);
-
- sprintf(name,"h_rpcRechitX_rpcRechitY_%s",years[itr_year]);
- h_rpcRechitX_rpcRechitY[itr_year] = new TH2D(name,"",320,-800,800,320,-800,800);
-
- sprintf(name,"h_dtRechitZ_dtRechitR_%s",years[itr_year]);
- h_dtRechitZ_dtRechitR[itr_year] = new TH2D(name,"",240,-600,600,80,400,800);
-
- sprintf(name,"h_rpcRechitZ_rpcRechitR_%s",years[itr_year]);
- h_rpcRechitZ_rpcRechitR[itr_year] = new TH2D(name,"",240,-600,600,80,400,800);
-
- sprintf(name,"h_nDtRechitClusters_noVeto_%s",years[itr_year]);
- h_nDtRechitClusters_noVeto[itr_year] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_nDtRechitClusters_fullVeto_%s",years[itr_year]);
- h_nDtRechitClusters_fullVeto[itr_year] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_nDtRechitClusters_fullVetoPlus_%s",years[itr_year]);
- h_nDtRechitClusters_fullVetoPlus[itr_year] = new TH1D(name,"",5,0,5);
-
- TFile *_file;
- if(strcmp(years[itr_year],"All")==0){
- _file = TFile::Open(dir+years[itr_year]+"/v4/v4/normalized/Run2_displacedJetMuonNtupler_V1p15_Data2016_Data2017_Data2018-HighMET_goodLumi.root");
- }
- else{
- _file = TFile::Open(dir+years[itr_year]+"/v1/v3/normalized/Run2_displacedJetMuonNtupler_V1p17_Data"+years[itr_year]+"_"+runNames[itr_year]+"-HighMET-"+dates[itr_year]+"_goodLumi.root");
- }
-
- TTreeReader treeReader("MuonSystem",_file);
-
- TTreeReaderValue runNum(treeReader,"runNum");
- TTreeReaderValue lumiSec(treeReader,"lumiSec");
- TTreeReaderValue eventNum(treeReader,"evtNum");
- TTreeReaderValue MET(treeReader,"met");
- TTreeReaderValue METphi(treeReader,"metPhi");
-
- TTreeReaderValue nDtRechitClusters(treeReader,"nDtRechitClusters");
- TTreeReaderArray dtRechitClusterX(treeReader,"dtRechitClusterX");
- TTreeReaderArray dtRechitClusterY(treeReader,"dtRechitClusterY");
- TTreeReaderArray dtRechitClusterZ(treeReader,"dtRechitClusterZ");
- TTreeReaderArray dtRechitClusterPhi(treeReader,"dtRechitClusterPhi");
- TTreeReaderArray dtRechitClusterEta(treeReader,"dtRechitClusterEta");
- TTreeReaderArray dtRechitClusterXSpread(treeReader,"dtRechitClusterXSpread");
- TTreeReaderArray dtRechitClusterYSpread(treeReader,"dtRechitClusterYSpread");
- TTreeReaderArray dtRechitClusterZSpread(treeReader,"dtRechitClusterZSpread");
- TTreeReaderArray dtRechitClusterPhiSpread(treeReader,"dtRechitClusterPhiSpread");
- TTreeReaderArray dtRechitClusterEtaSpread(treeReader,"dtRechitClusterEtaSpread");
- TTreeReaderArray dtRechitClusterJetVetoPt(treeReader,"dtRechitClusterJetVetoPt");
- TTreeReaderArray dtRechitClusterMuonVetoPt(treeReader,"dtRechitClusterMuonVetoPt");
- TTreeReaderArray dtRechitClusterSize(treeReader,"dtRechitClusterSize");
- TTreeReaderArray dtRechitClusterNSegmentStation1(treeReader,"dtRechitClusterNSegmentStation1");
- TTreeReaderArray dtRechitClusterNSegmentStation2(treeReader,"dtRechitClusterNSegmentStation2");
- TTreeReaderArray dtRechitClusterNSegmentStation3(treeReader,"dtRechitClusterNSegmentStation3");
- TTreeReaderArray dtRechitClusterNSegmentStation4(treeReader,"dtRechitClusterNSegmentStation4");
- TTreeReaderArray dtRechitClusterMaxStation(treeReader,"dtRechitClusterMaxStation");
- TTreeReaderArray dtRechitClusterNStation(treeReader,"dtRechitClusterNStation");
- TTreeReaderArray dtRechitClusterMaxChamber(treeReader,"dtRechitClusterMaxChamber");
- TTreeReaderArray dtRechitClusterNChamber(treeReader,"dtRechitClusterNChamber");
-
- TTreeReaderValue nDtRechits(treeReader,"nDtRechits");
- TTreeReaderArray dtRechitX(treeReader,"dtRechitX");
- TTreeReaderArray dtRechitY(treeReader,"dtRechitY");
- TTreeReaderArray dtRechitZ(treeReader,"dtRechitZ");
- TTreeReaderArray dtRechitEta(treeReader,"dtRechitEta");
- TTreeReaderArray dtRechitPhi(treeReader,"dtRechitPhi");
- TTreeReaderArray dtRechitStation(treeReader,"dtRechitStation");
- TTreeReaderArray dtRechitWheel(treeReader,"dtRechitWheel");
-
- TTreeReaderValue nJets(treeReader,"nJets");
- TTreeReaderArray jetPt(treeReader,"jetPt");
- TTreeReaderArray jetEta(treeReader,"jetEta");
- TTreeReaderArray jetPhi(treeReader,"jetPhi");
- TTreeReaderArray jetRechitT(treeReader,"jetRechitT");
- TTreeReaderArray jetRechitT_rms(treeReader,"jetRechitT_rms");
- TTreeReaderArray jetElectronEnergyFraction(treeReader,"jetElectronEnergyFraction");
- TTreeReaderArray jetPhotonEnergyFraction(treeReader,"jetPhotonEnergyFraction");
- TTreeReaderArray jetNeutralHadronEnergyFraction(treeReader,"jetNeutralHadronEnergyFraction");
- TTreeReaderArray jetChargedHadronEnergyFraction(treeReader,"jetChargedHadronEnergyFraction");
- TTreeReaderArray jetMuonEnergyFraction(treeReader,"jetMuonEnergyFraction");
-
- TTreeReaderValue nRPCRechits(treeReader,"nRpc");
- TTreeReaderArray RPCRechitX(treeReader,"rpcX");
- TTreeReaderArray RPCRechitY(treeReader,"rpcY");
- TTreeReaderArray RPCRechitZ(treeReader,"rpcZ");
- TTreeReaderArray RPCRechitPhi(treeReader,"rpcPhi");
- TTreeReaderArray RPCRechitBx(treeReader,"rpcBx");
-
- _ofile->cd();
- evtNum = 0;
- cout << "Data" << years[itr_year] << endl;
- while(treeReader.Next()){
- fill_n(wheelCount, 5, 0);
- fill_n(stationCount, 4, 0);
- fill_n(rpcLayerCount, 6, 0);
- fill_n(rpcWheelCount, 5, 0);
- nWheel = 0;
- nWheelLowThresh = 0;
- nWheelThresh = 0;
- nStation = 0;
- nStationLowThresh = 0;
- nStationThresh = 0;
- passCR = false;
- nPassNoVeto = 0;
- nPassFull = 0;
- nPassFullPlus = 0;
- dPhi_min = 999.;
- if(evtNum%100000==0){ cout << evtNum << " of " << treeReader.GetEntries(1) << endl; }
-
- if(*MET > 200){
-
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(fabs(jetEta[itr_jet])<3.0 && jetPt[itr_jet]>30.0){
- dPhi_tmp = jetPhi[itr_jet] - *METphi;
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp) < dPhi_min){
- dPhi_min = fabs(dPhi_tmp);
- }
- }
- }
- if(fabs(dPhi_min)<0.6){ passCR = true; }
-
- if(passCR){
-
- if(*nDtRechits<750){
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- h_dtRechitX_dtRechitY[itr_year]->Fill(dtRechitX[itr_dt],dtRechitY[itr_dt]);
- h_dtRechitZ_dtRechitR[itr_year]->Fill(dtRechitZ[itr_dt],sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2)));
- rechitWheel = getWheel(dtRechitZ[itr_dt]);
- rechitWheel+=2;
- if(rechitWheel>=0 && rechitWheel<5){
- wheelCount[rechitWheel] += 1;
- }
- rechitStation = getStation(dtRechitX[itr_dt],dtRechitY[itr_dt]);
- if(rechitStation>-1){
- stationCount[rechitStation-1] += 1;
- }
- }
- }
- else{
- fill_n(wheelCount, 5, 150);
- fill_n(stationCount, 4, 150);
- }
- for(Int_t itr_wheel = 0; itr_wheel<5; itr_wheel++){
- if(wheelCount[itr_wheel] > 0){ nWheel += 1; }
- if(wheelCount[itr_wheel] > 4){ nWheelLowThresh += 1; }
- if(wheelCount[itr_wheel] > 12){ nWheelThresh += 1; }
- }
- for(Int_t itr_station = 0; itr_station<4; itr_station++){
- if(stationCount[itr_station]>0){ nStation += 1; }
- if(itr_station<3){
- if(stationCount[itr_station]>12){ nStationThresh += 1; }
- if(stationCount[itr_station]>4){ nStationLowThresh += 1; }
- }
- else{
- if(stationCount[itr_station]>8){ nStationThresh += 1; }
- if(stationCount[itr_station]>2){ nStationLowThresh += 1; }
- }
- }
-
- h_nDtRechits[itr_year]->Fill(*nDtRechits);
- h_nRpcRechits[itr_year]->Fill(*nRPCRechits);
- h_nDtRechits_MB1[itr_year]->Fill(stationCount[0]);
- h_nDtRechits_MB2[itr_year]->Fill(stationCount[1]);
- h_nDtRechits_MB3[itr_year]->Fill(stationCount[2]);
- h_nDtRechits_MB4[itr_year]->Fill(stationCount[3]);
- h_nDtRechits_Wheelm2[itr_year]->Fill(wheelCount[0]);
- h_nDtRechits_Wheelm1[itr_year]->Fill(wheelCount[1]);
- h_nDtRechits_Wheel0[itr_year]->Fill(wheelCount[2]);
- h_nDtRechits_Wheel1[itr_year]->Fill(wheelCount[3]);
- h_nDtRechits_Wheel2[itr_year]->Fill(wheelCount[4]);
- h_nStation[itr_year]->Fill(nStation);
- h_nStationLowThresh[itr_year]->Fill(nStationLowThresh);
- h_nStationThresh[itr_year]->Fill(nStationThresh);
- h_nWheel[itr_year]->Fill(nWheel);
- h_nWheelLowThresh[itr_year]->Fill(nWheelLowThresh);
- h_nWheelThresh[itr_year]->Fill(nWheelThresh);
-
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- h_jetRechitT_jetEta[itr_year]->Fill(jetRechitT[itr_jet],jetEta[itr_jet]);
- h_jetPhi[itr_year]->Fill(jetPhi[itr_jet]);
- }
-
- for(Int_t itr_rpc = 0; itr_rpc<*nRPCRechits; itr_rpc++){
- if(RPCRechitZ[itr_rpc]<661.){
- h_rpcRechitX_rpcRechitY[itr_year]->Fill(RPCRechitX[itr_rpc],RPCRechitY[itr_rpc]);
- h_rpcRechitZ_rpcRechitR[itr_year]->Fill(RPCRechitZ[itr_rpc],sqrt(pow(RPCRechitX[itr_rpc],2)+pow(RPCRechitY[itr_rpc],2)));
- rpcLayer = getRPCLayer(RPCRechitX[itr_rpc],RPCRechitY[itr_rpc]);
- if(rpcLayer>-1){
- rpcLayerCount[rpcLayer-1]+=1;
- }
- rpcWheel = getWheel(RPCRechitZ[itr_rpc]);
- rpcWheel+=2;
- if(rpcWheel>=0 && rpcWheel<5){
- rpcWheelCount[rpcWheel] += 1;
- }
- }
- }
-
- h_nRpcRechits_Layer1[itr_year]->Fill(rpcLayerCount[0]);
- h_nRpcRechits_Layer2[itr_year]->Fill(rpcLayerCount[1]);
- h_nRpcRechits_Layer3[itr_year]->Fill(rpcLayerCount[2]);
- h_nRpcRechits_Layer4[itr_year]->Fill(rpcLayerCount[3]);
- h_nRpcRechits_Layer5[itr_year]->Fill(rpcLayerCount[4]);
- h_nRpcRechits_Layer6[itr_year]->Fill(rpcLayerCount[5]);
- h_nRpcRechits_Wheelm2[itr_year]->Fill(rpcWheelCount[0]);
- h_nRpcRechits_Wheelm1[itr_year]->Fill(rpcWheelCount[1]);
- h_nRpcRechits_Wheel0[itr_year]->Fill(rpcWheelCount[2]);
- h_nRpcRechits_Wheel1[itr_year]->Fill(rpcWheelCount[3]);
- h_nRpcRechits_Wheel2[itr_year]->Fill(rpcWheelCount[4]);
-
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- rpcBx.clear();
- passJet = false;
- passMuon = false;
- passMB1 = false;
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- if(dtRechitClusterNSegmentStation1[itr_clust]==0){ passMB1 = true; }
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
-
- if(dtRechitClusterSize[itr_clust]>50 && ((dtRechitClusterPhi[itr_clust]<0.4 || dtRechitClusterPhi[itr_clust]>0.6) || (*runNum<275.75e3 || *runNum>275.95e3))){
- nPassNoVeto += 1;
-
- for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
- dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(RPCRechitZ[itr_rpc] - dtRechitClusterZ[itr_clust])<5. && fabs(dPhi_tmp)<0.4){
- rpcBx.push_back(RPCRechitBx[itr_rpc]);
- }
- }
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- }
-
- if(passJet && passMuon && passMB1){
- nPassFull += 1;
-
- if(!rpcBx.empty()){
- if(rpcSpread==0){
- if(dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhiClusterMET)<1.0){
- nPassFullPlus += 1;
- }
- }
- }
- }
- }
- }
- }
-
- h_nDtRechitClusters_noVeto[itr_year]->Fill(nPassNoVeto);
- h_nDtRechitClusters_fullVeto[itr_year]->Fill(nPassFull);
- h_nDtRechitClusters_fullVetoPlus[itr_year]->Fill(nPassFullPlus);
-
- }
- }
- evtNum+=1;
- }
- }
-
- _ofile->Write();
- _ofile->Close();
-
-}
diff --git a/analyzeSignal.C b/analyzeSignal.C
deleted file mode 100644
index 68b6e37..0000000
--- a/analyzeSignal.C
+++ /dev/null
@@ -1,2804 +0,0 @@
-R__LOAD_LIBRARY(libTreePlayer)
-
-int getStation(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 400. && hitR < 480.){ return 1; }
- else if(hitR > 485. && hitR < 560.){ return 2; }
- else if(hitR > 590. && hitR < 650.){ return 3; }
- else if(hitR > 690. && hitR < 800.){ return 4; }
- else{ return -1; }
-}
-
-int getWheel(float hitZ){
- if(hitZ > 0){
- if(hitZ < 127.){ return 0; }
- else if(hitZ < 395.){ return 1; }
- else if(hitZ < 661.){ return 2; }
- else{ return -99; }
- }
- else{
- return -1*getWheel(-1.0*hitZ);
- }
-}
-
-int getRPCLayer(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 410. && hitR < 440.){ return 1; }
- else if(hitR > 445. && hitR < 475.){ return 2; }
- else if(hitR > 490. && hitR < 520.){ return 3; }
- else if(hitR > 525. && hitR < 555.){ return 4; }
- else if(hitR > 600. && hitR < 630.){ return 5; }
- else if(hitR > 700. && hitR < 770.){ return 6; }
- else{ return -1; }
-}
-
-void analyzeSignal(){
-
- char name[50];
- char title[100];
- char mX[3][10] = {"15","40","55"};
- //char mX[2][10] = {"25","450"};
- //char ctau[10] = "1m";
- char ctau[10] = "10000";
- char years[3][20] = {"MC_Summer16","MC_Fall17","MC_Fall18"};
- //TString dir("/storage/user/mcitron/signalPointsGGHWithRPCWithFlags/");
- TString dir("/mnt/hadoop/store/group/phys_exotica/delayedjets/displacedJetMuonAnalyzer/driftTube/V1p17/");
- //TString dir("/mnt/hadoop/store/group/phys_exotica/delayedjets/displacedJetMuonAnalyzer/driftTube/V1p15/");
- TFile *_ofile = TFile::Open("outSig_central_V1p17_altTest5.root","RECREATE");
- Float_t lumi[3] = {37.8,44.98,63.67};
- Float_t xSec = 48.58;
- Float_t weight;
-
- TH1D *h_dPhiClusterMET[4];
- TH1D *h_dPhiClusterMETMax[4];
- TH1D *h_dPhiJetMET[4];
- TH1D *h_jetMet_dPhiMin4[4];
- TH1D *h_MET[4];
- TH1D *h_jetPt[4];
-
- TH1D *h_dPhiJetMETBarrel_noVeto[4];
- TH1D *h_dPhiJetMETBarrel_jetVeto[4];
- TH1D *h_dPhiJetMETBarrel_muonVeto[4];
- TH1D *h_dPhiJetMETBarrel_MB1Veto[4];
- TH1D *h_dPhiJetMETBarrel_noMB1Veto[4];
- TH1D *h_dPhiJetMETBarrel_fullVeto[4];
- TH1D *h_dPhiJetMETMagnet_noVeto[4];
- TH1D *h_dPhiJetMETMagnet_jetVeto[4];
- TH1D *h_dPhiJetMETMagnet_muonVeto[4];
- TH1D *h_dPhiJetMETMagnet_MB1Veto[4];
- TH1D *h_dPhiJetMETMagnet_noMB1Veto[4];
- TH1D *h_dPhiJetMETMagnet_fullVeto[4];
- TH1D *h_dPhiJetMETMagnet_fullHOVeto[4];
- TH1D *h_dPhiJetMETMagnet[4];
- TH1D *h_dPhiJetMETAll_noVeto[4];
- TH1D *h_dPhiJetMETAll_jetVeto[4];
- TH1D *h_dPhiJetMETAll_muonVeto[4];
- TH1D *h_dPhiJetMETAll_MB1Veto[4];
- TH1D *h_dPhiJetMETAll_noMB1Veto[4];
- TH1D *h_dPhiJetMETAll_fullVeto[4];
-
- TH1D *h_nDtRechitClusters_noVeto[4];
- TH1D *h_dtRechitClusterSize_noVeto[4];
- TH1D *h_nTotalClusteredRechits_noVeto[4];
- TH1D *h_dtRechitClusterMaxStation_noVeto[4];
- TH1D *h_dtRechitClusterNStation_noVeto[4];
- TH1D *h_dPhiClusterMET_noVeto[4];
- TH1D *h_dtRechitClusterXSpread_noVeto[4];
- TH1D *h_dtRechitClusterYSpread_noVeto[4];
- TH1D *h_dtRechitClusterZSpread_noVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_noVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_noVeto[4];
- TH1D *h_nRPCMatched_noVeto[4];
- TH1D *h_RPCMatchedBx_noVeto[4];
- TH1D *h_RPCMatchedBxSpread_noVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_noVeto[4];
- TH1D *h_nRPCMatched_Spread0_noVeto[4];
- TH2D *h_npv_nDtRechitClusters_noVeto[4];
-
- TH1D *h_nDtRechitClusters_muonVeto[4];
- TH1D *h_dtRechitClusterSize_muonVeto[4];
- TH1D *h_nTotalClusteredRechits_muonVeto[4];
- TH1D *h_dtRechitClusterMaxStation_muonVeto[4];
- TH1D *h_dtRechitClusterNStation_muonVeto[4];
- TH1D *h_dPhiClusterMET_muonVeto[4];
- TH1D *h_dtRechitClusterXSpread_muonVeto[4];
- TH1D *h_dtRechitClusterYSpread_muonVeto[4];
- TH1D *h_dtRechitClusterZSpread_muonVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_muonVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_muonVeto[4];
- TH1D *h_nRPCMatched_muonVeto[4];
- TH1D *h_RPCMatchedBx_muonVeto[4];
- TH1D *h_RPCMatchedBxSpread_muonVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_muonVeto[4];
- TH1D *h_nRPCMatched_Spread0_muonVeto[4];
-
- TH1D *h_nDtRechitClusters_jetVeto[4];
- TH1D *h_dtRechitClusterSizeBarrel_jetVeto[4];
- TH1D *h_dtRechitClusterSizeMagnet_jetVeto[4];
- TH1D *h_dtRechitClusterSizeAll_jetVeto[4];
- TH1D *h_dtRechitClusterSize_jetVeto[4];
- TH1D *h_nTotalClusteredRechits_jetVeto[4];
- TH1D *h_dtRechitClusterMaxStation_jetVeto[4];
- TH1D *h_dtRechitClusterNStation_jetVeto[4];
- TH1D *h_dPhiClusterMET_jetVeto[4];
- TH1D *h_dtRechitClusterXSpread_jetVeto[4];
- TH1D *h_dtRechitClusterYSpread_jetVeto[4];
- TH1D *h_dtRechitClusterZSpread_jetVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_jetVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_jetVeto[4];
- TH1D *h_nRPCMatched_jetVeto[4];
- TH1D *h_nRPCMatchedMagnet_jetVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer1_jetVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer2_jetVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer3_jetVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer4_jetVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer1_fullHOVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer2_fullHOVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer3_fullHOVeto[4];
- TH1D *h_nRPCMatchedMagnetLayer4_fullHOVeto[4];
- TH1D *h_RPCMatchedBx_jetVeto[4];
- TH1D *h_RPCMatchedBxSpread_jetVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_jetVeto[4];
- TH1D *h_nRPCMatched_Spread0_jetVeto[4];
-
- TH1D *h_nDtRechitClusters_MB1Veto[4];
- TH1D *h_dtRechitClusterSizeBarrel_MB1Veto[4];
- TH1D *h_dtRechitClusterSizeMagnet_MB1Veto[4];
- TH1D *h_dtRechitClusterSizeAll_MB1Veto[4];
- TH1D *h_dtRechitClusterSize_MB1Veto[4];
- TH1D *h_nTotalClusteredRechits_MB1Veto[4];
- TH1D *h_dtRechitClusterMaxStation_MB1Veto[4];
- TH1D *h_dtRechitClusterNStation_MB1Veto[4];
- TH1D *h_dPhiClusterMET_MB1Veto[4];
- TH1D *h_dtRechitClusterXSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterYSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterZSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterEtaSpread_MB1Veto[4];
- TH1D *h_dtRechitClusterPhiSpread_MB1Veto[4];
- TH1D *h_nRPCMatched_MB1Veto[4];
- TH1D *h_RPCMatchedBx_MB1Veto[4];
- TH1D *h_RPCMatchedBxSpread_MB1Veto[4];
- TH1D *h_nRPCMatched_Spread0_MB1Veto[4];
- TH1D *h_RPCMatchedBx_Spread0_MB1Veto[4];
-
- TH1D *h_nDtRechitClusters_fullVeto[4];
- TH1D *h_dtRechitClusterSizeBarrel_fullVeto[4];
- TH1D *h_dtRechitClusterSizeMagnet_fullVeto[4];
- TH1D *h_dtRechitClusterSizeAll_fullVeto[4];
- TH1D *h_dtRechitClusterSize_fullVeto[4];
- TH1D *h_nTotalClusteredRechits_fullVeto[4];
- TH1D *h_dtRechitClusterMaxStation_fullVeto[4];
- TH1D *h_dtRechitClusterMaxStation_fullHOVeto[4];
- TH1D *h_dtRechitClusterNStation_fullVeto[4];
- TH1D *h_dtRechitClusterNStationUnclustered_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshStation_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshLowStation_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshStationUnclustered_fullVeto[4];
- TH1D *h_dtRechitClusterNThreshLowStationUnclustered_fullVeto[4];
- TH1D *h_dPhiClusterMET_fullVeto[4];
- TH1D *h_dPhiClusterMET_fullHOVeto[4];
- TH1D *h_dtRechitClusterXSpread_fullVeto[4];
- TH1D *h_dtRechitClusterYSpread_fullVeto[4];
- TH1D *h_dtRechitClusterZSpread_fullVeto[4];
- TH1D *h_dtRechitClusterEtaSpread_fullVeto[4];
- TH1D *h_dtRechitClusterPhiSpread_fullVeto[4];
- TH1D *h_nRPCMatched_fullVeto[4];
- TH1D *h_nRPCMatched_fullHOVeto[4];
- TH1D *h_RPCMatchedBx_fullVeto[4];
- TH1D *h_RPCMatchedBxSpread_fullVeto[4];
- TH1D *h_RPCMatchedBxSpread_fullHOVeto[4];
- TH1D *h_nRPCMatched_Spread0_fullVeto[4];
- TH1D *h_RPCMatchedBx_Spread0_fullVeto[4];
-
- TH1D *h_dtRechitClusterEta_fullVeto[4];
- TH1D *h_dtRechitClusterPhi_fullVeto[4];
- TH1D *h_dtRechitClusterR_fullVeto[4];
- TH1D *h_dtRechitClusterZ_fullVeto[4];
- TH2D *h_dtRechitClusterRZ_fullVeto[4];
- TH2D *h_dtRechitClusterRZFine_fullVeto[4];
- TH1D *h_dtRechitClusterNWheels50_fullVeto[4];
- TH1D *h_dtRechitClusterNWheels25_fullVeto[4];
- TH1D *h_dtRechitClusterNWheels1_fullVeto[4];
- TH1D *h_dtRechitClusterMaxWheel_fullVeto[4];
- TH2D *h_npv_nDtRechitClusters_fullVeto[4];
- TH1D *h_gLLPpt_fullVeto[4];
- TH1D *h_gLLPpt_Bx0_fullVeto[4];
- TH1D *h_gLLPpt_Bx1_fullVeto[4];
- TH1D *h_gLLP_travel_time_fullVeto[4];
-
- TH1D *h_RPCMatchedBx_invertedJetVeto[4];
- TH1D *h_RPCMatchedBx_invertedMuonVeto[4];
- TH1D *h_RPCMatchedBx_invertedMuJetVeto[4];
-
- TH1D *h_dtRechitClusterSize_noMB1Veto[4];
- TH1D *h_dtRechitClusterSizeBarrel_noMB1Veto[4];
- TH1D *h_dtRechitClusterSizeMagnet_noMB1Veto[4];
- TH1D *h_dtRechitClusterSizeAll_noMB1Veto[4];
- TH1D *h_dtRechitClusterNStation_noMB1Veto[4];
- TH1D *h_dtRechitClusterNRechitsMB1_noMB1Veto[4];
- TH1D *h_dtRechitClusterPercentRechitsMB1_noMB1Veto[4];
- TH1D *h_nRPCMatched_noMB1Veto[4];
- TH1D *h_nRPCMatchedLayer1_noMB1Veto[4];
- TH1D *h_nRPCMatchedLayer2_noMB1Veto[4];
- TH1D *h_nRPCMatchedLayer12_noMB1Veto[4];
- TH1D *h_RPCMatchedBxSpread_noMB1Veto[4];
-
- TH1D *h_dtRechitClusterSizeBarrel_HOVeto[4];
- TH1D *h_dtRechitClusterSizeMagnet_HOVeto[4];
- TH1D *h_dtRechitClusterSizeAll_HOVeto[4];
-
- TH1D *h_dtRechitClusterSizeBarrel_fullHOVeto[4];
- TH1D *h_dtRechitClusterSizeMagnet_fullHOVeto[4];
- TH1D *h_dtRechitClusterSizeAll_fullHOVeto[4];
-
- TH1D *h_nTotalClusteredRechitsBarrel_noVeto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_noVeto[4];
- TH1D *h_nTotalClusteredRechitsAll_noVeto[4];
- TH1D *h_nTotalClusteredRechitsBarrel_jetVeto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_jetVeto[4];
- TH1D *h_nTotalClusteredRechitsAll_jetVeto[4];
- TH1D *h_nTotalClusteredRechitsBarrel_MB1Veto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_MB1Veto[4];
- TH1D *h_nTotalClusteredRechitsAll_MB1Veto[4];
- TH1D *h_nTotalClusteredRechitsBarrel_noMB1Veto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_noMB1Veto[4];
- TH1D *h_nTotalClusteredRechitsAll_noMB1Veto[4];
- TH1D *h_nTotalClusteredRechitsBarrel_HOVeto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_HOVeto[4];
- TH1D *h_nTotalClusteredRechitsAll_HOVeto[4];
- TH1D *h_nTotalClusteredRechitsBarrel_fullVeto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_fullVeto[4];
- TH1D *h_nTotalClusteredRechitsAll_fullVeto[4];
- TH1D *h_nTotalClusteredRechitsBarrel_fullHOVeto[4];
- TH1D *h_nTotalClusteredRechitsMagnet_fullHOVeto[4];
- TH1D *h_nTotalClusteredRechitsAll_fullHOVeto[4];
-
- TH1D *h_dtRechitClusterSize_RPCMatch[4];
- TH1D *h_dtRechitClusterSize_RPCSpread0[4];
- TH1D *h_nTotalClusteredRechits_fullVetoPlus[4];
- TH1D *h_nTotalClusteredRechitsBarrel_fullVetoPlus[4];
- TH1D *h_nTotalClusteredRechitsMagnet_fullHOVetoPlus[4];
- TH1D *h_dtRechitClusterXSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterYSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterZSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterEtaSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterPhiSpread_fullVetoPlus[4];
- TH1D *h_dtRechitClusterEta_fullVetoPlus[4];
- TH1D *h_dtRechitClusterPhi_fullVetoPlus[4];
- TH2D *h_dtRechitClusterEtaPhi_fullVetoPlus[4];
- TH1D *h_dtRechitClusterNStation_fullVetoPlus[4];
- TH1D *h_dtRechitClusterSizeRatio_fullVetoPlus[4];
- TH1D *h_dtRechitClusterSizeRatio_fullVetoMinus[4];
- TH1D *h_dtRechitClusterNWheel_fullVetoPlus[4];
- TH1D *h_dtRechitClusterNStation_fullHOVetoPlus[4];
- TH1D *h_dtRechitClusterNWheel_fullHOVetoPlus[4];
-
- TH1D *h_HOMatchedEnergyCluster280Magnet_noMB1Veto[4];
-
- TH1D *h_HOTime_fullHOVeto[4];
-
- TH1D *h_muonPt_jetMB1Veto[4];
- TH1D *h_jetPt_muonMB1Veto[4];
- TH1D *h_MB1Rechits_jetMuonVeto[4];
- TH1D *h_muonPt_jetHOVeto[4];
- TH1D *h_jetPt_muonHOVeto[4];
- TH1D *h_HOEnergy_jetMuonVeto[4];
-
- TH1D *h_muonDR_fullVeto[4];
- TH1D *h_muonDR_RPCMatch[4];
- TH1D *h_muonDR_RPCSpread0[4];
- TH1D *h_jetDR_fullVeto[4];
- TH1D *h_jetDR_RPCMatch[4];
- TH1D *h_jetDR_RPCSpread0[4];
- TH1D *h_muonDR_fullHOVeto[4];
- TH1D *h_muonDR_HORPCMatch[4];
- TH1D *h_muonDR_HORPCSpread0[4];
- TH1D *h_jetDR_fullHOVeto[4];
- TH1D *h_jetDR_HORPCMatch[4];
- TH1D *h_jetDR_HORPCSpread0[4];
-
- TH1D *h_decayVertexRadius_noVeto[4];
- TH1D *h_HOEnergy_jetVeto[4];
- TH1D *h_dRClusterRPC_jetVeto[4];
- TH1D *h_dRClusterHO_jetVeto[4];
-
- TH1D *h_jetDR_minDR_fullHOVetoPlus[4];
- TH1D *h_jetPt_minDR_fullHOVetoPlus[4];
- TH1D *h_jetEta_minDR_fullHOVetoPlus[4];
- TH1D *h_jetPhi_minDR_fullHOVetoPlus[4];
- TH1D *h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus[4];
- TH1D *h_jetDR_minDR_vetoJet[4];
- TH1D *h_jetPt_minDR_vetoJet[4];
- TH1D *h_jetEta_minDR_vetoJet[4];
- TH1D *h_jetPhi_minDR_vetoJet[4];
- TH1D *h_jetChargedEMEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetNeutralEMEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetNeutralHadronEnergyFraction_minDR_vetoJet[4];
- TH1D *h_jetChargedHadronEnergyFraction_minDR_vetoJet[4];
-
- TH1D *h_nWheels1_noCluster[4];
- TH1D *h_nWheels10_noCluster[4];
- TH1D *h_nWheels20_noCluster[4];
- TH1D *h_nWheels30_noCluster[4];
- TH1D *h_nWheels50_noCluster[4];
- TH1D *h_nWheels150_noCluster[4];
- TH1D *h_nWheels1_noVeto[4];
- TH1D *h_nWheels1_fullVetoPlus[4];
- TH1D *h_nWheels1_fullVetoMinus[4];
- TH1D *h_nWheels10_noVeto[4];
- TH1D *h_nWheels10_fullVetoPlus[4];
- TH1D *h_nWheels10_fullVetoMinus[4];
- TH1D *h_nWheels20_noVeto[4];
- TH1D *h_nWheels20_fullVetoPlus[4];
- TH1D *h_nWheels20_fullVetoMinus[4];
- TH1D *h_nWheels30_noVeto[4];
- TH1D *h_nWheels30_fullVetoPlus[4];
- TH1D *h_nWheels30_fullVetoMinus[4];
- TH1D *h_nWheels50_noVeto[4];
- TH1D *h_nWheels50_fullVetoPlus[4];
- TH1D *h_nWheels50_fullVetoMinus[4];
- TH1D *h_nWheels150_noVeto[4];
- TH1D *h_nWheels150_fullVetoPlus[4];
- TH1D *h_nWheels150_fullVetoMinus[4];
-
- TH1D *h_jetPtMax_noVeto[4];
- TH1D *h_jetPtMax_fullVeto[4];
- TH1D *h_jetPtMax_fullVetoPlus[4];
- TH1D *h_jetPtMax_fullVetoMinus[4];
- TH1D *h_jetPtMET_noVeto[4];
- TH1D *h_jetPtMET_fullVeto[4];
- TH1D *h_jetPtMET_fullVetoPlus[4];
- TH1D *h_jetPtMET_fullVetoMinus[4];
-
- Double_t dPhi_tmp = 0.0;
- Double_t dPhiClusterMET = 0.0;
- Double_t dPhiClusterMET_max = 0.0;
- Double_t dPhi_min = 999.;
- Double_t clustSizeMax = 0.;
- Double_t dPhi_clust = 999.;
- Double_t jetPt_tmp = 0.0;
- Double_t dPhi_minTop4 = 0.0;
- Double_t dPhi_min20 = 0.0;
- Double_t dPhi_min30 = 0.0;
- Double_t dPhi_min50 = 0.0;
- Double_t muonPt_max = 0.0;
- Double_t muonDR_min = 0.0;
- Double_t jetPt_max = 0.0;
- Double_t jetDR_min = 0.0;
- Int_t jetDR_index = -1;
-
- Int_t rechitCount[5];
- Int_t stationCount[4];
- Int_t rechitWheel = -99;
- Int_t rechitStation = -99;
- Int_t hitWheels1 = -1;
- Int_t hitWheels10 = -1;
- Int_t hitWheels20 = -1;
- Int_t hitWheels30 = -1;
- Int_t hitWheels50 = -1;
- Int_t hitWheels150 = -1;
- Int_t nStationUnclustered = -1;
- Int_t nThreshStation = -1;
- Int_t nThreshLowStation = -1;
- Int_t nThreshStationUnclustered = -1;
- Int_t nThreshLowStationUnclustered = -1;
-
- vector muStatus = {};
- Double_t dR_tmp = 0.0;
- Int_t nMatched = 0;
- vector goodStatus = {1,44,51,52,91};
- vector rpcBx = {};
- vector rpcLayer = {};
- vector zWheel = {};
- Int_t rpcSpread = 0;
- Float_t rpcMean = 0;
-
- Int_t evtNum = 0;
- Int_t totalNum = 0;
- Bool_t goodEvt = false;
- Int_t itr_file = 0;
- Int_t goodJets = 0;
- Bool_t matchJet = false;
- Bool_t matchMuon = false;
- Int_t match = 0;
- Int_t matchLayer1 = 0;
- Int_t matchLayer2 = 0;
- Int_t matchLayer3 = 0;
- Int_t matchLayer4 = 0;
- Int_t matchHO = 0;
- Float_t sumE = 0.0;
- Float_t totalSumE = 0.0;
- Float_t weightT = 0.0;
- Int_t llp_itr = -1;
-
- Bool_t passMuon = false;
- Bool_t passMuon_alt = false;
- Bool_t passMB1_alt = false;
- Bool_t passJet = false;
- Bool_t passMB1 = false;
- Bool_t passHO = false;
- Bool_t passInvertedJet = false;
- Bool_t passInvertedMuon = false;
- Bool_t passInvertedMuJet = false;
- Int_t nPassMuon = 0;
- Int_t nPassJet = 0;
- Int_t nPassMuon_std = 0;
- Int_t nPassMB1_std = 0;
- Int_t nPassMuon_alt = 0;
- Int_t nPassMB1_alt = 0;
- Int_t nPassJetMuon = 0;
- Int_t nPassMB1 = 0;
- Int_t nPassHO = 0;
- Int_t nPassJetMuon_std = 0;
- Int_t nPassJetMB1_std = 0;
- Int_t nPassFull = 0;
- Int_t nPassFull_std = 0;
- Int_t nPassFull_altMuon = 0;
- Int_t nPassFull_altMB1 = 0;
- Int_t nPassFull_altMuonMB1 = 0;
- Int_t nPassFullHO = 0;
- Int_t nPassNone = 0;
- Int_t nPassFullPlus = 0;
- Int_t nPassFullDTPlus_noMuon = 0;
- Int_t nPassFullDTPlus_noMB1 = 0;
- Int_t nPassFullDTPlus_std = 0;
- Int_t nPassFullDTPlus_altMuon = 0;
- Int_t nPassFullDTPlus_altMB1 = 0;
- Int_t nPassFullDTPlus_altMuonMB1 = 0;
- Int_t nPassFullMinus = 0;
- Int_t totalBarrelEvents = 0;
- Int_t totalMagnetEvents = 0;
- Int_t totalEvents = 0;
- Int_t totalClusteredNone = 0;
- Int_t totalClusteredNoMB1 = 0;
- Int_t totalClusteredJet = 0;
- Int_t totalClusteredMB1 = 0;
- Int_t totalClusteredHO = 0;
- Int_t totalClusteredFull = 0;
- Int_t totalClusteredFullHO = 0;
- Float_t noEff = 0.0;
- Float_t muonEff = 0.0;
- Float_t jetEff = 0.0;
- Float_t MB1Eff = 0.0;
- Float_t HOEff = 0.0;
- Float_t fullHOEff = 0.0;
- Float_t fullEff = 0.0;
-
- Bool_t goodDecay = false;
- Bool_t magnetDecay = false;
-
- Bool_t passMuonEvent_std=false;
- Bool_t passMB1Event_std=false;
- Bool_t passMuonEvent_alt=false;
- Bool_t passMB1Event_alt=false;
- Bool_t passJetMB1_std=false;
- Bool_t passJetMuon_std=false;
- Bool_t passFull_std = false;
- Bool_t passFull_altMuon = false;
- Bool_t passFull_altMB1 = false;
- Bool_t passFull_altMuonMB1 = false;
- Bool_t passFullDTPlus_noMuon = false;
- Bool_t passFullDTPlus_noMB1 = false;
- Bool_t passFullDTPlus_std = false;
- Bool_t passFullDTPlus_altMuon = false;
- Bool_t passFullDTPlus_altMB1 = false;
- Bool_t passFullDTPlus_altMuonMB1 = false;
-
- Bool_t passNoVeto = false;
- Bool_t passFullVeto = false;
- Bool_t passRPCMatch = false;
- Bool_t passRPCSpread = false;
- Bool_t passMaxStation = false;
- Bool_t passDeltaPhi = false;
- Bool_t passFullVeto_ho = false;
- Bool_t passRPCMatch_ho = false;
- Bool_t passRPCSpread_ho = false;
- Bool_t passMaxStation_ho = false;
- Bool_t passDeltaPhi_ho = false;
- Bool_t passJetMET = false;
- Bool_t passJetMET_20 = false;
- Bool_t passJetMET_30 = false;
- Bool_t passJetMET_50 = false;
- Bool_t passJetMET_top4 = false;
-
- Float_t nPassMET = 0;
- Float_t nPassDTDecay = 0;
- Float_t nPassJetMET = 0;
- Float_t nPassJetMET_top4 = 0;
- Float_t nPassJetMET_20 = 0;
- Float_t nPassJetMET_30 = 0;
- Float_t nPassJetMET_50 = 0;
- Float_t nPassNoVeto = 0;
- Float_t nPassFullVeto = 0;
-
- Float_t nPassMaxStation = 0;
- Float_t nPassDeltaPhi = 0;
- Float_t nPassRPCMatch = 0;
- Float_t nPassRPCSpread = 0;
-
- Float_t nPassHODecay = 0;
- Float_t nPassNoVeto_ho = 0;
- Float_t nPassFullVeto_ho = 0;
- Float_t nPassRPCMatch_ho = 0;
- Float_t nPassRPCSpread_ho = 0;
- Float_t nPassDeltaPhi_ho = 0;
-
- Int_t totalClusteredFullPlus = 0;
- Int_t totalClusteredFullHOPlus = 0;
-
- for(Int_t itr_mX=0; itr_mX<3; itr_mX++){
- sprintf(name,"h_jetMet_dPhiMin4_%s_%s",mX[itr_mX],ctau);
- h_jetMet_dPhiMin4[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMET_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMET[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETBarrel_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETBarrel_noVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETBarrel_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETBarrel_jetVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETBarrel_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETBarrel_muonVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETBarrel_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETBarrel_MB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETBarrel_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETBarrel_noMB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETBarrel_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETBarrel_fullVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_noVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_jetVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_muonVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_MB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_noMB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_fullVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet_fullHOVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETMagnet_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETMagnet[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETAll_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETAll_noVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETAll_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETAll_jetVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETAll_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETAll_muonVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETAll_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETAll_MB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETAll_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETAll_noMB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiJetMETAll_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiJetMETAll_fullVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiClusterMET_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiClusterMETMax_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMETMax[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_MET_%s_%s",mX[itr_mX],ctau);
- h_MET[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_jetPt_%s_%s",mX[itr_mX],ctau);
- h_jetPt[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nDtRechitClusters_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nDtRechitClusters_noVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechits_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxStation_noVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_noVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET_noVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterXSpread_noVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterYSpread_noVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZSpread_noVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaSpread_noVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_noVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhiSpread_noVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_noVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_noVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_noVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_noVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_noVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_noVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_Spread0_noVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_Spread0_noVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_nDtRechitClusters_muonVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSize_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_muonVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechits_muonVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxStation_muonVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_muonVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET_muonVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterXSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterYSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZSpread_muonVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhiSpread_muonVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_muonVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_muonVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_muonVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_Spread0_muonVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_muonVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_Spread0_muonVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nDtRechitClusters_jetVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSizeBarrel_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeBarrel_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeMagnet_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeMagnet_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeAll_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeAll_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechits_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxStation_jetVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_jetVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET_jetVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterXSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterYSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZSpread_jetVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhiSpread_jetVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_jetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_jetVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedMagnet_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnet_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer1_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer1_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer2_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer2_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer3_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer3_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer4_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer4_jetVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer1_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer1_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer2_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer2_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer3_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer3_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_nRPCMatchedMagnetLayer4_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedMagnetLayer4_fullHOVeto[itr_file] = new TH1D(name,"",30,0,30);
-
- sprintf(name,"h_RPCMatchedBxSpread_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_jetVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_Spread0_jetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_Spread0_jetVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_dtRechitClusterSizeBarrel_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeBarrel_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nDtRechitClusters_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nDtRechitClusters_MB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSizeMagnet_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeMagnet_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeAll_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeAll_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechits_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxStation_MB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_MB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET_MB1Veto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterXSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterYSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZSpread_MB1Veto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhiSpread_MB1Veto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_MB1Veto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_MB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_MB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_Spread0_MB1Veto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_Spread0_MB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nDtRechitClusters_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nDtRechitClusters_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSizeBarrel_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeBarrel_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeMagnet_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeMagnet_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeAll_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeAll_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechits_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechits_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterMaxStation_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterMaxStation_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxStation_fullHOVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStationUnclustered_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStationUnclustered_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshStation_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNThreshStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshLowStation_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNThreshLowStation_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshStationUnclustered_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNThreshStationUnclustered_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNThreshLowStationUnclustered_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNThreshLowStationUnclustered_fullVeto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dPhiClusterMET_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET_fullVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dPhiClusterMET_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_dPhiClusterMET_fullHOVeto[itr_file] = new TH1D(name,"",70,0,3.5);
-
- sprintf(name,"h_dtRechitClusterXSpread_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterXSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterYSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZSpread_fullVeto[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhiSpread_fullVeto[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_RPCMatchedBx_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_fullVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_fullVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatched_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_fullHOVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_fullVeto[itr_file] = new TH1D(name,"",10,0,10);
-
- sprintf(name,"h_RPCMatchedBxSpread_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_fullHOVeto[itr_file] = new TH1D(name,"",10,0,10);
-
- sprintf(name,"h_RPCMatchedBx_Spread0_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_Spread0_fullVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_nRPCMatched_Spread0_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_Spread0_fullVeto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_dtRechitClusterEta_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEta_fullVeto[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_dtRechitClusterPhi_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhi_fullVeto[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterR_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterR_fullVeto[itr_file] = new TH1D(name,"",40,0,800);
-
- sprintf(name,"h_dtRechitClusterZ_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZ_fullVeto[itr_file] = new TH1D(name,"",120,-600,600);
-
- sprintf(name,"h_dtRechitClusterRZ_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterRZ_fullVeto[itr_file] = new TH2D(name,"",120,-600,600,40,400,800);
-
- sprintf(name,"h_dtRechitClusterRZFine_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterRZFine_fullVeto[itr_file] = new TH2D(name,"",1200,-600,600,400,400,800);
-
- sprintf(name,"h_dtRechitClusterNWheels50_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNWheels50_fullVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitClusterNWheels25_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNWheels25_fullVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitClusterNWheels1_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNWheels1_fullVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_dtRechitClusterMaxWheel_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterMaxWheel_fullVeto[itr_file] = new TH1D(name,"",6,-3,3);
-
- sprintf(name,"h_gLLPpt_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_gLLPpt_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_gLLPpt_Bx0_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_gLLPpt_Bx0_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_gLLPpt_Bx1_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_gLLPpt_Bx1_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_gLLP_travel_time_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_gLLP_travel_time_fullVeto[itr_file] = new TH1D(name,"",100,0,10000);
-
- sprintf(name,"h_npv_nDtRechitClusters_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_npv_nDtRechitClusters_fullVeto[itr_file] = new TH2D(name,"",10,0,10,5,0,5);
-
- sprintf(name,"h_RPCMatchedBx_invertedJetVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_invertedJetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_RPCMatchedBx_invertedMuonVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_invertedMuonVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_RPCMatchedBx_invertedMuJetVeto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBx_invertedMuJetVeto[itr_file] = new TH1D(name,"",13,-6.5,6.5);
-
- sprintf(name,"h_dtRechitClusterSize_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_noMB1Veto[itr_file] = new TH1D(name,"",50,0,500);
-
- sprintf(name,"h_dtRechitClusterSizeBarrel_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeBarrel_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeMagnet_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeMagnet_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeAll_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeAll_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterNStation_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_noMB1Veto[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNRechitsMB1_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNRechitsMB1_noMB1Veto[itr_file] = new TH1D(name,"",50,0,500);
-
- sprintf(name,"h_dtRechitClusterPercentRechitsMB1_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPercentRechitsMB1_noMB1Veto[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_nRPCMatched_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatched_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedLayer1_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedLayer1_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedLayer2_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedLayer2_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_nRPCMatchedLayer12_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nRPCMatchedLayer12_noMB1Veto[itr_file] = new TH1D(name,"",20,0,20);
-
- sprintf(name,"h_RPCMatchedBxSpread_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_RPCMatchedBxSpread_noMB1Veto[itr_file] = new TH1D(name,"",10,0,10);
-
- sprintf(name,"h_dtRechitClusterSizeBarrel_HOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeBarrel_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeMagnet_HOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeMagnet_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeAll_HOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeAll_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeBarrel_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeBarrel_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeMagnet_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeMagnet_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSizeAll_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeAll_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_noVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_jetVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_MB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_MB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_noMB1Veto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_HOVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_HOVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_HOVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_HOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_fullVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsAll_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsAll_fullHOVeto[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_RPCMatch_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_RPCMatch[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterSize_RPCSpread0_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSize_RPCSpread0[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsBarrel_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsBarrel_fullVetoPlus[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_nTotalClusteredRechitsMagnet_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nTotalClusteredRechitsMagnet_fullHOVetoPlus[itr_file] = new TH1D(name,"",100,0,1000);
-
- sprintf(name,"h_dtRechitClusterXSpread_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterXSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterYSpread_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterYSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,400);
-
- sprintf(name,"h_dtRechitClusterZSpread_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterZSpread_fullVetoPlus[itr_file] = new TH1D(name,"",30,0,150);
-
- sprintf(name,"h_dtRechitClusterEtaSpread_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterPhiSpread_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhiSpread_fullVetoPlus[itr_file] = new TH1D(name,"",40,0,0.4);
-
- sprintf(name,"h_dtRechitClusterEta_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEta_fullVetoPlus[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_dtRechitClusterPhi_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterPhi_fullVetoPlus[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_dtRechitClusterEtaPhi_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterEtaPhi_fullVetoPlus[itr_file] = new TH2D(name,"",70,-3.5,3.5,60,-3,3);
-
- sprintf(name,"h_dtRechitClusterNStation_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_fullVetoPlus[itr_file] = new TH1D(name,"",4,0,4);
-
- sprintf(name,"h_dtRechitClusterNWheel_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNWheel_fullVetoPlus[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterNStation_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNStation_fullHOVetoPlus[itr_file] = new TH1D(name,"",4,0,4);
-
- sprintf(name,"h_dtRechitClusterNWheel_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterNWheel_fullHOVetoPlus[itr_file] = new TH1D(name,"",5,0,5);
-
- sprintf(name,"h_dtRechitClusterSizeRatio_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeRatio_fullVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_dtRechitClusterSizeRatio_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_dtRechitClusterSizeRatio_fullVetoMinus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_HOMatchedEnergyCluster280Magnet_noMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_HOMatchedEnergyCluster280Magnet_noMB1Veto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOTime_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_HOTime_fullHOVeto[itr_file] = new TH1D(name,"",60,-60,60);
-
- sprintf(name,"h_muonPt_jetMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_muonPt_jetMB1Veto[itr_file] = new TH1D(name,"",50,0,100);
-
- sprintf(name,"h_jetPt_muonMB1Veto_%s_%s",mX[itr_mX],ctau);
- h_jetPt_muonMB1Veto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_MB1Rechits_jetMuonVeto_%s_%s",mX[itr_mX],ctau);
- h_MB1Rechits_jetMuonVeto[itr_file] = new TH1D(name,"",200,0,200);
-
- sprintf(name,"h_muonPt_jetHOVeto_%s_%s",mX[itr_mX],ctau);
- h_muonPt_jetHOVeto[itr_file] = new TH1D(name,"",50,0,100);
-
- sprintf(name,"h_jetPt_muonHOVeto_%s_%s",mX[itr_mX],ctau);
- h_jetPt_muonHOVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_HOEnergy_jetMuonVeto_%s_%s",mX[itr_mX],ctau);
- h_HOEnergy_jetMuonVeto[itr_file] = new TH1D(name,"",40,0,200);
-
- sprintf(name,"h_muonDR_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_muonDR_fullVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_RPCMatch_%s_%s",mX[itr_mX],ctau);
- h_muonDR_RPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_RPCSpread0_%s_%s",mX[itr_mX],ctau);
- h_muonDR_RPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_jetDR_fullVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_RPCMatch_%s_%s",mX[itr_mX],ctau);
- h_jetDR_RPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_RPCSpread0_%s_%s",mX[itr_mX],ctau);
- h_jetDR_RPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_muonDR_fullHOVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_HORPCMatch_%s_%s",mX[itr_mX],ctau);
- h_muonDR_HORPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_muonDR_HORPCSpread0_%s_%s",mX[itr_mX],ctau);
- h_muonDR_HORPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_fullHOVeto_%s_%s",mX[itr_mX],ctau);
- h_jetDR_fullHOVeto[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_HORPCMatch_%s_%s",mX[itr_mX],ctau);
- h_jetDR_HORPCMatch[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetDR_HORPCSpread0_%s_%s",mX[itr_mX],ctau);
- h_jetDR_HORPCSpread0[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_decayVertexRadius_noVeto_%s_%s",mX[itr_mX],ctau);
- h_decayVertexRadius_noVeto[itr_file] = new TH1D(name,"",80,0,800);
-
- sprintf(name,"h_HOEnergy_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_HOEnergy_jetVeto[itr_file] = new TH1D(name,"",40,0,200);
-
- sprintf(name,"h_dRClusterRPC_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dRClusterRPC_jetVeto[itr_file] = new TH1D(name,"",30,0,3);
-
- sprintf(name,"h_dRClusterHO_jetVeto_%s_%s",mX[itr_mX],ctau);
- h_dRClusterHO_jetVeto[itr_file] = new TH1D(name,"",30,0,3);
-
- sprintf(name,"h_jetDR_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetDR_minDR_vetoJet[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetPt_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetPt_minDR_vetoJet[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetEta_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetEta_minDR_vetoJet[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_jetPhi_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetPhi_minDR_vetoJet[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_jetChargedEMEnergyFracion_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetChargedEMEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralEMEnergyFracion_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetNeutralEMEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetChargedHadronEnergyFracion_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetChargedHadronEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralHadronEnergyFracion_minDR_vetoJet_%s_%s",mX[itr_mX],ctau);
- h_jetNeutralHadronEnergyFraction_minDR_vetoJet[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetDR_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetDR_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",20,0,2);
-
- sprintf(name,"h_jetPt_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetPt_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetEta_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetEta_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",60,-3,3);
-
- sprintf(name,"h_jetPhi_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetPhi_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",70,-3.5,3.5);
-
- sprintf(name,"h_jetChargedEMEnergyFracion_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralEMEnergyFracion_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetChargedHadronEnergyFracion_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_jetNeutralHadronEnergyFracion_minDR_fullHOVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file] = new TH1D(name,"",25,0,1);
-
- sprintf(name,"h_nWheels1_noCluster_%s_%s",mX[itr_mX],ctau);
- h_nWheels1_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_noCluster_%s_%s",mX[itr_mX],ctau);
- h_nWheels150_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_noCluster_%s_%s",mX[itr_mX],ctau);
- h_nWheels10_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_noCluster_%s_%s",mX[itr_mX],ctau);
- h_nWheels20_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_noCluster_%s_%s",mX[itr_mX],ctau);
- h_nWheels30_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_noCluster_%s_%s",mX[itr_mX],ctau);
- h_nWheels50_noCluster[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels1_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nWheels1_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels1_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nWheels1_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels1_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_nWheels1_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nWheels10_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nWheels10_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels10_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_nWheels10_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nWheels20_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nWheels20_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels20_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_nWheels20_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nWheels30_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nWheels30_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels30_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_nWheels30_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nWheels50_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nWheels50_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels50_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_nWheels50_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_noVeto_%s_%s",mX[itr_mX],ctau);
- h_nWheels150_noVeto[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_nWheels150_fullVetoPlus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_nWheels150_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_nWheels150_fullVetoMinus[itr_file] = new TH1D(name,"",6,0,6);
-
- sprintf(name,"h_jetPtMax_noVeto_%s_%s",mX[itr_mX],ctau);
- h_jetPtMax_noVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMax_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_jetPtMax_fullVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMax_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetPtMax_fullVetoPlus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMax_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_jetPtMax_fullVetoMinus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_noVeto_%s_%s",mX[itr_mX],ctau);
- h_jetPtMET_noVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVeto_%s_%s",mX[itr_mX],ctau);
- h_jetPtMET_fullVeto[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVetoPlus_%s_%s",mX[itr_mX],ctau);
- h_jetPtMET_fullVetoPlus[itr_file] = new TH1D(name,"",20,0,200);
-
- sprintf(name,"h_jetPtMET_fullVetoMinus_%s_%s",mX[itr_mX],ctau);
- h_jetPtMET_fullVetoMinus[itr_file] = new TH1D(name,"",20,0,200);
-
- evtNum = 0;
- totalNum = 0;
- //weight = lumi*xSec*1000/treeReader.GetEntries(1);
- totalEvents=0;
- totalMagnetEvents=0;
- totalBarrelEvents=0;
- noEff=0.0;
- muonEff=0.0;
- jetEff=0.0;
- MB1Eff=0.0;
- HOEff=0.0;
- fullEff=0.0;
- fullHOEff=0.0;
-
- nPassMET=0;
- nPassDTDecay=0;
- nPassJetMET=0;
- nPassJetMET_top4=0;
- nPassJetMET_20=0;
- nPassJetMET_30=0;
- nPassJetMET_50=0;
- nPassNoVeto=0;
- nPassFullVeto=0;
-
- nPassMaxStation=0;
- nPassDeltaPhi=0;
- nPassRPCMatch=0;
- nPassRPCSpread=0;
-
- nPassHODecay=0;
- nPassNoVeto_ho=0;
- nPassFullVeto_ho=0;
- nPassDeltaPhi_ho=0;
- nPassRPCMatch_ho=0;
- nPassRPCSpread_ho=0;
-
- nPassMuon_std=0;
- nPassMB1_std=0;
- nPassMuon_alt=0;
- nPassMB1_alt=0;
- nPassJetMuon_std = 0;
- nPassJetMB1_std = 0;
- nPassFull_std = 0;
- nPassFull_altMuon = 0;
- nPassFull_altMB1 = 0;
- nPassFull_altMuonMB1 = 0;
- nPassFullDTPlus_noMuon = 0;
- nPassFullDTPlus_noMB1 = 0;
- nPassFullDTPlus_std = 0;
- nPassFullDTPlus_altMuon = 0;
- nPassFullDTPlus_altMB1 = 0;
- nPassFullDTPlus_altMuonMB1 = 0;
-
- cout << mX[itr_mX] << "_" << ctau << endl;
- for(Int_t itr_year = 0; itr_year<3; itr_year++){
- cout << " " << years[itr_year] << endl;
-
- TFile *_file;
- if(strcmp(years[itr_year],"MC_Summer16")==0){
- _file = TFile::Open(dir+years[itr_year]+"/v1/v2/normalized/ggH_HToSSTobbbb_MH-125_MS-"+mX[itr_mX]+"_ctau-"+ctau+"_TuneCUETP8M1_13TeV-powheg-pythia8_1pb_weighted.root");
- //_file = TFile::Open(dir+years[itr_year]+"/v3/v5/normalized/ggH_HToSSTobbbb_MH-125_MS-"+mX[itr_mX]+"_ctau-"+ctau+"_TuneCUETP8M1_13TeV-powheg-pythia8_1pb_weighted.root");
- }
- else{
- _file = TFile::Open(dir+years[itr_year]+"/v1/v2/normalized/ggH_HToSSTobbbb_MH-125_MS-"+mX[itr_mX]+"_ctau-"+ctau+"_TuneCP5_13TeV-powheg-pythia8_1pb_weighted.root");
- //_file = TFile::Open(dir+years[itr_year]+"/v3/v5/normalized/ggH_HToSSTobbbb_MH-125_MS-"+mX[itr_mX]+"_ctau-"+ctau+"_TuneCP5_13TeV-powheg-pythia8_1pb_weighted.root");
-
- }
- /*if(strcmp(mX[itr_mX],"450")==0){
- _file = TFile::Open(dir+"/signal_1000_"+mX[itr_mX]+"_"+ctau+".root");
- }
- else{
- _file = TFile::Open(dir+"/signal_125_"+mX[itr_mX]+"_"+ctau+".root");
- }
-
- TTreeReader treeReader("ntuples/llp",_file);
- */
- TTreeReader treeReader("MuonSystem",_file);
-
- TTreeReaderArray gLLP_dt(treeReader,"gLLP_dt");
- //TTreeReaderArray gLLP_dt(treeReader,"gLLP_dt");
- //TTreeReaderArray gLLP_pt(treeReader,"gLLP_pt");
- TTreeReaderArray gLLP_decay_vertex_x(treeReader,"gLLP_decay_vertex_x");
- TTreeReaderArray gLLP_decay_vertex_y(treeReader,"gLLP_decay_vertex_y");
- TTreeReaderArray gLLP_decay_vertex_z(treeReader,"gLLP_decay_vertex_z");
- //TTreeReaderArray gLLP_travel_time(treeReader,"gLLP_travel_time");
-
- //TTreeReaderValue weight(treeReader,"weight");
- //TTreeReaderValue npv(treeReader,"npv");
- TTreeReaderValue MET(treeReader,"met");
- TTreeReaderValue METphi(treeReader,"metPhi");
- //TTreeReaderValue jetMet_dPhiMin4(treeReader,"jetMet_dPhiMin4");
-
- TTreeReaderValue nDtRechitClusters(treeReader,"nDtRechitClusters");
- TTreeReaderArray dtRechitClusterX(treeReader,"dtRechitClusterX");
- TTreeReaderArray dtRechitClusterY(treeReader,"dtRechitClusterY");
- TTreeReaderArray dtRechitClusterZ(treeReader,"dtRechitClusterZ");
- TTreeReaderArray dtRechitClusterPhi(treeReader,"dtRechitClusterPhi");
- TTreeReaderArray dtRechitClusterEta(treeReader,"dtRechitClusterEta");
- TTreeReaderArray dtRechitClusterXSpread(treeReader,"dtRechitClusterXSpread");
- TTreeReaderArray dtRechitClusterYSpread(treeReader,"dtRechitClusterYSpread");
- TTreeReaderArray dtRechitClusterZSpread(treeReader,"dtRechitClusterZSpread");
- TTreeReaderArray dtRechitClusterPhiSpread(treeReader,"dtRechitClusterPhiSpread");
- TTreeReaderArray dtRechitClusterEtaSpread(treeReader,"dtRechitClusterEtaSpread");
- TTreeReaderArray dtRechitClusterJetVetoPt(treeReader,"dtRechitClusterJetVetoPt");
- TTreeReaderArray dtRechitClusterMuonVetoPt(treeReader,"dtRechitClusterMuonVetoPt");
- TTreeReaderArray dtRechitClusterSize(treeReader,"dtRechitClusterSize");
- TTreeReaderArray dtRechitClusterNSegmentStation1(treeReader,"dtRechitClusterNSegmentStation1");
- TTreeReaderArray dtRechitClusterNSegmentStation2(treeReader,"dtRechitClusterNSegmentStation2");
- TTreeReaderArray dtRechitClusterNSegmentStation3(treeReader,"dtRechitClusterNSegmentStation3");
- TTreeReaderArray dtRechitClusterNSegmentStation4(treeReader,"dtRechitClusterNSegmentStation4");
- TTreeReaderArray dtRechitClusterMaxStation(treeReader,"dtRechitClusterMaxStation");
- TTreeReaderArray dtRechitClusterNStation(treeReader,"dtRechitClusterNStation");
- TTreeReaderArray dtRechitClusterMaxChamber(treeReader,"dtRechitClusterMaxChamber");
- TTreeReaderArray dtRechitClusterNChamber(treeReader,"dtRechitClusterNChamber");
-
- TTreeReaderValue nDtRechits(treeReader,"nDtRechits");
- TTreeReaderArray dtRechitX(treeReader,"dtRechitX");
- TTreeReaderArray dtRechitY(treeReader,"dtRechitY");
- TTreeReaderArray dtRechitZ(treeReader,"dtRechitZ");
- TTreeReaderArray dtRechitEta(treeReader,"dtRechitEta");
- TTreeReaderArray dtRechitPhi(treeReader,"dtRechitPhi");
- TTreeReaderArray dtRechitStation(treeReader,"dtRechitStation");
- TTreeReaderArray dtRechitWheel(treeReader,"dtRechitWheel");
-
- TTreeReaderValue nJets(treeReader,"nJets");
- TTreeReaderArray jetPt(treeReader,"jetPt");
- TTreeReaderArray jetEta(treeReader,"jetEta");
- TTreeReaderArray jetPhi(treeReader,"jetPhi");
- /*TTreeReaderArray jetChargedEMEnergyFraction(treeReader,"jetChargedEMEnergyFraction");
- TTreeReaderArray jetNeutralEMEnergyFraction(treeReader,"jetNeutralEMEnergyFraction");
- TTreeReaderArray jetNeutralHadronEnergyFraction(treeReader,"jetNeutralHadronEnergyFraction");
- TTreeReaderArray jetChargedHadronEnergyFraction(treeReader,"jetChargedHadronEnergyFraction");
- */
- TTreeReaderValue nLeptons(treeReader,"nLeptons");
- TTreeReaderArray lepPassLooseIso(treeReader,"lepPassLooseIso");
- TTreeReaderValue nMuons(treeReader,"nMuons");
- TTreeReaderArray muonEta(treeReader,"muonEta");
- TTreeReaderArray muonPhi(treeReader,"muonPhi");
- TTreeReaderArray muonPt(treeReader,"muonPt");
-
- TTreeReaderValue nRPCRechits(treeReader,"nRpc");
- TTreeReaderArray RPCRechitX(treeReader,"rpcX");
- TTreeReaderArray RPCRechitY(treeReader,"rpcY");
- TTreeReaderArray RPCRechitZ(treeReader,"rpcZ");
- TTreeReaderArray RPCRechitPhi(treeReader,"rpcPhi");
- TTreeReaderArray RPCRechitBx(treeReader,"rpcBx");
-
- TTreeReaderValue nHORechits(treeReader,"nHORechits");
- TTreeReaderArray HORechitE(treeReader,"hoRechit_E");
- TTreeReaderArray HORechitT(treeReader,"hoRechit_T");
- TTreeReaderArray HORechitEta(treeReader,"hoRechit_Eta");
- TTreeReaderArray HORechitPhi(treeReader,"hoRechit_Phi");
-
- totalNum += treeReader.GetEntries(1);
- _ofile->cd();
- while(treeReader.Next()){
- fill_n(rechitCount, 5, 0);
- hitWheels1 = 0;
- hitWheels10 = 0;
- hitWheels20 = 0;
- hitWheels30 = 0;
- hitWheels50 = 0;
- hitWheels150 = 0;
- goodEvt = false;
- goodDecay = false;
- magnetDecay = false;
- clustSizeMax = 0.;
- dPhi_min = -999.;
- jetPt_tmp = 0.0;
- dPhi_minTop4 = -999.;
- dPhi_min20 = -999.;
- dPhi_min30 = -999.;
- dPhi_min50 = -999.;
- if(evtNum%100000==0){ cout << evtNum << " of " << totalNum << endl; }
-
- for(Int_t itr_llp=0; itr_llp<2; itr_llp++){
- if(gLLP_decay_vertex_z[itr_llp] < 650.){
- h_decayVertexRadius_noVeto[itr_file]->Fill(sqrt(pow(gLLP_decay_vertex_x[itr_llp],2)+pow(gLLP_decay_vertex_y[itr_llp],2)));
- }
- }
- if(gLLP_dt[0] || gLLP_dt[1]){ goodDecay = true; }
- else if(sqrt(pow(gLLP_decay_vertex_x[0],2)+pow(gLLP_decay_vertex_y[0],2)) < 400. && sqrt(pow(gLLP_decay_vertex_x[0],2)+pow(gLLP_decay_vertex_y[0],2)) > 300. && abs(gLLP_decay_vertex_z[0]) < 650.){ magnetDecay = true; }
- else if(sqrt(pow(gLLP_decay_vertex_x[1],2)+pow(gLLP_decay_vertex_y[0],2)) < 400. && sqrt(pow(gLLP_decay_vertex_x[1],2)+pow(gLLP_decay_vertex_y[1],2)) > 300. && abs(gLLP_decay_vertex_z[1]) < 650.){ magnetDecay = true; }
- if(*MET > 200){
- //nPassMET += lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1);
- nPassMET += 1;
- }
- if(*MET > 200){
- //nPassDTDecay += lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1);
- nPassDTDecay += 1;
- passNoVeto = false;
- passFullVeto = false;
- passRPCMatch = false;
- passRPCSpread = false;
- passMaxStation = false;
- passDeltaPhi = false;
- passFullVeto_ho = false;
- passRPCMatch_ho = false;
- passRPCSpread_ho = false;
- passDeltaPhi_ho = false;
- passMuonEvent_std=false;
- passMB1Event_std=false;
- passMuonEvent_alt=false;
- passMB1Event_alt=false;
- passJetMB1_std=false;
- passJetMuon_std=false;
- passFull_std = false;
- passFull_altMuon = false;
- passFull_altMB1 = false;
- passFull_altMuonMB1 = false;
- passFullDTPlus_noMuon = false;
- passFullDTPlus_noMB1 = false;
- passFullDTPlus_std = false;
- passFullDTPlus_altMuon = false;
- passFullDTPlus_altMB1 = false;
- passFullDTPlus_altMuonMB1 = false;
- passJetMET = false;
- passJetMET_20 = false;
- passJetMET_30 = false;
- passJetMET_50 = false;
- passJetMET_top4 = false;
- nPassMuon = 0;
- nPassJet = 0;
- nPassJetMuon = 0;
- nPassMB1 = 0;
- nPassHO = 0;
- nPassFull = 0;
- nPassFullHO = 0;
- nPassNone = 0;
- nPassFullPlus = 0;
- nPassFullMinus = 0;
- totalSumE=0.0;
- totalBarrelEvents+=1;
- totalClusteredNone = 0;
- totalClusteredNoMB1 = 0;
- totalClusteredJet = 0;
- totalClusteredMB1 = 0;
- totalClusteredHO = 0;
- totalClusteredFull = 0;
- totalClusteredFullHO = 0;
- totalClusteredFullPlus = 0;
- dPhiClusterMET_max = -1.;
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
- if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
- }
- //h_jetMet_dPhiMin4[itr_file]->Fill(*jetMet_dPhiMin4);
- if(*nJets>0){
- goodJets=0;
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(fabs(jetEta[itr_jet])<3.0){
- dPhi_tmp = jetPhi[itr_jet] - *METphi;
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp) < fabs(dPhi_min)){
- dPhi_min = fabs(dPhi_tmp);
- jetPt_tmp = jetPt[itr_jet];
- if(goodJets<4){ dPhi_minTop4 = fabs(dPhi_tmp); }
- if(jetPt[itr_jet]>50.0){ dPhi_min50 = fabs(dPhi_tmp); }
- if(jetPt[itr_jet]>30.0){ dPhi_min30 = fabs(dPhi_tmp); }
- if(jetPt[itr_jet]>20.0){ dPhi_min20 = fabs(dPhi_tmp); }
- }
- goodJets+=1;
- //if(goodJets==4){ break; }
- }
- }
- }
- if(fabs(dPhi_minTop4)!=999.){ h_dPhiJetMET[itr_file]->Fill(fabs(dPhi_min)); }
- if(fabs(dPhi_min)>0.6){ passJetMET += true; }
- if(fabs(dPhi_min20)>0.6){ passJetMET_20 += true; }
- if(fabs(dPhi_min30)>0.6){ passJetMET_30 += true; }
- if(fabs(dPhi_min50)>0.6){ passJetMET_50 += true; }
- if(fabs(dPhi_minTop4)>0.6){ passJetMET_top4 += true; }
- if(fabs(dPhi_minTop4)>0.0){
- //if(fabs(dPhiClusterMET_max)<1.0){
- //nPassJetMET += lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1);
- //nPassJetMET_top4 += 1;
- h_MET[itr_file]->Fill(*MET);
- h_jetPt[itr_file]->Fill(jetPt_tmp);
-
- if(*nDtRechits<1000){
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- rechitWheel = getWheel(dtRechitZ[itr_dt]);
- rechitWheel+=2;
- if(rechitWheel>=0 && rechitWheel<5){
- rechitCount[rechitWheel] += 1;
- }
- }
- }
- else{
- fill_n(rechitCount, 5, 150);
- }
- for(Int_t itr_wheel = 0; itr_wheel<5; itr_wheel++){
- if(rechitCount[itr_wheel] > 0){ hitWheels1 += 1; }
- if(rechitCount[itr_wheel] > 9){ hitWheels10 += 1; }
- if(rechitCount[itr_wheel] > 19){ hitWheels20 += 1; }
- if(rechitCount[itr_wheel] > 29){ hitWheels30 += 1; }
- if(rechitCount[itr_wheel] > 49){ hitWheels50 += 1; }
- if(rechitCount[itr_wheel] > 149){ hitWheels150 += 1; }
- }
- h_nWheels1_noCluster[itr_file]->Fill(hitWheels1);
- h_nWheels10_noCluster[itr_file]->Fill(hitWheels10);
- h_nWheels20_noCluster[itr_file]->Fill(hitWheels20);
- h_nWheels30_noCluster[itr_file]->Fill(hitWheels30);
- h_nWheels50_noCluster[itr_file]->Fill(hitWheels50);
- h_nWheels150_noCluster[itr_file]->Fill(hitWheels150);
-
- if(*nDtRechitClusters > 0){ passNoVeto = true; }
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- match = 0;
- matchLayer1 = 0;
- matchLayer2 = 0;
- matchLayer3 = 0;
- matchLayer4 = 0;
- matchHO = 0;
- fill_n(stationCount, 4, 0);
- nStationUnclustered = 0;
- nThreshStation = 0;
- nThreshLowStation = 0;
- nThreshStationUnclustered = 0;
- nThreshLowStationUnclustered = 0;
- sumE = 0;
- weightT = 0;
- rpcBx.clear();
- rpcLayer.clear();
- zWheel.clear();
- matchJet = false;
- matchMuon = false;
- goodEvt = true;
- passMuon = false;
- passMuon_alt = false;
- passMB1_alt = false;
- passJet = false;
- passMB1 = false;
- passHO = false;
- passInvertedJet = false;
- passInvertedMuon = false;
- passInvertedMuJet = false;
- llp_itr = -1;
-
- if(sqrt(pow(gLLP_decay_vertex_x[0]-dtRechitClusterX[itr_clust],2)+pow(gLLP_decay_vertex_y[0]-dtRechitClusterY[itr_clust],2)+pow(gLLP_decay_vertex_z[0]-dtRechitClusterZ[itr_clust],2)) < sqrt(pow(gLLP_decay_vertex_x[1]-dtRechitClusterX[itr_clust],2)+pow(gLLP_decay_vertex_y[1]-dtRechitClusterY[itr_clust],2)+pow(gLLP_decay_vertex_z[1]-dtRechitClusterZ[itr_clust],2))){ llp_itr = 0; }
- else{ llp_itr = 1; }
-
- /*passJet = true;
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(jetPt[itr_jet]>20.){
- dPhi_tmp = RPCRechitPhi[itr_jet] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr_jet]-dtRechitClusterEta[itr_clust],2))<0.5){
- passJet = false;
- break;
- }
- }
- }
- if(!passJet){ passInvertedJet = true; }
- */
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- else{ passInvertedJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- else{ passInvertedMuon = true; }
- if(dtRechitClusterNSegmentStation1[itr_clust]==0){ passMB1 = true; }
-
- passMB1_alt = true;
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- if(sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))>400. && sqrt(pow(dtRechitX[itr_dt],2)+pow(dtRechitY[itr_dt],2))<480.){
- dPhi_tmp = dtRechitPhi[itr_dt] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(dtRechitEta[itr_dt]-dtRechitClusterEta[itr_clust],2))<0.4){
- passMB1_alt = false;
- break;
- }
- }
- }
- passMuon_alt = true;
- for(Int_t itr_lep = 0; itr_lep<*nLeptons; itr_lep++){
- if(lepPassLooseIso[itr_lep]){
- passMuon_alt = false;
- break;
- }
- }
- //if(*nLeptons==0){ passMuon_alt = true; }
-
- if(dtRechitClusterSize[itr_clust]>50){
-
- nPassNone+=1;
- noEff+=1.0;
- totalClusteredNone+=dtRechitClusterSize[itr_clust];
-
-
-
- for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
- dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(RPCRechitZ[itr_rpc] - dtRechitClusterZ[itr_clust])<5. && fabs(dPhi_tmp)<0.4){
- match+=1;
- rpcBx.push_back(RPCRechitBx[itr_rpc]);
- rpcLayer.push_back(getRPCLayer(RPCRechitX[itr_rpc],RPCRechitY[itr_rpc]));
- }
- }
-
- for(Int_t itr_ho = 0; itr_ho<*nHORechits; itr_ho++){
- dPhi_tmp = HORechitPhi[itr_ho] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(HORechitEta[itr_ho]-dtRechitClusterEta[itr_clust],2))<0.5){
- matchHO+=1;
- sumE += HORechitE[itr_ho];
- weightT += HORechitT[itr_ho]*HORechitE[itr_ho];
- }
- }
- if(sumE>40.){ passHO = true; }
-
- muonPt_max = 0.0;
- muonDR_min = 999.0;
- for(Int_t itr=0; itr<*nMuons; itr++){
- dPhi_tmp = muonPhi[itr] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(muonEta[itr]-dtRechitClusterEta[itr_clust],2))<0.4){
- if(muonPt[itr]>muonPt_max){
- muonPt_max=muonPt[itr];
- }
- }
- if(muonPt[itr]>10.&&sqrt(pow(dPhi_tmp,2)+pow(muonEta[itr]-dtRechitClusterEta[itr_clust],2)) TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2))<0.4){
- if(jetPt[itr]>jetPt_max){
- jetPt_max=jetPt[itr];
- }
- }
- if(jetPt[itr]>20.&&sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2))Fill(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2)));
- h_jetPt_minDR_vetoJet[itr_file]->Fill(jetPt[itr]);
- h_jetEta_minDR_vetoJet[itr_file]->Fill(jetEta[itr]);
- h_jetPhi_minDR_vetoJet[itr_file]->Fill(jetPhi[itr]);
- //h_jetChargedEMEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetChargedEMEnergyFraction[itr]);
- //h_jetNeutralEMEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetNeutralEMEnergyFraction[itr]);
- //h_jetChargedHadronEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetChargedHadronEnergyFraction[itr]);
- //h_jetNeutralHadronEnergyFraction_minDR_vetoJet[itr_file]->Fill(jetNeutralHadronEnergyFraction[itr]);
- }
- }
-
- if(dtRechitClusterNSegmentStation2[itr_clust]>12){ nThreshStation+=1; }
- if(dtRechitClusterNSegmentStation3[itr_clust]>12){ nThreshStation+=1; }
- if(dtRechitClusterNSegmentStation4[itr_clust]>8){ nThreshStation+=1; }
-
- if(dtRechitClusterNSegmentStation2[itr_clust]>4){ nThreshLowStation+=1; }
- if(dtRechitClusterNSegmentStation3[itr_clust]>4){ nThreshLowStation+=1; }
- if(dtRechitClusterNSegmentStation4[itr_clust]>2){ nThreshLowStation+=1; }
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
- if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
-
- h_dtRechitClusterSize_noVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_noVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_noVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_noVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_noVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_noVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_noVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_noVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_noVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_noVeto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_noVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_noVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_noVeto[itr_file]->Fill(match); }
- }
-
- if(passMuon){
- nPassMuon+=1;
- muonEff+=1.0;
- h_dtRechitClusterSize_muonVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_muonVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_muonVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_muonVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_muonVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_muonVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_muonVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_muonVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_muonVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_muonVeto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_muonVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_muonVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_muonVeto[itr_file]->Fill(match); }
- }
- }
-
- if(passJet){
- nPassJet+=1;
- jetEff+=1.0;
- totalClusteredJet+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_jetVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSizeBarrel_jetVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_jetVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_jetVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_jetVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_jetVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_jetVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_jetVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_jetVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_jetVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_jetVeto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_jetVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_jetVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_jetVeto[itr_file]->Fill(match); }
- }
- }
-
- if(passMB1){
- nPassMB1+=1;
- MB1Eff+=1.0;
- totalClusteredMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_MB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSizeBarrel_MB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_MB1Veto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_MB1Veto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dPhiClusterMET_MB1Veto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_MB1Veto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_MB1Veto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_MB1Veto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_MB1Veto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_MB1Veto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_MB1Veto[itr_file]->Fill(match);
- if(!rpcBx.empty()){
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_MB1Veto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_MB1Veto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_MB1Veto[itr_file]->Fill(match); }
- }
- }
-
- if(passInvertedJet && passMB1){
- if(!rpcBx.empty()){
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- }
- }
- }
-
- if(passInvertedMuon && passMB1){
- if(!rpcBx.empty()){
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- }
- }
- }
-
- if(passInvertedJet && passInvertedMuon && passMB1){
- //cout << "inverted mu jet" << endl;
- if(!rpcBx.empty()){
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- }
- }
- }
- //cout << "done inverted" << endl;
-
- if(passMuon && passJet){
- //cout << "no MB1" << endl;
- nPassJetMuon+=1;
- totalClusteredNoMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_noMB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSizeBarrel_noMB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterNRechitsMB1_noMB1Veto[itr_file]->Fill(dtRechitClusterNSegmentStation1[itr_clust]);
- h_dtRechitClusterPercentRechitsMB1_noMB1Veto[itr_file]->Fill(float(dtRechitClusterNSegmentStation1[itr_clust]) / dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterNStation_noMB1Veto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_nRPCMatched_noMB1Veto[itr_file]->Fill(match);
- h_MB1Rechits_jetMuonVeto[itr_file]->Fill(dtRechitClusterNSegmentStation1[itr_clust]);
- if(!rpcLayer.empty()){
- h_RPCMatchedBxSpread_noMB1Veto[itr_file]->Fill(max_element(rpcBx.begin(),rpcBx.end()) - min_element(rpcBx.begin(),rpcBx.end()));
- for(Int_t itr = 0; itrFill(matchLayer1);
- h_nRPCMatchedLayer2_noMB1Veto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedLayer12_noMB1Veto[itr_file]->Fill(matchLayer1+matchLayer2);
- }
- //cout << "done no MB1" << endl;
-
- if(passMuon && passJet && passMB1){
- passFullVeto = true;
- nPassFull+=1;
- fullEff+=1.0;
-
- if(*nDtRechits<1000){
- for(Int_t itr_dt = 0; itr_dt<*nDtRechits; itr_dt++){
- dPhi_tmp = dtRechitPhi[itr_dt] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(dtRechitEta[itr_dt]-dtRechitClusterEta[itr_clust],2))<0.5){
- rechitStation = getStation(dtRechitX[itr_dt],dtRechitY[itr_dt]);
- if(rechitStation>-1){
- stationCount[rechitStation-1] += 1;
- }
- }
- }
- }
- else{
- fill_n(stationCount, 4, 150);
- }
- for(Int_t itr_station=0; itr_station<4; itr_station++){
- if(stationCount[itr_station]>0){ nStationUnclustered+=1; }
- if(itr_station<3){
- if(stationCount[itr_station]>12){ nThreshStationUnclustered+=1; }
- if(stationCount[itr_station]>4){ nThreshLowStationUnclustered+=1; }
- }
- else{
- if(stationCount[itr_station]>8){ nThreshStationUnclustered+=1; }
- if(stationCount[itr_station]>2){ nThreshLowStationUnclustered+=1; }
- }
- }
-
- totalClusteredFull+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSize_fullVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterSizeBarrel_fullVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_fullVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_dtRechitClusterNStation_fullVeto[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dtRechitClusterNStationUnclustered_fullVeto[itr_file]->Fill(nStationUnclustered);
- h_dtRechitClusterNThreshStation_fullVeto[itr_file]->Fill(nThreshStation);
- h_dtRechitClusterNThreshLowStation_fullVeto[itr_file]->Fill(nThreshLowStation);
- h_dtRechitClusterNThreshStationUnclustered_fullVeto[itr_file]->Fill(nThreshStationUnclustered);
- h_dtRechitClusterNThreshLowStationUnclustered_fullVeto[itr_file]->Fill(nThreshLowStationUnclustered);
- h_dPhiClusterMET_fullVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_dtRechitClusterXSpread_fullVeto[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_fullVeto[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_fullVeto[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_fullVeto[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_fullVeto[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_nRPCMatched_fullVeto[itr_file]->Fill(match);
-
- h_dtRechitClusterEta_fullVeto[itr_file]->Fill(dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterPhi_fullVeto[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterR_fullVeto[itr_file]->Fill(sqrt(pow(dtRechitClusterX[itr_clust],2)+pow(dtRechitClusterY[itr_clust],2)));
- h_dtRechitClusterZ_fullVeto[itr_file]->Fill(dtRechitClusterZ[itr_clust]);
- h_dtRechitClusterRZ_fullVeto[itr_file]->Fill(dtRechitClusterZ[itr_clust],sqrt(pow(dtRechitClusterX[itr_clust],2)+pow(dtRechitClusterY[itr_clust],2)));
- h_dtRechitClusterRZFine_fullVeto[itr_file]->Fill(dtRechitClusterZ[itr_clust],sqrt(pow(dtRechitClusterX[itr_clust],2)+pow(dtRechitClusterY[itr_clust],2)));
-
- h_dtRechitClusterNWheels1_fullVeto[itr_file]->Fill(dtRechitClusterNChamber[itr_clust]);
- h_dtRechitClusterMaxWheel_fullVeto[itr_file]->Fill(dtRechitClusterMaxChamber[itr_clust]);
-
- //h_gLLP_travel_time_fullVeto[itr_file]->Fill(gLLP_travel_time[llp_itr]);
- //h_gLLPpt_fullVeto[itr_file]->Fill(gLLP_pt[llp_itr]);
- if(!rpcBx.empty()){
- rpcMean = accumulate(rpcBx.begin(), rpcBx.end(), 0.0) / rpcBx.size();
- //if(abs(rpcMean)<0.5){ h_gLLPpt_Bx0_fullVeto[itr_file]->Fill(gLLP_pt[llp_itr]); }
- //else if(rpcMean < 1.5){ h_gLLPpt_Bx1_fullVeto[itr_file]->Fill(gLLP_pt[llp_itr]); }
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- for(Int_t itr = 0; itrFill(rpcBx[itr]);
- if(rpcSpread==0){ h_RPCMatchedBx_Spread0_fullVeto[itr_file]->Fill(rpcBx[itr]); }
- }
- h_RPCMatchedBxSpread_fullVeto[itr_file]->Fill(rpcSpread);
- if(rpcSpread==0){ h_nRPCMatched_Spread0_fullVeto[itr_file]->Fill(match); }
- }
-
- h_muonDR_fullVeto[itr_file]->Fill(muonDR_min);
- h_jetDR_fullVeto[itr_file]->Fill(jetDR_min);
-
- if(!rpcBx.empty()){
- passRPCMatch = true;
- h_dtRechitClusterSize_RPCMatch[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_muonDR_RPCMatch[itr_file]->Fill(muonDR_min);
- h_jetDR_RPCMatch[itr_file]->Fill(jetDR_min);
- if(rpcSpread==0){
- passRPCSpread = true;
- h_dtRechitClusterSize_RPCSpread0[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_muonDR_RPCSpread0[itr_file]->Fill(muonDR_min);
- h_jetDR_RPCSpread0[itr_file]->Fill(jetDR_min);
- if(dtRechitClusterMaxStation[itr_clust]>2){
- passMaxStation = true;
- if(fabs(dPhiClusterMET)<1){
- passDeltaPhi = true;
- nPassFullPlus+=1;
- nPassFullMinus+=1;
- totalClusteredFullPlus+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterXSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterXSpread[itr_clust]);
- h_dtRechitClusterYSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterYSpread[itr_clust]);
- h_dtRechitClusterZSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterZSpread[itr_clust]);
- h_dtRechitClusterEtaSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterEtaSpread[itr_clust]);
- h_dtRechitClusterPhiSpread_fullVetoPlus[itr_file]->Fill(dtRechitClusterPhiSpread[itr_clust]);
- h_dtRechitClusterPhi_fullVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust]);
- h_dtRechitClusterEta_fullVetoPlus[itr_file]->Fill(dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterEtaPhi_fullVetoPlus[itr_file]->Fill(dtRechitClusterPhi[itr_clust],dtRechitClusterEta[itr_clust]);
- h_dtRechitClusterNStation_fullVetoPlus[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dtRechitClusterNWheel_fullVetoPlus[itr_file]->Fill(dtRechitClusterNChamber[itr_clust]);
- //h_dtRechitClusterSizeRatio_fullVetoPlus[itr_file]->Fill(dtRechitClusterSize[itr_clust] / float(*nDtRechits));
- }
- }
- }
- }
-
- }
-
- if(passMuon && passJet){
- passJetMuon_std=true;
- if(passMB1_alt){
- passFull_altMB1=true;
- }
- if(!rpcBx.empty() && rpcSpread==0 && dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhiClusterMET)<1){
- passFullDTPlus_noMB1=true;
- if(passMB1_alt){
- passFullDTPlus_altMB1=true;
- }
- }
- }
- if(passMB1 && passJet){
- passJetMB1_std=true;
- if(passMuon_alt){
- passFull_altMuon=true;
- }
- if(!rpcBx.empty() && rpcSpread==0 && dtRechitClusterMaxStation[itr_clust]>2 && fabs(dPhiClusterMET)<1){
- passFullDTPlus_noMuon=true;
- if(passMuon_alt){
- passFullDTPlus_altMuon=true;
- }
- }
- }
- if(passMuon_alt){
- passMuonEvent_alt=true;
- if(passJet && passMB1_alt){
- passFull_altMuonMB1=true;
- if(!rpcBx.empty()){
- if(rpcSpread==0){
- if(dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhiClusterMET)<1){
- passFullDTPlus_altMuonMB1=true;
- }
- }
- }
- }
- }
- }
- if(passMB1_alt){
- passMB1Event_alt=true;
- }
- if(passMuon){
- passMuonEvent_std=true;
- }
- if(passMB1){
- passMB1Event_std=true;
- if(passJet && passMuon){
- passFull_std=true;
- if(!rpcBx.empty()){
- if(rpcSpread==0){
- if(dtRechitClusterMaxStation[itr_clust]>2){
- if(fabs(dPhiClusterMET)<1){
- passFullDTPlus_std=true;
- }
- }
- }
- }
- }
- }
-
- if(passHO){
- nPassHO+=1;
- totalClusteredHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeBarrel_HOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- /*if(passMuon && passJet && passHO){
- nPassFullHO+=1;
- totalClusteredFullHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeBarrel_fullHOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }*/
-
- if(passMuon && passMB1){
- h_jetPt_muonMB1Veto[itr_file]->Fill(jetPt_max);
- }
-
- if(passJet && passMB1){
- h_muonPt_jetMB1Veto[itr_file]->Fill(muonPt_max);
- }
- if(passJet && passMuon && passHO){
- passFullVeto_ho = true;
- nPassFullHO+=1;
- totalClusteredFullHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_fullHOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_fullHOVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_nRPCMatched_fullHOVeto[itr_file]->Fill(match);
- h_RPCMatchedBxSpread_fullHOVeto[itr_file]->Fill(rpcSpread);
- h_dPhiClusterMET_fullHOVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_HOTime_fullHOVeto[itr_file]->Fill(weightT/sumE);
-
- h_muonDR_fullHOVeto[itr_file]->Fill(muonDR_min);
- h_jetDR_fullHOVeto[itr_file]->Fill(jetDR_min);
-
- h_nRPCMatchedMagnetLayer1_fullHOVeto[itr_file]->Fill(matchLayer1);
- h_nRPCMatchedMagnetLayer2_fullHOVeto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedMagnetLayer3_fullHOVeto[itr_file]->Fill(matchLayer3);
- h_nRPCMatchedMagnetLayer4_fullHOVeto[itr_file]->Fill(matchLayer4);
-
- if(!rpcBx.empty()){
- passRPCMatch_ho = true;
- h_muonDR_HORPCMatch[itr_file]->Fill(muonDR_min);
- h_jetDR_HORPCMatch[itr_file]->Fill(jetDR_min);
- if(rpcSpread==0){
- passRPCSpread_ho = true;
- h_muonDR_HORPCSpread0[itr_file]->Fill(muonDR_min);
- h_jetDR_HORPCSpread0[itr_file]->Fill(jetDR_min);
- if(fabs(dPhiClusterMET)<1){
- passDeltaPhi_ho = true;
- totalClusteredFullHOPlus+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterNStation_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterNStation[itr_clust]);
- h_dtRechitClusterNWheel_fullHOVetoPlus[itr_file]->Fill(dtRechitClusterNChamber[itr_clust]);
- h_jetDR_minDR_fullHOVetoPlus[itr_file]->Fill(jetDR_min);
- h_jetPt_minDR_fullHOVetoPlus[itr_file]->Fill(jetPt[jetDR_index]);
- h_jetEta_minDR_fullHOVetoPlus[itr_file]->Fill(jetEta[jetDR_index]);
- h_jetPhi_minDR_fullHOVetoPlus[itr_file]->Fill(jetPhi[jetDR_index]);
- //h_jetChargedEMEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetChargedEMEnergyFraction[jetDR_index]);
- //h_jetNeutralEMEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetNeutralEMEnergyFraction[jetDR_index]);
- //h_jetChargedHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetChargedHadronEnergyFraction[jetDR_index]);
- //h_jetNeutralHadronEnergyFraction_minDR_fullHOVetoPlus[itr_file]->Fill(jetNeutralHadronEnergyFraction[jetDR_index]);
- }
- }
- }
- }
- }
- }
- if(passFullVeto_ho){ nPassFullVeto_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passRPCMatch_ho){ nPassRPCMatch_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passRPCSpread_ho){ nPassRPCSpread_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passDeltaPhi_ho){ nPassDeltaPhi_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
-
- if(passNoVeto){ nPassNoVeto += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passFullVeto){ nPassFullVeto += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passRPCMatch){ nPassRPCMatch += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passRPCSpread){ nPassRPCSpread += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passMaxStation){ nPassMaxStation += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passDeltaPhi){ nPassDeltaPhi += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
-
- if(passJetMuon_std){ nPassJetMuon_std += 1; }
- if(passJetMB1_std){ nPassJetMB1_std += 1; }
- if(passMuonEvent_std){ nPassMuon_std += 1; }
- if(passMB1Event_std){ nPassMB1_std += 1; }
- if(passMuonEvent_alt){ nPassMuon_alt += 1; }
- if(passMB1Event_alt){ nPassMB1_alt += 1; }
- if(passFull_std){ nPassFull_std += 1; }
- if(passFull_altMuon){ nPassFull_altMuon += 1; }
- if(passFull_altMB1){ nPassFull_altMB1 += 1; }
- if(passFull_altMuonMB1){ nPassFull_altMuonMB1 += 1; }
- if(passFullDTPlus_noMuon){ nPassFullDTPlus_noMuon += 1; }
- if(passFullDTPlus_noMB1){ nPassFullDTPlus_noMB1 += 1; }
- if(passFullDTPlus_std){
- nPassFullDTPlus_std += 1;
- if(passJetMET){ nPassJetMET += 1; }
- if(passJetMET_20){ nPassJetMET_20 += 1; }
- if(passJetMET_30){ nPassJetMET_30 += 1; }
- if(passJetMET_50){ nPassJetMET_50 += 1; }
- if(passJetMET_top4){ nPassJetMET_top4 += 1; }
- }
- if(passFullDTPlus_altMuon){ nPassFullDTPlus_altMuon += 1; }
- if(passFullDTPlus_altMB1){ nPassFullDTPlus_altMB1 += 1; }
- if(passFullDTPlus_altMuonMB1){ nPassFullDTPlus_altMuonMB1 += 1; }
-
- h_nDtRechitClusters_noVeto[itr_file]->Fill(nPassNone);
- h_nDtRechitClusters_muonVeto[itr_file]->Fill(nPassMuon);
- h_nDtRechitClusters_jetVeto[itr_file]->Fill(nPassJet);
- h_nDtRechitClusters_MB1Veto[itr_file]->Fill(nPassMB1);
- h_nDtRechitClusters_fullVeto[itr_file]->Fill(nPassFull);
-
- if(nPassNone>0){
- h_dPhiJetMETBarrel_noVeto[itr_file]->Fill(dPhi_min);
- h_nWheels1_noVeto[itr_file]->Fill(hitWheels1);
- h_nWheels10_noVeto[itr_file]->Fill(hitWheels10);
- h_nWheels20_noVeto[itr_file]->Fill(hitWheels20);
- h_nWheels30_noVeto[itr_file]->Fill(hitWheels30);
- h_nWheels50_noVeto[itr_file]->Fill(hitWheels50);
- h_nWheels150_noVeto[itr_file]->Fill(hitWheels150);
- h_jetPtMET_noVeto[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_noVeto[itr_file]->Fill(jetPt[0]);
- }
- if(nPassMuon>0){ h_dPhiJetMETBarrel_muonVeto[itr_file]->Fill(dPhi_min); }
- if(nPassJet>0){ h_dPhiJetMETBarrel_jetVeto[itr_file]->Fill(dPhi_min); }
- if(nPassMB1>0){ h_dPhiJetMETBarrel_MB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassJetMuon>0){ h_dPhiJetMETBarrel_noMB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassFull>0){
- h_dPhiJetMETBarrel_fullVeto[itr_file]->Fill(dPhi_min);
- h_jetPtMET_fullVeto[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_fullVeto[itr_file]->Fill(jetPt[0]);
- }
- if(nPassFullPlus>0){
- h_nWheels1_fullVetoPlus[itr_file]->Fill(hitWheels1);
- h_nWheels10_fullVetoPlus[itr_file]->Fill(hitWheels10);
- h_nWheels20_fullVetoPlus[itr_file]->Fill(hitWheels20);
- h_nWheels30_fullVetoPlus[itr_file]->Fill(hitWheels30);
- h_nWheels50_fullVetoPlus[itr_file]->Fill(hitWheels50);
- h_nWheels150_fullVetoPlus[itr_file]->Fill(hitWheels150);
- h_jetPtMET_fullVetoPlus[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_fullVetoPlus[itr_file]->Fill(jetPt[0]);
- }
- if(nPassFullMinus>0){
- h_nWheels1_fullVetoMinus[itr_file]->Fill(hitWheels1);
- h_nWheels10_fullVetoMinus[itr_file]->Fill(hitWheels10);
- h_nWheels20_fullVetoMinus[itr_file]->Fill(hitWheels20);
- h_nWheels30_fullVetoMinus[itr_file]->Fill(hitWheels30);
- h_nWheels50_fullVetoMinus[itr_file]->Fill(hitWheels50);
- h_nWheels150_fullVetoMinus[itr_file]->Fill(hitWheels150);
- h_jetPtMET_fullVetoMinus[itr_file]->Fill(jetPt_tmp);
- h_jetPtMax_fullVetoMinus[itr_file]->Fill(jetPt[0]);
- }
- //h_npv_nDtRechitClusters_noVeto[itr_file]->Fill(*npv,nPassNone);
- //h_npv_nDtRechitClusters_fullVeto[itr_file]->Fill(*npv,nPassFull);
- h_nTotalClusteredRechitsBarrel_noVeto[itr_file]->Fill(totalClusteredNone);
- h_nTotalClusteredRechitsBarrel_jetVeto[itr_file]->Fill(totalClusteredJet);
- h_nTotalClusteredRechitsBarrel_MB1Veto[itr_file]->Fill(totalClusteredMB1);
- h_nTotalClusteredRechitsBarrel_noMB1Veto[itr_file]->Fill(totalClusteredNoMB1);
- h_nTotalClusteredRechitsBarrel_HOVeto[itr_file]->Fill(totalClusteredHO);
- h_nTotalClusteredRechitsBarrel_fullVeto[itr_file]->Fill(totalClusteredFull);
- h_nTotalClusteredRechitsBarrel_fullHOVeto[itr_file]->Fill(totalClusteredFullHO);
-
- h_dPhiClusterMETMax[itr_file]->Fill(dPhiClusterMET_max);
-
- h_nTotalClusteredRechitsBarrel_fullVetoPlus[itr_file]->Fill(totalClusteredFullPlus);
- }
- }
-
- /*if(*MET>200 && magnetDecay){
- nPassHODecay+=1;
- totalMagnetEvents+=1;
- passNoVeto = false;
- passFullVeto = false;
- passRPCMatch = false;
- passRPCSpread = false;
- passMaxStation = false;
- passDeltaPhi = false;
- nPassMuon = 0;
- nPassJet = 0;
- nPassJetMuon = 0;
- nPassMB1 = 0;
- nPassHO = 0;
- nPassFull = 0;
- nPassFullHO = 0;
- nPassNone = 0;
- goodJets=0;
- totalSumE=0.0;
- totalClusteredNone = 0;
- totalClusteredNoMB1 = 0;
- totalClusteredJet = 0;
- totalClusteredMB1 = 0;
- totalClusteredHO = 0;
- totalClusteredFull = 0;
- totalClusteredFullHO = 0;
- totalClusteredFullHOPlus = 0;
- dPhiClusterMET_max = -1.;
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
- if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
- }
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(fabs(jetEta[itr_jet])<3.0 && jetPt[itr_jet]>20.0){
- dPhi_tmp = jetPhi[itr_jet] - *METphi;
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp) < dPhi_min){
- dPhi_min = fabs(dPhi_tmp);
- jetPt_tmp = jetPt[itr_jet];
- }
- goodJets+=1;
- if(goodJets==4){ break; }
- }
- }
- h_dPhiJetMETMagnet[itr_file]->Fill(fabs(dPhi_min));
- if(fabs(dPhi_min)>0.6){
- //if(fabs(dPhiClusterMET_max)<1.0){
- nPassJetMET+=1;
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- match = 0;
- matchLayer1 = 0;
- matchLayer2 = 0;
- matchLayer3 = 0;
- matchLayer4 = 0;
- matchHO = 0;
- sumE = 0;
- weightT = 0;
- rpcBx.clear();
- rpcLayer.clear();
- zWheel.clear();
- matchJet = false;
- matchMuon = false;
- goodEvt = true;
- passMuon = false;
- passJet = false;
- passMB1 = false;
- passHO = false;
- passInvertedJet = false;
- passInvertedMuon = false;
- passInvertedMuJet = false;
- llp_itr = -1;
-
- passNoVeto = true;
-
- if(sqrt(pow(gLLP_decay_vertex_x[0]-dtRechitClusterX[itr_clust],2)+pow(gLLP_decay_vertex_y[0]-dtRechitClusterY[itr_clust],2)+pow(gLLP_decay_vertex_z[0]-dtRechitClusterZ[itr_clust],2)) < sqrt(pow(gLLP_decay_vertex_x[1]-dtRechitClusterX[itr_clust],2)+pow(gLLP_decay_vertex_y[1]-dtRechitClusterY[itr_clust],2)+pow(gLLP_decay_vertex_z[1]-dtRechitClusterZ[itr_clust],2))){ llp_itr = 0; }
- else{ llp_itr = 1; }
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
-
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- else{ passInvertedJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- else{ passInvertedMuon = true; }
- if(dtRechitClusterNSegmentStation1[itr_clust]==0){ passMB1 = true; }
-
- for(Int_t itr_rpc=0; itr_rpc<*nRPCRechits; itr_rpc++){
- dPhi_tmp = RPCRechitPhi[itr_rpc] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(RPCRechitZ[itr_rpc] - dtRechitClusterZ[itr_clust])<5. && fabs(dPhi_tmp)<0.4){
- match+=1;
- rpcBx.push_back(RPCRechitBx[itr_rpc]);
- rpcLayer.push_back(getRPCLayer(RPCRechitX[itr_rpc],RPCRechitY[itr_rpc]));
- }
- }
- rpcSpread = max_element(rpcBx.begin(), rpcBx.end()) - min_element(rpcBx.begin(), rpcBx.end());
- if(!rpcLayer.empty()){
- for(Int_t itr = 0; itr TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(passJet){
- h_dRClusterHO_jetVeto[itr_file]->Fill(sqrt(pow(dPhi_tmp,2)+pow(HORechitEta[itr_ho]-dtRechitClusterEta[itr_clust],2)));
- }
- if(sqrt(pow(dPhi_tmp,2)+pow(HORechitEta[itr_ho]-dtRechitClusterEta[itr_clust],2))<0.5){
- matchHO+=1;
- sumE += HORechitE[itr_ho];
- weightT += HORechitT[itr_ho]*HORechitE[itr_ho];
- }
- }
- if(passJet){
- h_HOEnergy_jetVeto[itr_file]->Fill(sumE);
- }
- if(sumE>40.){ passHO = true; }
-
- muonPt_max = 0.0;
- muonDR_min = 999.0;
- for(Int_t itr=0; itr<*nMuons; itr++){
- dPhi_tmp = muonPhi[itr] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(muonEta[itr]-dtRechitClusterEta[itr_clust],2))<0.4){
- if(muonPt[itr]>muonPt_max){
- muonPt_max=muonPt[itr];
- }
- }
- if(muonPt[itr]>10.&&sqrt(pow(dPhi_tmp,2)+pow(muonEta[itr]-dtRechitClusterEta[itr_clust],2)) TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2))<0.4){
- if(jetPt[itr]>jetPt_max){
- jetPt_max=jetPt[itr];
- }
- }
- if(jetPt[itr]>20.&&sqrt(pow(dPhi_tmp,2)+pow(jetEta[itr]-dtRechitClusterEta[itr_clust],2))50){
-
- nPassNone+=1;
- totalClusteredNone+=dtRechitClusterSize[itr_clust];
-
- if(passMuon){
- nPassMuon+=1;
- }
- if(passJet){
- nPassJet+=1;
- totalClusteredJet+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_jetVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_nRPCMatchedMagnet_jetVeto[itr_file]->Fill(match);
-
- h_nRPCMatchedMagnetLayer1_jetVeto[itr_file]->Fill(matchLayer1);
- h_nRPCMatchedMagnetLayer2_jetVeto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedMagnetLayer3_jetVeto[itr_file]->Fill(matchLayer3);
- h_nRPCMatchedMagnetLayer4_jetVeto[itr_file]->Fill(matchLayer4);
- }
- if(passMB1){
- nPassMB1+=1;
- totalClusteredMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_MB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passJet && passMuon){
- nPassJetMuon+=1;
- totalClusteredNoMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_noMB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_HOEnergy_jetMuonVeto[itr_file]->Fill(sumE);
- if(dtRechitClusterSize[itr_clust]>=280){
- totalSumE+=sumE;
- }
- }
- if(passJet && passHO){
- h_muonPt_jetHOVeto[itr_file]->Fill(muonPt_max);
- }
- if(passMuon && passHO){
- h_jetPt_muonHOVeto[itr_file]->Fill(jetPt_max);
- }
- if(passJet && passMuon && passMB1){
- nPassFull+=1;
- totalClusteredFull+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_fullVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passHO){
- nPassHO+=1;
- totalClusteredHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_HOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passJet && passMuon && passHO){
- passFullVeto = true;
- nPassFullHO+=1;
- totalClusteredFullHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeMagnet_fullHOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- h_dtRechitClusterMaxStation_fullHOVeto[itr_file]->Fill(dtRechitClusterMaxStation[itr_clust]);
- h_nRPCMatched_fullHOVeto[itr_file]->Fill(match);
- h_RPCMatchedBxSpread_fullHOVeto[itr_file]->Fill(rpcSpread);
- h_dPhiClusterMET_fullHOVeto[itr_file]->Fill(fabs(dPhiClusterMET));
- h_HOTime_fullHOVeto[itr_file]->Fill(weightT/sumE);
-
- h_muonDR_fullHOVeto[itr_file]->Fill(muonDR_min);
- h_jetDR_fullHOVeto[itr_file]->Fill(jetDR_min);
-
- h_nRPCMatchedMagnetLayer1_fullHOVeto[itr_file]->Fill(matchLayer1);
- h_nRPCMatchedMagnetLayer2_fullHOVeto[itr_file]->Fill(matchLayer2);
- h_nRPCMatchedMagnetLayer3_fullHOVeto[itr_file]->Fill(matchLayer3);
- h_nRPCMatchedMagnetLayer4_fullHOVeto[itr_file]->Fill(matchLayer4);
-
- if(!rpcBx.empty()){
- passRPCMatch = true;
- h_muonDR_HORPCMatch[itr_file]->Fill(muonDR_min);
- h_jetDR_HORPCMatch[itr_file]->Fill(jetDR_min);
- if(rpcSpread==0){
- passRPCSpread = true;
- h_muonDR_HORPCSpread0[itr_file]->Fill(muonDR_min);
- h_jetDR_HORPCSpread0[itr_file]->Fill(jetDR_min);
- if(fabs(dPhiClusterMET)<1){
- passDeltaPhi = true;
- totalClusteredFullHOPlus+=dtRechitClusterSize[itr_clust];
- }
- }
- }
- }
- }
- }
- h_HOMatchedEnergyCluster280Magnet_noMB1Veto[itr_file]->Fill(totalSumE);
-
- if(passNoVeto){ nPassNoVeto_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passFullVeto){ nPassFullVeto_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passRPCMatch){ nPassRPCMatch_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passRPCSpread){ nPassRPCSpread_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
- if(passDeltaPhi){ nPassDeltaPhi_ho += 1; }//lumi[itr_year] * 1000. * 48.58 * 0.01 / treeReader.GetEntries(1); }
-
- if(nPassNone>0){ h_dPhiJetMETMagnet_noVeto[itr_file]->Fill(dPhi_min); }
- if(nPassMuon>0){ h_dPhiJetMETMagnet_muonVeto[itr_file]->Fill(dPhi_min); }
- if(nPassJet>0){ h_dPhiJetMETMagnet_jetVeto[itr_file]->Fill(dPhi_min); }
- if(nPassMB1>0){ h_dPhiJetMETMagnet_MB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassJetMuon>0){ h_dPhiJetMETMagnet_noMB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassFull>0){ h_dPhiJetMETMagnet_fullVeto[itr_file]->Fill(dPhi_min); }
- if(nPassFullHO>0){ h_dPhiJetMETMagnet_fullHOVeto[itr_file]->Fill(dPhi_min); }
-
- h_nTotalClusteredRechitsMagnet_noVeto[itr_file]->Fill(totalClusteredNone);
- h_nTotalClusteredRechitsMagnet_jetVeto[itr_file]->Fill(totalClusteredJet);
- h_nTotalClusteredRechitsMagnet_MB1Veto[itr_file]->Fill(totalClusteredMB1);
- h_nTotalClusteredRechitsMagnet_noMB1Veto[itr_file]->Fill(totalClusteredNoMB1);
- h_nTotalClusteredRechitsMagnet_HOVeto[itr_file]->Fill(totalClusteredHO);
- h_nTotalClusteredRechitsMagnet_fullVeto[itr_file]->Fill(totalClusteredFull);
- h_nTotalClusteredRechitsMagnet_fullHOVeto[itr_file]->Fill(totalClusteredFullHO);
- h_nTotalClusteredRechitsMagnet_fullHOVetoPlus[itr_file]->Fill(totalClusteredFullHOPlus);
- }
- }*/
- /*if(*MET>200){
- totalEvents+=1;
- nPassMuon = 0;
- nPassJet = 0;
- nPassJetMuon = 0;
- nPassMB1 = 0;
- nPassHO = 0;
- nPassFull = 0;
- nPassFullHO = 0;
- nPassNone = 0;
- goodJets=0;
- totalSumE=0.0;
- totalClusteredNone = 0;
- totalClusteredNoMB1 = 0;
- totalClusteredJet = 0;
- totalClusteredMB1 = 0;
- totalClusteredHO = 0;
- totalClusteredFull = 0;
- totalClusteredFullHO = 0;
- dPhiClusterMET_max = -1.;
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
- if(fabs(dPhiClusterMET)>dPhiClusterMET_max){ dPhiClusterMET_max=fabs(dPhiClusterMET); }
- }
- for(Int_t itr_jet = 0; itr_jet<*nJets; itr_jet++){
- if(fabs(jetEta[itr_jet])<3.0 && jetPt[itr_jet]>20.0){
- dPhi_tmp = jetPhi[itr_jet] - *METphi;
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(fabs(dPhi_tmp) < dPhi_min){
- dPhi_min = fabs(dPhi_tmp);
- jetPt_tmp = jetPt[itr_jet];
- }
- goodJets+=1;
- if(goodJets==4){ break; }
- }
- }
- if(fabs(dPhi_min)>0.6){
- //if(fabs(dPhiClusterMET_max)<1.0){
- for(Int_t itr_clust = 0; itr_clust<*nDtRechitClusters; itr_clust++){
- match = 0;
- matchLayer1 = 0;
- matchLayer2 = 0;
- matchLayer3 = 0;
- matchLayer4 = 0;
- matchHO = 0;
- sumE = 0;
- weightT = 0;
- rpcBx.clear();
- rpcLayer.clear();
- zWheel.clear();
- matchJet = false;
- matchMuon = false;
- goodEvt = true;
- passMuon = false;
- passJet = false;
- passMB1 = false;
- passHO = false;
- passInvertedJet = false;
- passInvertedMuon = false;
- passInvertedMuJet = false;
- llp_itr = -1;
-
- if(sqrt(pow(gLLP_decay_vertex_x[0]-dtRechitClusterX[itr_clust],2)+pow(gLLP_decay_vertex_y[0]-dtRechitClusterY[itr_clust],2)+pow(gLLP_decay_vertex_z[0]-dtRechitClusterZ[itr_clust],2)) < sqrt(pow(gLLP_decay_vertex_x[1]-dtRechitClusterX[itr_clust],2)+pow(gLLP_decay_vertex_y[1]-dtRechitClusterY[itr_clust],2)+pow(gLLP_decay_vertex_z[1]-dtRechitClusterZ[itr_clust],2))){ llp_itr = 0; }
- else{ llp_itr = 1; }
-
- dPhiClusterMET = dtRechitClusterPhi[itr_clust] - *METphi;
- if(dPhiClusterMET > TMath::Pi()){ dPhiClusterMET -= 2*TMath::Pi(); }
- if(dPhiClusterMET < -1.0*TMath::Pi()){ dPhiClusterMET += 2*TMath::Pi(); }
-
- if(dtRechitClusterJetVetoPt[itr_clust]<20.){ passJet = true; }
- else{ passInvertedJet = true; }
- if(dtRechitClusterMuonVetoPt[itr_clust]<10.){ passMuon = true; }
- else{ passInvertedMuon = true; }
- if(dtRechitClusterNSegmentStation1[itr_clust]==0){ passMB1 = true; }
-
- for(Int_t itr_ho = 0; itr_ho<*nHORechits; itr_ho++){
- dPhi_tmp = HORechitPhi[itr_ho] - dtRechitClusterPhi[itr_clust];
- if(dPhi_tmp > TMath::Pi()){ dPhi_tmp -= 2*TMath::Pi(); }
- if(dPhi_tmp < -1.0*TMath::Pi()){ dPhi_tmp += 2*TMath::Pi(); }
- if(sqrt(pow(dPhi_tmp,2)+pow(HORechitEta[itr_ho]-dtRechitClusterEta[itr_clust],2))<0.5){
- matchHO+=1;
- sumE += HORechitE[itr_ho];
- weightT += HORechitT[itr_ho]*HORechitE[itr_ho];
- }
- }
- if(sumE>40.){ passHO = true; }
-
- if(dtRechitClusterSize[itr_clust]>50){
-
- nPassNone+=1;
- totalClusteredNone+=dtRechitClusterSize[itr_clust];
-
- if(passMuon){
- nPassMuon+=1;
- }
- if(passJet){
- nPassJet+=1;
- totalClusteredJet+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeAll_jetVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passMB1){
- nPassMB1+=1;
- totalClusteredMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeAll_MB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passJet && passMuon){
- nPassJetMuon+=1;
- totalClusteredNoMB1+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeAll_noMB1Veto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passJet && passMuon && passMB1){
- nPassFull+=1;
- totalClusteredFull+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeAll_fullVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passHO){
- nPassHO+=1;
- totalClusteredHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeAll_HOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- if(passJet && passMuon && passHO){
- nPassFullHO+=1;
- totalClusteredFullHO+=dtRechitClusterSize[itr_clust];
- h_dtRechitClusterSizeAll_fullHOVeto[itr_file]->Fill(dtRechitClusterSize[itr_clust]);
- }
- }
- }
- if(nPassNone>0){ h_dPhiJetMETAll_noVeto[itr_file]->Fill(dPhi_min); }
- if(nPassMuon>0){ h_dPhiJetMETAll_muonVeto[itr_file]->Fill(dPhi_min); }
- if(nPassJet>0){ h_dPhiJetMETAll_jetVeto[itr_file]->Fill(dPhi_min); }
- if(nPassMB1>0){ h_dPhiJetMETAll_MB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassJetMuon>0){ h_dPhiJetMETAll_noMB1Veto[itr_file]->Fill(dPhi_min); }
- if(nPassFull>0){ h_dPhiJetMETAll_fullVeto[itr_file]->Fill(dPhi_min); }
-
- h_nTotalClusteredRechitsAll_noVeto[itr_file]->Fill(totalClusteredNone);
- h_nTotalClusteredRechitsAll_jetVeto[itr_file]->Fill(totalClusteredJet);
- h_nTotalClusteredRechitsAll_MB1Veto[itr_file]->Fill(totalClusteredMB1);
- h_nTotalClusteredRechitsAll_noMB1Veto[itr_file]->Fill(totalClusteredNoMB1);
- h_nTotalClusteredRechitsAll_HOVeto[itr_file]->Fill(totalClusteredHO);
- h_nTotalClusteredRechitsAll_fullVeto[itr_file]->Fill(totalClusteredFull);
- h_nTotalClusteredRechitsAll_fullHOVeto[itr_file]->Fill(totalClusteredFullHO);
- }
- }*/
- evtNum+=1;
- }
-
- }
- //cout << "Total events = " << totalEvents << endl;
- //cout << "Total magnet events = " << totalMagnetEvents << endl;
- //cout << "Total barrel events = " << totalBarrelEvents << endl;
-
- cout << "MET > 200: " << nPassMET * 137.0 * 1000. * 48.58 * 0.01 << endl;
- //cout << "DT Decay: " << nPassDTDecay * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(jet,MET) > 0.6: " << nPassJetMET * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(jet [20 GeV],MET) > 0.6: " << nPassJetMET_20 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(jet [30 GeV],MET) > 0.6: " << nPassJetMET_30 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(jet [50 GeV],MET) > 0.6: " << nPassJetMET_50 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(jet [Top 4],MET) > 0.6: " << nPassJetMET_top4 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "No Veto: " << nPassNoVeto * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Full Veto: " << nPassFullVeto * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "nRPC Matched > 0: " << nPassRPCMatch * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "RPC Spread = 0: " << nPassRPCSpread * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Max Station > 2: " << nPassMaxStation * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(Cluster,MET) < 1: " << nPassDeltaPhi * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << " " << endl;
- //cout << "HO Decay: " << nPassHODecay * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(jet,MET) > 0.6: " << nPassJetMET * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "No Veto: " << nPassNoVeto_ho * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Full Veto: " << nPassFullVeto_ho * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "nRPC Matched > 0: " << nPassRPCMatch_ho * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "RPC Spread = 0: " << nPassRPCSpread_ho * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "dPhi(Cluster,MET) < 1: " << nPassDeltaPhi_ho * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "DT cluster: " << nPassNoVeto * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << " " << endl;
- cout << "Muon veto: " << nPassMuon_std * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "MB1 veto: " << nPassMB1_std * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Jet+Muon veto: " << nPassJetMuon_std * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Jet+MB1 veto: " << nPassJetMB1_std * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Full DT Veto: " << nPassFull_std * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << " " << endl;
- cout << "Alt Muon veto: " << nPassMuon_alt * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt MB1 veto: " << nPassMB1_alt * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt Muon Full DT veto: " << nPassFull_altMuon * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt MB1 Full DT veto: " << nPassFull_altMB1 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt Muon MB1 Full DT veto: " << nPassFull_altMuonMB1 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << " " << endl;
- cout << "Full DT Selection No Muon: " << nPassFullDTPlus_noMuon * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Full DT Selection No MB1: " << nPassFullDTPlus_noMB1 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Full DT Selection: " << nPassFullDTPlus_std * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt Muon Full DT Selection: " << nPassFullDTPlus_altMuon * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt MB1 Full DT Selection: " << nPassFullDTPlus_altMB1 * 137.0 * 1000. * 48.58 * 0.01 << endl;
- cout << "Alt Muon MB1 Full DT Selection: " << nPassFullDTPlus_altMuonMB1 * 137.0 * 1000. * 48.58 * 0.01 << endl;
-
- cout << " " << endl;
-
- itr_file+=1;
- }
-
- _ofile->Write();
- _ofile->Close();
-
-}
diff --git a/analyzeSignal_ABCD.C b/analyzeSignal_ABCD.C
index d6cff75..9e0a5c5 100644
--- a/analyzeSignal_ABCD.C
+++ b/analyzeSignal_ABCD.C
@@ -1,46 +1,44 @@
R__LOAD_LIBRARY(libTreePlayer)
-int getStation(float hitX, float hitY){
- float hitR = sqrt(pow(hitX,2)+pow(hitY,2));
- if(hitR > 400. && hitR < 480.){ return 1; }
- else if(hitR > 485. && hitR < 560.){ return 2; }
- else if(hitR > 590. && hitR < 650.){ return 3; }
- else if(hitR > 690. && hitR < 800.){ return 4; }
- else{ return -1; }
-}
+#include "helpers.h"
+#include "signalfiles.h"
+#include
+#include
+#include