@@ -124,6 +124,9 @@ struct chargedkstaranalysis {
124124 Configurable<float > cInvMassEnd{" cInvMassEnd" , 1.5 , " Invariant mass end" };
125125 Configurable<int > cInvMassBins{" cInvMassBins" , 900 , " Invariant mass binning" };
126126
127+ // Rapidity Cut
128+ Configurable<double > confRapidity{" confRapidity" , 0.5 , " Rapidity cut" };
129+
127130 // Event mixing
128131 Configurable<int > nEvtMixing{" nEvtMixing" , 5 , " Number of events to mix" };
129132 ConfigurableAxis cfgvtxbins{" cfgvtxbins" , {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" };
@@ -140,6 +143,13 @@ struct chargedkstaranalysis {
140143 " Value of the TOF Nsigma cut" };
141144 Configurable<float > nsigmaCutCombined{" nsigmaCutCombined" , 3.0 , " Value of the Combined Nsigma cut" };
142145 Configurable<int > cfgNoMixedEvents{" cfgNoMixedEvents" , 5 , " Number of mixed events per event" };
146+
147+ // For rotational background
148+ Configurable<bool > fillRotation{" fillRotation" , true , " fill rotation" };
149+ Configurable<float > confMinRot{" confMinRot" , 5.0 * TMath::Pi () / 6.0 , " Minimum of rotation" };
150+ Configurable<float > confMaxRot{" confMaxRot" , 7.0 * TMath::Pi () / 6.0 , " Maximum of rotation" };
151+ Configurable<int > nBkgRotations{" nBkgRotations" , 9 , " Number of rotated copies (background) per each original candidate" };
152+
143153 void init (InitContext const &)
144154 {
145155 AxisSpec dcaxyAxisQA = {cDCABinsQA, 0.0 , 3.0 , " DCA_{#it{xy}} (cm)" };
@@ -208,9 +218,14 @@ struct chargedkstaranalysis {
208218 histos1.add (" chargekstarMassPtMultPtUnlikeSign" ,
209219 " Invariant mass of CKS meson Unlike Sign" , kTHnSparseF ,
210220 {invMassAxis, ptAxis, centAxis}, true );
221+ histos1.add (" hSparseChargeKstarSameEventRotational" , " hSparseChargeKstarSameEventRotational" , HistType::kTHnSparseF , {invMassAxis, ptAxis, centAxis}, true );
222+
211223 histos1.add (" chargekstarMassPtMultPtMixedEvent" ,
212224 " Invariant mass of CKS meson MixedEvent Sign" , kTHnSparseF ,
213225 {invMassAxis, ptAxis, centAxis}, true );
226+ if (fillRotation) {
227+ histos1.add (" hRotation" , " hRotation" , kTH1F , {{360 , 0.0 , 2.0 * TMath::Pi ()}});
228+ }
214229 }
215230 double massPi = o2::constants::physics::MassPionCharged;
216231 double massK0s = o2::constants::physics::MassK0Short;
@@ -230,7 +245,7 @@ struct chargedkstaranalysis {
230245 // auto multiplicity = collision.cent();
231246 auto multiplicity = collision.cent ();
232247 histos1.fill (HIST (" QAbefore/collMult" ), multiplicity);
233- TLorentzVector lDecayDaughter, lDecayV0, lResonance;
248+ TLorentzVector lDecayDaughter, lDecayV0, lResonance, pionrot, chargekstarrot ;
234249
235250 for (const auto & track : dTracks) { // loop over all dTracks1 to find the bachelor pion
236251 auto trackId = track.index ();
@@ -296,7 +311,7 @@ struct chargedkstaranalysis {
296311 histos1.fill (HIST (" QAafter/hGoodTracksV0s" ), 2.5 );
297312
298313 // Checking whether the mid-rapidity condition is met
299- if (std::abs (lResonance.Rapidity ()) > 0.5 )
314+ if (std::abs (lResonance.Rapidity ()) > confRapidity )
300315 continue ;
301316 if constexpr (!IsMix) {
302317 histos1.fill (HIST (" chargedkstarinvmassUlikeSign" ), lResonance.M ());
@@ -310,6 +325,29 @@ struct chargedkstaranalysis {
310325 histos1.fill (HIST (" chargekstarMassPtMultPtMixedEvent" ),
311326 lResonance.M (), lResonance.Pt (), multiplicity);
312327 }
328+
329+ if constexpr (!IsMix) {
330+ if (fillRotation) {
331+ for (int nrotbkg = 0 ; nrotbkg < nBkgRotations; nrotbkg++) {
332+ auto rotangle = TMath::Pi ();
333+ if (nBkgRotations > 1 ) {
334+ auto anglestart = confMinRot;
335+ auto angleend = confMaxRot;
336+ auto anglestep = (angleend - anglestart) / (1.0 * (nBkgRotations - 1 ));
337+ rotangle = anglestart + nrotbkg * anglestep;
338+ }
339+ histos1.fill (HIST (" hRotation" ), rotangle);
340+ auto rotpionPx = lDecayDaughter.Px () * std::cos (rotangle) - lDecayDaughter.Py () * std::sin (rotangle);
341+ auto rotpionPy = lDecayDaughter.Px () * std::sin (rotangle) + lDecayDaughter.Py () * std::cos (rotangle);
342+ pionrot.SetXYZM (rotpionPx, rotpionPy, lDecayDaughter.Pz (), massPi);
343+ chargekstarrot = pionrot + lDecayV0;
344+ if (TMath::Abs (chargekstarrot.Rapidity ()) > confRapidity) {
345+ continue ;
346+ }
347+ histos1.fill (HIST (" hSparseChargeKstarSameEventRotational" ), chargekstarrot.M (), chargekstarrot.Pt (), multiplicity);
348+ }
349+ }
350+ }
313351 }
314352 }
315353 }
0 commit comments