CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h

Go to the documentation of this file.
00001 #ifndef PileupMixingContent_h
00002 #define PileupMixingContent_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     PileupMixingContent
00006 // Class  :     PileupMixingContent
00007 // 
00013 //
00014 // Original Author:  Mike Hildreth, Notre Dame
00015 //         Created:  April 18, 2011
00016 //
00017 //
00018 
00019 #include <vector>
00020 #include <string>
00021 #include <iostream>
00022 
00023 class PileupMixingContent {
00024 
00025  public:
00026 
00027   PileupMixingContent(){};
00028 
00029   PileupMixingContent( std::vector<int>& bunchCrossing,
00030                        std::vector<int>& n_interactions, 
00031                        std::vector<float>& True_interactions ) 
00032  {
00033 
00034     bunchCrossing_.reserve(bunchCrossing.size());
00035     n_interactions_.reserve(bunchCrossing.size());
00036     n_TrueInteractions_.reserve(bunchCrossing.size());
00037 
00038     for(int inter=0; inter<(int)bunchCrossing.size(); ++inter) {
00039         bunchCrossing_.push_back(bunchCrossing[inter]);
00040         n_interactions_.push_back(n_interactions[inter]);
00041         n_TrueInteractions_.push_back(True_interactions[inter]);
00042     }
00043   };
00044 
00045   PileupMixingContent( std::vector<int>& bunchCrossing,
00046                        std::vector<int>& n_interactions)
00047  {
00048 
00049     bunchCrossing_.reserve(bunchCrossing.size());
00050     n_interactions_.reserve(bunchCrossing.size());
00051 
00052     for(int inter=0; inter<(int)bunchCrossing.size(); ++inter) {
00053         bunchCrossing_.push_back(bunchCrossing[inter]);
00054         n_interactions_.push_back(n_interactions[inter]);
00055         n_TrueInteractions_.push_back(-1.);
00056     }
00057   };
00058 
00059 
00060 
00061   ~PileupMixingContent(){
00062     bunchCrossing_.clear();
00063     n_interactions_.clear();
00064     n_TrueInteractions_.clear();
00065   };
00066 
00067   const std::vector<int>& getMix_Ninteractions() const { return n_interactions_; }
00068   const std::vector<float>& getMix_TrueInteractions() const { return n_TrueInteractions_; }
00069   const std::vector<int>& getMix_bunchCrossing() const { return bunchCrossing_; }
00070 
00071  private:
00072 
00073   // for "standard" pileup: we have MC Truth information for these
00074 
00075 
00076   std::vector<int> bunchCrossing_;
00077   std::vector<int> n_interactions_;
00078   std::vector<float> n_TrueInteractions_;
00079 
00080 
00081 };
00082 
00083 #endif