@@ -74,6 +74,8 @@ struct highmasslambda {
7474 Configurable<std::string> geoPath{" geoPath" , " GLO/Config/GeometryAligned" , " Path of the geometry file" };
7575
7676 // fill output
77+ Configurable<bool > fillDefault{" fillDefault" , true , " fill Occupancy" };
78+ Configurable<bool > fillOccupancy{" fillOccupancy" , true , " fill Occupancy" };
7779 Configurable<bool > fillPolarization{" fillPolarization" , false , " fill polarization" };
7880 Configurable<bool > fillRotation{" fillRotation" , false , " fill rotation" };
7981 // events
@@ -145,6 +147,7 @@ struct highmasslambda {
145147
146148 void init (o2::framework::InitContext&)
147149 {
150+ std::vector<double > occupancyBinning = {0.0 , 500.0 , 1000.0 , 3000.0 , 6000.0 , 50000.0 };
148151 const AxisSpec thnAxisInvMass{configThnAxisInvMass, " #it{M} (GeV/#it{c}^{2})" };
149152 const AxisSpec thnAxisPt{configThnAxisPt, " #it{p}_{T} (GeV/#it{c})" };
150153 const AxisSpec thnAxisCosThetaStar{configThnAxisCosThetaStar, " cos(#vartheta)" };
@@ -161,6 +164,7 @@ struct highmasslambda {
161164 AxisSpec ptProtonAxis = {16 , 0.0 , 8 , " V0M (%)" };
162165 AxisSpec dcaAxis = {100 , 0.0 , 0.1 , " V0M (%)" };
163166 AxisSpec dcatoPVAxis = {50 , 0.0 , 0.4 , " V0M (%)" };
167+ AxisSpec occupancyAxis = {occupancyBinning, " occupancy" };
164168
165169 histos.add (" hRejectPID" , " hRejectPID" , kTH1F , {{2 , 0 .0f , 2 .0f }});
166170 histos.add (" hMomCorr" , " hMomCorr" , kTH3F , {{200 , -10 .0f , 10 .0f }, {200 , -10 .0f , 10 .0f }, {8 , 0 .0f , 80 .0f }});
@@ -172,6 +176,7 @@ struct highmasslambda {
172176 histos.add (" hFTOCvsTPCSelected" , " Mult correlation FT0C vs. TPC after selection" , kTH2F , {{80 , 0 .0f , 80 .0f }, {100 , -0 .5f , 5999 .5f }});
173177 histos.add (" hCentrality" , " Centrality distribution" , kTH1F , {{200 , 0.0 , 200.0 }});
174178 histos.add (" hVtxZ" , " Vertex distribution in Z;Z (cm)" , kTH1F , {{400 , -20.0 , 20.0 }});
179+ histos.add (" hOccupancy" , " Occupancy" , kTH1F , {{5000 , 0.0 , 50000.0 }});
175180 histos.add (" hEta" , " Eta distribution" , kTH1F , {{200 , -1 .0f , 1 .0f }});
176181 histos.add (" hDcaxy" , " Dcaxy distribution" , kTH1F , {{1000 , -0 .5f , 0 .5f }});
177182 histos.add (" hDcaz" , " Dcaz distribution" , kTH1F , {{1000 , -0 .5f , 0 .5f }});
@@ -183,13 +188,20 @@ struct highmasslambda {
183188 histos.add (" hPsiTPC" , " PsiTPC" , kTH2F , {centAxis, phiAxis});
184189 histos.add (" hPsiTPCR" , " PsiTPCR" , kTH2F , {centAxis, phiAxis});
185190 histos.add (" hPsiTPCL" , " PsiTPCL" , kTH2F , {centAxis, phiAxis});
186- histos.add (" hSparseV2SASameEvent_V2" , " hSparseV2SASameEvent_V2" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
187- histos.add (" hSparseV2SAMixedEvent_V2" , " hSparseV2SAMixedEvent_V2" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
188- histos.add (" hSparseV2SASameEventRotational_V2" , " hSparseV2SASameEventRotational_V2" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
189- histos.add (" hSparseV2SASameEvent_V2_new" , " hSparseV2SASameEvent_V2_new" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
190- histos.add (" hSparseV2SAMixedEvent_V2_new" , " hSparseV2SAMixedEvent_V2_new" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
191- histos.add (" hSparseV2SASameEventRotational_V2_new" , " hSparseV2SASameEventRotational_V2_new" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
192-
191+ if (fillDefault) {
192+ histos.add (" hSparseV2SASameEvent_V2" , " hSparseV2SASameEvent_V2" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
193+ histos.add (" hSparseV2SAMixedEvent_V2" , " hSparseV2SAMixedEvent_V2" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
194+ histos.add (" hSparseV2SASameEventRotational_V2" , " hSparseV2SASameEventRotational_V2" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
195+ histos.add (" hSparseV2SASameEvent_V2_new" , " hSparseV2SASameEvent_V2_new" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
196+ histos.add (" hSparseV2SAMixedEvent_V2_new" , " hSparseV2SAMixedEvent_V2_new" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
197+ histos.add (" hSparseV2SASameEventRotational_V2_new" , " hSparseV2SASameEventRotational_V2_new" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
198+ }
199+ if (fillOccupancy) {
200+ histos.add (" hSparseV2SASameEvent_V2_occupancy" , " hSparseV2SASameEvent_V2_occupancy" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality, occupancyAxis});
201+ histos.add (" hSparseV2SASameEventRotational_V2_occupancy" , " hSparseV2SASameEventRotational_V2_occupancy" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality, occupancyAxis});
202+ histos.add (" hSparseV2SASameEvent_V2_new_occupancy" , " hSparseV2SASameEvent_V2_new_occupancy" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality, occupancyAxis});
203+ histos.add (" hSparseV2SASameEventRotational_V2_new_occupancy" , " hSparseV2SASameEventRotational_V2_new_occupancy" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, occupancyAxis});
204+ }
193205 if (fillPolarization) {
194206 histos.add (" hSparseV2SASameEventplus_SA" , " hSparseV2SASameEventplus_SA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
195207 histos.add (" hSparseV2SASameEventplus_SA_A0" , " hSparseV2SASameEventplus_SA_A0" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
@@ -409,6 +421,7 @@ struct highmasslambda {
409421 if (!collision.triggereventep ()) {
410422 return ;
411423 }
424+ int occupancy = collision.trackOccupancyInTimeRange ();
412425 auto psiFT0C = collision.psiFT0C ();
413426 auto psiFT0A = collision.psiFT0A ();
414427 auto psiTPC = collision.psiTPC ();
@@ -429,6 +442,7 @@ struct highmasslambda {
429442 histos.fill (HIST (" ResFT0ATPC" ), centrality, TMath::Cos (2.0 * (psiTPC - psiFT0A)));
430443 histos.fill (HIST (" hCentrality" ), centrality);
431444 histos.fill (HIST (" hVtxZ" ), collision.posZ ());
445+ histos.fill (HIST (" hOccupancy" ), occupancy);
432446 auto firstprimarytrack = 0 ;
433447 for (auto track1 : tracks) {
434448 if (!selectionTrack (track1)) {
@@ -493,10 +507,14 @@ struct highmasslambda {
493507
494508 auto diffangle = Proton.Phi () - Lambdac.Phi ();
495509 auto decaylength = std::abs ((track1.dcaXY () / TMath::Sin (diffangle)) / (Lambdac.P () / 2.286 ));
496-
497- histos.fill (HIST (" hSparseV2SASameEvent_V2" ), Lambdac.M (), Lambdac.Pt (), v2, decaylength, Proton.Pt (), centrality);
498- histos.fill (HIST (" hSparseV2SASameEvent_V2_new" ), Lambdac.M (), Lambdac.Pt (), v2, std::abs (track1.dcaXY ()), Proton.Pt (), centrality);
499-
510+ if (fillDefault) {
511+ histos.fill (HIST (" hSparseV2SASameEvent_V2" ), Lambdac.M (), Lambdac.Pt (), v2, decaylength, Proton.Pt (), centrality);
512+ histos.fill (HIST (" hSparseV2SASameEvent_V2_new" ), Lambdac.M (), Lambdac.Pt (), v2, std::abs (track1.dcaXY ()), Proton.Pt (), centrality);
513+ }
514+ if (fillOccupancy) {
515+ histos.fill (HIST (" hSparseV2SASameEvent_V2_occupancy" ), Lambdac.M (), Lambdac.Pt (), v2, decaylength, Proton.Pt (), centrality, occupancy);
516+ histos.fill (HIST (" hSparseV2SASameEvent_V2_new_occupancy" ), Lambdac.M (), Lambdac.Pt (), v2, std::abs (track1.dcaXY ()), Proton.Pt (), centrality, occupancy);
517+ }
500518 if (fillRotation) {
501519 for (int nrotbkg = 1 ; nrotbkg < nBkgRotations; nrotbkg++) {
502520 auto anglestep = nrotbkg * (2.0 * TMath::Pi () / nBkgRotations);
@@ -508,8 +526,14 @@ struct highmasslambda {
508526 auto v2Rot = TMath::Cos (2.0 * phiminuspsiRot);
509527 auto diffangleRot = ProtonRot.Phi () - LambdacRot.Phi ();
510528 auto decaylengthRot = std::abs ((track1.dcaXY () / TMath::Sin (diffangleRot)) / (Lambdac.P () / 2.286 ));
511- histos.fill (HIST (" hSparseV2SASameEventRotational_V2" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, decaylengthRot, Proton.Pt (), centrality);
512- histos.fill (HIST (" hSparseV2SASameEventRotational_V2_new" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, std::abs (track1.dcaXY ()), Proton.Pt (), centrality);
529+ if (fillDefault) {
530+ histos.fill (HIST (" hSparseV2SASameEventRotational_V2" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, decaylengthRot, Proton.Pt (), centrality);
531+ histos.fill (HIST (" hSparseV2SASameEventRotational_V2_new" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, std::abs (track1.dcaXY ()), Proton.Pt (), centrality);
532+ }
533+ if (fillOccupancy) {
534+ histos.fill (HIST (" hSparseV2SASameEventRotational_V2_occupancy" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, decaylengthRot, Proton.Pt (), centrality, occupancy);
535+ histos.fill (HIST (" hSparseV2SASameEventRotational_V2_new_occupancy" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, std::abs (track1.dcaXY ()), Proton.Pt (), centrality, occupancy);
536+ }
513537 }
514538 }
515539 ROOT::Math::Boost boost{Lambdac.BoostToCM ()};
0 commit comments