@@ -61,7 +61,7 @@ bool isStable(int pdg)
6161}
6262
6363// Ported from AliRoot AliStack::IsPhysicalPrimary
64- template <typename Particles, typename Particle>
64+ template <typename Particle>
6565bool isPhysicalPrimary (Particle const & particle)
6666{
6767 // Test if a particle is a physical primary according to the following definition:
@@ -96,7 +96,7 @@ bool isPhysicalPrimary(Particle const& particle)
9696 // Solution for K0L decayed by Pythia6
9797 // ->
9898 if (particle.has_mother0 ()) {
99- auto mother = particle.template mother0_as <Particles >();
99+ auto mother = particle.template mother0_as <typename Particle:: parent_t >();
100100 if (std::abs (mother.pdgCode ()) == 130 ) {
101101 LOGF (debug, " isPhysicalPrimary F4" );
102102 return false ;
@@ -107,7 +107,7 @@ bool isPhysicalPrimary(Particle const& particle)
107107 // ->
108108 if (pdg == 22 && particle.has_daughter0 ()) {
109109 LOGF (debug, " D %d" , particle.daughter0Id ());
110- auto daughter = particle.template daughter0_as <Particles >();
110+ auto daughter = particle.template daughter0_as <typename Particle:: parent_t >();
111111 if (daughter.pdgCode () == 22 ) {
112112 LOGF (debug, " isPhysicalPrimary F5" );
113113 return false ;
@@ -121,7 +121,7 @@ bool isPhysicalPrimary(Particle const& particle)
121121 // Particle produced during transport
122122
123123 LOGF (debug, " M0 %d %d" , particle.producedByGenerator (), particle.mother0Id ());
124- auto mother = particle.template mother0_as <Particles >();
124+ auto mother = particle.template mother0_as <typename Particle:: parent_t >();
125125 int mpdg = std::abs (mother.pdgCode ());
126126
127127 // Check for Sigma0
@@ -155,7 +155,7 @@ bool isPhysicalPrimary(Particle const& particle)
155155 // Loop back to the generated mother
156156 LOGF (debug, " M0 %d %d" , mother.producedByGenerator (), mother.mother0Id ());
157157 while (mother.has_mother0 () && !mother.producedByGenerator ()) {
158- mother = mother.template mother0_as <Particles >();
158+ mother = mother.template mother0_as <typename Particle:: parent_t >();
159159 LOGF (debug, " M+ %d %d" , mother.producedByGenerator (), mother.mother0Id ());
160160 mpdg = std::abs (mother.pdgCode ());
161161 mfl = int (mpdg / std::pow (10 , int (std::log10 (mpdg))));
@@ -169,13 +169,6 @@ bool isPhysicalPrimary(Particle const& particle)
169169 return true ;
170170 }
171171}
172-
173- // Short hand for the standard type
174- bool isPhysicalPrimary (o2::aod::McParticle const & particle)
175- {
176- return isPhysicalPrimary<o2::aod::McParticles>(particle);
177- }
178-
179172}; // namespace MC
180173
181174#endif
0 commit comments