CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/RecoParticleFlow/PFClusterTools/interface/TreeUtility.h

Go to the documentation of this file.
00001 #ifndef TREEUTILITY_HH_
00002 #define TREEUTILITY_HH_
00003 #include "RecoParticleFlow/PFClusterTools/interface/DetectorElement.h"
00004 #include "RecoParticleFlow/PFClusterTools/interface/ParticleDeposit.h"
00005 #include "DataFormats/ParticleFlowReco/interface/Calibratable.h"
00006 #include "DataFormats/ParticleFlowReco/interface/CalibrationProvenance.h"
00007 
00008 #include <boost/shared_ptr.hpp>
00009 #include <TFile.h>
00010 #include <TChain.h>
00011 #include <vector>
00012 #include <string>
00013 #include <map>
00014 
00015 namespace pftools {
00026 typedef boost::shared_ptr<Calibratable> CalibratablePtr;
00027 class TreeUtility {
00028 public:
00029 
00030         TreeUtility();
00031         virtual ~TreeUtility();
00032 
00033         unsigned getParticleDepositsDirectly(TChain& sourceChain,
00034                         std::vector<ParticleDepositPtr>& toBeFilled,
00035                         CalibrationTarget target, DetectorElementPtr offset,
00036                         DetectorElementPtr ecal, DetectorElementPtr hcal, bool includeOffset = false);
00037 
00038         unsigned getCalibratablesFromRootFile(TChain& tree,
00039                         std::vector<Calibratable>& toBeFilled);
00040 
00041         unsigned convertCalibratablesToParticleDeposits(
00042                         const std::vector<Calibratable>& input,
00043                         std::vector<ParticleDepositPtr>& toBeFilled,
00044                         CalibrationTarget target, DetectorElementPtr offset,
00045                         DetectorElementPtr ecal, DetectorElementPtr hcal, bool includeOffset = false);
00046 
00047         void dumpCaloDataToCSV(TChain& chain, std::string csvFilename, double range, bool gaus = false);
00048 
00049 
00050 private:
00051         std::map<std::string, unsigned> vetos_;
00052 
00053 };
00054 }
00055 #endif /*TREEUTILITY_HH_*/