1818#include " PWGEM/Dilepton/Utils/EMFwdTrack.h"
1919#include " PWGEM/Dilepton/Utils/EMTrack.h"
2020#include " PWGEM/Dilepton/Utils/EMTrackUtilities.h"
21- #include " PWGEM/Dilepton/Utils/EventHistograms.h"
21+ // #include "PWGEM/Dilepton/Utils/EventHistograms.h"
2222#include " PWGEM/Dilepton/Utils/EventMixingHandler.h"
2323#include " PWGEM/Dilepton/Utils/PairUtilities.h"
2424
2525#include " CCDB/BasicCCDBManager.h"
2626#include " CommonConstants/LHCConstants.h"
2727#include " DataFormatsParameters/GRPECSObject.h"
2828#include " DataFormatsParameters/GRPLHCIFData.h"
29- #include " DataFormatsParameters/GRPMagField.h"
30- #include " DataFormatsParameters/GRPObject.h"
31- #include " DetectorsBase/GeometryManager.h"
32- #include " DetectorsBase/Propagator.h"
29+ // #include "DataFormatsParameters/GRPMagField.h"
30+ // #include "DataFormatsParameters/GRPObject.h"
31+ // #include "DetectorsBase/GeometryManager.h"
32+ // #include "DetectorsBase/Propagator.h"
3333#include " Framework/ASoAHelpers.h"
3434#include " Framework/AnalysisTask.h"
3535#include " Framework/runDataProcessing.h"
@@ -64,19 +64,19 @@ using MyEMH_pair = o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tupl
6464struct DileptonPolarization {
6565 // Configurables
6666 Configurable<std::string> ccdburl{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
67- Configurable<std::string> grpPath{" grpPath" , " GLO/GRP/GRP" , " Path of the grp file" };
68- Configurable<std::string> grpmagPath{" grpmagPath" , " GLO/Config/GRPMagField" , " CCDB path of the GRPMagField object" };
69- Configurable<bool > skipGRPOquery{" skipGRPOquery" , true , " skip grpo query" };
70- Configurable<float > d_bz_input{" d_bz_input" , -999 , " bz field in kG, -999 is automatic" };
67+ // Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
68+ // Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
69+ // Configurable<bool> skipGRPOquery{"skipGRPOquery", true, "skip grpo query"};
70+ // Configurable<float> d_bz_input{"d_bz_input", -999, "bz field in kG, -999 is automatic"};
7171
72- Configurable<int > cfgPairType{" cfgPairType" , 0 , " 0:dielectron:0 , 1:dimuon" };
72+ Configurable<int > cfgPairType{" cfgPairType" , 0 , " 0:dielectron, 1:dimuon" };
7373 Configurable<int > cfgOccupancyEstimator{" cfgOccupancyEstimator" , 0 , " FT0C:0, Track:1" };
7474 Configurable<bool > cfgDoMix{" cfgDoMix" , true , " flag for event mixing" };
75- Configurable<int > ndepth{" ndepth" , 100 , " depth for event mixing" };
75+ Configurable<int > ndepth{" ndepth" , 1000 , " depth for event mixing" };
7676 Configurable<uint64_t > ndiff_bc_mix{" ndiff_bc_mix" , 594 , " difference in global BC required in mixed events" };
7777 ConfigurableAxis ConfVtxBins{" ConfVtxBins" , {VARIABLE_WIDTH, -10 .0f , -8 .f , -6 .f , -4 .f , -2 .f , 0 .f , 2 .f , 4 .f , 6 .f , 8 .f , 10 .f }, " Mixing bins - z-vertex" };
78- ConfigurableAxis ConfCentBins{" ConfCentBins" , {VARIABLE_WIDTH, 0 .0f , 5 . 0f , 10 .0f , 20 .0f , 30 .0f , 40 .0f , 50 .0f , 60 .0f , 70 .0f , 80 .0f , 90 .0f , 100 .f , 999 .f }, " Mixing bins - centrality" };
79- ConfigurableAxis ConfEPBins{" ConfEPBins" , {16 , -M_PI / 2 , +M_PI / 2 }, " Mixing bins - event plane angle" };
78+ ConfigurableAxis ConfCentBins{" ConfCentBins" , {VARIABLE_WIDTH, 0 .0f , 10 .0f , 20 .0f , 30 .0f , 40 .0f , 50 .0f , 60 .0f , 70 .0f , 80 .0f , 90 .0f , 100 .f , 999 .f }, " Mixing bins - centrality" };
79+ ConfigurableAxis ConfEPBins{" ConfEPBins" , {1 , -M_PI / 2 , +M_PI / 2 }, " Mixing bins - event plane angle" };
8080 ConfigurableAxis ConfOccupancyBins{" ConfOccupancyBins" , {VARIABLE_WIDTH, -1 , 1e+10 }, " Mixing bins - occupancy" };
8181 Configurable<int > cfgPolarizationFrame{" cfgPolarizationFrame" , 0 , " frame of polarization. 0:CS, 1:HX, else:FATAL" };
8282
@@ -134,7 +134,7 @@ struct DileptonPolarization {
134134
135135 Service<o2::ccdb::BasicCCDBManager> ccdb;
136136 int mRunNumber ;
137- float d_bz;
137+ // float d_bz;
138138
139139 HistogramRegistry fRegistry {" output" , {}, OutputObjHandlingPolicy::AnalysisObject, false , false };
140140 // static constexpr std::string_view event_cut_types[2] = {"before/", "after/"};
@@ -163,7 +163,7 @@ struct DileptonPolarization {
163163 void init (InitContext& /* context*/ )
164164 {
165165 mRunNumber = 0 ;
166- d_bz = 0 ;
166+ // d_bz = 0;
167167
168168 ccdb->setURL (ccdburl);
169169 ccdb->setCaching (true );
@@ -334,39 +334,38 @@ struct DileptonPolarization {
334334 return ;
335335 }
336336
337- // In case override, don't proceed, please - no CCDB access required
338- if (d_bz_input > -990 ) {
339- d_bz = d_bz_input;
340- o2::parameters::GRPMagField grpmag;
341- if (std::fabs (d_bz) > 1e-5 ) {
342- grpmag.setL3Current (30000 .f / (d_bz / 5 .0f ));
343- }
344- o2::base::Propagator::initFieldFromGRP (&grpmag);
345- mRunNumber = collision.runNumber ();
346- return ;
347- }
348-
349- auto run3grp_timestamp = collision.timestamp ();
350- o2::parameters::GRPObject* grpo = 0x0 ;
351- o2::parameters::GRPMagField* grpmag = 0x0 ;
352- if (!skipGRPOquery)
353- grpo = ccdb->getForTimeStamp <o2::parameters::GRPObject>(grpPath, run3grp_timestamp);
354- if (grpo) {
355- o2::base::Propagator::initFieldFromGRP (grpo);
356- // Fetch magnetic field from ccdb for current collision
357- d_bz = grpo->getNominalL3Field ();
358- LOG (info) << " Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kG" ;
359- } else {
360- grpmag = ccdb->getForTimeStamp <o2::parameters::GRPMagField>(grpmagPath, run3grp_timestamp);
361- if (!grpmag) {
362- LOG (fatal) << " Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp;
363- }
364- o2::base::Propagator::initFieldFromGRP (grpmag);
365- // Fetch magnetic field from ccdb for current collision
366- d_bz = std::lround (5 .f * grpmag->getL3Current () / 30000 .f );
367- LOG (info) << " Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kG" ;
368- }
369- mRunNumber = collision.runNumber ();
337+ // // In case override, don't proceed, please - no CCDB access required
338+ // if (d_bz_input > -990) {
339+ // d_bz = d_bz_input;
340+ // o2::parameters::GRPMagField grpmag;
341+ // if (std::fabs(d_bz) > 1e-5) {
342+ // grpmag.setL3Current(30000.f / (d_bz / 5.0f));
343+ // }
344+ // o2::base::Propagator::initFieldFromGRP(&grpmag);
345+ // mRunNumber = collision.runNumber();
346+ // return;
347+ // }
348+
349+ // auto run3grp_timestamp = collision.timestamp();
350+ // o2::parameters::GRPObject* grpo = 0x0;
351+ // o2::parameters::GRPMagField* grpmag = 0x0;
352+ // if (!skipGRPOquery)
353+ // grpo = ccdb->getForTimeStamp<o2::parameters::GRPObject>(grpPath, run3grp_timestamp);
354+ // if (grpo) {
355+ // o2::base::Propagator::initFieldFromGRP(grpo);
356+ // // Fetch magnetic field from ccdb for current collision
357+ // d_bz = grpo->getNominalL3Field();
358+ // LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kG";
359+ // } else {
360+ // grpmag = ccdb->getForTimeStamp<o2::parameters::GRPMagField>(grpmagPath, run3grp_timestamp);
361+ // if (!grpmag) {
362+ // LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp;
363+ // }
364+ // o2::base::Propagator::initFieldFromGRP(grpmag);
365+ // // Fetch magnetic field from ccdb for current collision
366+ // d_bz = std::lround(5.f * grpmag->getL3Current() / 30000.f);
367+ // LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kG";
368+ // }
370369
371370 auto grplhcif = ccdb->getForTimeStamp <o2::parameters::GRPLHCIFData>(" GLO/Config/GRPLHCIF" , collision.timestamp ());
372371 int beamZ1 = grplhcif->getBeamZ (o2::constants::lhc::BeamC);
@@ -380,6 +379,8 @@ struct DileptonPolarization {
380379 beamP1 = std::sqrt (std::pow (beamE1, 2 ) - std::pow (beamM1, 2 ));
381380 beamP2 = std::sqrt (std::pow (beamE2, 2 ) - std::pow (beamM2, 2 ));
382381 LOGF (info, " beamZ1 = %d, beamZ2 = %d, beamA1 = %d, beamA2 = %d, beamE1 = %f (GeV), beamE2 = %f (GeV), beamM1 = %f (GeV), beamM2 = %f (GeV), beamP1 = %f (GeV), beamP2 = %f (GeV)" , beamZ1, beamZ2, beamA1, beamA2, beamE1, beamE2, beamM1, beamM2, beamP1, beamP2);
382+
383+ mRunNumber = collision.runNumber ();
383384 }
384385
385386 ~DileptonPolarization ()
0 commit comments