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

Contents of /PamCut/Collections/EffRigCollection/EffRigCollection.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Sep 25 15:02:01 2009 UTC (15 years, 2 months ago) by pam-fi
Branch: MAIN
Changes since 1.2: +11 -6 lines
File MIME type: text/plain
Support for error computation using ROOT's TGraphAsymmErrors::BayesDivide() added.

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 * for each rigidity bin given to the constructor. The output consists of text files and a ROOT file
20 * with the efficiency graph.
21 *
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 * @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 * @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection
39 * with the total efficiency, plus a similar file (named outFileBase + "-eff-rig.txt") with a
40 * row for each rigidity bin. Additionally, a ROOT file (outFileBase + "-eff-rig.root") will be
41 * produced, containing the efficiency graph.
42 * @param rigBinsFile The file with the rigidity bins.
43 * @param errMethod The method to use for error computation. Possible values are defined in #EffRigCollection_ErrMethod.
44 */
45 EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", int errMethod =
46 EFFRIG_ROOT);
47
48 /*! @brief Destructor. */
49 ~EffRigCollection() {
50
51 }
52
53 /*! @brief Applies the selection and detector cuts to the current event.
54 *
55 * @param event The event to analyze.
56 * @return CUTOK if the event survives all the selection and detector cuts.
57 */
58 int ApplyCut(PamLevel2 *event);
59
60 /*! @brief The post analysis task.
61 *
62 */
63 void Finalize();
64
65 private:
66
67 vector<float> _bins;
68 vector<unsigned int> _selVector;
69 vector<unsigned int> _detVector;
70
71 unsigned int _outUp, _outDown;
72
73 };
74
75 #endif /* EFFRIGCOLLECTION_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23