@@ -79,6 +79,7 @@ struct f1protoncorrelation {
7979 Configurable<float > momentumTOFProton{" momentumTOFProton" , 0.7 , " Proton momentum TOF" };
8080 Configurable<float > momentumProtonMax{" momentumProtonMax" , 3.0 , " Maximum proton momentum" };
8181 Configurable<float > lowPtF1{" lowPtF1" , 1.0 , " PT cut F1" };
82+ Configurable<int > nRot{" nRot" , 4 , " Number of rotational bkg" };
8283 // Event Mixing
8384 Configurable<int > nEvtMixing{" nEvtMixing" , 10 , " Number of events to mix" };
8485 ConfigurableAxis CfgVtxBins{" CfgVtxBins" , {10 , -10 , 10 }, " Mixing bins - z-vertex" };
@@ -213,7 +214,7 @@ struct f1protoncorrelation {
213214 }
214215 float combinedTPC;
215216 TLorentzVector F1, Proton, F1ProtonPair, Pion, Kaon, Kshort;
216- TLorentzVector F1Rot, PionRot, KaonKshortPair, KaonKshortPairRot ;
217+ TLorentzVector F1Rot, PionRot, KaonKshortPair;
217218 // Process the data in same event
218219
219220 int currentRunNumber = -999 ;
@@ -299,7 +300,9 @@ struct f1protoncorrelation {
299300 histos.fill (HIST (" hNsigmaProtonTPC" ), protontrack.protonNsigmaTPC (), Proton.Pt ());
300301 }
301302 histos.fill (HIST (" h2SameEventPtCorrelation" ), relative_momentum, F1.Pt (), Proton.Pt ());
303+
302304 if (f1track.f1SignalStat () > 0 ) {
305+ // check charge
303306 int f1Charge = f1track.f1SignalStat ();
304307 if (f1Charge == 2 ) {
305308 f1Charge = -1 ;
@@ -312,32 +315,33 @@ struct f1protoncorrelation {
312315 if (fillSparse) {
313316 histos.fill (HIST (" SEMassUnlike" ), F1.M (), F1.Pt (), Proton.Pt (), relative_momentum, combinedTPC, pairCharge);
314317 }
318+ if (fillRotation) {
319+ for (int nrotbkg = 0 ; nrotbkg < nRot; nrotbkg++) {
320+ auto anglestart = 5.0 * TMath::Pi () / 6.0 ;
321+ auto angleend = 7.0 * TMath::Pi () / 6.0 ;
322+ auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0 ));
323+ auto rotangle = anglestart + nrotbkg * anglestep;
324+ auto rotPionPx = Pion.Px () * std::cos (rotangle) - Pion.Py () * std::sin (rotangle);
325+ auto rotPionPy = Pion.Px () * std::sin (rotangle) + Pion.Py () * std::cos (rotangle);
326+ PionRot.SetXYZM (rotPionPx, rotPionPy, Pion.Pz (), Pion.M ());
327+ F1Rot = PionRot + KaonKshortPair;
328+ if (F1Rot.Pt () < 1.0 ) {
329+ continue ;
330+ }
331+ auto relative_momentum_rot = getkstar (F1Rot, Proton);
332+ histos.fill (HIST (" h2SameEventInvariantMassRot_mass" ), relative_momentum_rot, F1Rot.Pt (), F1Rot.M (), pairCharge);
333+ if (fillSparse) {
334+ histos.fill (HIST (" SEMassRot" ), F1Rot.M (), F1Rot.Pt (), Proton.Pt (), relative_momentum_rot, combinedTPC, pairCharge);
335+ }
336+ }
337+ }
315338 }
316339 if (f1track.f1SignalStat () == -1 ) {
317340 histos.fill (HIST (" h2SameEventInvariantMassLike_mass" ), relative_momentum, F1.Pt (), F1.M (), protontrack.protonCharge ());
318341 if (fillSparse) {
319342 histos.fill (HIST (" SEMassLike" ), F1.M (), F1.Pt (), Proton.Pt (), relative_momentum, combinedTPC, protontrack.protonCharge ());
320343 }
321344 }
322- if (fillRotation) {
323- for (int nrotbkg = 0 ; nrotbkg < 9 ; nrotbkg++) {
324- auto anglestart = 5.0 * TMath::Pi () / 6.0 ;
325- auto angleend = 7.0 * TMath::Pi () / 6.0 ;
326- auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0 ));
327- auto rotangle = anglestart + nrotbkg * anglestep;
328- auto rotKKPx = KaonKshortPair.Px () * std::cos (rotangle) - KaonKshortPair.Py () * std::sin (rotangle);
329- auto rotKKPy = KaonKshortPair.Px () * std::sin (rotangle) + KaonKshortPair.Py () * std::cos (rotangle);
330- KaonKshortPairRot.SetXYZM (rotKKPx, rotKKPy, KaonKshortPair.Pz (), KaonKshortPair.M ());
331- F1Rot = Pion + KaonKshortPairRot;
332- auto relative_momentum_rot = getkstar (F1Rot, Proton);
333- if (f1track.f1SignalStat () > 0 ) {
334- histos.fill (HIST (" h2SameEventInvariantMassRot_mass" ), relative_momentum_rot, F1Rot.Pt (), F1Rot.M (), protontrack.protonCharge ());
335- if (fillSparse) {
336- histos.fill (HIST (" SEMassRot" ), F1Rot.M (), F1Rot.Pt (), Proton.Pt (), relative_momentum_rot, combinedTPC, protontrack.protonCharge ());
337- }
338- }
339- }
340- }
341345 }
342346 }
343347 }
@@ -430,15 +434,18 @@ struct f1protoncorrelation {
430434 }
431435 }
432436 if (fillRotation) {
433- for (int nrotbkg = 0 ; nrotbkg < 9 ; nrotbkg++) {
437+ for (int nrotbkg = 0 ; nrotbkg < nRot ; nrotbkg++) {
434438 auto anglestart = 5.0 * TMath::Pi () / 6.0 ;
435439 auto angleend = 7.0 * TMath::Pi () / 6.0 ;
436440 auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0 ));
437441 auto rotangle = anglestart + nrotbkg * anglestep;
438- auto rotKKPx = KaonKshortPair.Px () * std::cos (rotangle) - KaonKshortPair.Py () * std::sin (rotangle);
439- auto rotKKPy = KaonKshortPair.Px () * std::sin (rotangle) + KaonKshortPair.Py () * std::cos (rotangle);
440- KaonKshortPairRot.SetXYZM (rotKKPx, rotKKPy, KaonKshortPair.Pz (), KaonKshortPair.M ());
441- F1Rot = Pion + KaonKshortPairRot;
442+ auto rotPionPx = Pion.Px () * std::cos (rotangle) - Pion.Py () * std::sin (rotangle);
443+ auto rotPionPy = Pion.Px () * std::sin (rotangle) + Pion.Py () * std::cos (rotangle);
444+ PionRot.SetXYZM (rotPionPx, rotPionPy, Pion.Pz (), Pion.M ());
445+ F1Rot = PionRot + KaonKshortPair;
446+ if (F1Rot.Pt () < 1.0 ) {
447+ continue ;
448+ }
442449 auto relative_momentum_rot = getkstar (F1Rot, Proton);
443450 if (t1.f1SignalStat () > 0 ) {
444451 histos.fill (HIST (" h2MixEventInvariantMassRot_mass" ), relative_momentum_rot, F1Rot.Pt (), F1Rot.M (), 1.0 );
@@ -538,32 +545,36 @@ struct f1protoncorrelation {
538545 if (fillSparse) {
539546 histos.fill (HIST (" MEMassUnlike" ), F1.M (), F1.Pt (), Proton.Pt (), relative_momentum, combinedTPC, pairCharge);
540547 }
548+
549+ if (fillRotation) {
550+ for (int nrotbkg = 0 ; nrotbkg < nRot; nrotbkg++) {
551+ auto anglestart = 5.0 * TMath::Pi () / 6.0 ;
552+ auto angleend = 7.0 * TMath::Pi () / 6.0 ;
553+ auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0 ));
554+ auto rotangle = anglestart + nrotbkg * anglestep;
555+ auto rotPionPx = Pion.Px () * std::cos (rotangle) - Pion.Py () * std::sin (rotangle);
556+ auto rotPionPy = Pion.Px () * std::sin (rotangle) + Pion.Py () * std::cos (rotangle);
557+ PionRot.SetXYZM (rotPionPx, rotPionPy, Pion.Pz (), Pion.M ());
558+ F1Rot = PionRot + KaonKshortPair;
559+ if (F1Rot.Pt () < 1.0 ) {
560+ continue ;
561+ }
562+ auto relative_momentum_rot = getkstar (F1Rot, Proton);
563+ if (t1.f1SignalStat () > 0 ) {
564+ histos.fill (HIST (" h2MixEventInvariantMassRot_mass" ), relative_momentum_rot, F1Rot.Pt (), F1Rot.M (), pairCharge);
565+ if (fillSparse) {
566+ histos.fill (HIST (" MEMassRot" ), F1Rot.M (), F1Rot.Pt (), Proton.Pt (), relative_momentum_rot, combinedTPC, pairCharge);
567+ }
568+ }
569+ }
570+ }
541571 }
542572 if (t1.f1SignalStat () == -1 ) {
543573 histos.fill (HIST (" h2MixEventInvariantMassLike_mass" ), relative_momentum, F1.Pt (), F1.M (), t2.protonCharge ());
544574 if (fillSparse) {
545575 histos.fill (HIST (" MEMassLike" ), F1.M (), F1.Pt (), Proton.Pt (), relative_momentum, combinedTPC, t2.protonCharge ());
546576 }
547577 }
548- if (fillRotation) {
549- for (int nrotbkg = 0 ; nrotbkg < 9 ; nrotbkg++) {
550- auto anglestart = 5.0 * TMath::Pi () / 6.0 ;
551- auto angleend = 7.0 * TMath::Pi () / 6.0 ;
552- auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0 ));
553- auto rotangle = anglestart + nrotbkg * anglestep;
554- auto rotKKPx = KaonKshortPair.Px () * std::cos (rotangle) - KaonKshortPair.Py () * std::sin (rotangle);
555- auto rotKKPy = KaonKshortPair.Px () * std::sin (rotangle) + KaonKshortPair.Py () * std::cos (rotangle);
556- KaonKshortPairRot.SetXYZM (rotKKPx, rotKKPy, KaonKshortPair.Pz (), KaonKshortPair.M ());
557- F1Rot = Pion + KaonKshortPairRot;
558- auto relative_momentum_rot = getkstar (F1Rot, Proton);
559- if (t1.f1SignalStat () > 0 ) {
560- histos.fill (HIST (" h2MixEventInvariantMassRot_mass" ), relative_momentum_rot, F1Rot.Pt (), F1Rot.M (), t2.protonCharge ());
561- if (fillSparse) {
562- histos.fill (HIST (" MEMassRot" ), F1Rot.M (), F1Rot.Pt (), Proton.Pt (), relative_momentum_rot, combinedTPC, t2.protonCharge ());
563- }
564- }
565- }
566- }
567578 }
568579 }
569580 }
0 commit comments