diff --git a/PWGCF/Femto3D/Core/femto3dPairTask.h b/PWGCF/Femto3D/Core/femto3dPairTask.h index 763dd5cc0e4..c06b74cd3bc 100644 --- a/PWGCF/Femto3D/Core/femto3dPairTask.h +++ b/PWGCF/Femto3D/Core/femto3dPairTask.h @@ -23,62 +23,69 @@ namespace o2::aod::singletrackselector { -double particle_mass(int PDGcode){ - //if(PDGcode == 2212) return TDatabasePDG::Instance()->GetParticle(2212)->Mass(); - if(PDGcode == 1000010020) return 1.87561294257; - else return TDatabasePDG::Instance()->GetParticle(PDGcode)->Mass(); +double particle_mass(int PDGcode) +{ + // if(PDGcode == 2212) return TDatabasePDG::Instance()->GetParticle(2212)->Mass(); + if (PDGcode == 1000010020) + return 1.87561294257; + else + return TDatabasePDG::Instance()->GetParticle(PDGcode)->Mass(); } //==================================================================================== -class FemtoParticle { - public: - FemtoParticle(){} - FemtoParticle(const float& pt, const float& eta, const float& phi); - FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG); - FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG, const float& magField); - FemtoParticle(const FemtoParticle& obj); - FemtoParticle(const FemtoParticle* obj); - ~FemtoParticle(); - FemtoParticle& operator=(const FemtoParticle &obj); - - void Reset(); - - void SetPt(const float& pt){_pt = pt;} - void SetEta(const float& eta){_eta = eta;} - void SetPhi(const float& phi){_phi = phi;} - void SetSignedPDG(const int& signedPDG){_signedPDG = signedPDG;} - void SetMagField(const float& magField){_magField = magField;} - - float GetPt() const {return _pt;} - float GetEta() const {return _eta;} - float GetPhi() const {return _phi;} - float GetSignedPDG() const {return _signedPDG;} - float GetMagField() const {return _magField;} - - float GetPhiStar(const float& radius = 1.2) const; - std::shared_ptr Get4momentum() const; - void Get4momentum(TLorentzVector &vec) const; - - private: - float _pt = -1000.0, _eta = -1000.0, _phi = -1000.0, _magField = 0.0; - int _signedPDG = 0; +class FemtoParticle +{ + public: + FemtoParticle() {} + FemtoParticle(const float& pt, const float& eta, const float& phi); + FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG); + FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG, const float& magField); + FemtoParticle(const FemtoParticle& obj); + FemtoParticle(const FemtoParticle* obj); + ~FemtoParticle(); + FemtoParticle& operator=(const FemtoParticle& obj); + + void Reset(); + + void SetPt(const float& pt) { _pt = pt; } + void SetEta(const float& eta) { _eta = eta; } + void SetPhi(const float& phi) { _phi = phi; } + void SetSignedPDG(const int& signedPDG) { _signedPDG = signedPDG; } + void SetMagField(const float& magField) { _magField = magField; } + + float GetPt() const { return _pt; } + float GetEta() const { return _eta; } + float GetPhi() const { return _phi; } + float GetSignedPDG() const { return _signedPDG; } + float GetMagField() const { return _magField; } + + float GetPhiStar(const float& radius = 1.2) const; + std::shared_ptr Get4momentum() const; + void Get4momentum(TLorentzVector& vec) const; + + private: + float _pt = -1000.0, _eta = -1000.0, _phi = -1000.0, _magField = 0.0; + int _signedPDG = 0; }; -FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi){ +FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi) +{ _pt = pt; _eta = eta; _phi = phi; } -FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG){ +FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG) +{ _pt = pt; _eta = eta; _phi = phi; _signedPDG = signedPDG; } -FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG, const float& magField){ +FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi, const int& signedPDG, const float& magField) +{ _pt = pt; _eta = eta; _phi = phi; @@ -86,7 +93,8 @@ FemtoParticle::FemtoParticle(const float& pt, const float& eta, const float& phi _magField = magField; } -FemtoParticle::FemtoParticle(const FemtoParticle& obj){ +FemtoParticle::FemtoParticle(const FemtoParticle& obj) +{ SetPt(obj.GetPt()); SetEta(obj.GetEta()); SetPhi(obj.GetPhi()); @@ -94,7 +102,8 @@ FemtoParticle::FemtoParticle(const FemtoParticle& obj){ SetMagField(obj.GetMagField()); } -FemtoParticle::FemtoParticle(const FemtoParticle* obj){ +FemtoParticle::FemtoParticle(const FemtoParticle* obj) +{ SetPt(obj->GetPt()); SetEta(obj->GetEta()); SetPhi(obj->GetPhi()); @@ -106,20 +115,21 @@ FemtoParticle::~FemtoParticle() { } -FemtoParticle& FemtoParticle::operator=(const FemtoParticle &obj) +FemtoParticle& FemtoParticle::operator=(const FemtoParticle& obj) { - if (this != &obj) { - SetPt(obj.GetPt()); + if (this != &obj) { + SetPt(obj.GetPt()); SetEta(obj.GetEta()); SetPhi(obj.GetPhi()); SetSignedPDG(obj.GetSignedPDG()); SetMagField(obj.GetMagField()); - } + } - return *this; + return *this; } -void FemtoParticle::Reset(){ +void FemtoParticle::Reset() +{ _pt = -1000.0; _eta = -1000.0; _phi = -1000.0; @@ -127,95 +137,130 @@ void FemtoParticle::Reset(){ _magField = 0.0; } -float FemtoParticle::GetPhiStar(const float& radius) const { - if(_signedPDG && _magField) return _phi + asin( -0.3*_magField*( _signedPDG/std::abs(_signedPDG) )*radius/(2.0*_pt) ); - else return _phi; +float FemtoParticle::GetPhiStar(const float& radius) const +{ + if (_signedPDG && _magField) + return _phi + asin(-0.3 * _magField * (_signedPDG / std::abs(_signedPDG)) * radius / (2.0 * _pt)); + else + return _phi; } -std::shared_ptr FemtoParticle::Get4momentum() const { - std::shared_ptr fourmomentum(new TLorentzVector( _pt*std::sin(_phi), - _pt*std::cos(_phi), - _pt*std::sinh(_eta), - std::sqrt(_pt*std::cosh(_eta)*_pt*std::cosh(_eta) + particle_mass(std::abs(_signedPDG))*particle_mass(std::abs(_signedPDG))) )); +std::shared_ptr FemtoParticle::Get4momentum() const +{ + std::shared_ptr fourmomentum(new TLorentzVector(_pt * std::sin(_phi), + _pt * std::cos(_phi), + _pt * std::sinh(_eta), + std::sqrt(_pt * std::cosh(_eta) * _pt * std::cosh(_eta) + particle_mass(std::abs(_signedPDG)) * particle_mass(std::abs(_signedPDG))))); return fourmomentum; } -void FemtoParticle::Get4momentum(TLorentzVector &vec) const { +void FemtoParticle::Get4momentum(TLorentzVector& vec) const +{ vec.SetPtEtaPhiM(_pt, _eta, _phi, particle_mass(std::abs(_signedPDG))); - } //==================================================================================== +class FemtoPair +{ + public: + FemtoPair(){}; + FemtoPair(FemtoParticle* first, FemtoParticle* second) + { + _first = first; + _second = second; + } + FemtoPair(FemtoParticle* first, FemtoParticle* second, const bool& isidentical) + { + _first = first; + _second = second; + _isidentical = isidentical; + } + + FemtoPair(const FemtoPair& obj) + { + SetFirstParticle(obj.GetFirstParticle()); + SetSecondParticle(obj.GetSecondParticle()); + SetIdentical(obj.IsIdentical()); + } + FemtoPair(const FemtoPair* obj) + { + SetFirstParticle(obj->GetFirstParticle()); + SetSecondParticle(obj->GetSecondParticle()); + SetIdentical(obj->IsIdentical()); + } + ~FemtoPair() {} + FemtoPair& operator=(const FemtoPair& obj) + { + if (this != &obj) { + SetFirstParticle(obj.GetFirstParticle()); + SetSecondParticle(obj.GetSecondParticle()); + SetIdentical(obj.IsIdentical()); + } + return *this; + } -class FemtoPair{ - public: - FemtoPair(){}; - FemtoPair(FemtoParticle* first, FemtoParticle* second){_first = first; _second = second;} - FemtoPair(FemtoParticle* first, FemtoParticle* second, const bool& isidentical){_first = first; _second = second; _isidentical = isidentical;} - - FemtoPair(const FemtoPair& obj){ SetFirstParticle(obj.GetFirstParticle()); SetSecondParticle(obj.GetSecondParticle()); SetIdentical(obj.IsIdentical()); } - FemtoPair(const FemtoPair* obj){ SetFirstParticle(obj->GetFirstParticle()); SetSecondParticle(obj->GetSecondParticle()); SetIdentical(obj->IsIdentical()); } - ~FemtoPair(){} - FemtoPair& operator=(const FemtoPair &obj){ if (this != &obj) {SetFirstParticle(obj.GetFirstParticle()); SetSecondParticle(obj.GetSecondParticle()); SetIdentical(obj.IsIdentical()); } - return *this; - } - - void SetFirstParticle(FemtoParticle* first){_first = first;} - void SetSecondParticle(FemtoParticle* second){_second = second;} - void SetIdentical(const bool& isidentical){_isidentical = isidentical;} - void Reset(); - - FemtoParticle* GetFirstParticle() const {return _first;} - FemtoParticle* GetSecondParticle() const {return _second;} - bool IsIdentical() const {return _isidentical;} - - bool IsClosePair(const float& deta = 0.01, const float& dphi = 0.01, const float& radius = 1.2); - float GetEtaDiff() const {return _first->GetEta() - _second->GetEta();} - float GetPhiStarDiff(const float& radius = 1.2) const {return _first->GetPhiStar(radius) - _second->GetPhiStar(radius);} - float GetKstar(); - - private: - FemtoParticle* _first = NULL; - FemtoParticle* _second = NULL; - bool _isidentical = true; - TLorentzVector vec1, vec2; + void SetFirstParticle(FemtoParticle* first) { _first = first; } + void SetSecondParticle(FemtoParticle* second) { _second = second; } + void SetIdentical(const bool& isidentical) { _isidentical = isidentical; } + void Reset(); + + FemtoParticle* GetFirstParticle() const { return _first; } + FemtoParticle* GetSecondParticle() const { return _second; } + bool IsIdentical() const { return _isidentical; } + + bool IsClosePair(const float& deta = 0.01, const float& dphi = 0.01, const float& radius = 1.2); + float GetEtaDiff() const { return _first->GetEta() - _second->GetEta(); } + float GetPhiStarDiff(const float& radius = 1.2) const { return _first->GetPhiStar(radius) - _second->GetPhiStar(radius); } + float GetKstar(); + + private: + FemtoParticle* _first = NULL; + FemtoParticle* _second = NULL; + bool _isidentical = true; + TLorentzVector vec1, vec2; }; -void FemtoPair::Reset(){ +void FemtoPair::Reset() +{ _first = NULL; _second = NULL; _isidentical = true; } -bool FemtoPair::IsClosePair(const float& deta, const float& dphi, const float& radius){ - if(_first == NULL || _second == NULL) return true; - if(!(_first->GetMagField()*_second->GetMagField())) return true; - if(abs(GetEtaDiff()) < deta || abs(GetPhiStarDiff(radius)) < dphi) return true; +bool FemtoPair::IsClosePair(const float& deta, const float& dphi, const float& radius) +{ + if (_first == NULL || _second == NULL) + return true; + if (!(_first->GetMagField() * _second->GetMagField())) + return true; + if (abs(GetEtaDiff()) < deta || abs(GetPhiStarDiff(radius)) < dphi) + return true; return false; } -float FemtoPair::GetKstar() { - if(_first == NULL || _second == NULL) return -1000; +float FemtoPair::GetKstar() +{ + if (_first == NULL || _second == NULL) + return -1000; _first->Get4momentum(vec1); _second->Get4momentum(vec2); - if(_isidentical){ + if (_isidentical) { TLorentzVector fourmomentadiff = vec1 - vec2; - return 0.5*abs(fourmomentadiff.Mag()); - } - else{ + return 0.5 * abs(fourmomentadiff.Mag()); + } else { TLorentzVector fourmomentasum = vec1 + vec2; - vec1.Boost( (-1)*fourmomentasum.BoostVector() ); - vec1.Boost( (-1)*fourmomentasum.BoostVector() ); + vec1.Boost((-1) * fourmomentasum.BoostVector()); + vec1.Boost((-1) * fourmomentasum.BoostVector()); TVector3 qinv = vec1.Vect() - vec2.Vect(); - return 0.5*abs(qinv.Mag()); + return 0.5 * abs(qinv.Mag()); } } -}// namespace singletrackselector +} // namespace o2::aod::singletrackselector #endif // PWGCF_DATAMODEL_SINGLETRACKSELECTOR_H_ diff --git a/PWGCF/Femto3D/DataModel/singletrackselector.h b/PWGCF/Femto3D/DataModel/singletrackselector.h index 27bbda0ac48..a80a0fd288c 100644 --- a/PWGCF/Femto3D/DataModel/singletrackselector.h +++ b/PWGCF/Femto3D/DataModel/singletrackselector.h @@ -63,14 +63,12 @@ struct binning { }; } // namespace nsigma -DECLARE_SOA_COLUMN(Mult, mult, int); // Multiplicity of the collision -DECLARE_SOA_COLUMN(PosZ, posZ, float); // Vertex of the collision +DECLARE_SOA_COLUMN(Mult, mult, int); // Multiplicity of the collision +DECLARE_SOA_COLUMN(PosZ, posZ, float); // Vertex of the collision DECLARE_SOA_COLUMN(MagField, magField, float); // Magnetic field corresponding to a collision (in T) } // namespace singletrackselector - - DECLARE_SOA_TABLE(SingleCollSels, "AOD", "SCSEL", // Table of the variables for single track selection. o2::soa::Index<>, singletrackselector::Mult, @@ -80,19 +78,19 @@ DECLARE_SOA_TABLE(SingleCollSels, "AOD", "SCSEL", // Table of the variables for namespace singletrackselector { -DECLARE_SOA_INDEX_COLUMN(SingleCollSel, singleCollSel); // Index to the collision -DECLARE_SOA_COLUMN(P, p, float); // Momentum of the track -DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); // impact parameter of the track -DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); // impact parameter of the track -DECLARE_SOA_COLUMN(TPCInnerParam, tpcInnerParam, float); // Momentum at inner wall of the TPC -DECLARE_SOA_COLUMN(TPCSignal, tpcSignal, float); // dE/dx TPC -DECLARE_SOA_COLUMN(Beta, beta, float); // TOF beta -DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, int16_t); // Number of TPC clusters -DECLARE_SOA_COLUMN(TPCChi2NCl, tpcChi2NCl, float); // TPC chi2 +DECLARE_SOA_INDEX_COLUMN(SingleCollSel, singleCollSel); // Index to the collision +DECLARE_SOA_COLUMN(P, p, float); // Momentum of the track +DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); // impact parameter of the track +DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); // impact parameter of the track +DECLARE_SOA_COLUMN(TPCInnerParam, tpcInnerParam, float); // Momentum at inner wall of the TPC +DECLARE_SOA_COLUMN(TPCSignal, tpcSignal, float); // dE/dx TPC +DECLARE_SOA_COLUMN(Beta, beta, float); // TOF beta +DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, int16_t); // Number of TPC clusters +DECLARE_SOA_COLUMN(TPCChi2NCl, tpcChi2NCl, float); // TPC chi2 DECLARE_SOA_COLUMN(TPCCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, float); // Ratio of found over findable clusters -DECLARE_SOA_COLUMN(TPCNClsShared, tpcNClsShared, uint8_t); // Number of shared TPC clusters -DECLARE_SOA_COLUMN(ITSNCls, itsNCls, uint8_t); // Number of ITS clusters -DECLARE_SOA_COLUMN(ITSChi2NCl, itsChi2NCl, float); // ITS chi2 +DECLARE_SOA_COLUMN(TPCNClsShared, tpcNClsShared, uint8_t); // Number of shared TPC clusters +DECLARE_SOA_COLUMN(ITSNCls, itsNCls, uint8_t); // Number of ITS clusters +DECLARE_SOA_COLUMN(ITSChi2NCl, itsChi2NCl, float); // ITS chi2 DECLARE_SOA_COLUMN(Sign, sign, int8_t); DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Phi, phi, float); @@ -102,19 +100,19 @@ DECLARE_SOA_COLUMN(StoredTOFNSigmaDe, storedTofNSigmaDe, nsigma::binning::binned DECLARE_SOA_COLUMN(StoredTPCNSigmaDe, storedTpcNSigmaDe, nsigma::binning::binned_t); DECLARE_SOA_DYNAMIC_COLUMN(Energy, energy, - [](float p, float mass) -> float { return sqrt(p*p + mass * mass); }); + [](float p, float mass) -> float { return sqrt(p * p + mass * mass); }); DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, - [](float p, float eta) -> float { return p/std::cosh(eta); }); + [](float p, float eta) -> float { return p / std::cosh(eta); }); DECLARE_SOA_DYNAMIC_COLUMN(Px, px, - [](float p, float eta, float phi) -> float { return (p/std::cosh(eta))*std::sin(phi); }); + [](float p, float eta, float phi) -> float { return (p / std::cosh(eta)) * std::sin(phi); }); DECLARE_SOA_DYNAMIC_COLUMN(Py, py, - [](float p, float eta, float phi) -> float { return (p/std::cosh(eta))*std::cos(phi); }); + [](float p, float eta, float phi) -> float { return (p / std::cosh(eta)) * std::cos(phi); }); DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, - [](float p, float eta) -> float { return p*std::tanh(eta); }); + [](float p, float eta) -> float { return p * std::tanh(eta); }); DECLARE_SOA_DYNAMIC_COLUMN(PhiStar, phiStar, - [](float p, float eta, float sign, float phi, float magfield=0.0, float radius=1.6) -> float { + [](float p, float eta, float sign, float phi, float magfield = 0.0, float radius = 1.6) -> float { if(magfield==0.0) return -1000.0; - else return phi + std::asin( -0.3*magfield*sign*radius/(2.0*p/std::cosh(eta)) );}); + else return phi + std::asin( -0.3*magfield*sign*radius/(2.0*p/std::cosh(eta)) ); }); DECLARE_SOA_DYNAMIC_COLUMN(TOFNSigmaPr, tofNSigmaPr, [](nsigma::binning::binned_t nsigma_binned) -> float { return singletrackselector::unPack(nsigma_binned); }); @@ -128,37 +126,37 @@ DECLARE_SOA_DYNAMIC_COLUMN(TPCNSigmaDe, tpcNSigmaDe, } // namespace singletrackselector DECLARE_SOA_TABLE_FULL(SingleTrackSels, "SelTracks", "AOD", "STSEL", // Table of the variables for single track selection. - o2::soa::Index<>, - singletrackselector::SingleCollSelId, - singletrackselector::P, - singletrackselector::DcaXY, - singletrackselector::DcaZ, - singletrackselector::TPCInnerParam, - singletrackselector::TPCSignal, - singletrackselector::Beta, - singletrackselector::TPCNClsFound, - singletrackselector::TPCChi2NCl, - singletrackselector::TPCCrossedRowsOverFindableCls, - singletrackselector::TPCNClsShared, - singletrackselector::ITSNCls, - singletrackselector::ITSChi2NCl, - singletrackselector::Sign, - singletrackselector::Eta, - singletrackselector::Phi, - singletrackselector::StoredTOFNSigmaPr, - singletrackselector::StoredTPCNSigmaPr, - singletrackselector::StoredTOFNSigmaDe, - singletrackselector::StoredTPCNSigmaDe, - singletrackselector::Energy, - singletrackselector::Pt, - singletrackselector::Px, - singletrackselector::Py, - singletrackselector::Pz, - singletrackselector::PhiStar, - singletrackselector::TOFNSigmaPr, - singletrackselector::TPCNSigmaPr, - singletrackselector::TOFNSigmaDe, - singletrackselector::TPCNSigmaDe); + o2::soa::Index<>, + singletrackselector::SingleCollSelId, + singletrackselector::P, + singletrackselector::DcaXY, + singletrackselector::DcaZ, + singletrackselector::TPCInnerParam, + singletrackselector::TPCSignal, + singletrackselector::Beta, + singletrackselector::TPCNClsFound, + singletrackselector::TPCChi2NCl, + singletrackselector::TPCCrossedRowsOverFindableCls, + singletrackselector::TPCNClsShared, + singletrackselector::ITSNCls, + singletrackselector::ITSChi2NCl, + singletrackselector::Sign, + singletrackselector::Eta, + singletrackselector::Phi, + singletrackselector::StoredTOFNSigmaPr, + singletrackselector::StoredTPCNSigmaPr, + singletrackselector::StoredTOFNSigmaDe, + singletrackselector::StoredTPCNSigmaDe, + singletrackselector::Energy, + singletrackselector::Pt, + singletrackselector::Px, + singletrackselector::Py, + singletrackselector::Pz, + singletrackselector::PhiStar, + singletrackselector::TOFNSigmaPr, + singletrackselector::TPCNSigmaPr, + singletrackselector::TOFNSigmaDe, + singletrackselector::TPCNSigmaDe); } // namespace o2::aod #endif // PWGCF_DATAMODEL_SINGLETRACKSELECTOR_H_ @@ -166,34 +164,47 @@ DECLARE_SOA_TABLE_FULL(SingleTrackSels, "SelTracks", "AOD", "STSEL", // Table of namespace o2::aod::singletrackselector { -template inline bool TPCselection(TrackType const& track, std::pair> const& PIDcuts){ +template +inline bool TPCselection(TrackType const& track, std::pair> const& PIDcuts) +{ // add check for the size of the vector and order of the values??? must be 2 valies in order => [down, up] float Nsigma = -1000; - if(PIDcuts.first == 2212) Nsigma = track.tpcNSigmaPr(); - if(PIDcuts.first == 1000010020) Nsigma = track.tpcNSigmaDe(); + if (PIDcuts.first == 2212) + Nsigma = track.tpcNSigmaPr(); + if (PIDcuts.first == 1000010020) + Nsigma = track.tpcNSigmaDe(); - if(Nsigma > PIDcuts.second[0] && Nsigma < PIDcuts.second[1]) return true; - else return false; + if (Nsigma > PIDcuts.second[0] && Nsigma < PIDcuts.second[1]) + return true; + else + return false; } -template inline bool TOFselection(TrackType const& track, std::pair> const& PIDcuts){ +template +inline bool TOFselection(TrackType const& track, std::pair> const& PIDcuts) +{ // add check for the size of the vector and order of the values??? must be 2 valies in order => [down, up] float Nsigma = -1000; - if(PIDcuts.first == 2212) Nsigma = track.tofNSigmaPr(); - else if(PIDcuts.first == 1000010020) Nsigma = track.tofNSigmaDe(); - - else if(PIDcuts.first == 211){ - if constexpr (std::experimental::is_detected::value) Nsigma = track.tofNSigmaPi(); - } - else if(PIDcuts.first == 321){ - if constexpr (std::experimental::is_detected::value) Nsigma = track.tofNSigmaKa(); + if (PIDcuts.first == 2212) + Nsigma = track.tofNSigmaPr(); + else if (PIDcuts.first == 1000010020) + Nsigma = track.tofNSigmaDe(); + + else if (PIDcuts.first == 211) { + if constexpr (std::experimental::is_detected::value) + Nsigma = track.tofNSigmaPi(); + } else if (PIDcuts.first == 321) { + if constexpr (std::experimental::is_detected::value) + Nsigma = track.tofNSigmaKa(); } - if(Nsigma > PIDcuts.second[0] && Nsigma < PIDcuts.second[1]) return true; - else return false; + if (Nsigma > PIDcuts.second[0] && Nsigma < PIDcuts.second[1]) + return true; + else + return false; } -} // namespace singletrackselector \ No newline at end of file +} // namespace o2::aod::singletrackselector \ No newline at end of file diff --git a/PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx b/PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx index 5fa326e9999..82e01f90126 100644 --- a/PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx +++ b/PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx @@ -78,7 +78,8 @@ struct singleTrackSelector { std::vector particlesToKeep; std::vector particlesToReject; - void init(InitContext& context){ + void init(InitContext& context) + { particlesToKeep = _particlesToKeep; particlesToReject = _particlesToReject; @@ -89,7 +90,7 @@ struct singleTrackSelector { ccdb->setFatalWhenNull(false); } - void initCCDB(aod::BCsWithTimestamps::iterator const& bc) //inspired by PWGLF/TableProducer/lambdakzerobuilder.cxx + void initCCDB(aod::BCsWithTimestamps::iterator const& bc) // inspired by PWGLF/TableProducer/lambdakzerobuilder.cxx { if (mRunNumber == bc.runNumber()) { return; @@ -115,7 +116,7 @@ struct singleTrackSelector { LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; } mRunNumber = bc.runNumber(); - d_bz = 0.1*d_bz; + d_bz = 0.1 * d_bz; } void process(soa::Filtered::iterator const& collision, soa::Filtered const& tracks, aod::BCsWithTimestamps const&) @@ -135,42 +136,44 @@ struct singleTrackSelector { for (auto& track : tracks) { skip_track = false; - for(auto i : particlesToReject){ + for (auto i : particlesToReject) { // if satisfied, want to continue in the upper loop (over tracks) -- skip the current track - //cannot use simple 'continue' since it will be applied to the current loop, so have to use a flag - if( o2::aod::singletrackselector::TOFselection(track, std::make_pair(i, rejectWithinNsigmaTOF)) ){ + // cannot use simple 'continue' since it will be applied to the current loop, so have to use a flag + if (o2::aod::singletrackselector::TOFselection(track, std::make_pair(i, rejectWithinNsigmaTOF))) { skip_track = true; break; } } - if(skip_track) continue; - - for(auto ii : particlesToKeep) if( o2::aod::singletrackselector::TPCselection(track, std::make_pair(ii, keepWithinNsigmaTPC)) ){ - - tableRow(tableRowColl.lastIndex(), - track.p(), - track.dcaXY(), - track.dcaZ(), - track.tpcInnerParam(), - track.tpcSignal(), - track.beta(), - track.tpcNClsFound(), - track.tpcChi2NCl(), - track.tpcCrossedRowsOverFindableCls(), - track.tpcNClsShared(), - track.itsNCls(), - track.itsChi2NCl(), - track.sign(), - track.eta(), - track.phi(), - singletrackselector::packInTable(track.tofNSigmaPr()), - singletrackselector::packInTable(track.tpcNSigmaPr()), - singletrackselector::packInTable(track.tofNSigmaDe()), - singletrackselector::packInTable(track.tpcNSigmaDe())); - - break; // break the loop with particlesToKeep after the 'if' condition is satisfied -- don't want double entries - } + if (skip_track) + continue; + + for (auto ii : particlesToKeep) + if (o2::aod::singletrackselector::TPCselection(track, std::make_pair(ii, keepWithinNsigmaTPC))) { + + tableRow(tableRowColl.lastIndex(), + track.p(), + track.dcaXY(), + track.dcaZ(), + track.tpcInnerParam(), + track.tpcSignal(), + track.beta(), + track.tpcNClsFound(), + track.tpcChi2NCl(), + track.tpcCrossedRowsOverFindableCls(), + track.tpcNClsShared(), + track.itsNCls(), + track.itsChi2NCl(), + track.sign(), + track.eta(), + track.phi(), + singletrackselector::packInTable(track.tofNSigmaPr()), + singletrackselector::packInTable(track.tpcNSigmaPr()), + singletrackselector::packInTable(track.tofNSigmaDe()), + singletrackselector::packInTable(track.tpcNSigmaDe())); + + break; // break the loop with particlesToKeep after the 'if' condition is satisfied -- don't want double entries + } } } }; diff --git a/PWGCF/Femto3D/Tasks/femto3dPairTask.cxx b/PWGCF/Femto3D/Tasks/femto3dPairTask.cxx index 3fb3fc97bcb..4f753f48582 100644 --- a/PWGCF/Femto3D/Tasks/femto3dPairTask.cxx +++ b/PWGCF/Femto3D/Tasks/femto3dPairTask.cxx @@ -40,9 +40,8 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; - struct FemtoCorrelations { - //using allinfo = soa::Join; // aod::pidTPCPr + // using allinfo = soa::Join; // aod::pidTPCPr /// Construct a registry object with direct declaration HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -82,7 +81,6 @@ struct FemtoCorrelations { Configurable _vertexbinwidth{"vertexbinwidth", 2, "width of vertexZ bins within which the mixing is done"}; ConfigurableAxis CFkStarBinning{"CFkStarBinning", {500, 0.005, 5.005}, "k* binning of the CF (Nbins, lowlimit, uplimit)"}; - bool IsIdentical; std::pair> TPCcuts_1; @@ -101,13 +99,12 @@ struct FemtoCorrelations { using FilteredCollisions = aod::SingleCollSels; using FilteredTracks = aod::SingleTrackSels; - - Filter pFilter = o2::aod::singletrackselector::p > _min_P && o2::aod::singletrackselector::p < _max_P; + Filter pFilter = o2::aod::singletrackselector::p > _min_P&& o2::aod::singletrackselector::p < _max_P; Filter etaFilter = nabs(o2::aod::singletrackselector::eta) < _eta; Filter tpcTrkFilter = o2::aod::singletrackselector::tpcNClsFound >= _tpcNClsFound && o2::aod::singletrackselector::tpcChi2NCl < _tpcChi2NCl && - o2::aod::singletrackselector::tpcCrossedRowsOverFindableCls > _tpcCrossedRowsOverFindableCls && - o2::aod::singletrackselector::tpcNClsShared <= (uint8_t)_tpcNClsShared; + o2::aod::singletrackselector::tpcCrossedRowsOverFindableCls > _tpcCrossedRowsOverFindableCls&& + o2::aod::singletrackselector::tpcNClsShared <= (uint8_t)_tpcNClsShared; Filter dcaFilter = nabs(o2::aod::singletrackselector::dcaXY) < _dcaXY && nabs(o2::aod::singletrackselector::dcaZ) < _dcaZ; Filter itsNClsFilter = o2::aod::singletrackselector::itsNCls >= (uint8_t)_itsNCls && o2::aod::singletrackselector::itsChi2NCl < _itsChi2NCl; @@ -115,16 +112,15 @@ struct FemtoCorrelations { Preslice perCollId = o2::aod::singletrackselector::singleCollSelId; - void init(o2::framework::InitContext&) { - IsIdentical = (_sign_1*_particlePDG_1 == _sign_2*_particlePDG_2); + IsIdentical = (_sign_1 * _particlePDG_1 == _sign_2 * _particlePDG_2); TPCcuts_1 = std::make_pair(_particlePDG_1, _tpcNSigma_1); TOFcuts_1 = std::make_pair(_particlePDG_1, _tofNSigma_1); TPCcuts_2 = std::make_pair(_particlePDG_2, _tpcNSigma_2); TOFcuts_2 = std::make_pair(_particlePDG_2, _tofNSigma_2); - + const AxisSpec kStarAxis{CFkStarBinning, "k* (GeV/c)"}; registry.add("SE", "SE", kTH1F, {kStarAxis}); @@ -132,141 +128,148 @@ struct FemtoCorrelations { registry.add("p_first", "p", kTH1F, {{100, 0., 5., "p"}}); registry.add("nsigmaTOF_first", Form("nsigmaTOF_%i", (int)_particlePDG_1), kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); registry.add("nsigmaTPC_first", Form("nsigmaTPC_%i", (int)_particlePDG_1), kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); - if(!IsIdentical){ + if (!IsIdentical) { registry.add("p_second", Form("p_%i", (int)_particlePDG_2), kTH1F, {{100, 0., 5., "p"}}); registry.add("nsigmaTOF_second", Form("nsigmaTOF_%i", (int)_particlePDG_2), kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); registry.add("nsigmaTPC_second", Form("nsigmaTPC_%i", (int)_particlePDG_2), kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); } } - void process(soa::Filtered const& collisions, soa::Filtered const& tracks) { - if(_particlePDG_1 == 0 || _particlePDG_2 == 0) LOGF(fatal, "One of passed PDG is 0!!!"); + if (_particlePDG_1 == 0 || _particlePDG_2 == 0) + LOGF(fatal, "One of passed PDG is 0!!!"); o2::aod::singletrackselector::FemtoParticle* Particle; o2::aod::singletrackselector::FemtoPair* Pair = new o2::aod::singletrackselector::FemtoPair(); for (auto& collision : collisions) { - for (auto& track : tracks.sliceBy(perCollId, collision.index()) ) { + for (auto& track : tracks.sliceBy(perCollId, collision.index())) { - if(track.sign() == _sign_1 && (track.p() < _PIDtrshld_1 ? o2::aod::singletrackselector::TPCselection(track, TPCcuts_1) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_1)) ){ // filling the map: eventID <-> selected particles1 - Particle = new o2::aod::singletrackselector::FemtoParticle( track.pt(), track.eta(), track.phi() ); - Particle->SetSignedPDG( _sign_1*_particlePDG_1 ); + if (track.sign() == _sign_1 && (track.p() < _PIDtrshld_1 ? o2::aod::singletrackselector::TPCselection(track, TPCcuts_1) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_1))) { // filling the map: eventID <-> selected particles1 + Particle = new o2::aod::singletrackselector::FemtoParticle(track.pt(), track.eta(), track.phi()); + Particle->SetSignedPDG(_sign_1 * _particlePDG_1); Particle->SetMagField(collision.magField()); SEtracks1.push_back(Particle); registry.fill(HIST("p_first"), track.p()); - if(_particlePDG_1 == 2212){ + if (_particlePDG_1 == 2212) { registry.fill(HIST("nsigmaTOF_first"), track.p(), track.tofNSigmaPr()); registry.fill(HIST("nsigmaTPC_first"), track.p(), track.tpcNSigmaPr()); } - if(_particlePDG_1 == 1000010020){ + if (_particlePDG_1 == 1000010020) { registry.fill(HIST("nsigmaTOF_first"), track.p(), track.tofNSigmaDe()); registry.fill(HIST("nsigmaTPC_first"), track.p(), track.tpcNSigmaDe()); } } - if(IsIdentical || track.sign() != _sign_2) continue; - else if( !TOFselection(track, std::make_pair(_particlePDGtoReject, _rejectWithinNsigmaTOF)) && (track.p() < _PIDtrshld_2 ? o2::aod::singletrackselector::TPCselection(track, TPCcuts_2) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_2)) ){ // filling the map: eventID <-> selected particles2 if (see condition above ^) - Particle = new o2::aod::singletrackselector::FemtoParticle( track.pt(), track.eta(), track.phi() ); - Particle->SetSignedPDG( _sign_2*_particlePDG_2 ); + if (IsIdentical || track.sign() != _sign_2) + continue; + else if (!TOFselection(track, std::make_pair(_particlePDGtoReject, _rejectWithinNsigmaTOF)) && (track.p() < _PIDtrshld_2 ? o2::aod::singletrackselector::TPCselection(track, TPCcuts_2) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_2))) { // filling the map: eventID <-> selected particles2 if (see condition above ^) + Particle = new o2::aod::singletrackselector::FemtoParticle(track.pt(), track.eta(), track.phi()); + Particle->SetSignedPDG(_sign_2 * _particlePDG_2); Particle->SetMagField(collision.magField()); SEtracks2.push_back(Particle); registry.fill(HIST("p_second"), track.p()); - if(_particlePDG_2 == 2212){ + if (_particlePDG_2 == 2212) { registry.fill(HIST("nsigmaTOF_second"), track.p(), track.tofNSigmaPr()); registry.fill(HIST("nsigmaTPC_second"), track.p(), track.tpcNSigmaPr()); } - if(_particlePDG_2 == 1000010020){ + if (_particlePDG_2 == 1000010020) { registry.fill(HIST("nsigmaTOF_second"), track.p(), track.tofNSigmaDe()); registry.fill(HIST("nsigmaTPC_second"), track.p(), track.tpcNSigmaDe()); } } } - if(SEtracks1.size() || SEtracks2.size()) mixbins[std::pair{round(collision.posZ()/_vertexbinwidth), floor(collision.mult()/_multbinwidth)}].push_back(collision.index()); + if (SEtracks1.size() || SEtracks2.size()) + mixbins[std::pair{round(collision.posZ() / _vertexbinwidth), floor(collision.mult() / _multbinwidth)}].push_back(collision.index()); - if(IsIdentical){ // start of same event identical + if (IsIdentical) { // start of same event identical - for(int ii=0; iiSetFirstParticle(SEtracks1[ii]); Pair->SetSecondParticle(SEtracks1[iii]); Pair->SetIdentical(IsIdentical); - if(!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) registry.fill(HIST("SE"), Pair->GetKstar()); // close pair rejection and fillig the SE histo + if (!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) + registry.fill(HIST("SE"), Pair->GetKstar()); // close pair rejection and fillig the SE histo Pair->Reset(); } } - } // end of same event identical - else{ // start of same event non-identical + } // end of same event identical + else { // start of same event non-identical - for(auto& ii : SEtracks1 ){ - for(auto& iii : SEtracks2 ){ + for (auto& ii : SEtracks1) { + for (auto& iii : SEtracks2) { Pair->SetFirstParticle(ii); Pair->SetSecondParticle(iii); Pair->SetIdentical(IsIdentical); - if(!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) registry.fill(HIST("SE"), Pair->GetKstar()); // close pair rejection and fillig the SE histo + if (!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) + registry.fill(HIST("SE"), Pair->GetKstar()); // close pair rejection and fillig the SE histo Pair->Reset(); } } - }// end of same event non-identical + } // end of same event non-identical - if(SEtracks1.size()) selectedtracks_1.insert( std::pair>(collision.index(), SEtracks1) ); + if (SEtracks1.size()) + selectedtracks_1.insert(std::pair>(collision.index(), SEtracks1)); SEtracks1.clear(); - if(!IsIdentical && SEtracks2.size()){ - selectedtracks_2.insert( std::pair>(collision.index(), SEtracks2) ); + if (!IsIdentical && SEtracks2.size()) { + selectedtracks_2.insert(std::pair>(collision.index(), SEtracks2)); SEtracks2.clear(); } } //====================================== mixing identical ====================================== - if(IsIdentical){ // start of same event identical + if (IsIdentical) { // start of same event identical - for (auto i = mixbins.begin(); i != mixbins.end(); i++){ // start of mixed event identical + for (auto i = mixbins.begin(); i != mixbins.end(); i++) { // start of mixed event identical - for(int indx1=0; indx1<(i->second).size(); indx1++){ // nested loop for all the combinations of collisions in a chosen mult/vertex bin - for(int indx2=indx1+1; indx2<(i->second).size(); indx2++){ + for (int indx1 = 0; indx1 < (i->second).size(); indx1++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin + for (int indx2 = indx1 + 1; indx2 < (i->second).size(); indx2++) { - for(auto ii : selectedtracks_1[ (i->second)[indx1] ]){ - for(auto iii : selectedtracks_1[ (i->second)[indx2] ]){ + for (auto ii : selectedtracks_1[(i->second)[indx1]]) { + for (auto iii : selectedtracks_1[(i->second)[indx2]]) { Pair->SetFirstParticle(ii); Pair->SetSecondParticle(iii); Pair->SetIdentical(IsIdentical); - if(!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) registry.fill(HIST("ME"), Pair->GetKstar()); + if (!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) + registry.fill(HIST("ME"), Pair->GetKstar()); Pair->Reset(); } } } } - }// end of mixed event identical + } // end of mixed event identical } //====================================== end of mixing identical ====================================== - else{ //====================================== mixing non-identical ====================================== + else { //====================================== mixing non-identical ====================================== - for (auto i = mixbins.begin(); i != mixbins.end(); i++){ // start of mixed event non-identical + for (auto i = mixbins.begin(); i != mixbins.end(); i++) { // start of mixed event non-identical - for(int indx1=0; indx1<(i->second).size(); indx1++){ // nested loop for all the combinations of collisions in a chosen mult/vertex bin - for(int indx2=indx1+1; indx2<(i->second).size(); indx2++){ + for (int indx1 = 0; indx1 < (i->second).size(); indx1++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin + for (int indx2 = indx1 + 1; indx2 < (i->second).size(); indx2++) { - for(auto ii : selectedtracks_1[ (i->second)[indx1] ]){ - for(auto iii : selectedtracks_2[ (i->second)[indx2] ]){ + for (auto ii : selectedtracks_1[(i->second)[indx1]]) { + for (auto iii : selectedtracks_2[(i->second)[indx2]]) { Pair->SetFirstParticle(ii); Pair->SetSecondParticle(iii); Pair->SetIdentical(IsIdentical); - if(!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) registry.fill(HIST("ME"), Pair->GetKstar()); + if (!Pair->IsClosePair(_deta, _dphi, _radiusTPC)) + registry.fill(HIST("ME"), Pair->GetKstar()); Pair->Reset(); } } @@ -276,21 +279,23 @@ struct FemtoCorrelations { } //====================================== end of mixing non-identical ====================================== - // clearing up - for(auto i = selectedtracks_1.begin(); i != selectedtracks_1.end(); i++){ - for(auto ii : i->second) delete ii; + for (auto i = selectedtracks_1.begin(); i != selectedtracks_1.end(); i++) { + for (auto ii : i->second) + delete ii; (i->second).clear(); } selectedtracks_1.clear(); - if(!IsIdentical) for(auto i = selectedtracks_2.begin(); i != selectedtracks_2.end(); i++){ - for(auto ii : i->second) delete ii; - (i->second).clear(); - } + if (!IsIdentical) + for (auto i = selectedtracks_2.begin(); i != selectedtracks_2.end(); i++) { + for (auto ii : i->second) + delete ii; + (i->second).clear(); + } selectedtracks_2.clear(); - for(auto i = mixbins.begin(); i != mixbins.end(); i++){ + for (auto i = mixbins.begin(); i != mixbins.end(); i++) { (i->second).clear(); } mixbins.clear(); diff --git a/PWGCF/Femto3D/Tasks/femto3dQA.cxx b/PWGCF/Femto3D/Tasks/femto3dQA.cxx index 3352bd2ff00..890f8cafbdd 100644 --- a/PWGCF/Femto3D/Tasks/femto3dQA.cxx +++ b/PWGCF/Femto3D/Tasks/femto3dQA.cxx @@ -37,7 +37,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; struct QAHistograms { - //using allinfo = soa::Join; // aod::pidTPCPr + // using allinfo = soa::Join; // aod::pidTPCPr /// Construct a registry object with direct declaration HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -59,25 +59,22 @@ struct QAHistograms { Configurable _PIDtrshld{"PIDtrshld", 10.0, "value of momentum from which the PID is done with TOF (before that only TPC is used)"}; Configurable> _tofNSigma{"tofNSigma", std::vector{-3.0f, 3.0f}, "Nsigma range in TOF"}; - Configurable _particlePDGtoReject{"particlePDGtoReject", 0, "PDG codes of perticles that will be rejected with TOF (only proton and deurton are supported now)"}; Configurable> _rejectWithinNsigmaTOF{"rejectWithinNsigmaTOF", std::vector{-0.0f, 0.0f}, "TOF rejection Nsigma range for particles specified with PDG to be rejected"}; - std::pair> TPCcuts = std::make_pair(_particlePDG, _tpcNSigma); std::pair> TOFcuts = std::make_pair(_particlePDG, _tofNSigma); using FilteredCollisions = aod::SingleCollSels; using FilteredTracks = aod::SingleTrackSels; - Filter signFilter = o2::aod::singletrackselector::sign == _sign; - Filter pFilter = o2::aod::singletrackselector::p > _min_P && o2::aod::singletrackselector::p < _max_P; + Filter pFilter = o2::aod::singletrackselector::p > _min_P&& o2::aod::singletrackselector::p < _max_P; Filter etaFilter = nabs(o2::aod::singletrackselector::eta) < _eta; Filter tpcTrkFilter = o2::aod::singletrackselector::tpcNClsFound >= (int16_t)_tpcNClsFound && o2::aod::singletrackselector::tpcChi2NCl < _tpcChi2NCl && - o2::aod::singletrackselector::tpcCrossedRowsOverFindableCls > _tpcCrossedRowsOverFindableCls && - o2::aod::singletrackselector::tpcNClsShared <= (uint8_t)_tpcNClsShared; + o2::aod::singletrackselector::tpcCrossedRowsOverFindableCls > _tpcCrossedRowsOverFindableCls&& + o2::aod::singletrackselector::tpcNClsShared <= (uint8_t)_tpcNClsShared; Filter dcaFilter = nabs(o2::aod::singletrackselector::dcaXY) < _dcaXY && nabs(o2::aod::singletrackselector::dcaZ) < _dcaZ; Filter itsNClsFilter = o2::aod::singletrackselector::itsNCls >= (uint8_t)_itsNCls && o2::aod::singletrackselector::itsChi2NCl < _itsChi2NCl; @@ -110,11 +107,11 @@ struct QAHistograms { registry.add("TPCSignal", "TPC Signal", kTH2F, {{{200, 0., 5.0, "#it{p}_{inner} (GeV/#it{c})"}, {1000, 0., 1000.0, "dE/dx in TPC (arbitrary units)"}}}); registry.add("TOFSignal", "TOF Signal", kTH2F, {{200, 0., 5.0, "#it{p} (GeV/#it{c})"}, {100, 0., 1.5, "#beta"}}); - if(_particlePDG == 2212){ + if (_particlePDG == 2212) { registry.add("nsigmaTOFPr", "nsigmaTOFPr", kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); registry.add("nsigmaTPCPr", "nsigmaTPCPr", kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); } - if(_particlePDG == 1000010020){ + if (_particlePDG == 1000010020) { registry.add("nsigmaTOFDe", "nsigmaTOFDe", kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); registry.add("nsigmaTPCDe", "nsigmaTPCDe", kTH2F, {{100, 0., 5.}, {100, -10., 10.}}); } @@ -130,11 +127,11 @@ struct QAHistograms { registry.fill(HIST("posZ"), collision.posZ()); registry.fill(HIST("mult"), collision.mult()); - for (auto& track : tracks.sliceBy(perCollId, collision.index()) ) { + for (auto& track : tracks.sliceBy(perCollId, collision.index())) { registry.fill(HIST("TPCSignal_nocuts"), track.tpcInnerParam(), track.tpcSignal()); registry.fill(HIST("TOFSignal_nocuts"), track.p(), track.beta()); - if( !TOFselection(track, std::make_pair(_particlePDGtoReject, _rejectWithinNsigmaTOF)) && (track.p() < _PIDtrshld ? o2::aod::singletrackselector::TPCselection(track, TPCcuts) : o2::aod::singletrackselector::TOFselection(track, TOFcuts)) ){ + if (!TOFselection(track, std::make_pair(_particlePDGtoReject, _rejectWithinNsigmaTOF)) && (track.p() < _PIDtrshld ? o2::aod::singletrackselector::TPCselection(track, TPCcuts) : o2::aod::singletrackselector::TOFselection(track, TOFcuts))) { registry.fill(HIST("eta"), track.eta()); registry.fill(HIST("phi"), track.phi()); registry.fill(HIST("px"), track.px()); @@ -155,11 +152,11 @@ struct QAHistograms { registry.fill(HIST("TPCchi2"), track.tpcChi2NCl()); registry.fill(HIST("TPCSignal"), track.tpcInnerParam(), track.tpcSignal()); registry.fill(HIST("TOFSignal"), track.p(), track.beta()); - if(_particlePDG == 2212){ + if (_particlePDG == 2212) { registry.fill(HIST("nsigmaTOFPr"), track.p(), track.tofNSigmaPr()); registry.fill(HIST("nsigmaTPCPr"), track.p(), track.tpcNSigmaPr()); } - if(_particlePDG == 1000010020){ + if (_particlePDG == 1000010020) { registry.fill(HIST("nsigmaTOFDe"), track.p(), track.tofNSigmaDe()); registry.fill(HIST("nsigmaTPCDe"), track.p(), track.tpcNSigmaDe()); }