/[PAMELA software]/PamCut/Collections/EffRigCollection/EffRigCollection.h
ViewVC logotype

Annotation of /PamCut/Collections/EffRigCollection/EffRigCollection.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Oct 1 10:33:49 2009 UTC (15 years, 2 months ago) by pam-fi
Branch: MAIN
Changes since 1.3: +5 -4 lines
File MIME type: text/plain
Output format changed: now text output comprehends also the limits of the bin and the graph is produced even if outRoot == false.

1 pam-fi 1.1 /*
2     * EffRigCollection.h
3     *
4     * Created on: 12/ago/2009
5     * Author: Nicola Mori
6     */
7    
8     /*! @file EffRigCollection.h The EffRigCollection class definition file. */
9    
10     #ifndef EFFRIGCOLLECTION_H_
11     #define EFFRIGCOLLECTION_H_
12    
13     #include "../EffCollection/EffCollection.h"
14    
15     /*! @brief A rigidity-binned efficiency collection
16     *
17     * This class inherits from #EffCollection: it has selection and detector4 cuts and actions, and it
18     * computes and saves the integrated detector efficiency. Plus, it will compute and save the efficiency
19 pam-fi 1.3 * for each rigidity bin given to the constructor. The output consists of text files and a ROOT file
20     * with the efficiency graph.
21 pam-fi 1.1 *
22     * NOTE: to divide the events in rigidity bins, a physical track is required from which the
23     * rigidity can be calculated. It is MANDATORY to add a #TrkPhSinCut object to the selection
24     * cuts, to avoid problems when computing rigidity (it will be done if the event survives the
25     * selection cuts, so a #TrkPhSinCut in selection cuts will ensure a physical track being present
26     * at the moment of rigidity computation).
27     *
28     */
29     class EffRigCollection: public EffCollection {
30    
31     public:
32    
33     /*! @brief Constructor.
34     *
35 pam-fi 1.3 * @param collectionName The collection's name. The graph in the ROOT output will have the same name, so be
36     * careful to name the collection respecting the C++ rules for the names of the variables
37     * (eg. don't use - in the name) otherwise the graph will be unusable.
38 pam-fi 1.1 * @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection
39 pam-fi 1.4 * with the total efficiency, plus a similar file (named outFileBase + collection's name + "-rig.txt")
40     * with a row for each rigidity bin. At the beginning of each row there will be two additional columns
41     * with the edges of the bin. Additionally, a ROOT file (outFileBase + collection's name +"-rig.root")
42     * will be produced, containing the efficiency graph.
43 pam-fi 1.1 * @param rigBinsFile The file with the rigidity bins.
44 pam-fi 1.3 * @param errMethod The method to use for error computation. Possible values are defined in #EffRigCollection_ErrMethod.
45 pam-fi 1.1 */
46 pam-fi 1.3 EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", int errMethod =
47 pam-fi 1.4 EFFERR_ROOT);
48 pam-fi 1.1
49     /*! @brief Destructor. */
50     ~EffRigCollection() {
51    
52     }
53    
54     /*! @brief Applies the selection and detector cuts to the current event.
55     *
56     * @param event The event to analyze.
57     * @return CUTOK if the event survives all the selection and detector cuts.
58     */
59     int ApplyCut(PamLevel2 *event);
60    
61     /*! @brief The post analysis task.
62     *
63     */
64     void Finalize();
65    
66     private:
67    
68     vector<float> _bins;
69     vector<unsigned int> _selVector;
70     vector<unsigned int> _detVector;
71    
72     unsigned int _outUp, _outDown;
73 pam-fi 1.3
74 pam-fi 1.1 };
75    
76     #endif /* EFFRIGCOLLECTION_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23