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 // $Id: PileupSummaryInfo.cc,v 1.5 2011/07/05 00:40:41 mikeh Exp $
12 //
13 
15 
16 
17 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
18  std::vector<float>& zpositions,
19  std::vector<float>& sumpT_lowpT,
20  std::vector<float>& sumpT_highpT,
21  std::vector<int>& ntrks_lowpT,
22  std::vector<int>& ntrks_highpT )
23 {
24 
25  num_PU_vertices_ = num_PU_vertices;
26  zpositions_.clear();
27  sumpT_lowpT_.clear();
28  sumpT_highpT_.clear();
29  ntrks_lowpT_.clear();
30  ntrks_highpT_.clear();
31  instLumi_.clear();
32  eventInfo_.clear();
33 
34  int NLoop = zpositions.size();
35 
36  for( int ivtx = 0; ivtx<NLoop ; ++ivtx) {
37  zpositions_.push_back(zpositions[ivtx]);
38  sumpT_lowpT_.push_back(sumpT_lowpT[ivtx]);
39  sumpT_highpT_.push_back(sumpT_highpT[ivtx]);
40  ntrks_lowpT_.push_back(ntrks_lowpT[ivtx]);
41  ntrks_highpT_.push_back(ntrks_highpT[ivtx]);
42  }
43 
44 }
45 
46 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
47  std::vector<float>& zpositions,
48  std::vector<float>& sumpT_lowpT,
49  std::vector<float>& sumpT_highpT,
50  std::vector<int>& ntrks_lowpT,
51  std::vector<int>& ntrks_highpT,
52  int bunchCrossing)
53 {
54 
55  num_PU_vertices_ = num_PU_vertices;
56  zpositions_.clear();
57  sumpT_lowpT_.clear();
58  sumpT_highpT_.clear();
59  ntrks_lowpT_.clear();
60  ntrks_highpT_.clear();
61  instLumi_.clear();
62  eventInfo_.clear();
63  bunchCrossing_ = bunchCrossing;
64 
65  int NLoop = zpositions.size();
66 
67  for( int ivtx = 0; ivtx<NLoop ; ++ivtx) {
68  zpositions_.push_back(zpositions[ivtx]);
69  sumpT_lowpT_.push_back(sumpT_lowpT[ivtx]);
70  sumpT_highpT_.push_back(sumpT_highpT[ivtx]);
71  ntrks_lowpT_.push_back(ntrks_lowpT[ivtx]);
72  ntrks_highpT_.push_back(ntrks_highpT[ivtx]);
73  }
74 
75 }
76 
77 
78 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
79  std::vector<float>& zpositions,
80  std::vector<float>& sumpT_lowpT,
81  std::vector<float>& sumpT_highpT,
82  std::vector<int>& ntrks_lowpT,
83  std::vector<int>& ntrks_highpT,
84  int bunchCrossing,
85  float TrueNumInteractions )
86 {
87 
88  num_PU_vertices_ = num_PU_vertices;
89  zpositions_.clear();
90  sumpT_lowpT_.clear();
91  sumpT_highpT_.clear();
92  ntrks_lowpT_.clear();
93  ntrks_highpT_.clear();
94  instLumi_.clear();
95  eventInfo_.clear();
96  bunchCrossing_ = bunchCrossing;
97  TrueNumInteractions_ = TrueNumInteractions;
98 
99  int NLoop = zpositions.size();
100 
101  for( int ivtx = 0; ivtx<NLoop ; ++ivtx) {
102  zpositions_.push_back(zpositions[ivtx]);
103  sumpT_lowpT_.push_back(sumpT_lowpT[ivtx]);
104  sumpT_highpT_.push_back(sumpT_highpT[ivtx]);
105  ntrks_lowpT_.push_back(ntrks_lowpT[ivtx]);
106  ntrks_highpT_.push_back(ntrks_highpT[ivtx]);
107  }
108 
109 }
110 
111 
112 
113 PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices,
114  std::vector<float>& instLumi,
115  std::vector<edm::EventID>& eventInfo)
116 {
117  num_PU_vertices_ = num_PU_vertices;
118  zpositions_.clear();
119  sumpT_lowpT_.clear();
120  sumpT_highpT_.clear();
121  ntrks_lowpT_.clear();
122  ntrks_highpT_.clear();
123  instLumi_.clear();
124  eventInfo_.clear();
125 
126 
127  for( int ivtx = 0; ivtx<num_PU_vertices ; ++ivtx) {
128  instLumi_.push_back(instLumi[ivtx]);
129  eventInfo_.push_back(eventInfo[ivtx]);
130  }
131 }
132 
134 }
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_