Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:52

0001 #ifndef PileupSummaryInfo_h
0002 #define PileupSummaryInfo_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     PileupSummaryInfo
0006 // Class  :     PileupSummaryInfo
0007 //
0008 /**\class PileupSummaryInfo PileupSummaryInfo.h SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h
0009 
0010 Description: contains information related to the details of the pileup simulation for a given event
0011 Usage: purely descriptive
0012 */
0013 //
0014 // Original Author:  Mike Hildreth, Notre Dame
0015 //         Created:  July 1, 2010
0016 //
0017 
0018 #include "DataFormats/Provenance/interface/EventID.h"
0019 #include <vector>
0020 #include <string>
0021 
0022 class PileupSummaryInfo {
0023 public:
0024   PileupSummaryInfo(){};
0025 
0026   PileupSummaryInfo(const int num_PU_vertices,
0027                     const std::vector<float>& zpositions,
0028                     const std::vector<float>& times,  // may be empty
0029                     const std::vector<float>& sumpT_lowpT,
0030                     const std::vector<float>& sumpT_highpT,
0031                     const std::vector<int>& ntrks_lowpT,
0032                     const std::vector<int>& ntrks_highpT);
0033 
0034   PileupSummaryInfo(const int num_PU_vertices,
0035                     const std::vector<float>& zpositions,
0036                     const std::vector<float>& times,  // may be empty
0037                     const std::vector<float>& sumpT_lowpT,
0038                     const std::vector<float>& sumpT_highpT,
0039                     const std::vector<int>& ntrks_lowpT,
0040                     const std::vector<int>& ntrks_highpT,
0041                     int bunchCrossing);
0042 
0043   PileupSummaryInfo(const int num_PU_vertices,
0044                     const std::vector<float>& zpositions,
0045                     const std::vector<float>& times,  // may be empty
0046                     const std::vector<float>& sumpT_lowpT,
0047                     const std::vector<float>& sumpT_highpT,
0048                     const std::vector<int>& ntrks_lowpT,
0049                     const std::vector<int>& ntrks_highpT,
0050                     const std::vector<edm::EventID>& eventInfo,
0051                     const std::vector<float>& pT_hats,
0052                     int bunchCrossing,
0053                     float TrueNumInteractions,
0054                     int bunchSpacing);
0055 
0056   PileupSummaryInfo(const int num_PU_vertices,
0057                     const std::vector<float>& instLumi,
0058                     const std::vector<edm::EventID>& eventInfo);
0059 
0060   ~PileupSummaryInfo();
0061 
0062   const int getPU_NumInteractions() const { return num_PU_vertices_; }
0063   const std::vector<float>& getPU_zpositions() const { return zpositions_; }
0064   bool has_times() const { return !times_.empty(); }
0065   const std::vector<float>& getPU_times() const { return times_; }
0066   const std::vector<float>& getPU_sumpT_lowpT() const { return sumpT_lowpT_; }
0067   const std::vector<float>& getPU_sumpT_highpT() const { return sumpT_highpT_; }
0068   const std::vector<int>& getPU_ntrks_lowpT() const { return ntrks_lowpT_; }
0069   const std::vector<int>& getPU_ntrks_highpT() const { return ntrks_highpT_; }
0070   const std::vector<float>& getPU_instLumi() const { return instLumi_; }
0071   const std::vector<edm::EventID>& getPU_EventID() const { return eventInfo_; }
0072   const std::vector<float>& getPU_pT_hats() const { return pT_hats_; }
0073   const int getBunchCrossing() const { return bunchCrossing_; }
0074   const int getBunchSpacing() const { return bunchSpacing_; }
0075   const float getTrueNumInteractions() const { return TrueNumInteractions_; }
0076 
0077 private:
0078   // for "standard" pileup: we have MC Truth information for these
0079 
0080   int num_PU_vertices_;
0081   std::vector<float> zpositions_;
0082   std::vector<float> times_;
0083   std::vector<float> sumpT_lowpT_;
0084   std::vector<float> sumpT_highpT_;
0085   std::vector<int> ntrks_lowpT_;
0086   std::vector<int> ntrks_highpT_;
0087   std::vector<edm::EventID> eventInfo_;
0088   std::vector<float> pT_hats_;
0089   int bunchCrossing_;
0090   int bunchSpacing_;
0091   float TrueNumInteractions_;
0092 
0093   // for DataMixer pileup, we only have raw information:
0094 
0095   std::vector<float> instLumi_;
0096 };
0097 
0098 #endif