CMS 3D CMS Logo

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 public:
27 
28  PileupMixingContent(std::vector<int>& bunchCrossing,
29  std::vector<int>& n_interactions,
30  std::vector<float>& True_interactions,
31  std::vector<edm::EventID>& eventInfos,
32  int bunchSpacing)
33  : eventInfos_(eventInfos), bunchSpacing_(bunchSpacing) {
34  bunchCrossing_.reserve(bunchCrossing.size());
35  n_interactions_.reserve(bunchCrossing.size());
36  n_TrueInteractions_.reserve(bunchCrossing.size());
37 
38  for (int inter = 0; inter < (int)bunchCrossing.size(); ++inter) {
39  bunchCrossing_.push_back(bunchCrossing[inter]);
40  n_interactions_.push_back(n_interactions[inter]);
41  n_TrueInteractions_.push_back(True_interactions[inter]);
42  }
43  };
44 
45  PileupMixingContent(std::vector<int>& bunchCrossing, std::vector<int>& n_interactions) {
46  bunchCrossing_.reserve(bunchCrossing.size());
47  n_interactions_.reserve(bunchCrossing.size());
48 
49  for (int inter = 0; inter < (int)bunchCrossing.size(); ++inter) {
50  bunchCrossing_.push_back(bunchCrossing[inter]);
51  n_interactions_.push_back(n_interactions[inter]);
52  n_TrueInteractions_.push_back(-1.);
53  }
54  };
55 
57  bunchCrossing_.clear();
58  n_interactions_.clear();
59  n_TrueInteractions_.clear();
60  eventInfos_.clear();
61  };
62 
63  const std::vector<int>& getMix_Ninteractions() const { return n_interactions_; }
64  const std::vector<float>& getMix_TrueInteractions() const { return n_TrueInteractions_; }
65  const std::vector<int>& getMix_bunchCrossing() const { return bunchCrossing_; }
66  const int& getMix_bunchSpacing() const { return bunchSpacing_; }
67  const std::vector<edm::EventID> getMix_eventInfo() const { return eventInfos_; }
68 
69 private:
70  // for "standard" pileup: we have MC Truth information for these
71 
72  std::vector<int> bunchCrossing_;
73  std::vector<int> n_interactions_;
74  std::vector<float> n_TrueInteractions_;
75  std::vector<edm::EventID> eventInfos_;
77 };
78 
79 #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)