Skip to content

Commit 1349396

Browse files
committed
small change parsing weightvector
1 parent 83c2df0 commit 1349396

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

PWGEM/Dilepton/Core/Dilepton.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#include <Math/Vector4Dfwd.h>
6565
#include <TH1.h>
6666
#include <TH2.h>
67-
#include <TH3.h>
6867
#include <TList.h>
6968
#include <TRandom3.h>
7069
#include <TString.h>
@@ -150,6 +149,7 @@ struct Dilepton {
150149
o2::framework::ConfigurableAxis ConfPolarizationQuadMomBins{"ConfPolarizationQuadMomBins", {15, -0.5, 1}, "quadrupole moment bins for polarization analysis"}; // quardrupole moment <(3 x cos^2(theta) -1)/2>
151150

152151
o2::framework::Configurable<int> cfgNumBootstrapSamples{"cfgNumBootstrapSamples", 1, "Number of Bootstrap Samples"};
152+
153153

154154
EMEventCut fEMEventCut;
155155
struct : o2::framework::ConfigurableGroup {
@@ -570,7 +570,7 @@ struct Dilepton {
570570
LOGF(info, "h2sp_resolution.GetBinContent(40, 1) = %f", h2sp_resolution->GetBinContent(40, 1));
571571
}
572572

573-
if (flowcorrectionGroup.cfgApplyWeightNUA) {
573+
if(flowcorrectionGroup.cfgApplyWeightNUA){
574574
auto list_nua = ccdb->getForTimeStamp<TList>(flowcorrectionGroup.nuaPath, collision.timestamp());
575575
h3nua_weights.push_back(reinterpret_cast<TH3D*>(list_nua->FindObject("weights_uls_NUA")));
576576
LOGF(info, "h3nua_weights.at(0)->GetBinContent(5, 5, 5) = %f", h3nua_weights.at(0)->GetBinContent(5, 5, 5));
@@ -903,8 +903,8 @@ struct Dilepton {
903903
}
904904

905905
float getNUAweight(const int type_int, const float phi, const float eta, const float zVtx)
906-
{
907-
if (h3nua_weights.at(type_int) == nullptr) {
906+
{
907+
if (h3nua_weights.at(type_int) == nullptr){
908908
return 1.f;
909909
}
910910
int binId_phi = h3nua_weights.at(type_int)->GetXaxis()->FindBin(phi);
@@ -919,7 +919,7 @@ struct Dilepton {
919919
}
920920

921921
template <int ev_id, typename TCollision, typename TTrack1, typename TTrack2, typename TCut, typename TAllTracks>
922-
bool fillPairInfo(TCollision const& collision, TTrack1 const& t1, TTrack2 const& t2, TCut const& cut, TAllTracks const&, const std::vector<float> weightvector)
922+
bool fillPairInfo(TCollision const& collision, TTrack1 const& t1, TTrack2 const& t2, TCut const& cut, TAllTracks const&, const std::vector<float>& weightvector)
923923
{
924924
if constexpr (ev_id == 0) {
925925
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
@@ -1092,8 +1092,8 @@ struct Dilepton {
10921092

10931093
if constexpr (ev_id == 0) {
10941094
// LOGF(info, "collision.centFT0C() = %f, collision.trackOccupancyInTimeRange() = %d, getSPresolution = %f", collision.centFT0C(), collision.trackOccupancyInTimeRange(), getSPresolution(collision.centFT0C(), collision.trackOccupancyInTimeRange()));
1095-
if (flowcorrectionGroup.cfgApplyWeightNUA) {
1096-
weight *= 1. / getNUAweight(t1.sign() * t2.sign() < 0 ? 0 : (t1.sign() > 0 && t2.sign() > 0 ? 1 : 2), v12.Phi(), v12.Eta(), collision.posZ());
1095+
if(flowcorrectionGroup.cfgApplyWeightNUA){
1096+
weight *= 1./getNUAweight(t1.sign() * t2.sign() < 0 ? 0 : (t1.sign() > 0 && t2.sign() > 0 ? 1 : 2), v12.Phi(), v12.Eta(), collision.posZ());
10971097
}
10981098

10991099
float sp = RecoDecay::dotProd(std::array<float, 2>{static_cast<float>(std::cos(nmod * v12.Phi())), static_cast<float>(std::sin(nmod * v12.Phi()))}, qvectors[nmod][cfgQvecEstimator]) / getSPresolution(collision.centFT0C(), collision.trackOccupancyInTimeRange());

0 commit comments

Comments
 (0)