Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:27

0001 /* Copyright 2008-2010, Technische Universitaet Muenchen,
0002    Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
0003 
0004    This file is part of GENFIT.
0005 
0006    GENFIT is free software: you can redistribute it and/or modify
0007    it under the terms of the GNU Lesser General Public License as published
0008    by the Free Software Foundation, either version 3 of the License, or
0009    (at your option) any later version.
0010 
0011    GENFIT is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014    GNU Lesser General Public License for more details.
0015 
0016    You should have received a copy of the GNU Lesser General Public License
0017    along with GENFIT.  If not, see <http://www.gnu.org/licenses/>.
0018  */
0019 /** @addtogroup genfit
0020  * @{
0021  */
0022 
0023 #ifndef genfit_WireTrackCandHit_h
0024 #define genfit_WireTrackCandHit_h
0025 
0026 #include "TrackCandHit.h"
0027 
0028 
0029 namespace genfit {
0030 
0031 /**
0032  * @brief Hit object for use in TrackCand. Provides additional left/right parameter.
0033  */
0034 class WireTrackCandHit : public TrackCandHit {
0035  public:
0036 
0037   // Constructors/Destructors ---------
0038   WireTrackCandHit(int detId   = -1,
0039                int hitId   = -1,
0040                int planeId = -1,
0041                double sortingParameter  =  0.,
0042                char leftRight = 0);
0043 
0044   virtual ~WireTrackCandHit() {;}
0045 
0046   virtual WireTrackCandHit* clone() const override {return new WireTrackCandHit(*this);}
0047 
0048   // Accessors
0049   int getLeftRightResolution() const {return leftRight_;}
0050 
0051   // Modifiers
0052   /**
0053    * select how to resolve the left/right ambiguity:
0054    * -1: negative (left) side on vector (track direction) x (wire direction)
0055    * 0: auto select (take side with smallest distance to track)
0056    * 1: positive (right) side on vector (track direction) x (wire direction)
0057    */
0058   void setLeftRightResolution(int leftRight){
0059     if (leftRight==0) leftRight_ = 0;
0060     else if (leftRight<0) leftRight_ = -1;
0061     else leftRight_ = 1;
0062   }
0063 
0064   virtual void Print(Option_t* option = "") const override;
0065 
0066 
0067  protected:
0068 
0069   //! protect from calling copy c'tor from outside the class. Use #clone() if you want a copy!
0070   WireTrackCandHit(const WireTrackCandHit& other) :
0071     TrackCandHit(other), leftRight_(other.leftRight_) {;}
0072   //! protect from calling assignment operator from outside the class. Use #clone() instead!
0073   WireTrackCandHit& operator=(const WireTrackCandHit&);
0074 
0075 
0076   // Data Members ------------
0077   signed char leftRight_; // left/right ambiguity handling
0078 
0079 
0080  public:
0081 
0082   ClassDefOverride(WireTrackCandHit, 2)
0083 
0084 };
0085 
0086 } /* End of namespace genfit */
0087 /** @} */
0088 
0089 #endif // genfit_TrackCandHit_h