@@ -415,6 +415,17 @@ struct nuclei_in_jets {
415415 return false ;
416416 }
417417
418+ double trackInclination (double eta)
419+ {
420+ double lambda (0 );
421+ double theta = 2.0 * std::atan (std::exp (-eta));
422+ if (theta <= o2::constants::math::PIHalf)
423+ lambda = o2::constants::math::PIHalf - theta;
424+ if (theta > o2::constants::math::PIHalf)
425+ lambda = theta - o2::constants::math::PIHalf;
426+ return lambda;
427+ }
428+
418429 void GetReweightingHistograms (o2::framework::Service<o2::ccdb::BasicCCDBManager> const & ccdbObj, TString filepath, TString histname_antip_jet, TString histname_antip_ue)
419430 {
420431 TList* l = ccdbObj->get <TList>(filepath.Data ());
@@ -596,24 +607,6 @@ struct nuclei_in_jets {
596607 registryQC.fill (HIST (" event_selection_jets" ), 1.5 ); // events with pTjet>10 GeV/c selected
597608 // ************************************************************************************************************************************
598609
599- // Leading Track
600- double pt_max (0 );
601-
602- // Loop over Reconstructed Tracks
603- for (auto const & track : tracks) {
604-
605- if (!passedTrackSelectionForJetReconstruction (track))
606- continue ;
607-
608- if (track.pt () > pt_max) {
609- pt_max = track.pt ();
610- }
611- }
612- // Event Counter: Skip Events with pt<pt_leading_min
613- if (pt_max < 5.0 )
614- return ;
615- registryQC.fill (HIST (" event_selection_jets" ), 2.5 ); // events with pTleading > 5 GeV/c selected
616-
617610 // Overlaps
618611 int nOverlaps (0 );
619612 for (int i = 0 ; i < static_cast <int >(jet.size ()); i++) {
@@ -660,6 +653,25 @@ struct nuclei_in_jets {
660653 double dcaxy = track.dcaXY ();
661654 double dcaz = track.dcaZ ();
662655
656+ // ITS Cluster size
657+ double averageItsClusterSize (0 );
658+ int nItsCls (0 );
659+ for (int i = 0 ; i < 7 ; i++) {
660+ int clusterSize = track.itsClsSizeInLayer (i);
661+ averageItsClusterSize += static_cast <double >(clusterSize);
662+ if (clusterSize > 0 )
663+ nItsCls++;
664+ }
665+ averageItsClusterSize = averageItsClusterSize / static_cast <double >(nItsCls);
666+ double lambda = trackInclination (track.eta ());
667+
668+ double avgClsCosLMin (0.0 ); // pt-dependent selection will be implemented
669+ double avgClsCosLMax (5.0 ); // pt-dependent selection will be implemented
670+ bool isItsSelected = false ;
671+ if (averageItsClusterSize * std::cos (lambda) > avgClsCosLMin && averageItsClusterSize * std::cos (lambda) < avgClsCosLMax) {
672+ isItsSelected = true ;
673+ }
674+
663675 TVector3 particle_dir (track.px (), track.py (), track.pz ());
664676 double deltaEta_jet = particle_dir.Eta () - jet[i].Eta ();
665677 double deltaPhi_jet = GetDeltaPhi (particle_dir.Phi (), jet[i].Phi ());
@@ -693,10 +705,12 @@ struct nuclei_in_jets {
693705
694706 if (track.sign () < 0 ) { // only antimatter
695707 // Antiproton
696- if (pt < max_pt_for_nsigmaTPC)
697- registryData.fill (HIST (" antiproton_jet_tpc" ), pt, nsigmaTPCPr);
698- if (pt >= min_pt_for_nsigmaTOF && nsigmaTPCPr > min_nsigmaTPC && nsigmaTPCPr < max_nsigmaTPC && track.hasTOF ())
699- registryData.fill (HIST (" antiproton_jet_tof" ), pt, nsigmaTOFPr);
708+ if (isItsSelected) {
709+ if (pt < max_pt_for_nsigmaTPC)
710+ registryData.fill (HIST (" antiproton_jet_tpc" ), pt, nsigmaTPCPr);
711+ if (pt >= min_pt_for_nsigmaTOF && nsigmaTPCPr > min_nsigmaTPC && nsigmaTPCPr < max_nsigmaTPC && track.hasTOF ())
712+ registryData.fill (HIST (" antiproton_jet_tof" ), pt, nsigmaTOFPr);
713+ }
700714
701715 // Antideuteron
702716 if (pt < max_pt_for_nsigmaTPC)
@@ -723,11 +737,12 @@ struct nuclei_in_jets {
723737
724738 if (track.sign () < 0 ) { // only antimatter
725739 // Antiproton
726- if (pt < max_pt_for_nsigmaTPC)
727- registryData.fill (HIST (" antiproton_ue_tpc" ), pt, nsigmaTPCPr);
728- if (pt >= min_pt_for_nsigmaTOF && nsigmaTPCPr > min_nsigmaTPC && nsigmaTPCPr < max_nsigmaTPC && track.hasTOF ())
729- registryData.fill (HIST (" antiproton_ue_tof" ), pt, nsigmaTOFPr);
730-
740+ if (isItsSelected) {
741+ if (pt < max_pt_for_nsigmaTPC)
742+ registryData.fill (HIST (" antiproton_ue_tpc" ), pt, nsigmaTPCPr);
743+ if (pt >= min_pt_for_nsigmaTOF && nsigmaTPCPr > min_nsigmaTPC && nsigmaTPCPr < max_nsigmaTPC && track.hasTOF ())
744+ registryData.fill (HIST (" antiproton_ue_tof" ), pt, nsigmaTOFPr);
745+ }
731746 // Antideuteron
732747 if (pt < max_pt_for_nsigmaTPC)
733748 registryData.fill (HIST (" antideuteron_ue_tpc" ), pt, nsigmaTPCDe);
0 commit comments