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

Diff of /PamCut/Collections/EffRigCollection/EffRigCollection.h

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

revision 1.2 by pam-fi, Thu Sep 24 18:17:26 2009 UTC revision 1.6 by pam-fi, Tue Jul 12 17:36:03 2011 UTC
# Line 10  Line 10 
10  #ifndef EFFRIGCOLLECTION_H_  #ifndef EFFRIGCOLLECTION_H_
11  #define EFFRIGCOLLECTION_H_  #define EFFRIGCOLLECTION_H_
12    
13  #include "../EffCollection/EffCollection.h"  #include "../BinnedEffCollection/BinnedEffCollection.h"
14    
15  /*! @brief A rigidity-binned efficiency collection  /*! @brief A rigidity binned efficiency collection
16   *   *
17   * This class inherits from #EffCollection: it has selection and detector4 cuts and actions, and it   * This class inherits from #BinnedEffCollection: it only implements the #GetBinValue method
18   * computes and saves the integrated detector efficiency. Plus, it will compute and save the efficiency   * to return event rigidity with sign.
  * for each rigidity bin given to the constructor.  
19   *   *
20   * NOTE: to divide the events in rigidity bins, a physical track is required from which the   * NOTE: to divide the events in rigidity bins, a physical track is required from which the
21   * rigidity can be calculated. It is MANDATORY to add a #TrkPhSinCut object to the selection   * rigidity can be calculated. It is MANDATORY to add a #TrkPhSinCut object to the selection
# Line 25  Line 24 
24   * at the moment of rigidity computation).   * at the moment of rigidity computation).
25   *   *
26   */   */
27  class EffRigCollection: public EffCollection {  class EffRigCollection: public BinnedEffCollection {
28    
29  public:  public:
30    
31    /*! @brief Constructor.    /*! @brief Constructor.
32     *     *
33     * @param collectionName The collection's name.     * @param collectionName The collection's name. The graph in the ROOT output will have the same name, so be
34       *                       careful to name the collection respecting the C++ rules for the names of the variables
35       *                       (eg. don't use - in the name) otherwise the graph will be unusable.
36     * @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection     * @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection
37     *                    with the total efficiency, plus a similar file (named outFileBase + "-eff-rig.txt") with a     *                    with the total efficiency, plus a similar file (named outFileBase + collection's name + "-rig.txt")
38     *                    row for each rigidity bin.     *                    with a row for each rigidity bin. At the beginning of each row there will be two additional columns
39       *                    with the edges of the bin. Additionally, a ROOT file (outFileBase + collection's name +"-rig.root")
40       *                    will be produced, containing the efficiency graph.
41     * @param rigBinsFile The file with the rigidity bins.     * @param rigBinsFile The file with the rigidity bins.
42     * @param absRig If true, the absolute rigidity of the selected events will be considered..     * @param errMethod The method to use for error computation. Possible values are defined in #EffCollection_ErrMethod.
43       * @param owns If true, the collection will own the cuts and the actions, ie., it will
44       *             destroy them in its destructor.
45     */     */
46    EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", bool absRig = false);    EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", int errMethod =
47          EFFERR_ROOT, bool owns = true);
48    
49    /*! @brief Destructor. */    /*! @brief Destructor. */
50    ~EffRigCollection() {    ~EffRigCollection() {
51    
52    }    }
53    
54    /*! @brief Applies the selection and detector cuts to the current event.    /*! @brief The value of binning parameter (rigidity).
55     *     *
56     * @param event The event to analyze.     * @param event The current event.
57     * @return CUTOK if the event survives all the selection and detector cuts.     * @return The rigidity (with sign) of current event.
58     */     */
59    int ApplyCut(PamLevel2 *event);    float GetBinValue(PamLevel2 *event);
   
   /*! @brief The post analysis task.  
    *  
    */  
   void Finalize();  
   
 private:  
   
   bool _absRig;  
   vector<float> _bins;  
   vector<unsigned int> _selVector;  
   vector<unsigned int> _detVector;  
   
   unsigned int _outUp, _outDown;  
60  };  };
61    
62  #endif /* EFFRIGCOLLECTION_H_ */  #endif /* EFFRIGCOLLECTION_H_ */

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

  ViewVC Help
Powered by ViewVC 1.1.23