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