Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:09:08

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2018 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 namespace Fatras {
0012 
0013 struct X0Limit {
0014 
0015   /// Return true if the limit in X0 is reached
0016   /// @todo modify, return what's left from the detector: needs non-const
0017   /// detector
0018   template <typename detector_t, typename particle_t>
0019   bool operator()(const detector_t &detector,
0020                   const particle_t &particle) const {
0021     return particle.pathInX0() +
0022                detector.thickness() / detector.material().X0() >=
0023            particle.limitInX0();
0024   }
0025 };
0026 
0027 struct L0Limit {
0028 
0029   /// Return true if the limit in X0 is reached
0030   /// @todo modify, return what's left from the detector: needs non-const
0031   /// detector
0032   template <typename detector_t, typename particle_t>
0033   bool operator()(const detector_t &detector,
0034                   const particle_t &particle) const {
0035     return particle.pathInL0() +
0036                detector.thickness() / detector.material().L0() >=
0037            particle.limitInL0();
0038   }
0039 };
0040 
0041 } // namespace Fatras