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>
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  {
33 
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,
46  std::vector<int>& n_interactions)
47  {
48 
49  bunchCrossing_.reserve(bunchCrossing.size());
50  n_interactions_.reserve(bunchCrossing.size());
51 
52  for(int inter=0; inter<(int)bunchCrossing.size(); ++inter) {
53  bunchCrossing_.push_back(bunchCrossing[inter]);
54  n_interactions_.push_back(n_interactions[inter]);
55  n_TrueInteractions_.push_back(-1.);
56  }
57  };
58 
59 
60 
62  bunchCrossing_.clear();
63  n_interactions_.clear();
64  n_TrueInteractions_.clear();
65  };
66 
67  const std::vector<int>& getMix_Ninteractions() const { return n_interactions_; }
68  const std::vector<float>& getMix_TrueInteractions() const { return n_TrueInteractions_; }
69  const std::vector<int>& getMix_bunchCrossing() const { return bunchCrossing_; }
70 
71  private:
72 
73  // for "standard" pileup: we have MC Truth information for these
74 
75 
76  std::vector<int> bunchCrossing_;
77  std::vector<int> n_interactions_;
78  std::vector<float> n_TrueInteractions_;
79 
80 
81 };
82 
83 #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
PileupMixingContent(std::vector< int > &bunchCrossing, std::vector< int > &n_interactions)
std::vector< float > n_TrueInteractions_
int inter
PileupMixingContent(std::vector< int > &bunchCrossing, std::vector< int > &n_interactions, std::vector< float > &True_interactions)
std::vector< int > bunchCrossing_