test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PileupMixingContent.h
Go to the documentation of this file.
1 #ifndef PileupMixingContent_h
2 #define PileupMixingContent_h
3 // -*- C++ -*-
4 //
5 // Package: PileupMixingContent
6 // Class : PileupMixingContent
7 //
13 //
14 // Original Author: Mike Hildreth, Notre Dame
15 // Created: April 18, 2011
16 //
17 //
18 
19 #include <vector>
20 #include <string>
21 #include <iostream>
23 
25 
26  public:
27 
29 
30  PileupMixingContent( std::vector<int>& bunchCrossing,
31  std::vector<int>& n_interactions,
32  std::vector<float>& True_interactions,
33  std::vector<edm::EventID>& eventInfos,
34  int bunchSpacing):
35  eventInfos_(eventInfos),
36  bunchSpacing_(bunchSpacing)
37  {
38 
39  bunchCrossing_.reserve(bunchCrossing.size());
40  n_interactions_.reserve(bunchCrossing.size());
41  n_TrueInteractions_.reserve(bunchCrossing.size());
42 
43  for(int inter=0; inter<(int)bunchCrossing.size(); ++inter) {
44  bunchCrossing_.push_back(bunchCrossing[inter]);
45  n_interactions_.push_back(n_interactions[inter]);
46  n_TrueInteractions_.push_back(True_interactions[inter]);
47  }
48  };
49 
50  PileupMixingContent( std::vector<int>& bunchCrossing,
51  std::vector<int>& n_interactions)
52  {
53 
54  bunchCrossing_.reserve(bunchCrossing.size());
55  n_interactions_.reserve(bunchCrossing.size());
56 
57  for(int inter=0; inter<(int)bunchCrossing.size(); ++inter) {
58  bunchCrossing_.push_back(bunchCrossing[inter]);
59  n_interactions_.push_back(n_interactions[inter]);
60  n_TrueInteractions_.push_back(-1.);
61  }
62  };
63 
64 
65 
67  bunchCrossing_.clear();
68  n_interactions_.clear();
69  n_TrueInteractions_.clear();
70  eventInfos_.clear();
71  };
72 
73  const std::vector<int>& getMix_Ninteractions() const { return n_interactions_; }
74  const std::vector<float>& getMix_TrueInteractions() const { return n_TrueInteractions_; }
75  const std::vector<int>& getMix_bunchCrossing() const { return bunchCrossing_; }
76  const int & getMix_bunchSpacing() const { return bunchSpacing_; }
77  const std::vector<edm::EventID> getMix_eventInfo() const {return eventInfos_;}
78 
79  private:
80 
81  // for "standard" pileup: we have MC Truth information for these
82 
83 
84  std::vector<int> bunchCrossing_;
85  std::vector<int> n_interactions_;
86  std::vector<float> n_TrueInteractions_;
87  std::vector<edm::EventID> eventInfos_;
89 
90 };
91 
92 #endif
const std::vector< float > & getMix_TrueInteractions() const
const std::vector< int > & getMix_bunchCrossing() const
std::vector< int > n_interactions_
const std::vector< int > & getMix_Ninteractions() const
const std::vector< edm::EventID > getMix_eventInfo() const
PileupMixingContent(std::vector< int > &bunchCrossing, std::vector< int > &n_interactions)
std::vector< float > n_TrueInteractions_
std::vector< edm::EventID > eventInfos_
int inter
const int & getMix_bunchSpacing() const
std::vector< int > bunchCrossing_
PileupMixingContent(std::vector< int > &bunchCrossing, std::vector< int > &n_interactions, std::vector< float > &True_interactions, std::vector< edm::EventID > &eventInfos, int bunchSpacing)