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
PileupMixingContent::getMix_bunchCrossing
const std::vector< int > & getMix_bunchCrossing() const
Definition: PileupMixingContent.h:65
PileupMixingContent::PileupMixingContent
PileupMixingContent()
Definition: PileupMixingContent.h:26
PileupMixingContent::n_interactions_
std::vector< int > n_interactions_
Definition: PileupMixingContent.h:73
HLTEgPhaseIITestSequence_cff.bunchSpacing
bunchSpacing
Definition: HLTEgPhaseIITestSequence_cff.py:1574
EventID.h
PileupMixingContent::PileupMixingContent
PileupMixingContent(std::vector< int > &bunchCrossing, std::vector< int > &n_interactions)
Definition: PileupMixingContent.h:45
PileupMixingContent::bunchSpacing_
int bunchSpacing_
Definition: PileupMixingContent.h:76
createfilelist.int
int
Definition: createfilelist.py:10
PileupMixingContent
Definition: PileupMixingContent.h:24
PileupMixingContent::getMix_Ninteractions
const std::vector< int > & getMix_Ninteractions() const
Definition: PileupMixingContent.h:63
PileupMixingContent::getMix_bunchSpacing
const int & getMix_bunchSpacing() const
Definition: PileupMixingContent.h:66
PileupMixingContent::bunchCrossing_
std::vector< int > bunchCrossing_
Definition: PileupMixingContent.h:72
PileupMixingContent::PileupMixingContent
PileupMixingContent(std::vector< int > &bunchCrossing, std::vector< int > &n_interactions, std::vector< float > &True_interactions, std::vector< edm::EventID > &eventInfos, int bunchSpacing)
Definition: PileupMixingContent.h:28
PileupMixingContent::getMix_eventInfo
const std::vector< edm::EventID > getMix_eventInfo() const
Definition: PileupMixingContent.h:67
inter
int inter
Definition: CascadeWrapper.h:27
PileupMixingContent::n_TrueInteractions_
std::vector< float > n_TrueInteractions_
Definition: PileupMixingContent.h:74
PileupMixingContent::eventInfos_
std::vector< edm::EventID > eventInfos_
Definition: PileupMixingContent.h:75
PileupMixingContent::getMix_TrueInteractions
const std::vector< float > & getMix_TrueInteractions() const
Definition: PileupMixingContent.h:64
PileupMixingContent::~PileupMixingContent
~PileupMixingContent()
Definition: PileupMixingContent.h:56