|
20 | 20 | #include <TLorentzVector.h> |
21 | 21 | #include <TVector2.h> |
22 | 22 | #include <algorithm> |
| 23 | + |
23 | 24 | #include <iostream> |
24 | 25 |
|
25 | 26 | #include "Framework/ASoA.h" |
@@ -80,6 +81,8 @@ struct phiInJets { |
80 | 81 | Configurable<bool> cfgIsKstar{"cfgIsKstar", false, "Swaps Phi for Kstar analysis"}; |
81 | 82 | Configurable<bool> cfgDataHists{"cfgDataHists", false, "Enables DataHists"}; |
82 | 83 | Configurable<bool> cfgMCRecHists{"cfgMCRecHists", false, "Enables MCRecHists"}; |
| 84 | + Configurable<bool> cfgMCRecMBHists{"cfgMCRecMBHists", false, "Enables MCRec MB Hists"}; |
| 85 | + Configurable<bool> cfgMCRecInsideHists{"cfgMCRecInsideHists", false, "Enables MCRec Inside Hists"}; |
83 | 86 | Configurable<bool> cfgMCGenHists{"cfgMCGenHists", false, "Enables MCGenHists"}; |
84 | 87 | Configurable<bool> cfgMCGenMATCHEDHists{"cfgMCGenMATCHEDHists", false, "Enables MCGenMATCHEDHists"}; |
85 | 88 | Configurable<bool> cfgMCRecMATCHEDHists{"cfgMCRecMATCHEDHists", false, "Enables MCRecMATCHEDHists"}; |
@@ -164,36 +167,24 @@ struct phiInJets { |
164 | 167 | JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE_pt_v_eta", "hMCRec_nonmatch_hUSS_INSIDE_pt_v_eta", kTH2F, {PtAxis, axisEta}); |
165 | 168 | JEhistos.add("JetVsPhi_REC", "JetVsPhi_REC", kTH2F, {{4000, 0., 200.}, {200, 0, 20.0}}); |
166 | 169 |
|
167 | | - JEhistos.add("hMCRecTrue_hUSS", "hMCRecTrue_hUSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
168 | | - JEhistos.add("hMCRecTrue_hLSS", "hMCRecTrue_hLSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
169 | | - |
170 | | - JEhistos.add("hMCRec_hUSS", "hMCRec_hUSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
171 | | - JEhistos.add("hMCRec_hUSS_1D", "hMCRec_hUSS_1D", kTH1F, {MinvAxis}); |
172 | | - JEhistos.add("hMCRec_hUSS_1D_2_3", "hMCRec_hUSS_1D_2_3", kTH1F, {MinvAxis}); |
173 | | - |
174 | | - JEhistos.add("hMCRec_hLSS", "hMCRec_hLSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
175 | | - JEhistos.add("hMCRec_hLSS_1D", "hMCRec_hLSS_1D", kTH1F, {MinvAxis}); |
176 | | - JEhistos.add("hMCRec_hLSS_1D_2_3", "hMCRec_hLSS_1D_2_3", kTH1F, {MinvAxis}); |
177 | | - |
178 | | - JEhistos.add("hMCRec_hUSS_INSIDE", "hMCRec_hUSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
179 | | - JEhistos.add("hMCRec_hUSS_INSIDE_1D", "hMCRec_hUSS_INSIDE_1D", kTH1F, {MinvAxis}); |
180 | | - JEhistos.add("hMCRec_hUSS_INSIDE_1D_2_3", "hMCRec_hUSS_INSIDE_1D_2_3", kTH1F, {MinvAxis}); |
181 | | - |
182 | | - JEhistos.add("hMCRec_hLSS_INSIDE", "hMCRec_hLSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
183 | | - JEhistos.add("hMCRec_hLSS_INSIDE_1D", "hMCRec_hLSS_INSIDE_1D", kTH1F, {MinvAxis}); |
184 | | - JEhistos.add("hMCRec_hLSS_INSIDE_1D_2_3", "hMCRec_hLSS_INSIDE_1D_2_3", kTH1F, {MinvAxis}); |
185 | | - |
186 | | - JEhistos.add("hMCRecTrue_hUSS_INSIDE", "hMCRecTrue_hUSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
187 | | - JEhistos.add("hMCRecTrue_hUSS_INSIDE_1D", "hMCRecTrue_hUSS_INSIDE_1D", kTH1F, {MinvAxis}); |
188 | | - JEhistos.add("hMCRecTrue_hUSS_INSIDE_1D_2_3", "hMCRecTrue_hUSS_INSIDE_1D_2_3", kTH1F, {MinvAxis}); |
189 | | - |
190 | | - JEhistos.add("hMCRecTrue_hLSS_INSIDE", "hMCRecTrue_hLSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
191 | | - JEhistos.add("hMCRecTrue_hLSS_INSIDE_1D", "hMCRecTrue_hLSS_INSIDE_1D", kTH1F, {MinvAxis}); |
192 | | - JEhistos.add("hMCRecTrue_hLSS_INSIDE_1D_2_3", "hMCRecTrue_hLSS_INSIDE_1D_2_3", kTH1F, {MinvAxis}); |
193 | | - |
194 | | - JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE", "hMCRec_nonmatch_hUSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
195 | | - JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE_1D", "hMCRec_nonmatch_hUSS_INSIDE_1D", kTH1F, {MinvAxis}); |
196 | | - JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE_1D_2_3", "hMCRec_nonmatch_hUSS_INSIDE_1D_2_3", kTH1F, {MinvAxis}); |
| 170 | + // used for Minv closure tests |
| 171 | + // MB |
| 172 | + if (cfgMCRecMBHists) { |
| 173 | + JEhistos.add("hMCRec_hUSS", "hMCRec_hUSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 174 | + JEhistos.add("hMCRec_hLSS", "hMCRec_hLSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 175 | + JEhistos.add("hMCRecTrue_hUSS", "hMCRecTrue_hUSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 176 | + JEhistos.add("hMCRecTrue_hLSS", "hMCRecTrue_hLSS", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 177 | + } |
| 178 | + // INSIDE |
| 179 | + if (cfgMCRecInsideHists) { |
| 180 | + JEhistos.add("hMCRec_hUSS_INSIDE", "hMCRec_hUSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 181 | + JEhistos.add("hMCRec_hLSS_INSIDE", "hMCRec_hLSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 182 | + JEhistos.add("hMCRecTrue_hUSS_INSIDE", "hMCRecTrue_hUSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 183 | + JEhistos.add("hMCRecTrue_hLSS_INSIDE", "hMCRecTrue_hLSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 184 | + JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE", "hMCRec_nonmatch_hUSS_INSIDE", kTH3F, {dRAxis, PtAxis, MinvAxis}); |
| 185 | + JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE_1D", "hMCRec_nonmatch_hUSS_INSIDE_1D", kTH1F, {MinvAxis}); |
| 186 | + JEhistos.add("hMCRec_nonmatch_hUSS_INSIDE_1D_2_3", "hMCRec_nonmatch_hUSS_INSIDE_1D_2_3", kTH1F, {MinvAxis}); |
| 187 | + } |
197 | 188 | } |
198 | 189 |
|
199 | 190 | if (cfgMCGenHists) { |
@@ -723,10 +714,12 @@ struct phiInJets { |
723 | 714 | //================== |
724 | 715 | // 1.MB REC Closure |
725 | 716 | //================== |
726 | | - if (originalTrack.sign() * originalTrack2.sign() < 0) { |
727 | | - JEhistos.fill(HIST("hMCRec_hUSS"), 1.0, lResonance.Pt(), lResonance.M()); |
728 | | - } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
729 | | - JEhistos.fill(HIST("hMCRec_hLSS"), 1.0, lResonance.Pt(), lResonance.M()); |
| 717 | + if (cfgMCRecMBHists) { |
| 718 | + if (originalTrack.sign() * originalTrack2.sign() < 0) { |
| 719 | + JEhistos.fill(HIST("hMCRec_hUSS"), 1.0, lResonance.Pt(), lResonance.M()); |
| 720 | + } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
| 721 | + JEhistos.fill(HIST("hMCRec_hLSS"), 1.0, lResonance.Pt(), lResonance.M()); |
| 722 | + } |
730 | 723 | } |
731 | 724 | //============================================ |
732 | 725 | // 2.Check if particle is inside a jet or not |
@@ -766,14 +759,15 @@ struct phiInJets { |
766 | 759 | //====================== |
767 | 760 | // 3.INSIDE REC Closure |
768 | 761 | //====================== |
769 | | - if (jetFlag) { |
770 | | - if (originalTrack.sign() * originalTrack2.sign() < 0) { |
771 | | - JEhistos.fill(HIST("hMCRec_hUSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
772 | | - } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
773 | | - JEhistos.fill(HIST("hMCRec_hLSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
| 762 | + if (cfgMCRecInsideHists) { |
| 763 | + if (jetFlag) { |
| 764 | + if (originalTrack.sign() * originalTrack2.sign() < 0) { |
| 765 | + JEhistos.fill(HIST("hMCRec_hUSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
| 766 | + } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
| 767 | + JEhistos.fill(HIST("hMCRec_hLSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
| 768 | + } |
774 | 769 | } |
775 | 770 | } |
776 | | - |
777 | 771 | // check PID |
778 | 772 | if (track.has_mcParticle() && track2.has_mcParticle()) { |
779 | 773 | auto part1 = track.mcParticle(); |
@@ -830,48 +824,52 @@ struct phiInJets { |
830 | 824 | //===================== |
831 | 825 | // 4.MB True Closure |
832 | 826 | //===================== |
833 | | - if (originalTrack.sign() * originalTrack2.sign() < 0) { |
834 | | - JEhistos.fill(HIST("hMCRecTrue_hUSS"), 1.0, lResonance.Pt(), lResonance.M()); |
835 | | - } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
836 | | - JEhistos.fill(HIST("hMCRecTrue_hLSS"), 1.0, lResonance.Pt(), lResonance.M()); |
| 827 | + if (cfgMCRecMBHists) { |
| 828 | + if (originalTrack.sign() * originalTrack2.sign() < 0) { |
| 829 | + JEhistos.fill(HIST("hMCRecTrue_hUSS"), 1.0, lResonance.Pt(), lResonance.M()); |
| 830 | + } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
| 831 | + JEhistos.fill(HIST("hMCRecTrue_hLSS"), 1.0, lResonance.Pt(), lResonance.M()); |
| 832 | + } |
837 | 833 | } |
838 | | - |
839 | 834 | //=========================== |
840 | 835 | // 5.INSIDE REC True Closure |
841 | 836 | //=========================== |
842 | | - if (jetFlag) { |
843 | | - if (originalTrack.sign() * originalTrack2.sign() < 0) { |
844 | | - JEhistos.fill(HIST("hMCRecTrue_hUSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
845 | | - } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
846 | | - JEhistos.fill(HIST("hMCRecTrue_hLSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
| 837 | + if (cfgMCRecInsideHists) { |
| 838 | + if (jetFlag) { |
| 839 | + if (originalTrack.sign() * originalTrack2.sign() < 0) { |
| 840 | + JEhistos.fill(HIST("hMCRecTrue_hUSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
| 841 | + } else if (originalTrack.sign() * originalTrack2.sign() > 0) { |
| 842 | + JEhistos.fill(HIST("hMCRecTrue_hLSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M()); |
| 843 | + } |
847 | 844 | } |
848 | 845 | } |
849 | | - |
850 | 846 | if (lResonance.M() > 1.005 && lResonance.M() < 1.035) |
851 | 847 | RealPhiCand++; |
852 | 848 |
|
853 | 849 | // Now we do jets |
854 | | - if (cfgSingleJet) |
855 | | - if (goodjets > 1) |
856 | | - jetpt = DistinguishJetsMC(mcd_pt, mcd_phi, mcd_eta, lResonance); |
| 850 | + if (cfgMCRecInsideHists) { |
| 851 | + if (cfgSingleJet) |
| 852 | + if (goodjets > 1) |
| 853 | + jetpt = DistinguishJetsMC(mcd_pt, mcd_phi, mcd_eta, lResonance); |
857 | 854 |
|
858 | | - if (jetFlag) { |
859 | | - if (lResonance.M() > 1.005 && lResonance.M() < 1.035) |
860 | | - RealPhiCandInJet++; |
861 | | - JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE_pt_v_eta"), lResonance.Pt(), lResonance.Eta()); |
862 | | - JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE_1D"), lResonance.M()); |
863 | | - if (lResonance.Pt() > 2.0 && lResonance.Pt() < 3) |
864 | | - JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE_1D_2_3"), lResonance.M()); |
865 | | - JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE"), jetpt, lResonance.Pt(), lResonance.M()); |
866 | | - } |
| 855 | + if (jetFlag) { |
| 856 | + if (lResonance.M() > 1.005 && lResonance.M() < 1.035) |
| 857 | + RealPhiCandInJet++; |
| 858 | + JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE_pt_v_eta"), lResonance.Pt(), lResonance.Eta()); |
| 859 | + JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE_1D"), lResonance.M()); |
| 860 | + if (lResonance.Pt() > 2.0 && lResonance.Pt() < 3) |
| 861 | + JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE_1D_2_3"), lResonance.M()); |
| 862 | + JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_INSIDE"), jetpt, lResonance.Pt(), lResonance.M()); |
| 863 | + } |
867 | 864 |
|
868 | | - if (hasJets) { |
869 | | - JEhistos.fill(HIST("ptJEHistogramPhi_JetTrigger"), lResonance.Pt()); |
870 | | - auto triggerjet = std::min_element(mcd_pt.begin(), mcd_pt.end()); |
871 | | - double triggerjet_pt = *triggerjet; |
872 | | - JEhistos.fill(HIST("JetVsPhi_REC"), triggerjet_pt, lResonance.Pt()); |
| 865 | + if (hasJets) { |
| 866 | + JEhistos.fill(HIST("ptJEHistogramPhi_JetTrigger"), lResonance.Pt()); |
| 867 | + auto triggerjet = std::min_element(mcd_pt.begin(), mcd_pt.end()); |
| 868 | + double triggerjet_pt = *triggerjet; |
| 869 | + JEhistos.fill(HIST("JetVsPhi_REC"), triggerjet_pt, lResonance.Pt()); |
| 870 | + } |
| 871 | + JEhistos.fill(HIST("minvJEHistogramPhi"), lResonance.M()); |
873 | 872 | } |
874 | | - JEhistos.fill(HIST("minvJEHistogramPhi"), lResonance.M()); |
875 | 873 | } // mcpart check |
876 | 874 | } // tracks2 |
877 | 875 | } // tracks1 |
|
0 commit comments