CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PileupSummaryInfo.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PileupSummaryInfo
4 // Class : PileupSummaryInfo
5 //
6 // Implementation:
7 //
8 //
9 // Original Author: Mike Hildreth, Notre Dame
10 // Created:
11 //
12 
14 
15 
16 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
17  std::vector<float>& zpositions,
18  std::vector<float>& sumpT_lowpT,
19  std::vector<float>& sumpT_highpT,
20  std::vector<int>& ntrks_lowpT,
21  std::vector<int>& ntrks_highpT )
22 {
23 
24  num_PU_vertices_ = num_PU_vertices;
25  zpositions_.clear();
26  sumpT_lowpT_.clear();
27  sumpT_highpT_.clear();
28  ntrks_lowpT_.clear();
29  ntrks_highpT_.clear();
30  instLumi_.clear();
31  eventInfo_.clear();
32 
33  int NLoop = zpositions.size();
34 
35  for( int ivtx = 0; ivtx<NLoop ; ++ivtx) {
36  zpositions_.push_back(zpositions[ivtx]);
37  sumpT_lowpT_.push_back(sumpT_lowpT[ivtx]);
38  sumpT_highpT_.push_back(sumpT_highpT[ivtx]);
39  ntrks_lowpT_.push_back(ntrks_lowpT[ivtx]);
40  ntrks_highpT_.push_back(ntrks_highpT[ivtx]);
41  }
42 
43 }
44 
45 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
46  std::vector<float>& zpositions,
47  std::vector<float>& sumpT_lowpT,
48  std::vector<float>& sumpT_highpT,
49  std::vector<int>& ntrks_lowpT,
50  std::vector<int>& ntrks_highpT,
51  int bunchCrossing)
52 {
53 
54  num_PU_vertices_ = num_PU_vertices;
55  zpositions_.clear();
56  sumpT_lowpT_.clear();
57  sumpT_highpT_.clear();
58  ntrks_lowpT_.clear();
59  ntrks_highpT_.clear();
60  instLumi_.clear();
61  eventInfo_.clear();
62  bunchCrossing_ = bunchCrossing;
63 
64  int NLoop = zpositions.size();
65 
66  for( int ivtx = 0; ivtx<NLoop ; ++ivtx) {
67  zpositions_.push_back(zpositions[ivtx]);
68  sumpT_lowpT_.push_back(sumpT_lowpT[ivtx]);
69  sumpT_highpT_.push_back(sumpT_highpT[ivtx]);
70  ntrks_lowpT_.push_back(ntrks_lowpT[ivtx]);
71  ntrks_highpT_.push_back(ntrks_highpT[ivtx]);
72  }
73 
74 }
75 
76 
77 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
78  std::vector<float>& zpositions,
79  std::vector<float>& sumpT_lowpT,
80  std::vector<float>& sumpT_highpT,
81  std::vector<int>& ntrks_lowpT,
82  std::vector<int>& ntrks_highpT,
83  int bunchCrossing,
84  float TrueNumInteractions )
85 {
86 
87  num_PU_vertices_ = num_PU_vertices;
88  zpositions_.clear();
89  sumpT_lowpT_.clear();
90  sumpT_highpT_.clear();
91  ntrks_lowpT_.clear();
92  ntrks_highpT_.clear();
93  instLumi_.clear();
94  eventInfo_.clear();
95  bunchCrossing_ = bunchCrossing;
96  TrueNumInteractions_ = TrueNumInteractions;
97 
98  int NLoop = zpositions.size();
99 
100  for( int ivtx = 0; ivtx<NLoop ; ++ivtx) {
101  zpositions_.push_back(zpositions[ivtx]);
102  sumpT_lowpT_.push_back(sumpT_lowpT[ivtx]);
103  sumpT_highpT_.push_back(sumpT_highpT[ivtx]);
104  ntrks_lowpT_.push_back(ntrks_lowpT[ivtx]);
105  ntrks_highpT_.push_back(ntrks_highpT[ivtx]);
106  }
107 
108 }
109 
110 
111 
112 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
113  std::vector<float>& instLumi,
114  std::vector<edm::EventID>& eventInfo)
115 {
116  num_PU_vertices_ = num_PU_vertices;
117  zpositions_.clear();
118  sumpT_lowpT_.clear();
119  sumpT_highpT_.clear();
120  ntrks_lowpT_.clear();
121  ntrks_highpT_.clear();
122  instLumi_.clear();
123  eventInfo_.clear();
124 
125 
126  for( int ivtx = 0; ivtx<num_PU_vertices ; ++ivtx) {
127  instLumi_.push_back(instLumi[ivtx]);
128  eventInfo_.push_back(eventInfo[ivtx]);
129  }
130 }
131 
133 }
std::vector< int > ntrks_lowpT_
std::vector< edm::EventID > eventInfo_
std::vector< float > sumpT_highpT_
std::vector< float > sumpT_lowpT_
std::vector< float > zpositions_
std::vector< int > ntrks_highpT_
std::vector< float > instLumi_