ATLAS Offline Software
AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef PMGTOOLS_IPMGCROSSSECTIONTOOL_H
8 #define PMGTOOLS_IPMGCROSSSECTIONTOOL_H
9 
10 // Infrastructure include(s):
11 #include "AsgTools/IAsgTool.h"
12 
13 #include <vector>
14 
15 namespace PMGTools {
16 
17  // store all information for certain DSID in structure
18  struct AllSampleInfo{
19  int dsid;
20  std::string containerName;
21  double genXsec;
22  double filterEff;
23  double kFactor;
24  };
25 
26 
27 
28  class IPMGCrossSectionTool : public virtual asg::IAsgTool {
29 
30  // Declare the interface that the class provides
32 
33  public:
34 
36  virtual bool readInfosFromFiles(std::vector<std::string>) = 0;
37 
39  virtual bool readInfosFromDir(const std::string& inputDir) = 0;
40 
42  virtual double getFilterEff(const int dsid) const = 0;
43 
45  virtual std::string getSampleName(const int dsid) const = 0;
46 
48  virtual double getGeneratorXsection(const int dsid) const = 0;
49 
51  virtual double getKfactor(const int dsid) const = 0;
52 
54  virtual double getSampleXsection(const int dsid) const = 0;
55 
57  virtual std::vector<int> getLoadedDSIDs() const = 0;
58 
59  }; // class IPMGCrossSectionTool
60 
61 } // namespace PMGTools
62 
63 // overload the output operator for the AllSampleInfo object
64 std::ostream& operator<<(std::ostream& os, const PMGTools::AllSampleInfo& s) {
65  return os << "Name: " << s.containerName << std::endl
66  << "DSID: " << s.dsid << std::endl
67  << "Cross section: " << s.genXsec << std::endl
68  << "k-factor: " << s.kFactor << std::endl
69  << "Filter eff.: " << s.filterEff << std::endl;
70 }
71 #endif //> !PMGTOOLS_IPMGCROSSSECTIONTOOL_H
PMGTools::IPMGCrossSectionTool
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:28
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TestSUSYToolsAlg.inputDir
string inputDir
Definition: TestSUSYToolsAlg.py:76
PMGTools::AllSampleInfo::genXsec
double genXsec
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:21
PMGTools::AllSampleInfo::kFactor
double kFactor
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:23
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
PMGTools::IPMGCrossSectionTool::getSampleXsection
virtual double getSampleXsection(const int dsid) const =0
return the sample cross-section for DSID (can we find a more descriptive name for this,...
operator<<
std::ostream & operator<<(std::ostream &os, const PMGTools::AllSampleInfo &s)
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:64
PMGTools::AllSampleInfo::containerName
std::string containerName
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:20
PMGTools::IPMGCrossSectionTool::readInfosFromFiles
virtual bool readInfosFromFiles(std::vector< std::string >)=0
read infos from file, store them in the structure and make a vector that keeps all of them
PMGTools::IPMGCrossSectionTool::getLoadedDSIDs
virtual std::vector< int > getLoadedDSIDs() const =0
get a list of the DSID for the loaded samples
PMGTools::IPMGCrossSectionTool::readInfosFromDir
virtual bool readInfosFromDir(const std::string &inputDir)=0
read infos from all files in dir
Generate_dsid_ranseed.dsid
dsid
Definition: Generate_dsid_ranseed.py:6
PMGTools::IPMGCrossSectionTool::getFilterEff
virtual double getFilterEff(const int dsid) const =0
return filter efficiency for DSID
PMGTools::AllSampleInfo
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:18
PMGTools
Tool providing sample cross-sections and k-factors etc.
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:15
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
IAsgTool.h
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
PMGTools::AllSampleInfo::filterEff
double filterEff
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:22
PMGTools::AllSampleInfo::dsid
int dsid
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:19
PMGTools::IPMGCrossSectionTool::getSampleName
virtual std::string getSampleName(const int dsid) const =0
return the sample name for DSID
PMGTools::IPMGCrossSectionTool::getKfactor
virtual double getKfactor(const int dsid) const =0
return the k-factor for DSID
PMGTools::IPMGCrossSectionTool::getGeneratorXsection
virtual double getGeneratorXsection(const int dsid) const =0
return the AMI cross-section for DSID