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