1515// /
1616// / \author Su-Jeong Ji <su-jeong.ji@cern.ch>
1717
18- #include < TH1F.h>
19- #include < TH1D.h>
2018#include < TDirectory.h>
19+ #include < TFile.h>
20+ #include < TH1D.h>
21+ #include < TH1F.h>
22+ #include < TH2F.h>
2123#include < THn.h>
22- #include < TLorentzVector.h>
2324#include < TMath.h>
2425#include < TObjArray.h>
25- #include < TFile.h>
26- #include < TH2F.h>
2726// #include <TDatabasePDG.h> // FIXME
28- #include < TPDGCode.h> // FIXME
29-
30- #include < vector>
31- #include < cmath>
32- #include < array>
33- #include < cstdlib>
34- #include < chrono>
35- #include < string>
27+ #include " PWGLF/DataModel/LFStrangenessTables.h"
28+ #include " PWGLF/Utils/collisionCuts.h"
3629
37- #include " TRandom3.h"
38- #include " TF1.h"
39- #include " TVector2.h"
40- #include " Math/Vector3D.h"
41- #include " Math/Vector4D.h"
42- #include " Math/GenVector/Boost.h"
43- #include < TMath.h>
30+ #include " Common/Core/RecoDecay.h"
31+ #include " Common/Core/TrackSelection.h"
32+ #include " Common/Core/trackUtilities.h"
33+ #include " Common/DataModel/Centrality.h"
34+ #include " Common/DataModel/EventSelection.h"
35+ #include " Common/DataModel/Multiplicity.h"
36+ #include " Common/DataModel/PIDResponse.h"
37+ #include " Common/DataModel/TrackSelectionTables.h"
4438
45- #include " Framework/runDataProcessing.h"
46- #include " Framework/AnalysisTask.h"
39+ #include " CCDB/BasicCCDBManager.h"
40+ #include " CCDB/CcdbApi.h"
41+ #include " CommonConstants/MathConstants.h"
42+ #include " CommonConstants/PhysicsConstants.h"
43+ #include " DCAFitter/DCAFitterN.h"
44+ #include " DataFormatsParameters/GRPMagField.h"
45+ #include " DataFormatsParameters/GRPObject.h"
46+ #include " Framework/ASoAHelpers.h"
4747#include " Framework/AnalysisDataModel.h"
48+ #include " Framework/AnalysisTask.h"
4849#include " Framework/HistogramRegistry.h"
49- #include " Framework/StepTHn.h"
5050#include " Framework/O2DatabasePDGPlugin.h"
51- #include " Framework/ASoAHelpers.h"
5251#include " Framework/StaticFor.h"
53- #include " DCAFitter/DCAFitterN.h"
54-
55- #include " Common/DataModel/PIDResponse.h"
56- #include " Common/DataModel/Multiplicity.h"
57- #include " Common/DataModel/Centrality.h"
58- #include " Common/DataModel/TrackSelectionTables.h"
59- #include " Common/DataModel/EventSelection.h"
60-
61- #include " Common/Core/trackUtilities.h"
62- #include " Common/Core/TrackSelection.h"
63- #include " Common/Core/RecoDecay.h"
64-
65- #include " CommonConstants/PhysicsConstants.h"
66- #include " CommonConstants/MathConstants.h"
67-
52+ #include " Framework/StepTHn.h"
53+ #include " Framework/runDataProcessing.h"
6854#include " ReconstructionDataFormats/Track.h"
6955
70- #include " DataFormatsParameters/GRPObject.h"
71- #include " DataFormatsParameters/GRPMagField.h"
72-
73- #include " CCDB/CcdbApi.h"
74- #include " CCDB/BasicCCDBManager.h"
56+ #include " Math/GenVector/Boost.h"
57+ #include " Math/RotationZ.h"
58+ #include " Math/Vector3D.h"
59+ #include " Math/Vector4D.h"
60+ #include " TF1.h"
61+ #include " TRandom3.h"
62+ #include " TVector2.h"
63+ #include < TMath.h>
64+ #include < TPDGCode.h> // FIXME
7565
76- #include " PWGLF/DataModel/LFStrangenessTables.h"
77- #include " PWGLF/Utils/collisionCuts.h"
66+ #include < array>
67+ #include < chrono>
68+ #include < cmath>
69+ #include < cstdlib>
70+ #include < string>
71+ #include < vector>
7872
7973using namespace o2 ;
8074using namespace o2 ::framework;
@@ -105,6 +99,7 @@ struct Chk892pp {
10599 using MCEventCandidates = soa::Join<EventCandidates, aod::McCollisionLabels>;
106100 using MCTrackCandidates = soa::Join<TrackCandidates, aod::McTrackLabels>;
107101 using MCV0Candidates = soa::Join<V0Candidates, aod::McV0Labels>;
102+ using LorentzVectorSetXYZM = ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float >>;
108103
109104 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
110105
@@ -159,7 +154,7 @@ struct Chk892pp {
159154 Configurable<int> cfgMinOccupancy{"cfgMinOccupancy", -100, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
160155 Configurable<bool> cfgNCollinTR{"cfgNCollinTR", false, "Additional selection for the number of coll in time range"};
161156*/
162- Configurable<int > cfgCentEst{" cfgCentEst" , 1 , " Centrality estimator, 1: FT0C, 2: FT0M" };
157+ Configurable<int > cfgCentEst{" cfgCentEst" , 2 , " Centrality estimator, 1: FT0C, 2: FT0M" };
163158
164159 // / PID Selections, pion
165160 struct : ConfigurableGroup {
@@ -368,6 +363,7 @@ struct Chk892pp {
368363 histos.add (" QA/before/KstarRapidity" , " Rapidity distribution of chK(892)" , HistType::kTH1D , {yAxis});
369364 histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso});
370365 histos.add (" hInvmass_Kstar_Mix" , " Invariant mass of unlike-sign chK(892) from mixed event" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso});
366+ histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s});
371367
372368 // Mass QA (quick check)
373369 histos.add (" QA/before/kstarinvmass" , " Invariant mass of unlike-sign chK(892)" , HistType::kTH1D , {invMassAxisReso});
@@ -441,15 +437,19 @@ struct Chk892pp {
441437 histos.print ();
442438 }
443439
440+ const int kCentFT0C = 1 ;
441+ const int kCentFT0M = 2 ;
442+ const float kInvalidCentrality = -999 .f;
443+
444444 template <typename CollisionType>
445445 float getCentrality (CollisionType const & collision)
446446 {
447- if (cfgCentEst == 1 ) {
447+ if (cfgCentEst == kCentFT0C ) {
448448 return collision.multFT0C ();
449- } else if (cfgCentEst == 2 ) {
449+ } else if (cfgCentEst == kCentFT0M ) {
450450 return collision.multFT0M ();
451451 } else {
452- return - 999 ;
452+ return kInvalidCentrality ;
453453 }
454454 }
455455
@@ -696,7 +696,7 @@ struct Chk892pp {
696696 {
697697 histos.fill (HIST (" QA/before/CentDist" ), lCentrality);
698698
699- TLorentzVector lDecayDaughter1, lDecayDaughter2, lResoSecondary, lDecayDaughter_bach, lResoKstar, lDaughterRot, lResonanceRot;
699+ LorentzVectorSetXYZM lDecayDaughter1, lDecayDaughter2, lResoSecondary, lDecayDaughter_bach, lResoKstar, lDaughterRot, lResonanceRot;
700700 std::vector<int > trackIndicies = {};
701701 std::vector<int > k0sIndicies = {};
702702
@@ -848,8 +848,8 @@ struct Chk892pp {
848848 auto k0sCand = dTracks2.rawIteratorAt (k0sIndex);
849849 auto trkkMass = k0sCand.mK0Short ();
850850
851- lDecayDaughter_bach. SetXYZM (bTrack.px (), bTrack.py (), bTrack.pz (), MassPionCharged);
852- lResoSecondary. SetXYZM (k0sCand.px (), k0sCand.py (), k0sCand.pz (), trkkMass);
851+ lDecayDaughter_bach = LorentzVectorSetXYZM (bTrack.px (), bTrack.py (), bTrack.pz (), MassPionCharged);
852+ lResoSecondary = LorentzVectorSetXYZM (k0sCand.px (), k0sCand.py (), k0sCand.pz (), trkkMass);
853853 lResoKstar = lResoSecondary + lDecayDaughter_bach;
854854
855855 // QA plots
@@ -874,11 +874,17 @@ struct Chk892pp {
874874 histos.fill (HIST (" QA/RotBkg/hRotBkg" ), lRotAngle);
875875 if (BkgEstimationConfig.cfgRotPion ) {
876876 lDaughterRot = lDecayDaughter_bach;
877- lDaughterRot.RotateZ (lRotAngle);
877+ // lDaughterRot.RotateZ(lRotAngle);
878+ ROOT::Math::RotationZ rot (lRotAngle);
879+ auto p3 = rot * lDaughterRot.Vect ();
880+ lDaughterRot = LorentzVectorSetXYZM (p3.X (), p3.Y (), p3.Z (), lDaughterRot.M ());
878881 lResonanceRot = lDaughterRot + lResoSecondary;
879882 } else {
880883 lDaughterRot = lResoSecondary;
881- lDaughterRot.RotateZ (lRotAngle);
884+ // lDaughterRot.RotateZ(lRotAngle);
885+ ROOT::Math::RotationZ rot (lRotAngle);
886+ auto p3 = rot * lDaughterRot.Vect ();
887+ lDaughterRot = LorentzVectorSetXYZM (p3.X (), p3.Y (), p3.Z (), lDaughterRot.M ());
882888 lResonanceRot = lDecayDaughter_bach + lDaughterRot;
883889 }
884890 typeKstar = bTrack.sign () > 0 ? BinType::kKstarP_Rot : BinType::kKstarN_Rot ;
0 commit comments