/[PAMELA software]/PamCut/TrkCuts/TrkNucleiZCut/TrkNucleiZCut.h
ViewVC logotype

Diff of /PamCut/TrkCuts/TrkNucleiZCut/TrkNucleiZCut.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pam-fi, Fri May 29 10:10:18 2009 UTC revision 1.3 by pam-fi, Wed Aug 5 14:06:14 2009 UTC
# Line 21  Line 21 
21  enum TrkNucleiZ_Return {  enum TrkNucleiZ_Return {
22    TRKNUCLEIZ_OUTOFBOUNDS, ///< Discarded because charge is out of bounds    TRKNUCLEIZ_OUTOFBOUNDS, ///< Discarded because charge is out of bounds
23    TRKNUCLEIZ_TOOFEWLAYERS, ///< Discarded because charge can be measured in too few layers.    TRKNUCLEIZ_TOOFEWLAYERS, ///< Discarded because charge can be measured in too few layers.
24    TRKNUCLEIZ_ILLEGALZ    TRKNUCLEIZ_ILLEGALLOWZ, ///< Discarded because charge is not between 1 and 6
25  ///< Discarded because charge is not between 1 and 8    TRKNUCLEIZ_ILLEGALHIGHZ ///< Discarded because higher charge is not higher than lowZ and it is not -1 (default value)
26  };  };
27    
28  /*! @enum TrkNucleiZ_method Method to use to measure Z. */  /*! @enum TrkNucleiZ_method Method to use to measure Z. */
29  enum TrkNucleiZ_method {  enum TrkNucleiZ_method {
30    TRKNUCLEIZ_BETA, ///< Tracker dE/dx Vs. ToF beta    TRKNUCLEIZ_BETA, ///< Tracker dE/dx Vs. ToF beta
31    TRKNUCLEIZ_RIG,    TRKNUCLEIZ_RIG,
32  ///< Tracker standalon e: dE/dx Vs. rigidity    ///< Tracker standalon e: dE/dx Vs. rigidity
33  };  };
34    
35  /*! @enum TrkNucleiZ_Check Handy aliases to set check mean */  /*! @enum TrkNucleiZ_Check Handy aliases to set check mean */
36  enum TrkNucleiZ_Check {  enum TrkNucleiZ_Check {
37    TRKNUCLEIZ_CHECKMEAN, ///< Check the mean value.    TRKNUCLEIZ_CHECKMEAN, ///< Check the mean value.
38    TRKNUCLEIZ_CHECKSINGLEVALUES    TRKNUCLEIZ_CHECKSINGLEVALUES
39  ///< Check each single charge from each layer.    ///< Check each single charge from each layer.
40  };  };
41    
42  /*! @brief The TrkNuclei charge cut.  /*! @brief The TrkNuclei charge cut.
# Line 50  class TrkNucleiZCut: public PamCut { Line 50  class TrkNucleiZCut: public PamCut {
50  public:  public:
51    /*! @brief Constructor.    /*! @brief Constructor.
52     *     *
53     * The charge to look for is passed to the TrkNucleiZCut object as Z. For each charge, there is an associated distribution of     * The charge to look for is Z. For each charge, there is an associated distribution of
54     * events, with mean Zmean and standard deviation sigmaZ. These values will be used to check the events.     * events, with mean Zmean(Z) and standard deviation sigma(Z). These values will be used to check the events.
55       * If highZ is different from default (-1), the routine will select nuclei with charge in the range
56       * [Zmean(lowZ) - lowerBound*sigma(lowZ), Zmean(highZ) + upperBound*sigma(highZ)]; otherwise, it will select nuclei in the range
57       * [Zmean(lowZ) - lowerBound*sigma(lowZ), Zmean(lowZ) + upperBound*sigma(lowZ)], eg., it will look for a single charge defined by lowZ.
58     *     *
59     * @param cutName The cut's name.     * @param cutName The cut's name.
60     * @param Z The charge value.     * @param lowZ The charge value.
61     * @param lowerLimit The lower bound (in units of sigma_Z) of the desired charge range, defined as Zmean - lowerBound*sigmaZ.     * @param highZ The upper charge value.
62     * @param upperLimit The upper bound (in units of sigma_Z) of the desired charge range, defined as Zmean + upperBound*sigmaZ.     * @param lowerLimit The lower bound (in units of sigma(Z)) of the desired charge range, defined as Zmean - lowerBound*sigma(Z).
63       * @param upperLimit The upper bound (in units of sigma(Z)) of the desired charge range, defined as Zmean + upperBound*sigma(Z).
64     * @param minLayers The minimum required number of layers which give a valid charge information.     * @param minLayers The minimum required number of layers which give a valid charge information.
65     * @param howToCheck Flag to set the check by mean release or by release in single planes (see #TrkNucleiZ_Check).     * @param howToCheck Flag to set the check by mean release or by release in single planes (see #TrkNucleiZ_Check).
66     * @param method The method to use to measure the particle's charge (see #TrkNucleiZ_method).     * @param method The method to use to measure the particle's charge (see #TrkNucleiZ_method).
67     * @return     * @return
68     */     */
69    TrkNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, unsigned int minLayers = 1,    TrkNucleiZCut(const char *cutName, unsigned int lowZ, int highZ = -1, float lowerLimit = 1., float upperLimit = 1., unsigned int minLayers = 1,
70        unsigned int howToCheck = TRKNUCLEIZ_CHECKMEAN, unsigned int method = TRKNUCLEIZ_RIG) :        unsigned int howToCheck = TRKNUCLEIZ_CHECKMEAN, unsigned int method = TRKNUCLEIZ_RIG) :
71      PamCut(cutName), _Z(Z), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _trkNuclei(NULL), _minLayers(minLayers),    PamCut(cutName), _lowZ(lowZ), _highZ(highZ), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _trkNuclei(NULL), _minLayers(minLayers),
72          _howToCheck(howToCheck), _method(method) {    _howToCheck(howToCheck), _method(method) {
73    
74    }    }
75    /*! @brief Destructor. */    /*! @brief Destructor. */
# Line 74  public: Line 78  public:
78    }    }
79    
80    /*! @brief The TrkNucleiZ check.    /*! @brief The TrkNucleiZ check.
81       * The selection procedure depends on the value of highZ. If highZ = -1, the routine will look for a single charge lowZ, eg., for those
82       * events whose value of Zmean(lowZ) obtained from the TrkNuclei class is in the range
83       * [Zmean(lowZ) - sigma(Z)*lowerBound, Zmean(lowZ) + sigma(lowZ)*upperBound]. If instead highZ is grater than lowZ, the routine
84       * will select all the nuclei with charges in the range [lowZ, highZ]; in practice, an event will survive the selection if
85       * its charge as obtained from TrkNuclei is in the range  [Zmean(lowZ) - sigma(Z)*lowerBound, Zmean(highZ) + sigma(highZ)*upperBound].
86     *     *
    * The routine selects events whose value of Zmean obtained from the TrkNuclei Class is in the range [Zmean - sigma*lowerBound, Zmean + sigma*upperBound].  
87     * Zmean and sigma are defined respectively as the mean and the standard deviation of the charge distributions obtained using TrkNuclei.     * Zmean and sigma are defined respectively as the mean and the standard deviation of the charge distributions obtained using TrkNuclei.
88     * In current implementation, calibrations for Z=1 and Z=2 for mean dE/dx Vs. rigidity are:     * In current implementation, calibrations for Z=1 and Z=2 for mean dE/dx Vs. rigidity are:
89     *     *
# Line 109  public: Line 117  public:
117     *     *
118     * @param event The event to analyze.     * @param event The event to analyze.
119     * @return #CUTOK if the charge from mean dE/dx(if howToCheck == #TRKNUCLEIZ_CHECKMEAN) or all the single layer charges     * @return #CUTOK if the charge from mean dE/dx(if howToCheck == #TRKNUCLEIZ_CHECKMEAN) or all the single layer charges
120     *         (if howToCheck == #TRKNUCLEIZ_CHECKSINGLEVALUES) obtained from TrkNuclei are in the range [Z - sigma*lowerBound, Z + sigma*upperBound].     *         (if howToCheck == #TRKNUCLEIZ_CHECKSINGLEVALUES) obtained from TrkNuclei are in the range [Zmean(lowZ) - sigma(Z)*lowerBound, Zmean(lowZ) + sigma(lowZ)*upperBound]
121       *         (for single charge selection) or in the range [Zmean(lowZ) - sigma(Z)*lowerBound, Zmean(highZ) + sigma(highZ)*upperBound] (for charge range selection).
122       * @return #TRKNUCLEIZ_ILLEGALLOWZ if lowZ is less than 1 or greater than 6.
123       * @return #TRKNUCLEIZ_ILLEGALHIGHZ if highZ is less than lowZ and not the default value (-1), or if it is greater than 6.
124     * @return #TRKNUCLEIZ_OUTOFBOUNDS if the charge from mean dE/dx(if howToCheck == #TRKNUCLEIZ_CHECKMEAN) or at least one valid single layer     * @return #TRKNUCLEIZ_OUTOFBOUNDS if the charge from mean dE/dx(if howToCheck == #TRKNUCLEIZ_CHECKMEAN) or at least one valid single layer
125     *         charge (if howToCheck == #TRKNUCLEIZ_CHECKSINGLEVALUES) is out of bounds.     *         charge (if howToCheck == #TRKNUCLEIZ_CHECKSINGLEVALUES) is out of bounds.
126     * @return #TRKNUCLEIZ_TOOFEWLAYERS if charge information is available for a number of layers lesser than minLayers.     * @return #TRKNUCLEIZ_TOOFEWLAYERS if charge information is available for a number of layers lesser than minLayers.
# Line 120  public: Line 131  public:
131    
132  private:  private:
133    
134    unsigned int _Z;    unsigned int _lowZ;
135      int _highZ;
136    
137    static const float _meanRigMean[]; //Means for mean dE/dx Vs. rigidity    static const float _meanRigMean[]; //Means for mean dE/dx Vs. rigidity
138    static const float _sigmaRigMean[];//Sigmas for mean dE/dx Vs. rigidity    static const float _sigmaRigMean[];//Sigmas for mean dE/dx Vs. rigidity

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23