CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/QCDAnalysis/ChargedHadronSpectra/interface/EnergyLossPlain.h

Go to the documentation of this file.
00001 #ifndef _EnergyLossPlain_h_
00002 #define _EnergyLossPlain_h_
00003 
00004 #include "DataFormats/GeometryVector/interface/LocalVector.h"
00005 #include "DataFormats/TrackReco/interface/Track.h"
00006 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00007 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00008 
00009 class SiPixelRecHit;
00010 class SiStripRecHit2D;
00011 
00012 class EnergyLossPlain
00013 {
00014   public:
00015     EnergyLossPlain(const TrackerGeometry* theTracker_,
00016                     double pixelToStripMultiplier,
00017                     double pixelToStripExponent);
00018     ~EnergyLossPlain();
00019     void loadOptimalWeights();
00020     int estimate(const Trajectory* trajectory,
00021                  std::vector<std::pair<int,double> >& arithmeticMean,
00022                  std::vector<std::pair<int,double> >&  truncatedMean);
00023 
00024   private:
00025     double average    (std::vector<std::pair<double,double> >& values);
00026     double truncate   (std::vector<std::pair<double,double> >& values);
00027     double optimal    (std::vector<std::pair<double,double> >& values);
00028     double logTruncate(std::vector<std::pair<double,double> >& values);
00029 
00030     double expected(double Delta1, double Delta2);
00031 
00032     void process(LocalVector ldir,const SiPixelRecHit* recHit,
00033                  std::vector<std::pair<double,double> >& values);
00034     void process(LocalVector ldir,const SiStripRecHit2D* recHit,
00035                  std::vector<std::pair<double,double> >& values);
00036 
00037     const TrackerGeometry* theTracker;
00038     double pixelToStripMultiplier, pixelToStripExponent;
00039 
00040     static bool isFirst;
00041     static float optimalWeight[61][61];
00042 };
00043 
00044 #endif