//  
// Author: Soeren Stamm <mailto: stamm@physik.hu-berlin.de>
// Update: $Id: AtlHistFactorySystEnvelope.h,v 1.5 2016/04/19 07:46:18 stamm Exp $
// Copyright: 2015 (C) Soeren Stamm
//
#ifndef ATLAS_AtlHistFactorySystEnvelope
#define ATLAS_AtlHistFactorySystEnvelope
#ifndef ATLAS_AtlHistFactorySystematic
#include <AtlHistFactorySystematic.h>
#endif
#ifndef ATLAS_AtlTopLevelAnalysis
#include <AtlTopLevelAnalysis.h>
#endif

class AtlHistFactorySystEnvelope : public AtlHistFactorySystematic {

protected:
    TFile *fPlotterFileSyst1; // MCPlotter file for systematic
    TFile *fPlotterFileSyst2; // MCPlotter file for systematic
    TFile *fPlotterFileSyst3; // MCPlotter file for systematic
    TFile *fPlotterFileSyst4; // MCPlotter file for systematic
    TFile *fPlotterFileSyst5; // MCPlotter file for systematic
    TFile *fPlotterFileSyst6; // MCPlotter file for systematic
    // TFile *fPlotterFileNom;   // MCPlotter file for nominal
    AtlTopLevelAnalysis::ESystematic fSyst1; // Systematic
    AtlTopLevelAnalysis::ESystematic fSyst2; // Systematic
    AtlTopLevelAnalysis::ESystematic fSyst3; // Systematic
    AtlTopLevelAnalysis::ESystematic fSyst4; // Systematic
    AtlTopLevelAnalysis::ESystematic fSyst5; // Systematic
    AtlTopLevelAnalysis::ESystematic fSyst6; // Systematic
    // AtlTopLevelAnalysis::ESystematic fNominal; // Nominal (needed for envelope compuation)
    TList *fHistsSyst1; // List of MCPlotter templates for systematic
    TList *fHistsSyst2; // List of MCPlotter templates for systematic
    TList *fHistsSyst3; // List of MCPlotter templates for systematic
    TList *fHistsSyst4; // List of MCPlotter templates for systematic
    TList *fHistsSyst5; // List of MCPlotter templates for systematic
    TList *fHistsSyst6; // List of MCPlotter templates for systematic
    // TList *fHistsNom;   // List of MCPlotter templates for nominal
    
public:
    AtlHistFactorySystEnvelope();
    AtlHistFactorySystEnvelope(const char* systname,
			       const char* systtitle,
			       AtlTopLevelAnalysis::ESystematic Syst1,
			       AtlTopLevelAnalysis::ESystematic Syst2,
			       AtlTopLevelAnalysis::ESystematic Syst3 = AtlTopLevelAnalysis::kUndefined,
			       AtlTopLevelAnalysis::ESystematic Syst4 = AtlTopLevelAnalysis::kUndefined,
			       AtlTopLevelAnalysis::ESystematic Syst5 = AtlTopLevelAnalysis::kUndefined,
			       AtlTopLevelAnalysis::ESystematic Syst6 = AtlTopLevelAnalysis::kUndefined,
			       Bool_t useShape = kFALSE);
    virtual ~AtlHistFactorySystEnvelope();

    virtual void Initialize(const char* BaseDir,
			    const char* scheme = "plots_datamc");
    virtual void Clear(Option_t *option = "");

protected:
    virtual void GetHistsFromFile(const char* process);
    virtual void ComputeUpDownVariation(const char* process);
    
    ClassDef(AtlHistFactorySystEnvelope, 1) // Systematic using max. & min. variations as systematic (envelope)
};
#endif

 AtlHistFactorySystEnvelope.h:1
 AtlHistFactorySystEnvelope.h:2
 AtlHistFactorySystEnvelope.h:3
 AtlHistFactorySystEnvelope.h:4
 AtlHistFactorySystEnvelope.h:5
 AtlHistFactorySystEnvelope.h:6
 AtlHistFactorySystEnvelope.h:7
 AtlHistFactorySystEnvelope.h:8
 AtlHistFactorySystEnvelope.h:9
 AtlHistFactorySystEnvelope.h:10
 AtlHistFactorySystEnvelope.h:11
 AtlHistFactorySystEnvelope.h:12
 AtlHistFactorySystEnvelope.h:13
 AtlHistFactorySystEnvelope.h:14
 AtlHistFactorySystEnvelope.h:15
 AtlHistFactorySystEnvelope.h:16
 AtlHistFactorySystEnvelope.h:17
 AtlHistFactorySystEnvelope.h:18
 AtlHistFactorySystEnvelope.h:19
 AtlHistFactorySystEnvelope.h:20
 AtlHistFactorySystEnvelope.h:21
 AtlHistFactorySystEnvelope.h:22
 AtlHistFactorySystEnvelope.h:23
 AtlHistFactorySystEnvelope.h:24
 AtlHistFactorySystEnvelope.h:25
 AtlHistFactorySystEnvelope.h:26
 AtlHistFactorySystEnvelope.h:27
 AtlHistFactorySystEnvelope.h:28
 AtlHistFactorySystEnvelope.h:29
 AtlHistFactorySystEnvelope.h:30
 AtlHistFactorySystEnvelope.h:31
 AtlHistFactorySystEnvelope.h:32
 AtlHistFactorySystEnvelope.h:33
 AtlHistFactorySystEnvelope.h:34
 AtlHistFactorySystEnvelope.h:35
 AtlHistFactorySystEnvelope.h:36
 AtlHistFactorySystEnvelope.h:37
 AtlHistFactorySystEnvelope.h:38
 AtlHistFactorySystEnvelope.h:39
 AtlHistFactorySystEnvelope.h:40
 AtlHistFactorySystEnvelope.h:41
 AtlHistFactorySystEnvelope.h:42
 AtlHistFactorySystEnvelope.h:43
 AtlHistFactorySystEnvelope.h:44
 AtlHistFactorySystEnvelope.h:45
 AtlHistFactorySystEnvelope.h:46
 AtlHistFactorySystEnvelope.h:47
 AtlHistFactorySystEnvelope.h:48
 AtlHistFactorySystEnvelope.h:49
 AtlHistFactorySystEnvelope.h:50
 AtlHistFactorySystEnvelope.h:51
 AtlHistFactorySystEnvelope.h:52
 AtlHistFactorySystEnvelope.h:53
 AtlHistFactorySystEnvelope.h:54
 AtlHistFactorySystEnvelope.h:55
 AtlHistFactorySystEnvelope.h:56
 AtlHistFactorySystEnvelope.h:57
 AtlHistFactorySystEnvelope.h:58
 AtlHistFactorySystEnvelope.h:59
 AtlHistFactorySystEnvelope.h:60
 AtlHistFactorySystEnvelope.h:61
 AtlHistFactorySystEnvelope.h:62
 AtlHistFactorySystEnvelope.h:63
 AtlHistFactorySystEnvelope.h:64