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

Annotation of /PamCut/TrkCuts/TrkNucleiZCut/TrkNucleiZCut.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri May 29 10:10:18 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: MAIN
Changes since 1.1: +24 -9 lines
File MIME type: text/plain
Previous commit was outdated; fixed.

1 pam-fi 1.1 /*
2     * TrkNucleiZCut.h
3     *
4     * Created on: 10-mag-2009
5     * Author: Nicola Mori
6     */
7    
8     /*! @file TrkNucleiZCut.h The TofNucleiZCut class definition file */
9    
10     #ifndef NO_TRKNUCLEI
11    
12     #ifndef TRKNUCLEIZCUT_H_
13     #define TRKNUCLEIZCUT_H_
14    
15     #include "../../PamCutBase/PamCutBase.h"
16     #include <TrkNuclei.h>
17    
18     #include <TH2F.h>
19    
20     /*! @enum TrkNucleiZ_Return Return values for rejected events */
21     enum TrkNucleiZ_Return {
22     TRKNUCLEIZ_OUTOFBOUNDS, ///< Discarded because charge is out of bounds
23     TRKNUCLEIZ_TOOFEWLAYERS, ///< Discarded because charge can be measured in too few layers.
24     TRKNUCLEIZ_ILLEGALZ
25     ///< Discarded because charge is not between 1 and 8
26     };
27    
28     /*! @enum TrkNucleiZ_method Method to use to measure Z. */
29     enum TrkNucleiZ_method {
30     TRKNUCLEIZ_BETA, ///< Tracker dE/dx Vs. ToF beta
31 pam-fi 1.2 TRKNUCLEIZ_RIG,
32     ///< Tracker standalon e: dE/dx Vs. rigidity
33 pam-fi 1.1 };
34    
35 pam-fi 1.2 /*! @enum TrkNucleiZ_Check Handy aliases to set check mean */
36     enum TrkNucleiZ_Check {
37 pam-fi 1.1 TRKNUCLEIZ_CHECKMEAN, ///< Check the mean value.
38     TRKNUCLEIZ_CHECKSINGLEVALUES
39     ///< Check each single charge from each layer.
40     };
41    
42     /*! @brief The TrkNuclei charge cut.
43     *
44     * This cut uses the TrkNuclei library to cut events depending on particle's charge value.
45     *
46     */
47    
48     class TrkNucleiZCut: public PamCut {
49    
50     public:
51     /*! @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
54     * events, with mean Zmean and standard deviation sigmaZ. These values will be used to check the events.
55     *
56     * @param cutName The cut's name.
57     * @param Z The charge value.
58     * @param lowerLimit The lower bound (in units of sigma_Z) of the desired charge range, defined as Zmean - lowerBound*sigmaZ.
59     * @param upperLimit The upper bound (in units of sigma_Z) of the desired charge range, defined as Zmean + upperBound*sigmaZ.
60     * @param minLayers The minimum required number of layers which give a valid charge information.
61 pam-fi 1.2 * @param howToCheck Flag to set the check by mean release or by release in single planes (see #TrkNucleiZ_Check).
62 pam-fi 1.1 * @param method The method to use to measure the particle's charge (see #TrkNucleiZ_method).
63     * @return
64     */
65     TrkNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, unsigned int minLayers = 1,
66 pam-fi 1.2 unsigned int howToCheck = TRKNUCLEIZ_CHECKMEAN, unsigned int method = TRKNUCLEIZ_RIG) :
67 pam-fi 1.1 PamCut(cutName), _Z(Z), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _trkNuclei(NULL), _minLayers(minLayers),
68     _howToCheck(howToCheck), _method(method) {
69    
70     }
71     /*! @brief Destructor. */
72     ~TrkNucleiZCut() {
73     delete _trkNuclei;
74     }
75    
76     /*! @brief The TrkNucleiZ check.
77     *
78     * The routine selects events whose value of Zmean obtained from the TrkNuclei Class is in the range [Zmean - sigma*lowerBound, Zmean + sigma*upperBound].
79     * Zmean and sigma are defined respectively as the mean and the standard deviation of the charge distributions obtained using TrkNuclei.
80 pam-fi 1.2 * In current implementation, calibrations for Z=1 and Z=2 for mean dE/dx Vs. rigidity are:
81     *
82     * Z=1 | mean sigma
83     * ------------------------
84     * | 0.992 0.06
85     *
86     *
87     * Z=2 | mean sigma
88     * ------------------------
89     * | 1.99 0.1
90     *
91     * For all other cases (Z>2 or single plane releases or dE/dx Vs. beta), means are taken to be equal to the charge value (Zmean = Z) and sigmas are:
92 pam-fi 1.1 *
93     * Z | sigma
94     * -----------
95     * 1 | 0.09
96     * 2 | 0.10
97     * 3 | 0.17
98     * 4 | 0.34
99     * 5 | 0.44
100     * 6 | 0.59
101     *
102 pam-fi 1.2 * The TofNuclei calibrations used are the standard ones (from Wolfgang, see TrkNuclei.cpp).
103 pam-fi 1.1 * First of all, the number of layers giving a valid charge information is checked to be greater than minLayers; if it's not so,
104     * the routine will return #TRKNUCLEIZ_TOOFEWLAYERS. Next, it will check if the charge obtained considering the mean dE/dx in the tracker's
105     * layers is in the validity range if the constructor's flag howToCheckMean was set to TRKNUCLEIZ_CHECKMEAN; otherwise, it will check each
106     * single valid charge value (mean for X and Y views) obtained from each layer. In the latter case, it will return #CUTOK only if all
107     * valid layers (ie., those tagged as good for both X and Y in traccker level 2 routines) give a charge inside the bounds, regardless of
108     * the value of minLayers.
109     *
110     * @param event The event to analyze.
111     * @return #CUTOK if the charge from mean dE/dx(if howToCheck == #TRKNUCLEIZ_CHECKMEAN) or all the single layer charges
112     * (if howToCheck == #TRKNUCLEIZ_CHECKSINGLEVALUES) obtained from TrkNuclei are in the range [Z - sigma*lowerBound, Z + sigma*upperBound].
113     * @return #TRKNUCLEIZ_OUTOFBOUNDS if the charge from mean dE/dx(if howToCheck == #TRKNUCLEIZ_CHECKMEAN) or at least one valid single layer
114     * charge (if howToCheck == #TRKNUCLEIZ_CHECKSINGLEVALUES) is out of bounds.
115     * @return #TRKNUCLEIZ_TOOFEWLAYERS if charge information is available for a number of layers lesser than minLayers.
116     * @return #TRKNUCLEIZ_OUTOFBOUNDS if Z < 1 or Z > 6.
117     *
118     */
119     int Check(PamLevel2 *event);
120    
121     private:
122    
123     unsigned int _Z;
124 pam-fi 1.2
125     static const float _meanRigMean[]; //Means for mean dE/dx Vs. rigidity
126     static const float _sigmaRigMean[];//Sigmas for mean dE/dx Vs. rigidity
127     static const float _meanBetaMean[]; //Means for mean dE/dx Vs. beta
128     static const float _sigmaBetaMean[];//Sigmas for mean dE/dx Vs. beta
129 pam-fi 1.1
130     float _lowerLimit;
131     float _upperLimit;
132     TrkNuclei *_trkNuclei;
133     unsigned int _minLayers;
134     unsigned int _howToCheck;
135     unsigned int _method;
136     };
137     #endif /* TRKNUCLEIZCUT_H_ */
138    
139     #endif /* NO_TRKNUCLEI */

  ViewVC Help
Powered by ViewVC 1.1.23