|
12 | 12 | #ifndef PWGUD_CORE_DECAYTREE_H_ |
13 | 13 | #define PWGUD_CORE_DECAYTREE_H_ |
14 | 14 |
|
15 | | -#include <Framework/HistogramRegistry.h> |
16 | 15 | #include <Framework/HistogramSpec.h> |
17 | 16 | #include <Framework/Logger.h> |
18 | 17 |
|
|
29 | 28 | #include <utility> |
30 | 29 | #include <vector> |
31 | 30 |
|
| 31 | +namespace o2::framework |
| 32 | +{ |
| 33 | +class HistogramRegistry; |
| 34 | +} |
| 35 | + |
32 | 36 | // ----------------------------------------------------------------------------- |
33 | 37 | class pidSelector |
34 | 38 | { |
@@ -835,164 +839,7 @@ class decayTree |
835 | 839 | } |
836 | 840 |
|
837 | 841 | // create histograms |
838 | | - void createHistograms(o2::framework::HistogramRegistry& registry) |
839 | | - { |
840 | | - // definitions |
841 | | - auto etax = o2::framework::AxisSpec(100, -1.5, 1.5); |
842 | | - auto nSax = o2::framework::AxisSpec(300, -15.0, 15.0); |
843 | | - auto chi2ax = o2::framework::AxisSpec(100, 0.0, 5.0); |
844 | | - auto nClax = o2::framework::AxisSpec(170, 0.0, 170.0); |
845 | | - auto angax = o2::framework::AxisSpec(315, 0.0, 3.15); |
846 | | - auto dcaxyax = o2::framework::AxisSpec(400, -0.2, 0.2); |
847 | | - auto dcazax = o2::framework::AxisSpec(600, -0.3, 0.3); |
848 | | - auto sTPCax = o2::framework::AxisSpec(1000, 0., 1000.); |
849 | | - |
850 | | - std::string base; |
851 | | - std::string hname; |
852 | | - std::string annot; |
853 | | - fhistPointers.clear(); |
854 | | - for (const auto& res : getResonances()) { |
855 | | - auto max = o2::framework::AxisSpec(res->nmassBins(), res->massHistRange()[0], res->massHistRange()[1]); |
856 | | - auto momax = o2::framework::AxisSpec(res->nmomBins(), res->momHistRange()[0], res->momHistRange()[1]); |
857 | | - |
858 | | - // M-pT, M-eta, pT-eta |
859 | | - for (const auto& cc : fccs) { |
860 | | - base = cc; |
861 | | - base.append("/").append(res->name()).append("/"); |
862 | | - hname = base + "mpt"; |
863 | | - annot = "M versus pT; M (" + res->name() + ") GeV/c^{2}; pT (" + res->name() + ") GeV/c"; |
864 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, momax}})}); |
865 | | - hname = base + "meta"; |
866 | | - annot = "M versus eta; M (" + res->name() + ") GeV/c^{2}; eta (" + res->name() + ")"; |
867 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, etax}})}); |
868 | | - hname = base + "pteta"; |
869 | | - annot = "pT versus eta; pT (" + res->name() + ") GeV/c; eta (" + res->name() + ")"; |
870 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {momax, etax}})}); |
871 | | - |
872 | | - // M versus daughters |
873 | | - auto daughs = res->getDaughters(); |
874 | | - auto ndaughs = daughs.size(); |
875 | | - for (auto i = 0; i < static_cast<int>(ndaughs); i++) { |
876 | | - auto d1 = getResonance(daughs[i]); |
877 | | - |
878 | | - // M vs pT daughter |
879 | | - hname = base; |
880 | | - hname.append("MvspT_").append(res->name()).append(d1->name()); |
881 | | - annot = "M versus pT; M (" + res->name() + ") GeV/c^{2}; pT (" + d1->name() + ") GeV/c"; |
882 | | - auto momax1 = o2::framework::AxisSpec(d1->nmomBins(), d1->momHistRange()[0], d1->momHistRange()[1]); |
883 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, momax1}})}); |
884 | | - |
885 | | - // M vs eta daughter |
886 | | - hname = base; |
887 | | - hname.append("Mvseta_").append(res->name()).append(d1->name()); |
888 | | - annot = "M versus eta; M (" + res->name() + ") GeV/c^{2}; eta (" + d1->name() + ")"; |
889 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, etax}})}); |
890 | | - |
891 | | - if (d1->isFinal()) { |
892 | | - // M vs dcaXYZ |
893 | | - hname = base; |
894 | | - hname.append("MvsdcaXY_").append(res->name()).append(d1->name()); |
895 | | - annot = "M versus dcaXY; M (" + res->name() + ") GeV/c^{2}; dca_{XY} (" + d1->name() + ") #mu m"; |
896 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, dcaxyax}})}); |
897 | | - hname = base; |
898 | | - hname.append("MvsdcaZ_").append(res->name()).append(d1->name()); |
899 | | - annot = "M versus dcaZ; M (" + res->name() + ") GeV/c^{2}; dca_{Z} (" + d1->name() + ") #mu m"; |
900 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, dcazax}})}); |
901 | | - |
902 | | - // M vs chi2 track |
903 | | - hname = base; |
904 | | - hname.append("Mvschi2_").append(res->name()).append(d1->name()); |
905 | | - annot = "M versus chi2; M (" + res->name() + ") GeV/c^{2}; chi2 (" + d1->name() + ")"; |
906 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, chi2ax}})}); |
907 | | - |
908 | | - // M vs nCl track |
909 | | - hname = base; |
910 | | - hname.append("MvsnCl_").append(res->name()).append(d1->name()); |
911 | | - annot = "M versus nCl; M (" + res->name() + ") GeV/c^{2}; nCl (" + d1->name() + ")"; |
912 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, nClax}})}); |
913 | | - |
914 | | - // M versus detector hits |
915 | | - hname = base; |
916 | | - hname.append("MvsdetHits_").append(res->name()).append(d1->name()); |
917 | | - annot = "M versus detector hits; M (" + res->name() + ") GeV/c^{2}; ITS + 2*TPC + 4*TRD + 8*TOF (" + d1->name() + ")"; |
918 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, {16, -0.5, 15.5}}})}); |
919 | | - } else { |
920 | | - // M vs Mi |
921 | | - hname = base; |
922 | | - hname.append("MvsM_").append(res->name()).append(d1->name()); |
923 | | - annot = "M versus M; M (" + res->name() + ") GeV/c^{2}; M (" + d1->name() + ") GeV/c^{2}"; |
924 | | - auto max1 = o2::framework::AxisSpec(res->nmassBins(), d1->massHistRange()[0], d1->massHistRange()[1]); |
925 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, max1}})}); |
926 | | - } |
927 | | - } |
928 | | - |
929 | | - // daughters vs daughters |
930 | | - for (auto i = 0; i < static_cast<int>(ndaughs - 1); i++) { |
931 | | - auto d1 = getResonance(daughs[i]); |
932 | | - auto max1 = o2::framework::AxisSpec(d1->nmassBins(), d1->massHistRange()[0], d1->massHistRange()[1]); |
933 | | - for (auto j = i + 1; j < static_cast<int>(ndaughs); j++) { |
934 | | - auto d2 = getResonance(daughs[j]); |
935 | | - auto max2 = o2::framework::AxisSpec(d2->nmassBins(), d2->massHistRange()[0], d2->massHistRange()[1]); |
936 | | - |
937 | | - // M1 vs M2 |
938 | | - hname = base; |
939 | | - hname.append("MvsM_").append(d1->name()).append(d2->name()); |
940 | | - annot = std::string("M versus M; M (").append(d1->name()).append(") GeV/c^{2}; M (").append(d2->name()).append(") GeV/c^{2}"); |
941 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max1, max2}})}); |
942 | | - |
943 | | - // angle(d1, d2) |
944 | | - hname = base; |
945 | | - hname.append("angle_").append(d1->name()).append(d2->name()); |
946 | | - annot = std::string("angle; Angle (").append(d1->name()).append(", ").append(d2->name()).append(")"); |
947 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {angax}})}); |
948 | | - |
949 | | - // M vs angle(d1, d2) |
950 | | - hname = base; |
951 | | - hname.append("Mvsangle_").append(d1->name()).append(d2->name()); |
952 | | - annot = std::string("M versus angle; M (").append(res->name()).append(") GeV/c^{2}; Angle (").append(d1->name()).append(", ").append(d2->name()).append(")"); |
953 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, angax}})}); |
954 | | - |
955 | | - // both daughters are finals |
956 | | - if (d1->isFinal() && d2->isFinal()) { |
957 | | - hname = base; |
958 | | - hname.append("TPCsignal_").append(d1->name()).append(d2->name()); |
959 | | - annot = std::string("TPC signal of both tracks; TPCsignal (").append(d1->name()).append("); TPCsignal (").append(d2->name()).append(")"); |
960 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {sTPCax, sTPCax}})}); |
961 | | - } |
962 | | - } |
963 | | - } |
964 | | - |
965 | | - // for finals only |
966 | | - if (res->isFinal()) { |
967 | | - // dca |
968 | | - hname = base; |
969 | | - hname.append("dcaXY"); |
970 | | - annot = std::string("dcaXY; dca_{XY}(").append(res->name()).append(")"); |
971 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {dcaxyax}})}); |
972 | | - hname = base; |
973 | | - hname.append("dcaZ"); |
974 | | - annot = std::string("dcaZ; dca_{Z}(").append(res->name()).append(")"); |
975 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {dcazax}})}); |
976 | | - |
977 | | - // nSIgma[TPC, TOF] vs pT |
978 | | - for (const auto& det : fdets) { |
979 | | - for (const auto& part : fparts) { |
980 | | - hname = base; |
981 | | - hname.append("nS").append(part).append(det); |
982 | | - annot = std::string("nSigma_").append(det).append(" versus p; p (").append(res->name()).append(") GeV/c; nSigma_{").append(det).append(", ").append(part).append("} (").append(res->name()).append(")"); |
983 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {momax, nSax}})}); |
984 | | - } |
985 | | - } |
986 | | - |
987 | | - // detector hits |
988 | | - hname = base; |
989 | | - hname.append("detectorHits"); |
990 | | - annot = std::string("detectorHits; Detector(").append(res->name()).append(")"); |
991 | | - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {{4, 0.5, 4.5}}})}); |
992 | | - } |
993 | | - } |
994 | | - } |
995 | | - } |
| 842 | + void createHistograms(o2::framework::HistogramRegistry& registry); |
996 | 843 |
|
997 | 844 | // ClassDefNV(decayTree, 1); |
998 | 845 | }; |
|
0 commit comments