Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:03

0001 // @(#)root/tmva $Id$
0002 // Author: Tancredi Carli, Dominik Dannheim, Alexander Voigt
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  * Classes: PDEFoamMultiTarget                                                    *
0008  *                                             *
0009  *                                                                                *
0010  * Description:                                                                   *
0011  *      Concrete PDEFoamEvent sub-class.  This foam stores the number             *
0012  *      of events with every cell, as well as the statistical error on            *
0013  *      the event number.  It overrides GetCellValue() for projecting             *
0014  *      the target values given an incomplete event map with                      *
0015  *      N_variables < dimension of foam.                                          *
0016  *                                                                                *
0017  * Authors (alphabetical):                                                        *
0018  *      S. Jadach        - Institute of Nuclear Physics, Cracow, Poland           *
0019  *      Tancredi Carli   - CERN, Switzerland                                      *
0020  *      Dominik Dannheim - CERN, Switzerland                                      *
0021  *      Alexander Voigt  - TU Dresden, Germany                                    *
0022  *                                                                                *
0023  * Copyright (c) 2008, 2010:                                                      *
0024  *      CERN, Switzerland                                                         *
0025  *      MPI-K Heidelberg, Germany                                                 *
0026  *                                                                                *
0027  * Redistribution and use in source and binary forms, with or without             *
0028  * modification, are permitted according to the terms listed in LICENSE           *
0029  * (see tmva/doc/LICENSE)                                          *
0030  **********************************************************************************/
0031 
0032 #ifndef ROOT_TMVA_PDEFoamMultiTarget
0033 #define ROOT_TMVA_PDEFoamMultiTarget
0034 
0035 #include "TMVA/PDEFoamEvent.h"
0036 
0037 #include <vector>
0038 #include <map>
0039 
0040 namespace TMVA
0041 {
0042 
0043    // target selection method
0044    enum ETargetSelection { kMean = 0, kMpv = 1 };
0045 
0046    class PDEFoamMultiTarget : public PDEFoamEvent
0047    {
0048 
0049    protected:
0050       ETargetSelection fTargetSelection; // the target selection method
0051 
0052       PDEFoamMultiTarget(const PDEFoamMultiTarget&); // Copy Constructor  NOT USED
0053       virtual void CalculateMpv(std::map<Int_t, Float_t>&, const std::vector<PDEFoamCell*>&);  // Calculate mpv target
0054       virtual void CalculateMean(std::map<Int_t, Float_t>&, const std::vector<PDEFoamCell*>&); // Calculate mean target
0055 
0056       // ---------- Public functions ----------------------------------
0057    public:
0058       PDEFoamMultiTarget();                  // Default constructor (used only by ROOT streamer)
0059       PDEFoamMultiTarget(const TString&, ETargetSelection); // Principal user-defined constructor
0060       virtual ~PDEFoamMultiTarget() {}       // Default destructor
0061 
0062       // overridden from PDEFoam: extract the targets from the foam
0063       virtual std::vector<Float_t> GetCellValue(const std::map<Int_t, Float_t>&, ECellValue);
0064       using PDEFoam::GetCellValue;
0065 
0066       // ---------- ROOT class definition
0067       ClassDef(PDEFoamMultiTarget, 1) // Tree of PDEFoamCells
0068          }; // end of PDEFoamMultiTarget
0069 
0070 }  // namespace TMVA
0071 
0072 // ---------- Inline functions
0073 
0074 #endif