1111// /
1212// / \file nucleitpcpbpb.cxx
1313// / \brief nuclei analysis
14- // / \author Jaideep Tanwar <jaideep.tanwar@cern.ch>
14+ // / \author Jaideep Tanwar <jaideep.tanwar@cern.ch>
1515// /
16- #include < Math/Vector4D.h>
17- #include < limits>
18- #include < string>
19- #include < vector>
20- #include < TRandom3.h>
21- #include " Framework/runDataProcessing.h"
22- #include " Framework/AnalysisTask.h"
23- #include " Framework/AnalysisDataModel.h"
24- #include " Framework/ASoAHelpers.h"
16+ #include " Common/Core/PID/PIDTOF.h"
17+ #include " Common/Core/PID/TPCPIDResponse.h"
2518#include " Common/Core/RecoDecay.h"
2619#include " Common/Core/trackUtilities.h"
27- #include " Common/Core/PID/TPCPIDResponse.h"
28- #include " Common/DataModel/PIDResponseITS.h"
29- #include " Common/Core/PID/PIDTOF.h"
30- #include " Common/DataModel/TrackSelectionTables.h"
31- #include " Common/DataModel/EventSelection.h"
3220#include " Common/DataModel/Centrality.h"
33- #include " Common/DataModel/PIDResponse.h"
3421#include " Common/DataModel/CollisionAssociationTables.h"
35- #include " ReconstructionDataFormats/Track.h"
36- #include " DataFormatsTPC/BetheBlochAleph.h"
37- #include " DataFormatsParameters/GRPObject.h"
22+ #include " Common/DataModel/EventSelection.h"
23+ #include " Common/DataModel/PIDResponse.h"
24+ #include " Common/DataModel/PIDResponseITS.h"
25+ #include " Common/DataModel/TrackSelectionTables.h"
26+
27+ #include " CCDB/BasicCCDBManager.h"
3828#include " DataFormatsParameters/GRPMagField.h"
29+ #include " DataFormatsParameters/GRPObject.h"
30+ #include " DataFormatsTPC/BetheBlochAleph.h"
3931#include " DetectorsBase/GeometryManager.h"
4032#include " DetectorsBase/Propagator.h"
41- #include " CCDB/BasicCCDBManager.h"
33+ #include " Framework/ASoAHelpers.h"
34+ #include " Framework/AnalysisDataModel.h"
35+ #include " Framework/AnalysisTask.h"
36+ #include " Framework/runDataProcessing.h"
37+ #include " ReconstructionDataFormats/Track.h"
38+
39+ #include < Math/Vector4D.h>
40+ #include < TRandom3.h>
41+
42+ #include < limits>
43+ #include < string>
44+ #include < vector>
4245using namespace o2 ;
4346using namespace o2 ::framework;
4447using namespace o2 ::framework::expressions;
@@ -62,7 +65,7 @@ constexpr double betheBlochDefault[nParticles][nBetheParams]{
6265 {-126.557359 , -0.858569 , 1.111643 , 1.210323 , 2.656374 , 0.09 }, // helion
6366 {-126.557359 , -0.858569 , 1.111643 , 1.210323 , 2.656374 , 0.09 }}; // alpha
6467const int nTrkSettings = 18 ;
65- static const std::vector<std::string> trackPIDsettingsNames{" useBBparams" , " minITSnCls" , " minITSnClscos" , " minTPCnCls" , " maxTPCchi2" ," minTPCchi2" , " maxITSchi2" , " minRigidity" , " maxRigidity" , " maxTPCnSigma" , " TOFrequiredabove" , " minTOFmass" , " maxTOFmass" , " maxDcaXY" , " maxDcaZ" , " minITSclsSize" , " maxITSclsSize" , " minTPCnClsCrossedRows" };
68+ static const std::vector<std::string> trackPIDsettingsNames{" useBBparams" , " minITSnCls" , " minITSnClscos" , " minTPCnCls" , " maxTPCchi2" , " minTPCchi2" , " maxITSchi2" , " minRigidity" , " maxRigidity" , " maxTPCnSigma" , " TOFrequiredabove" , " minTOFmass" , " maxTOFmass" , " maxDcaXY" , " maxDcaZ" , " minITSclsSize" , " maxITSclsSize" , " minTPCnClsCrossedRows" };
6669constexpr double trackPIDsettings[nParticles][nTrkSettings]{
6770 {0 , 0 , 4 , 60 , 4.0 , 0.5 , 100 , 0.15 , 1.2 , 2.5 , -1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 },
6871 {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 0.20 , 4.0 , 3.0 , -1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 },
@@ -138,7 +141,7 @@ struct NucleitpcPbPb {
138141 Configurable<float > cfgtpcNClsFound{" cfgtpcNClsFound" , 100 .0f , " min. no. of tpcNClsFound" };
139142 Configurable<float > cfgitsNCls{" cfgitsNCls" , 2 .0f , " min. no. of itsNCls" };
140143 o2::track::TrackParametrizationWithError<float > mTrackParCov ;
141- // CCDB
144+ // CCDB
142145 Service<o2::ccdb::BasicCCDBManager> ccdb;
143146 Configurable<double > bField{" bField" , -999 , " bz field, -999 is automatic" };
144147 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -194,11 +197,11 @@ struct NucleitpcPbPb {
194197 histos.add (" histCentFT0M" , " histCentFT0M" , kTH1F , {axisCent});
195198 hDeDx.resize (2 * nParticles + 2 );
196199 hNsigmaPt.resize (2 * nParticles + 2 );
197- hmass.resize (2 * nParticles + 2 );
200+ hmass.resize (2 * nParticles + 2 );
198201 for (int i = 0 ; i < nParticles + 1 ; i++) {
199202 TString histName = i < nParticles ? primaryParticles[i].name : " all" ;
200203 if (cfgFillDeDxWithCut) {
201- hDeDx[2 * i] = histos.add <TH2>(Form (" dedx/histdEdx_%s_Cuts" , histName.Data ()), " ;p_{TPC}/z (GeV/#it{c}); d#it{E}/d#it{x}" , HistType::kTH2F , {axisRigidity, axisdEdx});
204+ hDeDx[2 * i] = histos.add <TH2>(Form (" dedx/histdEdx_%s_Cuts" , histName.Data ()), " ;p_{TPC}/z (GeV/#it{c}); d#it{E}/d#it{x}" , HistType::kTH2F , {axisRigidity, axisdEdx});
202205 }
203206 }
204207 for (int i = 0 ; i < nParticles; i++) {
@@ -244,7 +247,7 @@ struct NucleitpcPbPb {
244247 if (track.itsNCls () < cfgTrackPIDsettings->get (i, " minITSnCls" ) && cfgminITSnClsRequire)
245248 continue ;
246249 double cosheta = std::cosh (track.eta ());
247- if ((track.itsNCls ()/ cosheta) < cfgTrackPIDsettings->get (i, " minITSnClscos" ) && cfgminITSnClscosRequire)
250+ if ((track.itsNCls () / cosheta) < cfgTrackPIDsettings->get (i, " minITSnClscos" ) && cfgminITSnClscosRequire)
248251 continue ;
249252 if (track.itsChi2NCl () > cfgTrackPIDsettings->get (i, " maxITSchi2" ) && cfgmaxITSchi2Require)
250253 continue ;
@@ -255,11 +258,11 @@ struct NucleitpcPbPb {
255258 if ((getRigidity (track) < cfgTrackPIDsettings->get (i, " minRigidity" ) || getRigidity (track) > cfgTrackPIDsettings->get (i, " maxRigidity" )) && cfgRigidityCutRequire)
256259 continue ;
257260 float pt_momn;
258- setTrackParCov (track, mTrackParCov );
259- mTrackParCov .setPID (track.pidForTracking ());
260- pt_momn = (i == 4 || i == 5 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
261+ setTrackParCov (track, mTrackParCov );
262+ mTrackParCov .setPID (track.pidForTracking ());
263+ pt_momn = (i == 4 || i == 5 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
261264 bool insideDCAxy = (std::abs (track.dcaXY ()) <= (cfgTrackPIDsettings->get (i, " maxDcaXY" ) * (0 .0105f + 0 .0350f / std::pow (pt_momn, 1 .1f ))));
262- if ((!(insideDCAxy) || std::abs (track.dcaZ ()) > DCAzSigma ( pt_momn, cfgTrackPIDsettings->get (i, " maxDcaZ" ))) && cfgDCAwithptRequire)
265+ if ((!(insideDCAxy) || std::abs (track.dcaZ ()) > DCAzSigma (pt_momn, cfgTrackPIDsettings->get (i, " maxDcaZ" ))) && cfgDCAwithptRequire)
263266 continue ;
264267 if (track.sign () > 0 ) {
265268 histos.fill (HIST (" histDcaZVsPtData_particle" ), pt_momn, track.dcaZ ());
@@ -273,23 +276,23 @@ struct NucleitpcPbPb {
273276 if ((std::abs (tpcNsigma) > cfgTrackPIDsettings->get (i, " maxTPCnSigma" )) && cfgmaxTPCnSigmaRequire)
274277 continue ;
275278 float itsSigma = getITSnSigma (track, primaryParticles.at (i));
276- if ((std::abs (itsSigma) > cfgITSnsigma) && cfgmaxITSnSigmaRequire)
279+ if ((std::abs (itsSigma) > cfgITSnsigma) && cfgmaxITSnSigmaRequire)
277280 continue ;
278281 fillnsigma (track, i);
279282 filldedx (track, i);
280- // TOF selection
281- if (!track.hasTOF () && cfgTrackPIDsettings->get (i, " TOFrequiredabove" ) < 1 )
283+ // TOF selection
284+ if (!track.hasTOF () && cfgTrackPIDsettings->get (i, " TOFrequiredabove" ) < 1 )
282285 continue ;
283286 float beta{o2::pid::tof::Beta::GetBeta (track)};
284287 float charge{1 .f + static_cast <float >(i == 4 || i == 5 )};
285- float tofMasses = getRigidity (track) * charge * std::sqrt (1 .f / (beta * beta) - 1 .f );
288+ float tofMasses = getRigidity (track) * charge * std::sqrt (1 .f / (beta * beta) - 1 .f );
286289 if ((getRigidity (track) > cfgTrackPIDsettings->get (i, " TOFrequiredabove" ) && (tofMasses < cfgTrackPIDsettings->get (i, " minTOFmass" ) || tofMasses > cfgTrackPIDsettings->get (i, " maxTOFmass" ))) && cfgmassRequire)
287290 continue ;
288291 fillhmass (track, i);
289292 }
290293 histos.fill (HIST (" histeta" ), track.eta ());
291294 filldedx (track, nParticles);
292- } // track loop
295+ } // track loop
293296 }
294297 // ----------------------------------------------------------------------------------------------------------------
295298 // ----------------------------------------------------------------------------------------------------------------
@@ -397,9 +400,9 @@ struct NucleitpcPbPb {
397400 int i = species;
398401 const float tpcNsigma = getTPCnSigma (track, primaryParticles.at (i));
399402 float pt_momn;
400- setTrackParCov (track, mTrackParCov );
403+ setTrackParCov (track, mTrackParCov );
401404 mTrackParCov .setPID (track.pidForTracking ());
402- pt_momn = (i == 4 || i == 5 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
405+ pt_momn = (i == 4 || i == 5 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
403406 if (track.sign () > 0 ) {
404407 hNsigmaPt[2 * species]->Fill (pt_momn, tpcNsigma);
405408 }
@@ -420,15 +423,15 @@ struct NucleitpcPbPb {
420423 if (beta <= 0 .f || beta >= 1 .f )
421424 return ;
422425 float charge = (species == 4 || species == 5 ) ? 2 .f : 1 .f ;
423- float p = getRigidity (track); // assuming this is the momentum from inner TPC
426+ float p = getRigidity (track); // assuming this is the momentum from inner TPC
424427 float massTOF = p * charge * std::sqrt (1 .f / (beta * beta) - 1 .f );
425428 // get PDG mass
426429 float pdgMass = particleMasses[species];
427430 float massDiff = massTOF - pdgMass;
428431 float pt_momn;
429- setTrackParCov (track, mTrackParCov );
432+ setTrackParCov (track, mTrackParCov );
430433 mTrackParCov .setPID (track.pidForTracking ());
431- pt_momn = (species == 4 || species == 5 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
434+ pt_momn = (species == 4 || species == 5 ) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
432435 if (track.sign () > 0 ) {
433436 hmass[2 * species]->Fill (pt_momn, massDiff * massDiff);
434437 } else if (track.sign () < 0 ) {
@@ -438,7 +441,7 @@ struct NucleitpcPbPb {
438441
439442 // ----------------------------------------------------------------------------------------------------------------
440443 template <class T >
441- float getTPCnSigma (T const & track, PrimParticles & particle)
444+ float getTPCnSigma (T const & track, PrimParticles& particle)
442445 {
443446 const float rigidity = getRigidity (track);
444447 if (!track.hasTPC ())
@@ -463,16 +466,16 @@ struct NucleitpcPbPb {
463466 }
464467 // ----------------------------------------------------------------------------------------------------------------
465468 template <class T >
466- float getITSnSigma (T const & track, PrimParticles & particle)
467- {
468- if (!track.hasITS ())
469- return -999 ;
470- o2::aod::ITSResponse itsResponse;
471- if (particle.name == " helion" )
472- return itsResponse.nSigmaITS <o2::track::PID::Helium3>(track);
469+ float getITSnSigma (T const & track, PrimParticles& particle)
470+ {
471+ if (!track.hasITS ())
472+ return -999 ;
473+ o2::aod::ITSResponse itsResponse;
474+ if (particle.name == " helion" )
475+ return itsResponse.nSigmaITS <o2::track::PID::Helium3>(track);
473476
474- return -999 ; // fallback if no match
475- }
477+ return -999 ; // fallback if no match
478+ }
476479
477480 // ----------------------------------------------------------------------------------------------------------------
478481 template <class T >
@@ -498,7 +501,7 @@ float getITSnSigma(T const& track, PrimParticles & particle)
498501 }
499502 float DCAzSigma (double pt, float dcasigma)
500503 {
501- float invPt = 1 .f / pt;
504+ float invPt = 1 .f / pt;
502505 return (5.00000e-04 + 8.73690e-03 * invPt + 9.62329e-04 * invPt * invPt) * dcasigma; // o2-linter: disable=magic-number (To be checked)
503506 }
504507 // ----------------------------------------------------------------------------------------------------------------
0 commit comments