~ma5/madanalysis5/madanalysis-development

« back to all changes in this revision

Viewing changes to tools/SampleAnalyzer/Commons/DataFormat/MCSampleFormat.h

  • Committer: Benjamin Fuks
  • Date: 2018-05-04 10:44:49 UTC
  • mfrom: (115.1.81 v1.6beta)
  • Revision ID: fuks@cern.ch-20180504104449-60h8a00loxgr8zg0
Releasing v1.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#ifndef MCSAMPLE_DATAFORMAT_H
26
26
#define MCSAMPLE_DATAFORMAT_H
27
27
 
 
28
 
28
29
// STL headers
29
30
#include <map>
30
31
#include <iostream>
34
35
// SampleAnalyzer headers
35
36
#include "SampleAnalyzer/Commons/DataFormat/GeneratorInfo.h"
36
37
#include "SampleAnalyzer/Commons/DataFormat/MCProcessFormat.h"
 
38
#include "SampleAnalyzer/Commons/DataFormat/WeightDefinition.h"
37
39
#include "SampleAnalyzer/Commons/Service/LogService.h" 
38
40
 
 
41
 
39
42
namespace MA5
40
43
{
41
44
 
67
70
 private:
68
71
 
69
72
  // ---------------------- physics info -------------------------
70
 
  std::pair<MAint32,MAint32>        beamPDGID_;    
71
 
  std::pair<MAfloat64,MAfloat64>  beamE_;        
72
 
  std::pair<MAuint32,MAuint32>      beamPDFauthor_;
73
 
  std::pair<MAuint32,MAuint32>      beamPDFID_;
74
 
  MAint32                         weightMode_;
75
 
  std::vector<ProcessFormat>    processes_;
76
 
  const MA5GEN::GeneratorType*  sample_generator_;
 
73
  std::pair<MAint32,MAint32>     beamPDGID_;    
 
74
  std::pair<MAfloat64,MAfloat64> beamE_;        
 
75
  std::pair<MAuint32,MAuint32>   beamPDFauthor_;
 
76
  std::pair<MAuint32,MAuint32>   beamPDFID_;
 
77
  MAint32                        weightMode_;
 
78
  std::vector<ProcessFormat>     processes_;
 
79
  const MA5GEN::GeneratorType*   sample_generator_;
77
80
 
 
81
  // ----------------------- multiweights ------------------------
 
82
  WeightDefinition weight_definition_;
78
83
 
79
84
  // ----------------------- file info ---------------------------
80
85
  MAfloat64 xsection_;
110
115
    weightMode_         = 0; 
111
116
    processes_.clear();
112
117
 
 
118
    // WeightDefinition
 
119
    weight_definition_.Reset();
 
120
 
113
121
    // File info
114
122
    xsection_           = 0.;
115
123
    xsection_error_     = 0.;
169
177
  std::vector<ProcessFormat>& processes()
170
178
  { return processes_; }
171
179
 
 
180
  /// Accessor to the weight definition (read-only)
 
181
  const WeightDefinition& weight_definition() const
 
182
  { return weight_definition_; }
 
183
  
 
184
  /// Accessor to the weight definition
 
185
  WeightDefinition& weight_definition()
 
186
  { return weight_definition_; }
 
187
 
172
188
  /// Set the PDG ID of the intial partons
173
189
  void setBeamPDGID(MAint32 a, MAint32 b) 
174
190
  {beamPDGID_=std::make_pair(a,b); }