DAS  3.0
Das Analysis System
common.h
Go to the documentation of this file.
1 #include <fstream>
2 #include <iostream>
3 
4 namespace DAS::Normalisation {
5 
6 struct TriggerLumi {
7  int pt, turnon;
8  float weight;
9  TriggerLumi (int Pt, int Turnon, float Weight) :
10  pt(Pt), turnon(Turnon), weight(Weight)
11  {}
12  TriggerLumi (std::ifstream& infile)
13  {
14  infile >> pt;
15  infile >> turnon;
16 
17  float lumi;
18  infile >> lumi;
19  weight = 1./lumi;
20  }
21 };
22 
23 std::ostream& operator<< (std::ostream& Stream, const TriggerLumi& tr_lu)
24 {
25  Stream << tr_lu.pt << '\t' << tr_lu.turnon << '\t' << tr_lu.weight << '\t' << 1./tr_lu.weight;
26  return Stream;
27 }
28 
29 } // end of DAS::Normalisation namespace
30 
31 //using DAS::Normalisation::operator<<;
metPhiCorrectionExample.infile
string infile
Definition: metPhiCorrectionExample.py:25
DAS::Normalisation::TriggerLumi::TriggerLumi
TriggerLumi(int Pt, int Turnon, float Weight)
Definition: common.h:9
DAS::Normalisation::TriggerLumi::pt
int pt
Definition: common.h:7
DAS::Normalisation::TriggerLumi::TriggerLumi
TriggerLumi(std::ifstream &infile)
Definition: common.h:12
DAS::Weight
Definition: Weight.h:16
DAS::Normalisation::TriggerLumi::turnon
int turnon
Definition: common.h:7
DAS::Normalisation
Definition: getHLTJetResponse.cc:34
DAS::Normalisation::TriggerLumi
Definition: common.h:6
DAS::Normalisation::TriggerLumi::weight
float weight
Definition: common.h:8
DAS::Normalisation::operator<<
std::ostream & operator<<(std::ostream &Stream, const TriggerLumi &tr_lu)
Definition: common.h:23