//____________________________________________________________________
//
// Basic selector for analysis of ATLAS data
//
// Inherit from this class in order to write your own specific
// analysis selector. See the description of the AtlExampleAnalysis
// class for an example
//
// Main schema:
// ============
// The idea is to have different user analyses by means of inheritance:
//
//
//                                  AtlSelector
//                                       |
//                                       |
//          +-------------------+--------------------+--------------+
//          |                   |                    |              |
//          V                   V                    V              V
//    UserAnalaysis_1      UserAnalysis_2      UserAnalysis_3      ...
//
//
// The selector is mainly used for filling histograms during event
// processing. In addition, it is possible to create and fill an
// output A++ tree (see SetOutputTree()). This option is being used
// for the conversion of D3PDs into A++ files, for instance. The
// output tree as well as the histograms are filled only in case the
// ProcessCut() member function returns kTRUE for the event in
// question. This function can be optionally given by the user (see
// the example above how to do this). The default is to accept every
// event.
//
// The general picture of the data-flow looks like the following:
//
//  +-------------+
//  |             |                                    +-----------------+
//  | A++         +----+                         +---->| User Histograms |
//  | .root files |    |                         |     +-----------------+
//  +-------------+    |      +-------------+    |
//                     +----->|             |    |     +-----------------+
//        OR                  | AtlSelector +----+---->| Ctrl Histograms |
//                     +----->|             |    |     +-----------------+
//  +-------------+    |      +-------------+    |
//  |             |    |                         |     +-----------------+
//  | DPD Ntuples +----+                         +---->|    A++ Tree     |
//  |             |                                    +-----------------+
//  +-------------+
//
//
// Information about the processing status (no. of precessed events
// etc) is continuously printed to std output for non-batch jobs
// testet by gROOT->IsBatch()
//
//
// Processing and event selection:
// ===============================
// Flow-chart of user-defined functions
//
//     +-------------------+
//     | SetBranchStatus() |
//     +--------+----------+
//              |
//              V
//     +-------------------+
//     | BookHistograms()  |
//     +--------+----------+
//              |               +------------------------------+
//              V               |                              |
//     +-------------------+    V   +------------------+ false |
//     |    Event Loop     +--------+ ObjSelectionTool +------>|
//     +--------+----------+        +---+--------------+       |
//              |                       V                      |
//              |                   +------------------+ false |
//              |                   | ProcessPreCut()  +------>|
//              |                   +---+--------------+       |
//              |                       |                      |
//              |                   +-----------------+  false |
//              |                   |   ProcessCut()  +------->|
//              |                   +---+-------------+        |
//              |                       |                      |
//              |                 true? |    +-----------------++
//              |                       +----+ FillHistograms() |
//              |                            +------------------+
//              V
//     +-------------------+
//     |    Terminate()    |
//     +-------------------+
//
//
// Analysis tools:
// ===============
// There exist a couple of tools (decay finders, ctrl plots,
// b-tagging, trigger etc.) which can be plugged into the analysis at
// different positions. See the class AtlAnalysisTool for details.
//
// ObjSelection Tool:
// ==================
// The AtlObjSelectionTool selects the analysis objects (leptons, jets, b-jets)
// and performs cuts. The cuts have to be set with the use of public datamembers.
//
// Lepton cuts available:
// Pt-cut: fElectron_Pt_min, fMuon_Pt_min
// 
// Jet-Cut:
// Pt-cut:    fJetPt_min
// Eta-Range: fJetEta_min < |eta_jet| < fJetEta_max
//
// The number of jets in this list defines the Jet Multiplicity
// and the selector will remove any event that does not match the jet multiplicity
// provided via fJetMults.
//
// Selection cuts:
// ===============
// Selection cuts are supposed to be stored in public data members of
// the derived classes (eg see Atl_tChannelAnalysis). The default
// values of these cuts are to be given in the virtual member function
// SetCutDefaults(). It is common to enclose an analysis selector
// inside an analysis task. The base class for this is the class
// AtlAppAnalysisTask which in turn is inherited to the various
// analyses. The actual cut values for an analysis should be given
// there via AtlAppAnalysis::SetCut().
//
// Entry lists:
// ============
// Events that passed the ProcessCut() can be stored in a TEntryList. Later on,
// this list can be used to select only these events in a tree or chain.
// The chain has to be the same as when creating the list.
// To enable writing the entry list, use sel->SetWriteEntryList(kTRUE) or 
// set it in the task class.
// This list will be created in the output root file with the tree name
// "app_entrylist".
// To apply the list on a chain, you first have to load the list from
// the root file.
// TFile *f = new TFile("outputfile.root","read");
// TEntryList *elist = new TEntryList;
// elist = (TEntryList*)f->Get("app_entrylist");
// Then you can apply it on your chain:
// ch->SetEntryList(elist);
// Running your analysis now will only include the events stored in 
// the list.
//
//    Author: Oliver Maria Kind <mailto:kind@mail.desy.de>
//    Update: $Id: AtlSelector.cxx,v 1.156 2017/07/13 14:22:05 kind Exp $
//    Copyright: 2008 (C) Oliver Maria Kind
//
#ifndef ATLAS_AtlSelector
#include <AtlSelector.h>
#endif
#include <TString.h>
#include <TObjectTable.h>
#include <iostream>
#include <TROOT.h>
#include <TSystem.h>
#include <TEntryList.h>
#include <TKey.h>
#include <AtlEvtReaderApp.h>
#include "AtlEvtReaderBase.h"
#include <AtlEvtReaderD3PDSgTop.h>
#include <AtlEvtWriterApp.h>
#include <AtlEvtWriterMem.h>
#include <AtlEvtWriterD3PDSgTop.h>
#include <AtlObjectsToolD3PDSgTop.h>
#include <AtlEvtReaderD3PDCKM.h>
#include <TChainElement.h>

using namespace std;

static const char* fgLepChannelNames[AtlSelector::fgNumLepChannels+1] = {
    "enu", "munu", "lnu"
};

static const char* fgJetMultNames[AtlSelector::fgNumJetMults] = {
    "1", "2", "3", "4", "5", "6", "4to6", "1+", "2+", "3+", "all"
};

#ifndef __CINT__
ClassImp(AtlSelector);
#endif

//____________________________________________________________________

AtlSelector::AtlSelector(const char* OutputFilename) :
    TSelector(),
    fEvtReaderUser(0) {
    //
    // Default constructor
    //
    fEvent = 0;
    fTree = 0;
    fCurrentTree = 0;
    fBookkeepingList = new TObjArray;
    fNBookkeeping = 0;
    fOutputFile = 0;
    fOutputFilename  = new TString(OutputFilename);
    fOutputTreeName  = new TString("");
    fOutputTreeTitle = new TString("");
    fOutputTree = 0;
    fOutputTriggerConfTree = 0;
    fProcessedEvents    = 0;
    fProcessedEventsW   = 0.;
    fAcceptedEvents     = 0;
    fAcceptedEventsW    = 0.;
    fAcceptedEventsB    = 0.;
    fPreAcceptedEvents  = 0;
    fPreAcceptedEventsW = 0.;
    fJetBinEvents       = 0;
    fJetBinEventsW      = 0.;
    fPreTaggedEvents    = 0;
    fPreTaggedEventsW   = 0.;
    fEntry = 0;
    fListOfTools = new TList;
    fWriteEntryList = kFALSE;
    fEntryList = 0;
    fPrintEvent = kFALSE;
    fPrintObjectTable = kFALSE;
    fPassedSelection = kFALSE;
    fCountUnfilteredEvents = kTRUE;
    fInputMode = kD3PDSgTop_v2;
    fOutputMode = kApp;
    fEvtReader = 0;
    fEvtWriter = 0;
    fDoTruthTree = kFALSE;
    
    fHistCutflow_NoWeights                 = 0;
    fHistCutflow_genWeights                = 0;
    fHistCutflow_genXpileupWeights         = 0;
    fHistCutflow_genXpileupXzvertexWeights = 0;
    fHistCutflow_allEventsHFOR_NoWeights   = 0;
    fHistCutflow_allEventsHFOR_genWeights  = 0;
}

//____________________________________________________________________

AtlSelector::~AtlSelector() {
    //
    // Default destructor
    //
    delete fOutputFile;
    delete fOutputFilename;
    delete fOutputTreeName;
    delete fOutputTreeTitle;
    if ( fOutputTree != 0 ) delete fOutputTree;
    if ( fOutputTriggerConfTree != 0 ) delete fOutputTriggerConfTree;
    //if ( fCtrlPlots != 0 ) delete fCtrlPlots;
    //if ( fZ0Finder  != 0 ) delete fZ0Finder;
    fListOfTools->Delete(); delete fListOfTools;
    if ( fEvtReaderUser != 0 && fEvtReader != fEvtReaderUser ) delete fEvtReaderUser;
    if ( fEvtReader != 0 ) delete fEvtReader;
    if ( fEvtWriter != 0 ) delete fEvtWriter;
    delete fBookkeepingList;
}

//____________________________________________________________________

void AtlSelector::SetOutputTree(const char* name, const char* title) {
    //
    // Set output tree/ntuple
    // 
    // If the name of the output tree is set it is automatically being
    // filled with all events passing the ProcessCut() method.
    //
    // The trigger configuration dbase of the used runs is also copied
    // from the input files.
    // 
    // If the size of the output tree exceeds the maximum tree size
    // (see TTree::SetMaxTreeSize()) of (currently) 2Gb, Root splits
    // the output file automatically. Iin contrast to Root's internal
    // mechanism, which writes all histograms to the last of the
    // splitted files only, the AtlSelector class splits also the
    // histograms and writes them to their corresponding output files
    // (see ChangeOutputFile()). The same holds for the trigger
    // configuration dbase.
    //
    fOutputTreeName->Remove(0, fOutputTreeName->Length());
    fOutputTreeName->Append(name);
    fOutputTreeTitle->Remove(0, fOutputTreeTitle->Length());
    fOutputTreeTitle->Append(title);
}

//____________________________________________________________________

void AtlSelector::SetBranches() {
    //
    // Set branch assignments of the input tree. Here an A++ input
    // tree is assumed. For other trees this (virtual) method has to
    // be overloaded. See also the GetEntry() method
    //
    fEvtReader->SetEvent(fEvent);
    fEvtReader->SetBranches(fTree);
}

//____________________________________________________________________

Int_t AtlSelector::GetEntry(Long64_t entry) {
    //
    // Get entry from current input tree. This (virtual) method can be
    // overloaded if needed (different type of input tree)
    //
    fEntry = entry;
    fEvtReader->GetEntry(fCurrentTree, entry);
    return 0;
}

//____________________________________________________________________

void AtlSelector::Init(TTree *tree) {
    //
    // The Init() function is called when the selector needs to initialize
    // a new tree or chain. Typically here the branch addresses and branch
    // pointers of the tree will be set.
    // It is normally not necessary to make changes to the generated
    // code, but the routine can be extended by the user if needed.
    // Init() will be called many times when running on PROOF
    // (once per file to be processed).
    //
    fTree = tree;
    
    // Allow for event-wise deletion of ref objects in case of input chain
    if ( fIsChain ) ((TChain*)fTree)->CanDeleteRefs(kTRUE);
}

//____________________________________________________________________

Bool_t AtlSelector::Notify() {
    //
    // The Notify() function is called when a new file is opened. This
    // can be either for a new TTree in a TChain or when a new TTree
    // is started when using PROOF.
    //
    // Load the configurations (trigger etc.) from the
    // newly opened file. In case of writing an event list make sure a
    // new one is appended for the current tree.
    //
    // At the end of this function, the Notify() functions of the
    // current event reader and all active tools are called.
    //
    fCurrentTree = ( fIsChain ) ? fTree->GetTree() : fTree;
	
    // Note that Notify() usually is run once before the event loop by
    // TTreePlayer::Process(). In this case we do not need the
    // following code to be executed.
    if ( fCurrentTree == 0 ) {
	Info("Notify", "No tree currently loaded. Return.");
	return kTRUE;
    }
    Info("Notify", "Opened new input file %s", 
	 fCurrentTree->GetCurrentFile()->GetName());

    // Any events inside the tree ?
    if ( fCurrentTree->GetEntries() == 0 ) {
	Warning("Notify",
		"The event tree in the current input file contains 0 events.");
    } else {
	// ==============
	// Trigger config
	// ==============
	if ( fInputMode == kApp ) {
	    // Load trigger configuration (A++ input only)
	    Info("Notify", "Load trigger configuration dbase from current input file ...");
	    AtlTriggerConf *trig_conf = LoadTriggerConfig();
	    if ( HasOutputTree() && fOutputMode == kApp ) {
		// In case of writing an A++ output tree merge the new trigger config
		// with the dbases from the input files before.
		TTree *trig_tree = trig_conf->GetConfigTree();
		if ( fOutputTriggerConfTree == 0 ) {
		    // For the first input file simply copy the trigger conf tree
		    fOutputFile->cd();
		    fOutputTriggerConfTree = trig_tree->CloneTree(-1, "fast"); // raw byte copy
		} else {
		    TList *treelist = new TList;
		    treelist->Add(trig_tree);
		    fOutputTriggerConfTree->Merge(treelist);
		    delete treelist;
		}
	    }
	}
    }

    // Do bookkeeping of cut-flow and job info histograms
    DoBookkeeping(fCurrentTree->GetCurrentFile());
    
    // Call Notify() of the current event redaer
    fEvtReader->Notify();

    // Call Notify() of all enabled tools
    AtlAnalysisTool *tool = 0;
    TIter next_tool(fListOfTools);    
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	if ( !tool->IsOff() ) tool->Notify();
    }
    
    return kTRUE;
}

//____________________________________________________________________

void AtlSelector::DoBookkeeping(TFile *InputFile) {
    //
    // Perform bookkeeping of the cut-flow and job info histograms.
    // This is done for every input file.
    //

    //
    // Check if the bookkeeping has already been done for this input
    // file
    //
    
    // Find corresponding chain element for given file
    TObjArray* files = ((TChain*)fTree)->GetListOfFiles();
    TIter next_el(files);
    TChainElement *el = 0;
    while ( (el = (TChainElement*)next_el()) ) {
	if ( strcmp(el->GetTitle(), InputFile->GetName()) == 0 )
	    break;
    }
    
    // No chain element found ?
    if ( el == 0 ) {
	Error("DoBookkeeping",
	      "Could not find chain element for current input file %s.",
	      InputFile->GetName());
	Error("DoBookkeeping", "Abort !");
	gSystem->Abort(1);
    }
    
    // Bookkeeping already done for the given file ?
    if ( fBookkeepingList->FindObject(el) ) {
	Info("DoBookkeeping", "Perform bookkeeping for input file %s",
	     el->GetTitle());
	fBookkeepingList->Remove(el);
	fNBookkeeping--;
    } else {
	Info("DoBookkeeping",
	     "Bookkeeping for input file %s already done",
	     el->GetTitle());
	Info("DoBookkeeping", "Skip.");
	return;
    }

    // For A++-Ntuples:
    // Check if the new input file contains a JobInfo histogram. If
    // so, take the no. of all unfiltered events from there and
    // add it to the JobInfo histogram of the output file
    TH1F *h = 0;
    
    // For SgTopD3PDs:
    // Copy the TRC cutflow histograms. Abort if no histogram is found.
    // For this input mode, the A++-job-info histograms are ignored, even if
    // existing.
    
    // Cutflow histograms from SgTopD3PD
    TH1D *h_cf1 = 0;
    TH1D *h_cf2 = 0;
    TH1D *h_cf3 = 0;
    TH1D *h_cf4 = 0;
    TH1D *h_cf5 = 0;
    TH1D *h_cf6 = 0;
    
    if ( fInputMode == kApp ) {
	h = (TH1F*)InputFile->Get("/job_info/h_nevts");
	if ( h != 0 ) {
	    Info("DoBookkeeping", "JobInfo histogram in input file found. Disable counting of unfiltered events");
	    fCountUnfilteredEvents = kFALSE;
	    fHistEvents->AddBinContent(1, h->GetBinContent(1));
	    fHistEvents->AddBinContent(2, h->GetBinContent(2));
	    fHistEvents->AddBinContent(3, h->GetBinContent(3));
	} else {
	    Info("DoBookkeeping", "No JobInfo histogram in input file found. Enable counting of unfiltered events.");
	}
    } else if ( fInputMode == kD3PDSgTop ||
		fInputMode == kD3PDCKM ||
		fInputMode == kD3PDSgTop_v2 ) {
	
	// Copy all SgTopD3PD histograms
	if ( fInputMode == kD3PDSgTop_v2 ) {
	    // Cutflow histograms from SgTopD3PD
	    
	    h_cf1 = (TH1D*) InputFile->Get(Form("%s_fullCutFlow_noWeights", fTree->GetName()));
	    h_cf2 = (TH1D*) InputFile->Get(Form("%s_fullCutFlow_genWeights", fTree->GetName()));
	    h_cf3 = (TH1D*) InputFile->Get(Form("%s_fullCutFlow_genXpileupWeights", fTree->GetName()));
	    h_cf4 = (TH1D*) InputFile->Get(Form("%s_fullCutFlow_genXpileupXzvertexWeights", fTree->GetName()));
	    h_cf5 = (TH1D*) InputFile->Get(Form("%s_allEventsHFOR_noWeights", fTree->GetName()));
	    h_cf6 = (TH1D*) InputFile->Get(Form("%s_allEventsHFOR_genWeights", fTree->GetName()));

	    if ( h_cf1 == 0 ) {
		// For v14, cutflows are named:
		// 'physics_systematic_fullCutFlow_something'
		// --> the systematic is unknown when using MemTk ntuples
		//     do assignment to h_cf1, etc. with list of keys
		//
		// Do this only if the histogram can not be found with the above method.
		TList *keys = InputFile->GetListOfKeys();
		for ( Int_t i = 0; i < keys->GetEntries(); i++ ) {
		    TString keyname = ((TKey*) keys->At(i))->GetName();
		    if ( keyname.Contains("fullCutFlow_noWeights") ) {
			h_cf1 = (TH1D*)InputFile->Get(keyname.Data());
		    } else if ( keyname.Contains("fullCutFlow_genWeights") ) {
			h_cf2 = (TH1D*)InputFile->Get(keyname.Data());
		    } else if ( keyname.Contains("fullCutFlow_genXpileupWeights") ) {
			h_cf3 = (TH1D*)InputFile->Get(keyname.Data());
		    } else if ( keyname.Contains("fullCutFlow_genXpileupXzvertexWeights") ) {
			h_cf4 = (TH1D*)InputFile->Get(keyname.Data());
		    } else if ( keyname.Contains("allEventsHFOR_noWeights") ) {
			h_cf5 = (TH1D*)InputFile->Get(keyname.Data());
		    } else if ( keyname.Contains("allEventsHFOR_genWeights") ) {
			h_cf6 = (TH1D*)InputFile->Get(keyname.Data());
		    }
		}
	    }
	} else {
	    h_cf1 = (TH1D*) InputFile->Get("fullCutFlow_noWeights");
	    h_cf2 = (TH1D*) InputFile->Get("fullCutFlow_genWeights");
	    h_cf3 = (TH1D*) InputFile->Get("fullCutFlow_genXpileupWeights");
	    h_cf4 = (TH1D*) InputFile->Get("fullCutFlow_genXpileupXzvertexWeights");
	    h_cf5 = (TH1D*) InputFile->Get("allEventsHFOR_noWeights");
	    h_cf6 = (TH1D*) InputFile->Get("allEventsHFOR_genWeights");
	}

	// Abort here if no bookkeeping histogram is found.
	// The histograms are needed for e.g. plotting otherwise
	// the original number of events is unkown.
	if ( h_cf1 == 0 ) {
	    Error("DoBookkeeping", "No Bookkeeping histogram found! Abort!");
	    gSystem->Abort();
	}
	
	if ( fHistCutflow_NoWeights == 0 ) {
	    
	    fHistCutflow_NoWeights = (TH1D*) h_cf1->Clone();
	    fHistCutflow_NoWeights->SetDirectory(fOutputFile);

	    if ( h_cf2 != 0 ) { // MC
		fHistCutflow_genWeights                = (TH1D*) h_cf2->Clone();
		fHistCutflow_genXpileupWeights         = (TH1D*) h_cf3->Clone();
		fHistCutflow_genXpileupXzvertexWeights = (TH1D*) h_cf4->Clone();
		fHistCutflow_allEventsHFOR_NoWeights   = (TH1D*) h_cf5->Clone();
		fHistCutflow_allEventsHFOR_genWeights  = (TH1D*) h_cf6->Clone();

		fHistCutflow_genWeights->SetDirectory(fOutputFile);
		fHistCutflow_genXpileupWeights->SetDirectory(fOutputFile);
		fHistCutflow_genXpileupXzvertexWeights
		    ->SetDirectory(fOutputFile);
		fHistCutflow_allEventsHFOR_NoWeights->SetDirectory(fOutputFile);
		fHistCutflow_allEventsHFOR_genWeights
		    ->SetDirectory(fOutputFile);
	    }
	} else {
	    fHistCutflow_NoWeights->Add(h_cf1);
	    if ( h_cf2 != 0 ) { // MC
		fHistCutflow_genWeights->Add(h_cf2);
		fHistCutflow_genXpileupWeights->Add(h_cf3);
		fHistCutflow_genXpileupXzvertexWeights->Add(h_cf4);
		fHistCutflow_allEventsHFOR_NoWeights->Add(h_cf5);
		fHistCutflow_allEventsHFOR_genWeights->Add(h_cf6);
	    }
	}

	Info("DoBookkeeping",
	     "TRC D3PD bookkeeping histogram in input file found. Disable counting of unfiltered events.");
	fCountUnfilteredEvents = kFALSE;
	fHistEvents->AddBinContent(1, h_cf1->GetBinContent(1));
	if ( ( h_cf2 != 0 ) && ( h_cf4 != 0 ) ) { // MC
	    fHistEvents->AddBinContent(2, h_cf2->GetBinContent(1)); 
	    fHistEvents->AddBinContent(3, h_cf4->GetBinContent(1));
	} else { // DATA
	    fHistEvents->AddBinContent(2, h_cf1->GetBinContent(1)); 
	    fHistEvents->AddBinContent(3, h_cf1->GetBinContent(1));
	}
    }
    else if ( fInputMode == kCustom ) {
        AtlEvtReaderBase::InitialSumOfWeights_t const & sumOfWeights = fEvtReader->GetInitialSumOfWeights(InputFile);
        fCountUnfilteredEvents = kFALSE;
        fHistEvents->AddBinContent(1, sumOfWeights.one);
        fHistEvents->AddBinContent(2, sumOfWeights.mcevt);
        fHistEvents->AddBinContent(3, sumOfWeights.mcevt_pileup_zvtx);
    } else {
	Error("Notify", "Unknown input mode given. Abort!");
	gSystem->Abort(1);
    }
}

//____________________________________________________________________

void AtlSelector::Begin(TTree *tree) {
    //
    // The Begin() function is called at the start of the query.
    // When running with PROOF Begin() is only called on the client.
    // The tree argument is deprecated (on PROOF 0 is passed).
    //
    TString option = GetOption(); 

    // Start stop watch
    fStopwatch.Start();
    
    // Start here
    Info("Begin",
	 "==================== Start analysis job here ====================");

    // Write out Panda information in case of Panda jobs
    if ( gSystem->Getenv("PandaID") ) {
	Info("Begin", "Panda job Id: %s", gSystem->Getenv("PandaID"));
    }

    // Input is chain or tree ?
    // In case of a chain, check if there are any input files
    fTree = tree;
    if( fTree->InheritsFrom("TChain") ) {
	fIsChain = kTRUE;
	Int_t nfiles = ((TChain*)fTree)->GetListOfFiles()->GetEntries();
	if (  nfiles < 1 ) {
	    Error("Begin", "No input files given. Abort!");
	    gSystem->Abort(1);
	} else if ( nfiles == 1 ) {
	    Info("Begin", "This job contains %d input file.", nfiles);
	} else {
	    Info("Begin", "This job contains %d input files.", nfiles);
	}
    } else {
	fIsChain = kFALSE;
    }
    
    // Name of input chain
    Info("Begin", "Input chain name = \"%s\"", fTree->GetName());
    
    // Create event reader (if needed)
    if ( fEvtReader == 0 ) {
        if ( (!fEvtReaderUser) != (fInputMode != kCustom) ) {
            Fatal(__FUNCTION__, "fEvtReaderUser is (not) undefined while fInputMode is (not) set to kCustom");
        }
	switch ( fInputMode ) {
	    case kApp:
		fEvtReader = new AtlEvtReaderApp(this);
		Info("Begin", "Input file type = kApp");
		break;
	    case kD3PDSgTop:
	    case kD3PDSgTop_v2:
		fEvtReader = new AtlEvtReaderD3PDSgTop(this);
		Info("Begin", "Input file type = kD3PDSgTop");
		break;
	    case kD3PDCKM:
		fEvtReader = new AtlEvtReaderD3PDCKM(this);
		Info("Begin", "Input file type = kD3PDCKM");
		break;
            case kCustom:
                fEvtReader = fEvtReaderUser;
                Info("Begin", "Input file type = %s", fEvtReader->Class()->GetName());
                break;
	    default:
		Error("Begin", "Bad input file type - abort!");
		gSystem->Abort(1);
	}
    }

    // Create event writer (if any)
    if ( HasOutputTree() ) {
	Info("Begin", "Write output tree \"%s\"",
	     fOutputTreeName->Data());

	// Check if the event writer object was already given. If not
	// create one. The latter is still included for
	// backward-compability reasons
	if ( fEvtWriter == 0 ) {
	    switch ( fOutputMode ) {
		case kApp:
		    fEvtWriter = new AtlEvtWriterApp();
		    Info("Begin", "Output tree type: kAPP");
		    break;
		case kMemNtuple:
		    fEvtWriter = new AtlEvtWriterMem();
		    Info("Begin", "Output tree type: kMemNtuple");
		    break;
		case kD3PDSgTop:
		case kD3PDSgTop_v2:
		    fEvtWriter = new AtlEvtWriterD3PDSgTop();
		    Info("Begin", "Output tree type: kD3PDSgTop");
		    break;
		case kD3PDCKM:
		    fEvtWriter = new AtlEvtWriterD3PDSgTop();
		    Info("Begin", "Output tree type: kD3PDSgTop");
		    break;			    
		default:
		    Error("Begin", "Bad output tree type - abort!");
		    gSystem->Abort(1);
	    }
	} else {
	    Info("Begin", "Output tree type: %s",
		 fEvtWriter->GetNameOfType());
	}
    } else {
	Info("Begin", "Output tree: none");
    }
    
    // Open output file with maximum compression level
    Info("Begin", "Open output file \"%s\"", fOutputFilename->Data());
    fOutputFile = new TFile(fOutputFilename->Data(), "recreate");
    fOutputFile->SetCompressionLevel(9);
    
    // Create entry list (if wished)
    if ( fWriteEntryList ) {
	fEntryList = new TEntryList("app_entrylist", "A++ event list");
	fEntryList->SetDirectory(fOutputFile);
    }
}

//____________________________________________________________________

void AtlSelector::SlaveBegin(TTree *tree) {
    //
    // The SlaveBegin() function is called after the Begin() function.
    // When running with PROOF SlaveBegin() is called on each slave server.
    // The tree argument is deprecated (on PROOF 0 is passed).
    //
    // Function called before starting the event loop
    //  -it performs some cleanup
    //  -it creates histograms
    //  -it sets some initialisation for the event list
    //
    fProcInfo = new ProcInfo_t;
    fMemInfo  = new MemInfo_t;
    
    // ============
    // Create event
    // ============
    fEvent = new AtlEvent;

    // =======================================
    // Map branch addresses to branch pointers
    // =======================================
    Info("SlaveBegin", "Set branch addresses.");
    SetBranches();
    
    // ============================
    // Print analysis configuration
    // ============================
    
    // Print user analysis configuration
    Info("SlaveBegin", "User analysis configuration:\n");
    Print();

    // Init tools and print configuration of all analysis tools
    TIter next_tool(fListOfTools);
    AtlAnalysisTool *tool = 0;
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	tool->Init();
	cout << endl;
	Info("SlaveBegin",
	     "Registered analysis tool \"%s\" of type %s with the following configuration:\n",
	     tool->GetName(), tool->ClassName());
	tool->Print();
	// Remove switched off tools from list
	if ( tool->fProcessMode == AtlAnalysisTool::kOff ) {
	    fListOfTools->Remove(tool);
	    delete tool;
	}
    }
    
    // ======================
    // Switch off/on branches
    // ======================

    // Call user-defined function first
    if ( fInputMode == kApp ) SetBranchStatus();

    // Set tree and event pointers.
    // Set branch status for all analysis tools
    next_tool.Reset();
    while ( (tool=(AtlAnalysisTool*)next_tool()) ) {
	tool->SetTree(fTree);
	tool->SetOutputFile(fOutputFile);
	tool->SetEvent(fEvent);
	if ( fInputMode == kApp ) tool->SetBranchStatus();
    }
	
    // Make sure the event weight branch is loaded any time
    if ( fInputMode == kApp )
	fTree->SetBranchStatus("fEventHeader.fEventWeight", kTRUE);
    
    // ===============
    // Book histograms
    // ===============
    Info("SlaveBegin", "Book histograms ...");

    // Set Sumw2 for all histograms
    TH1::SetDefaultSumw2(kTRUE);
	
    // Book job info histograms
    BookJobInfoHistograms();
    Info("SlaveBegin", "Booked JobInfo histograms.");
    
    // Book user-defined histograms
    fOutputFile->cd();
    BookHistograms();
    Info("SlaveBegin", "Booked user-defined histograms.");

    // Book histograms of all analysis tools
    next_tool.Reset();
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) { 
	fOutputFile->cd();
	if(strcmp(tool->GetOutputDir(),"/") != 0) {
	  if( !fOutputFile->cd( tool->GetOutputDir() ) ) {
		fOutputFile->mkdir(tool->GetOutputDir(), "Tool directory");
		gDirectory->cd( tool->GetOutputDir() );
	  }
	}
	// Check if tool folder already exists
	if ( gDirectory->FindObject(tool->GetName()) != 0 ) {
	    Info("SlaveBegin", "Folder for tool \"%s\" already exists. Will re-use folder.",
		 tool->GetName());
	} else {
	    gDirectory->mkdir(tool->GetName(), tool->GetTitle());
	}
	gDirectory->cd(tool->GetName());
	tool->BookHistograms();
    }
    fOutputFile->cd();
    Info("SlaveBegin", "Booked histograms of all analysis tools.");

    // Print configuration of all booked histogram tools
    next_tool.Reset();
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	if ( tool->InheritsFrom("AtlHistogramTool") ) {
	    tool->Print();
	}
    }
	
    // =======================================
    // Create input file list for bookkeeping
    // =======================================
    TChainElement *el = 0;
    TIter next_el(((TChain*)fTree)->GetListOfFiles());
    while ( (el = (TChainElement*)next_el()) ) {
	fBookkeepingList->Add(el);
	fNBookkeeping++;
    }
    Info("SlaveBegin", "Registered %d input files for bookkeeping.",
	 fNBookkeeping);

    // ==========================================
    // Create A++ output tree (if name was given)
    // ==========================================
    if ( HasOutputTree() ) {
	fOutputFile->cd();
	fOutputTree = fEvtWriter->CreateTree(fOutputTreeName->Data(),
					     fOutputTreeTitle->Data(),
					     fTree);
	fEvtWriter->BookTree(fOutputTree, fEvent);
    }
}

//____________________________________________________________________

Bool_t AtlSelector::Process(Long64_t entry) {
    //
    // The Process() function is called for each entry in the tree (or possibly
    // keyed object in the case of PROOF) to be processed. The entry argument
    // specifies which entry in the currently loaded tree is to be processed.
    // It can be passed to either AtlSelector::GetEntry() or
    // TBranch::GetEntry() to read either all or the required parts of
    // the data. When processing keyed objects with PROOF, the object
    // is already loaded and is available via the fObject pointer.
    //
    // This function should contain the "body" of the analysis. It can contain
    // simple or elaborate selection criteria, run algorithms on the data
    // of the event and typically fill histograms.
    //
    // The processing can be stopped by calling Abort().
    //
    // Use fStatus to set the return value of TTree::Process().
    //
    // The return value is currently not used.
    //
    fPassedSelection = kFALSE;
    // Save current Object count
    Int_t ObjectNumber = TProcessID::GetObjectCount();
    
    // ===================
    // Step 1: Clear event
    // ===================
    fEvent->Clear();

    // Clear tools
    AtlAnalysisTool *tool = 0;
    TIter next_tool(fListOfTools);    
    next_tool.Reset();
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	tool->Clear();
    }

    // Clear analysis selector
    AtlSelector::Clear(); // Clear objects defined here
    Clear(); // Clear user-defined objects
    
    // ========================
    // Step 2: Fetch next event
    // ========================
    GetEntry(entry);
    
    // Set tree for output entry list
    if ( fWriteEntryList ) fEntryList->SetTree(fTree);
    
    // Process info
    ProcessInfo();

    // =========================
    // Step 3: Apply systematics
    // =========================

    // Perform systematics tools
    next_tool.Reset();
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	if ( tool->IsSystematics() )
	    tool->Process();
    }

    // =================================
    // Step 4: Print event & Bookkeeping
    // =================================
    
    // This is for tracking memory leaks
    // Make sure your .rootrc file is properly set
    if ( fPrintObjectTable == kTRUE ) {
	gObjectTable->Print();
    }
    
    // Print the full content of every event w/o trigger. Note that
    // when you try to print the trigger content with switched-off
    // trigger branches, the job crashes. The reason is still unknown.
    if ( fPrintEvent == kTRUE ) {
	fEvent->Print("all-notrig");
    }

    // Count no. of processed events
    fHistEvents->Fill(3.5, 1.);
    fHistEvents->Fill(4.5, fEvent->GetMCWeight());
    fHistEvents->Fill(5.5, fEvent->GetPreTagEvtWeight());
    fHistEvtWeights->Fill(fEvent->GetPreTagEvtWeight());
    fProcessedEvents++;
    fProcessedEventsW += fEvent->GetPreTagEvtWeight();  

    // In case the input A++ file does not contain a JobInfo Histogram
    // count the no. of all unfiltered events as well
    if ( fCountUnfilteredEvents == kTRUE ) {
	fHistEvents->Fill(0.5, 1.);
	fHistEvents->Fill(1.5, fEvent->GetMCWeight());
	fHistEvents->Fill(2.5, fEvent->GetPreTagEvtWeight());
    }
    

    // =============================================
    // Step 5: Define Objects for Analysis and Tools
    // =============================================
    
    // Perform object selection tool
    //  - if any of the object selection fails (e.g. jet-bin cut)
    //    the event is removed (Step 6)
    Bool_t PassedObjSelection = kTRUE;
    next_tool.Reset();
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	if ( tool->IsObjectsDefinition() )
	    PassedObjSelection = PassedObjSelection & tool->Process();
    }
    
    // =========================
    // Step 6: Obj Selection cut
    // =========================
    if ( PassedObjSelection ) {
	// Process only events contained in jet bin
	fJetBinEvents++;
	fJetBinEventsW += fEvent->GetPreTagEvtWeight();
    
	// =====================
	// Step 7: Scale Factors
	// =====================

	// Calculate pretag and tag event weights
	next_tool.Reset();
	while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	    if ( tool->IsScaleFactor() )
		tool->Process();
	}
	
	// ====================
	// Step 8: Pre-Analysis
	// ====================
	
	// Perform pre-analysis tools
	next_tool.Reset();
	while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	    if ( tool->IsPreAnalysis() )
		tool->Process();
	}
	
	// Fill tool histograms without event selection (optional)
	next_tool.Reset();
	while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	    tool->FillHistogramsNoEvtSel();
	}
	
	// Perform user-defined pre-analysis. Only events passing this
	// selection will be completely analyzed
	if ( ProcessPreCut() == kTRUE ) {
	    // Count no. of pre-accepted events
	    fHistEvents->Fill(6.5, 1.);
	    fHistEvents->Fill(7.5, fEvent->GetMCWeight());
	    fHistEvents->Fill(8.5, fEvent->GetPreTagEvtWeight());
	    fPreAcceptedEvents++;
	    fPreAcceptedEventsW += fEvent->GetPreTagEvtWeight();
	    	    
	    // =====================
	    // Step 9: Main Analysis
	    // =====================
	    InitEvent();
	    
	    // Perform main analysis for each analysis tool
	    next_tool.Reset();
	    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
		if ( tool->IsMainAnalysis() )
		    tool->Process();
	    }
	    
	    // ======================
	    // Step 10: Post-analysis
	    // ======================
	    
	    // Fill histograms of selector and tools
	    if ( ProcessCut() == kTRUE ) {
		// Fill user histograms and output A++ tree. Note that all
		// histograms must be filled before, because otherwise
		// they won't be stored properly in case of changing
		// output files, see ChangeOutputFile().
		ProcessFill();
		// Count no. of accepted events
		fHistEvents->Fill(9.5, 1.);
		fHistEvents->Fill(10.5, fEvent->GetMCWeight());
		fHistEvents->Fill(11.5, fEvent->GetPreTagEvtWeight());
		fAcceptedEvents++;
		fAcceptedEventsW += fEvent->GetPreTagEvtWeight();
		fAcceptedEventsB += fEvent->GetTagEvtWeight();		
	    }
	    
	    // Perform post-analysis for each analysis tool
	    next_tool.Reset();
	    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
		if ( tool->IsPostAnalysis() )
		    tool->Process();
	    }
	}
    }
    
    // Restore Object count
    // To save space in the table keeping track of all referenced objects
    // we assume that our events do not address each other. We reset the
    // object count to what it was at the beginning of the event.
    TProcessID::SetObjectCount(ObjectNumber);
    
    return kTRUE;
}

//____________________________________________________________________

void AtlSelector::SlaveTerminate() {
    //
    // The SlaveTerminate() function is called after all entries or objects
    // have been processed. When running with PROOF SlaveTerminate() is called
    // on each slave server.
    //
    Info("SlaveTerminate", "Terminating slave process");
    delete fEvent;

    // Close last input file
    if( fCurrentTree != 0 ) fCurrentTree->GetCurrentFile()->Close();

    // Call terminate functions for all tools
    AtlAnalysisTool *tool = 0;
    TIter next_tool(fListOfTools);
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	tool->Terminate();
    }

    // Perform bookkeeping on the remaining input files (if any)
    Info("SlaveTerminate", "Finish bookkeeping ...   %d input files left",
	fNBookkeeping);
    TIter next_el(fBookkeepingList);
    TChainElement *el = 0;
    while ( (el = (TChainElement*)next_el()) ) {
	TFile *infile = TFile::Open(el->GetTitle(),"read");
	DoBookkeeping(infile);
	delete infile;
    }
    if ( fNBookkeeping > 0 ) {
	Warning("SlaveTerminate", "Bookkeeping left for %d input files.",
		fNBookkeeping);
    } else {
	Info("SlaveTerminate", "Bookkeeping done for all input files.");
    }
	
    // Clean-up
    delete fProcInfo;
    delete fMemInfo;
}

//____________________________________________________________________

void AtlSelector::Terminate() {
    //
    // The Terminate() function is the last function to be called during
    // a query. It always runs on the client, it can be used to present
    // the results graphically or save the results to file.
    Info("Terminate", "Terminating analysis job ...");

    // Terminate event writer
    if ( fEvtWriter != 0 ) fEvtWriter->Terminate();
    
    // Write output file
    cout << endl;
    Info("Terminate", "Write output file \"%s\".",
	 fOutputFilename->Data());
    fOutputFile->cd();
    fOutputFile->Write();

    // Stop timer
    fStopwatch.Stop();
    
    // Print summary
    PrintSummary();
}

//____________________________________________________________________

void AtlSelector::ProcessFill() {
    //
    // Event fill routine (histograms etc)
    //

    // Fill user-defined histograms
    FillHistograms();

    // Fill tool histograms
    AtlAnalysisTool *tool = 0;
    TIter next_tool(fListOfTools);
    while ( (tool = (AtlAnalysisTool*)next_tool()) ) {
	tool->FillHistograms();
    }

    // Maximum output filesize reached ?
    if ( fOutputFile != 0 &&
	 fOutputFile->GetEND() > fOutputTree->GetMaxTreeSize() )
	ChangeOutputFile();
    
    // Fill output tree/ntuple (optional)
    if ( fOutputTree != 0 ) fEvtWriter->WriteEvent();
    
    // Fill entry list (optional)
    if ( fWriteEntryList ) {
      fEntryList->Enter(fEntry);
    }

}

//____________________________________________________________________

void AtlSelector::SetCutDefaults() {
    //
    // Set Default Values for public member variables.
    // When implementing this virtual method in a derived
    // Selector class, make sure to call this base method 
    // as well.
    // SetCutDefaults should be called in the ctor of the
    // derived class.
    // 
    // void DerivedSelector::SetCutDefaults(){
    //   AtlSelector::SetCutDefaults(); // calls base portion
    //   fFoo = bar; // set default value of fFoo to bar
    //   ...
    // }
}


//____________________________________________________________________

void AtlSelector::ProcessInfo() {
    //
    // Print information about the current process.  For interactive
    // (ie non-batch) jobs continuous output is given while for batch
    // jobs only a few out is given to avoid too much junk in the log
    // file
    //
    if ( gROOT->IsBatch() ) {
	Int_t mod = 0;
	if ( fProcessedEvents < 10 ) {
	    mod = 1;
	} else if ( fProcessedEvents < 1000 ) {
	    mod = 100;
	} else if ( fProcessedEvents < 10000 ) {
	    mod = 1000;
	} else {
	    mod = 10000;
	}
	if ( (fProcessedEvents+1) % mod == 0 )  {
	    printf("<AtlSelector::Process>: Processing chain \"%s\"  Run %-d  Evt %-llu",
		   fTree->GetName(), fEvent->RunNr(), fEvent->EventNr());
	    printf("    #Chain entry %-d/%-d\n",
		   (Int_t)fTree->GetReadEntry(),
		   (Int_t)fTree->GetEntriesFast());
	    gSystem->GetProcInfo(fProcInfo);
	    gSystem->GetMemInfo(fMemInfo);
	    printf("<AtlSelector::Process>: Memory usage proc_res=%d proc_virt=%d total=%d Mb\n",
		   Int_t(fProcInfo->fMemResident/1024),
		   Int_t(fProcInfo->fMemVirtual/1024),
		   fMemInfo->fMemTotal);
	    cout.flush();
	}
    } else {
	printf("\r<AtlSelector::Process>: Processing chain \"%s\"  Run %-d  Evt %-llu",
	       fTree->GetName(), fEvent->RunNr(), fEvent->EventNr());
	printf("    #Chain entry %-d/%-d",
	       (Int_t)fTree->GetReadEntry(),
	       (Int_t)fTree->GetEntriesFast());
	cout.flush();
    }
}

//____________________________________________________________________

void AtlSelector::PrintSummary() {
    //
    // Print summary at end of job
    //
    cout << endl << endl;
    cout << "================================================================"
	 << endl
	 << "                        Job Summary"  << endl
	 << "================================================================"
	 << endl
	 << "No. of processed events,       unweighted : "
	 << fProcessedEvents << endl
	 << "No. of processed events,         weighted : "
	 << fProcessedEventsW << endl
	 << "No. of events in jet bin,      unweighted : "
	 << fJetBinEvents << endl
	 << "No. of events in jet bin,        weighted : "
	 << fJetBinEventsW << endl
	 << "No. of pre-accepted events,    unweighted : "
	 << fPreAcceptedEvents << endl
	 << "No. of pre-accepted events,      weighted : "
	 << fPreAcceptedEventsW << endl
	 << "No. of pre-tagged events,      unweighted : "
	 << fPreTaggedEvents << endl
	 << "No. of pre-tagged events,        weighted : "
	 << fPreTaggedEventsW << endl
	 << "No. of accepted events,        unweighted : "
	 << fAcceptedEvents << endl
	 << "No. of accepted events (pretag), weighted : "
	 << fAcceptedEventsW << endl
	 << "No. of accepted events (tag),    weighted : "
	 << fAcceptedEventsB << endl
	 << "Time consumption                          : ";
    fStopwatch.Print();
    cout << "Job status                                : successful" << endl
	 << endl
	 << "For more information have a look at the histograms inside the"
	 << endl
	 << "JobInfo folder of the output .root file" << endl
	 << "================================================================"
	 << endl << endl;
}

//____________________________________________________________________

void AtlSelector::AddTool(AtlAnalysisTool *tool) {
    //
    // Add analysis tool to list of tools
    //
    fListOfTools->Add(tool);
    tool->SetParent(this);
    tool->SetEvent(fEvent);
    tool->SetTree(fTree);
}

//____________________________________________________________________

AtlAnalysisTool* AtlSelector::GetTool(const char* ClassName,
				      const char* ToolName, Bool_t force) { 
    //
    // Retrieves Tool from fListOfTools
    // If parameter force is true, the method will abort if no tool with
    // the description is found
    // otherwise it won't bother and simply return 0
    //
    AtlAnalysisTool *itertool = 0;
    AtlAnalysisTool *tool = 0;
    Int_t toolcount = 0;

    TIter next_tool(fListOfTools);
    next_tool.Reset();

    // searching tool
    while ( (itertool = (AtlAnalysisTool*)next_tool()) ) {
	if( ((TString)itertool->ClassName()).Contains(ClassName) && 
	    ( strcmp(ToolName, "") ==  0
	      || strcmp(itertool->GetName(), ToolName) == 0) ) {
	    tool = itertool;
	    toolcount++;
	}
    }

    // Checking if everything is alright
    if ( toolcount == 1 ){
	return tool;
    } else if ( toolcount == 0 ) {
	if ( force == kTRUE ) {
	    Error("GetTool",
		  "Requested tool %s of class %s not found!",
		  ToolName, ClassName);
	    gSystem->Abort(0);
	    return 0;
	} else {
	    return 0;
	}
    } else {
	Error("GetTool",
	      "Request with toolname %s of class %s returned %d instances! Please be more specific.",
	      ToolName, ClassName, toolcount);
	gSystem->Abort(0);
	return 0;
    }
}

//____________________________________________________________________

AtlTriggerConf* AtlSelector::LoadTriggerConfig() {
    //
    // Load trigger configuration
    //
    fCurrentTree->GetCurrentFile()->cd();
    
    // Trigger config
    AtlTriggerConf *trig_conf = AtlTriggerConf::Instance()
	->LoadTree(gDirectory);
    if ( trig_conf == 0 ) {
	Error("LoadTriggerConfig", "No trigger configuration dbase found! Do not try to access any trigger information.");
    }
    AtlTrigger::SetConfig(trig_conf);
    return trig_conf;
}

//____________________________________________________________________

void AtlSelector::BookJobInfoHistograms() {
    //
    // Book histograms containing information about the analysis job
    // like the no. of processed events, the event weights etc.
    //
    // The binning for the nevt histogram is as follows:
    // Bin  1 : All unfiltered events (unweighted)
    // Bin  2 : All unfiltered events (MC weight only)
    // Bin  3 : All unfiltered events (all weights)
    // Bin  4 : Processed events (unweighted)
    // Bin  5 : Processed events (MC weight only)
    // Bin  6 : Processed events (all weights)
    // Bin  7 : Pre-accepted events by ProcessPreCut() (unweighted)
    // Bin  8 : Pre-accepted events by ProcessPreCut() (MC weights only)
    // Bin  9 : Pre-accepted events by ProcessPreCut() (all weights)
    // Bin 10 : Accepted events by ProcessCut() (unweighted)
    // Bin 11 : Accepted events by ProcessCut() (MC weight only)
    // Bin 12 : Accepted events by ProcessCut() (all weights)
    //
    TDirectory *savdir = gDirectory;
    fOutputFile->cd();
    gDirectory->mkdir("job_info", "Analysis Job Information");
    gDirectory->cd("job_info");

    // No. of events
    fHistEvents = new TH1F("h_nevts", "No. of Events", 12, 0, 12);
    fHistEvents->GetXaxis()->SetBinLabel(1,  "All unfiltered Evts (unweighted)");
    fHistEvents->GetXaxis()->SetBinLabel(2,  "All unfiltered Evts (MC weights)");
    fHistEvents->GetXaxis()->SetBinLabel(3,  "All unfiltered Evts (all weights)");
    fHistEvents->GetXaxis()->SetBinLabel(4,  "Processed Evts (unweighted)");
    fHistEvents->GetXaxis()->SetBinLabel(5,  "Processed Evts (MC weights)");
    fHistEvents->GetXaxis()->SetBinLabel(6,  "Processed Evts (all weights)");
    fHistEvents->GetXaxis()->SetBinLabel(7,  "Pre-accepted Evts (unweighted)");
    fHistEvents->GetXaxis()->SetBinLabel(8,  "Pre-accepted Evts (MC weights)");
    fHistEvents->GetXaxis()->SetBinLabel(9,  "Pre-accepted Evts (all weights)");
    fHistEvents->GetXaxis()->SetBinLabel(10, "Accepted Evts (unweighted)");
    fHistEvents->GetXaxis()->SetBinLabel(11, "Accepted Evts (MC weights)");
    fHistEvents->GetXaxis()->SetBinLabel(12, "Accepted Evts (all weights)");
    fHistEvents->SetYTitle("Number of Events");
    fHistEvents->SetStats(kFALSE);
    
    // Event weights
    fHistEvtWeights = new TH1F("h_evtweight", "Event Weights (all processed events)",
			       22, -1.1, 1.1);
    fHistEvtWeights->SetXTitle("Weight");
    fHistEvtWeights->SetYTitle("Number of Entries");
    fHistEvtWeights->SetStats(kFALSE);
    
    savdir->cd();
}

//___________________________________________________________________

void AtlSelector::ChangeOutputFile() {
    //
    // This method is used to prevent Root from wrinting all
    // histograms only to the last file in case of splited output
    // files (see TTree::ChangeFile()). Instead the histograms are
    // splitted as well and written to their corresponding output
    // file.
    //

    // Write all histograms to the old file and reset them
    TObject *h = 0;
    while ( (h = fOutputFile->GetList()->First()) ) {
	if ( h->InheritsFrom("TH1") ) {
	    h->Write();
	    ((TH1*)h)->Reset();
	}
    }
}

//___________________________________________________________________

const char* AtlSelector::GetJetMultLabel(EJetMult jetmult) {
    //
    // Get Jet Multiplicity label
    //
    for ( Int_t i = 0; i < AtlSelector::fgNumJetMults; i++ ) {
	if ( jetmult & 0x1 << i ) return AtlSelector::GetJetMultLabel(i);
    }
    return "";
}

//___________________________________________________________________

const char* AtlSelector::GetJetMultLabel(Int_t i) {
    //
    // Returns Jet Multiplicity label ('1', '2', ...)
    //
    
    if ( i >= fgNumJetMults ) {
	cout << "Jet Multiplicity unknown! Abort!" << endl;
	gSystem->Abort(0);
    }
    return fgJetMultNames[i];
}

//___________________________________________________________________

const char* AtlSelector::GetLeptonLabel(ELepChannel lep) {
    //
    // Get Lepton Label
    // 
    // Works only for single-leptons
    //
    if ( lep & kElectron ) { return fgLepChannelNames[0]; };
    if ( lep & kMuon ) { return fgLepChannelNames[1]; };
	if ( lep & kLepton ) { return fgLepChannelNames[2]; };
    
    return "";
}

//___________________________________________________________________

const char* AtlSelector::GetLeptonLabel(Int_t i) {
    //
    // Returns Lepton Channel Label
    //
    if ( i >= fgNumLepChannels + 1 ) {
		cout << "Lepton Channel unknown! Abort!" << endl;
		gSystem->Abort(0);
    }
    return fgLepChannelNames[i];
}

//___________________________________________________________________

void AtlSelector::Clear(Option_t *otpion) {
    //
    // Clear AtlSelector
    //
    // User has to call this function in derived selector
    //
}

//___________________________________________________________________

const char* AtlSelector::GetJetMultEnum(UInt_t jetmult) {
    //
    // Get Jet Multiplicity Enum ('kOneJet', 'kTwoJet', ...)
    //
    switch ( jetmult ) {
	case AtlSelector::kOneJet:
	    return "AtlSelector::kOneJet";
	case AtlSelector::kTwoJet:
	    return "AtlSelector::kTwoJet";
	case AtlSelector::kThreeJet:
	    return "AtlSelector::kThreeJet";
	case AtlSelector::kFourJet:
	    return "AtlSelector::kFourJet";
	case AtlSelector::kFiveJet:
	    return "AtlSelector::kFiveJet";
	case AtlSelector::kSixJet:
	    return "AtlSelector::kSixJet";
	case AtlSelector::k4To6Jets:
	    return "AtlSelector::k4To6Jets";
	case AtlSelector::kOneOrMoreJets:
		return "AtlSelector::kOneOrMoreJets";
	case AtlSelector::kTwoOrMoreJets:
		return "AtlSelector::kTwoOrMoreJets";
	case AtlSelector::kThreeOrMoreJets:
	    return "AtlSelector::kThreeOrMoreJets";
	case AtlSelector::kAllJets:
		return "AtlSelector::kAllJets";
	default:
		cout << "<AtlSelector::GetJetMultEnum>: Jet Multiplicity not known! Abort!" << endl;
		gSystem->Abort(0);
	}
	return "";
}

//___________________________________________________________________

const char* AtlSelector::GetLeptonEnum(UInt_t lep) {
	//
	// Get Lepton Channel Enum ('kElectron', 'kMuon', ...)
	//
	switch ( lep ) {
		case AtlSelector::kElectron:
			return "AtlSelector::kElectron";
		case AtlSelector::kMuon:
			return "AtlSelector::kMuon";
		case AtlSelector::kLepton:
			return "AtlSelector::kLepton";
		default:
			cout << "<AtlSelector::GetLepChannelEnum>: Lepton not known! Abort!" << endl;
			gSystem->Abort(0);
	}
	return "";
}

//____________________________________________________________________

void AtlSelector::Print(Option_t *option) const {
    //
    // Print configuration of base selector.
    // (this function is supposed to be used from inside the user
    // analysis Print()
    //
    fEvtReader->Print();
    cout << endl << "  fDoTruthTree   = ";
    if ( fDoTruthTree ) {
	cout << "true";
    } else {
	cout << "false";
    }
    cout << endl;
}

//____________________________________________________________________

void AtlSelector::SetEvtReader(AtlEvtReaderBase * reader) {
	//
	// Explcitly sets the event reader.
	// Ownership of the reader is transferred to AtlSelector!
	//
	if ( fEvtReader ) {
		Fatal(__FUNCTION__, "... called too late!");
	}
	fInputMode = kCustom;
	fEvtReaderUser = reader;
}

//____________________________________________________________________

void AtlSelector::SetInputMode(EIOMode inputMode) {
	//
	// Sets the input mode.
	// Deprecated, please use SetEvtReader() if possible.
	//
	if ( fEvtReader ) {
		Fatal(__FUNCTION__, "... called too late!");
	}
	if ( fEvtReaderUser ) {
		delete fEvtReaderUser;
		fEvtReaderUser = 0;
	}
	fInputMode = inputMode;
}
 AtlSelector.cxx:1
 AtlSelector.cxx:2
 AtlSelector.cxx:3
 AtlSelector.cxx:4
 AtlSelector.cxx:5
 AtlSelector.cxx:6
 AtlSelector.cxx:7
 AtlSelector.cxx:8
 AtlSelector.cxx:9
 AtlSelector.cxx:10
 AtlSelector.cxx:11
 AtlSelector.cxx:12
 AtlSelector.cxx:13
 AtlSelector.cxx:14
 AtlSelector.cxx:15
 AtlSelector.cxx:16
 AtlSelector.cxx:17
 AtlSelector.cxx:18
 AtlSelector.cxx:19
 AtlSelector.cxx:20
 AtlSelector.cxx:21
 AtlSelector.cxx:22
 AtlSelector.cxx:23
 AtlSelector.cxx:24
 AtlSelector.cxx:25
 AtlSelector.cxx:26
 AtlSelector.cxx:27
 AtlSelector.cxx:28
 AtlSelector.cxx:29
 AtlSelector.cxx:30
 AtlSelector.cxx:31
 AtlSelector.cxx:32
 AtlSelector.cxx:33
 AtlSelector.cxx:34
 AtlSelector.cxx:35
 AtlSelector.cxx:36
 AtlSelector.cxx:37
 AtlSelector.cxx:38
 AtlSelector.cxx:39
 AtlSelector.cxx:40
 AtlSelector.cxx:41
 AtlSelector.cxx:42
 AtlSelector.cxx:43
 AtlSelector.cxx:44
 AtlSelector.cxx:45
 AtlSelector.cxx:46
 AtlSelector.cxx:47
 AtlSelector.cxx:48
 AtlSelector.cxx:49
 AtlSelector.cxx:50
 AtlSelector.cxx:51
 AtlSelector.cxx:52
 AtlSelector.cxx:53
 AtlSelector.cxx:54
 AtlSelector.cxx:55
 AtlSelector.cxx:56
 AtlSelector.cxx:57
 AtlSelector.cxx:58
 AtlSelector.cxx:59
 AtlSelector.cxx:60
 AtlSelector.cxx:61
 AtlSelector.cxx:62
 AtlSelector.cxx:63
 AtlSelector.cxx:64
 AtlSelector.cxx:65
 AtlSelector.cxx:66
 AtlSelector.cxx:67
 AtlSelector.cxx:68
 AtlSelector.cxx:69
 AtlSelector.cxx:70
 AtlSelector.cxx:71
 AtlSelector.cxx:72
 AtlSelector.cxx:73
 AtlSelector.cxx:74
 AtlSelector.cxx:75
 AtlSelector.cxx:76
 AtlSelector.cxx:77
 AtlSelector.cxx:78
 AtlSelector.cxx:79
 AtlSelector.cxx:80
 AtlSelector.cxx:81
 AtlSelector.cxx:82
 AtlSelector.cxx:83
 AtlSelector.cxx:84
 AtlSelector.cxx:85
 AtlSelector.cxx:86
 AtlSelector.cxx:87
 AtlSelector.cxx:88
 AtlSelector.cxx:89
 AtlSelector.cxx:90
 AtlSelector.cxx:91
 AtlSelector.cxx:92
 AtlSelector.cxx:93
 AtlSelector.cxx:94
 AtlSelector.cxx:95
 AtlSelector.cxx:96
 AtlSelector.cxx:97
 AtlSelector.cxx:98
 AtlSelector.cxx:99
 AtlSelector.cxx:100
 AtlSelector.cxx:101
 AtlSelector.cxx:102
 AtlSelector.cxx:103
 AtlSelector.cxx:104
 AtlSelector.cxx:105
 AtlSelector.cxx:106
 AtlSelector.cxx:107
 AtlSelector.cxx:108
 AtlSelector.cxx:109
 AtlSelector.cxx:110
 AtlSelector.cxx:111
 AtlSelector.cxx:112
 AtlSelector.cxx:113
 AtlSelector.cxx:114
 AtlSelector.cxx:115
 AtlSelector.cxx:116
 AtlSelector.cxx:117
 AtlSelector.cxx:118
 AtlSelector.cxx:119
 AtlSelector.cxx:120
 AtlSelector.cxx:121
 AtlSelector.cxx:122
 AtlSelector.cxx:123
 AtlSelector.cxx:124
 AtlSelector.cxx:125
 AtlSelector.cxx:126
 AtlSelector.cxx:127
 AtlSelector.cxx:128
 AtlSelector.cxx:129
 AtlSelector.cxx:130
 AtlSelector.cxx:131
 AtlSelector.cxx:132
 AtlSelector.cxx:133
 AtlSelector.cxx:134
 AtlSelector.cxx:135
 AtlSelector.cxx:136
 AtlSelector.cxx:137
 AtlSelector.cxx:138
 AtlSelector.cxx:139
 AtlSelector.cxx:140
 AtlSelector.cxx:141
 AtlSelector.cxx:142
 AtlSelector.cxx:143
 AtlSelector.cxx:144
 AtlSelector.cxx:145
 AtlSelector.cxx:146
 AtlSelector.cxx:147
 AtlSelector.cxx:148
 AtlSelector.cxx:149
 AtlSelector.cxx:150
 AtlSelector.cxx:151
 AtlSelector.cxx:152
 AtlSelector.cxx:153
 AtlSelector.cxx:154
 AtlSelector.cxx:155
 AtlSelector.cxx:156
 AtlSelector.cxx:157
 AtlSelector.cxx:158
 AtlSelector.cxx:159
 AtlSelector.cxx:160
 AtlSelector.cxx:161
 AtlSelector.cxx:162
 AtlSelector.cxx:163
 AtlSelector.cxx:164
 AtlSelector.cxx:165
 AtlSelector.cxx:166
 AtlSelector.cxx:167
 AtlSelector.cxx:168
 AtlSelector.cxx:169
 AtlSelector.cxx:170
 AtlSelector.cxx:171
 AtlSelector.cxx:172
 AtlSelector.cxx:173
 AtlSelector.cxx:174
 AtlSelector.cxx:175
 AtlSelector.cxx:176
 AtlSelector.cxx:177
 AtlSelector.cxx:178
 AtlSelector.cxx:179
 AtlSelector.cxx:180
 AtlSelector.cxx:181
 AtlSelector.cxx:182
 AtlSelector.cxx:183
 AtlSelector.cxx:184
 AtlSelector.cxx:185
 AtlSelector.cxx:186
 AtlSelector.cxx:187
 AtlSelector.cxx:188
 AtlSelector.cxx:189
 AtlSelector.cxx:190
 AtlSelector.cxx:191
 AtlSelector.cxx:192
 AtlSelector.cxx:193
 AtlSelector.cxx:194
 AtlSelector.cxx:195
 AtlSelector.cxx:196
 AtlSelector.cxx:197
 AtlSelector.cxx:198
 AtlSelector.cxx:199
 AtlSelector.cxx:200
 AtlSelector.cxx:201
 AtlSelector.cxx:202
 AtlSelector.cxx:203
 AtlSelector.cxx:204
 AtlSelector.cxx:205
 AtlSelector.cxx:206
 AtlSelector.cxx:207
 AtlSelector.cxx:208
 AtlSelector.cxx:209
 AtlSelector.cxx:210
 AtlSelector.cxx:211
 AtlSelector.cxx:212
 AtlSelector.cxx:213
 AtlSelector.cxx:214
 AtlSelector.cxx:215
 AtlSelector.cxx:216
 AtlSelector.cxx:217
 AtlSelector.cxx:218
 AtlSelector.cxx:219
 AtlSelector.cxx:220
 AtlSelector.cxx:221
 AtlSelector.cxx:222
 AtlSelector.cxx:223
 AtlSelector.cxx:224
 AtlSelector.cxx:225
 AtlSelector.cxx:226
 AtlSelector.cxx:227
 AtlSelector.cxx:228
 AtlSelector.cxx:229
 AtlSelector.cxx:230
 AtlSelector.cxx:231
 AtlSelector.cxx:232
 AtlSelector.cxx:233
 AtlSelector.cxx:234
 AtlSelector.cxx:235
 AtlSelector.cxx:236
 AtlSelector.cxx:237
 AtlSelector.cxx:238
 AtlSelector.cxx:239
 AtlSelector.cxx:240
 AtlSelector.cxx:241
 AtlSelector.cxx:242
 AtlSelector.cxx:243
 AtlSelector.cxx:244
 AtlSelector.cxx:245
 AtlSelector.cxx:246
 AtlSelector.cxx:247
 AtlSelector.cxx:248
 AtlSelector.cxx:249
 AtlSelector.cxx:250
 AtlSelector.cxx:251
 AtlSelector.cxx:252
 AtlSelector.cxx:253
 AtlSelector.cxx:254
 AtlSelector.cxx:255
 AtlSelector.cxx:256
 AtlSelector.cxx:257
 AtlSelector.cxx:258
 AtlSelector.cxx:259
 AtlSelector.cxx:260
 AtlSelector.cxx:261
 AtlSelector.cxx:262
 AtlSelector.cxx:263
 AtlSelector.cxx:264
 AtlSelector.cxx:265
 AtlSelector.cxx:266
 AtlSelector.cxx:267
 AtlSelector.cxx:268
 AtlSelector.cxx:269
 AtlSelector.cxx:270
 AtlSelector.cxx:271
 AtlSelector.cxx:272
 AtlSelector.cxx:273
 AtlSelector.cxx:274
 AtlSelector.cxx:275
 AtlSelector.cxx:276
 AtlSelector.cxx:277
 AtlSelector.cxx:278
 AtlSelector.cxx:279
 AtlSelector.cxx:280
 AtlSelector.cxx:281
 AtlSelector.cxx:282
 AtlSelector.cxx:283
 AtlSelector.cxx:284
 AtlSelector.cxx:285
 AtlSelector.cxx:286
 AtlSelector.cxx:287
 AtlSelector.cxx:288
 AtlSelector.cxx:289
 AtlSelector.cxx:290
 AtlSelector.cxx:291
 AtlSelector.cxx:292
 AtlSelector.cxx:293
 AtlSelector.cxx:294
 AtlSelector.cxx:295
 AtlSelector.cxx:296
 AtlSelector.cxx:297
 AtlSelector.cxx:298
 AtlSelector.cxx:299
 AtlSelector.cxx:300
 AtlSelector.cxx:301
 AtlSelector.cxx:302
 AtlSelector.cxx:303
 AtlSelector.cxx:304
 AtlSelector.cxx:305
 AtlSelector.cxx:306
 AtlSelector.cxx:307
 AtlSelector.cxx:308
 AtlSelector.cxx:309
 AtlSelector.cxx:310
 AtlSelector.cxx:311
 AtlSelector.cxx:312
 AtlSelector.cxx:313
 AtlSelector.cxx:314
 AtlSelector.cxx:315
 AtlSelector.cxx:316
 AtlSelector.cxx:317
 AtlSelector.cxx:318
 AtlSelector.cxx:319
 AtlSelector.cxx:320
 AtlSelector.cxx:321
 AtlSelector.cxx:322
 AtlSelector.cxx:323
 AtlSelector.cxx:324
 AtlSelector.cxx:325
 AtlSelector.cxx:326
 AtlSelector.cxx:327
 AtlSelector.cxx:328
 AtlSelector.cxx:329
 AtlSelector.cxx:330
 AtlSelector.cxx:331
 AtlSelector.cxx:332
 AtlSelector.cxx:333
 AtlSelector.cxx:334
 AtlSelector.cxx:335
 AtlSelector.cxx:336
 AtlSelector.cxx:337
 AtlSelector.cxx:338
 AtlSelector.cxx:339
 AtlSelector.cxx:340
 AtlSelector.cxx:341
 AtlSelector.cxx:342
 AtlSelector.cxx:343
 AtlSelector.cxx:344
 AtlSelector.cxx:345
 AtlSelector.cxx:346
 AtlSelector.cxx:347
 AtlSelector.cxx:348
 AtlSelector.cxx:349
 AtlSelector.cxx:350
 AtlSelector.cxx:351
 AtlSelector.cxx:352
 AtlSelector.cxx:353
 AtlSelector.cxx:354
 AtlSelector.cxx:355
 AtlSelector.cxx:356
 AtlSelector.cxx:357
 AtlSelector.cxx:358
 AtlSelector.cxx:359
 AtlSelector.cxx:360
 AtlSelector.cxx:361
 AtlSelector.cxx:362
 AtlSelector.cxx:363
 AtlSelector.cxx:364
 AtlSelector.cxx:365
 AtlSelector.cxx:366
 AtlSelector.cxx:367
 AtlSelector.cxx:368
 AtlSelector.cxx:369
 AtlSelector.cxx:370
 AtlSelector.cxx:371
 AtlSelector.cxx:372
 AtlSelector.cxx:373
 AtlSelector.cxx:374
 AtlSelector.cxx:375
 AtlSelector.cxx:376
 AtlSelector.cxx:377
 AtlSelector.cxx:378
 AtlSelector.cxx:379
 AtlSelector.cxx:380
 AtlSelector.cxx:381
 AtlSelector.cxx:382
 AtlSelector.cxx:383
 AtlSelector.cxx:384
 AtlSelector.cxx:385
 AtlSelector.cxx:386
 AtlSelector.cxx:387
 AtlSelector.cxx:388
 AtlSelector.cxx:389
 AtlSelector.cxx:390
 AtlSelector.cxx:391
 AtlSelector.cxx:392
 AtlSelector.cxx:393
 AtlSelector.cxx:394
 AtlSelector.cxx:395
 AtlSelector.cxx:396
 AtlSelector.cxx:397
 AtlSelector.cxx:398
 AtlSelector.cxx:399
 AtlSelector.cxx:400
 AtlSelector.cxx:401
 AtlSelector.cxx:402
 AtlSelector.cxx:403
 AtlSelector.cxx:404
 AtlSelector.cxx:405
 AtlSelector.cxx:406
 AtlSelector.cxx:407
 AtlSelector.cxx:408
 AtlSelector.cxx:409
 AtlSelector.cxx:410
 AtlSelector.cxx:411
 AtlSelector.cxx:412
 AtlSelector.cxx:413
 AtlSelector.cxx:414
 AtlSelector.cxx:415
 AtlSelector.cxx:416
 AtlSelector.cxx:417
 AtlSelector.cxx:418
 AtlSelector.cxx:419
 AtlSelector.cxx:420
 AtlSelector.cxx:421
 AtlSelector.cxx:422
 AtlSelector.cxx:423
 AtlSelector.cxx:424
 AtlSelector.cxx:425
 AtlSelector.cxx:426
 AtlSelector.cxx:427
 AtlSelector.cxx:428
 AtlSelector.cxx:429
 AtlSelector.cxx:430
 AtlSelector.cxx:431
 AtlSelector.cxx:432
 AtlSelector.cxx:433
 AtlSelector.cxx:434
 AtlSelector.cxx:435
 AtlSelector.cxx:436
 AtlSelector.cxx:437
 AtlSelector.cxx:438
 AtlSelector.cxx:439
 AtlSelector.cxx:440
 AtlSelector.cxx:441
 AtlSelector.cxx:442
 AtlSelector.cxx:443
 AtlSelector.cxx:444
 AtlSelector.cxx:445
 AtlSelector.cxx:446
 AtlSelector.cxx:447
 AtlSelector.cxx:448
 AtlSelector.cxx:449
 AtlSelector.cxx:450
 AtlSelector.cxx:451
 AtlSelector.cxx:452
 AtlSelector.cxx:453
 AtlSelector.cxx:454
 AtlSelector.cxx:455
 AtlSelector.cxx:456
 AtlSelector.cxx:457
 AtlSelector.cxx:458
 AtlSelector.cxx:459
 AtlSelector.cxx:460
 AtlSelector.cxx:461
 AtlSelector.cxx:462
 AtlSelector.cxx:463
 AtlSelector.cxx:464
 AtlSelector.cxx:465
 AtlSelector.cxx:466
 AtlSelector.cxx:467
 AtlSelector.cxx:468
 AtlSelector.cxx:469
 AtlSelector.cxx:470
 AtlSelector.cxx:471
 AtlSelector.cxx:472
 AtlSelector.cxx:473
 AtlSelector.cxx:474
 AtlSelector.cxx:475
 AtlSelector.cxx:476
 AtlSelector.cxx:477
 AtlSelector.cxx:478
 AtlSelector.cxx:479
 AtlSelector.cxx:480
 AtlSelector.cxx:481
 AtlSelector.cxx:482
 AtlSelector.cxx:483
 AtlSelector.cxx:484
 AtlSelector.cxx:485
 AtlSelector.cxx:486
 AtlSelector.cxx:487
 AtlSelector.cxx:488
 AtlSelector.cxx:489
 AtlSelector.cxx:490
 AtlSelector.cxx:491
 AtlSelector.cxx:492
 AtlSelector.cxx:493
 AtlSelector.cxx:494
 AtlSelector.cxx:495
 AtlSelector.cxx:496
 AtlSelector.cxx:497
 AtlSelector.cxx:498
 AtlSelector.cxx:499
 AtlSelector.cxx:500
 AtlSelector.cxx:501
 AtlSelector.cxx:502
 AtlSelector.cxx:503
 AtlSelector.cxx:504
 AtlSelector.cxx:505
 AtlSelector.cxx:506
 AtlSelector.cxx:507
 AtlSelector.cxx:508
 AtlSelector.cxx:509
 AtlSelector.cxx:510
 AtlSelector.cxx:511
 AtlSelector.cxx:512
 AtlSelector.cxx:513
 AtlSelector.cxx:514
 AtlSelector.cxx:515
 AtlSelector.cxx:516
 AtlSelector.cxx:517
 AtlSelector.cxx:518
 AtlSelector.cxx:519
 AtlSelector.cxx:520
 AtlSelector.cxx:521
 AtlSelector.cxx:522
 AtlSelector.cxx:523
 AtlSelector.cxx:524
 AtlSelector.cxx:525
 AtlSelector.cxx:526
 AtlSelector.cxx:527
 AtlSelector.cxx:528
 AtlSelector.cxx:529
 AtlSelector.cxx:530
 AtlSelector.cxx:531
 AtlSelector.cxx:532
 AtlSelector.cxx:533
 AtlSelector.cxx:534
 AtlSelector.cxx:535
 AtlSelector.cxx:536
 AtlSelector.cxx:537
 AtlSelector.cxx:538
 AtlSelector.cxx:539
 AtlSelector.cxx:540
 AtlSelector.cxx:541
 AtlSelector.cxx:542
 AtlSelector.cxx:543
 AtlSelector.cxx:544
 AtlSelector.cxx:545
 AtlSelector.cxx:546
 AtlSelector.cxx:547
 AtlSelector.cxx:548
 AtlSelector.cxx:549
 AtlSelector.cxx:550
 AtlSelector.cxx:551
 AtlSelector.cxx:552
 AtlSelector.cxx:553
 AtlSelector.cxx:554
 AtlSelector.cxx:555
 AtlSelector.cxx:556
 AtlSelector.cxx:557
 AtlSelector.cxx:558
 AtlSelector.cxx:559
 AtlSelector.cxx:560
 AtlSelector.cxx:561
 AtlSelector.cxx:562
 AtlSelector.cxx:563
 AtlSelector.cxx:564
 AtlSelector.cxx:565
 AtlSelector.cxx:566
 AtlSelector.cxx:567
 AtlSelector.cxx:568
 AtlSelector.cxx:569
 AtlSelector.cxx:570
 AtlSelector.cxx:571
 AtlSelector.cxx:572
 AtlSelector.cxx:573
 AtlSelector.cxx:574
 AtlSelector.cxx:575
 AtlSelector.cxx:576
 AtlSelector.cxx:577
 AtlSelector.cxx:578
 AtlSelector.cxx:579
 AtlSelector.cxx:580
 AtlSelector.cxx:581
 AtlSelector.cxx:582
 AtlSelector.cxx:583
 AtlSelector.cxx:584
 AtlSelector.cxx:585
 AtlSelector.cxx:586
 AtlSelector.cxx:587
 AtlSelector.cxx:588
 AtlSelector.cxx:589
 AtlSelector.cxx:590
 AtlSelector.cxx:591
 AtlSelector.cxx:592
 AtlSelector.cxx:593
 AtlSelector.cxx:594
 AtlSelector.cxx:595
 AtlSelector.cxx:596
 AtlSelector.cxx:597
 AtlSelector.cxx:598
 AtlSelector.cxx:599
 AtlSelector.cxx:600
 AtlSelector.cxx:601
 AtlSelector.cxx:602
 AtlSelector.cxx:603
 AtlSelector.cxx:604
 AtlSelector.cxx:605
 AtlSelector.cxx:606
 AtlSelector.cxx:607
 AtlSelector.cxx:608
 AtlSelector.cxx:609
 AtlSelector.cxx:610
 AtlSelector.cxx:611
 AtlSelector.cxx:612
 AtlSelector.cxx:613
 AtlSelector.cxx:614
 AtlSelector.cxx:615
 AtlSelector.cxx:616
 AtlSelector.cxx:617
 AtlSelector.cxx:618
 AtlSelector.cxx:619
 AtlSelector.cxx:620
 AtlSelector.cxx:621
 AtlSelector.cxx:622
 AtlSelector.cxx:623
 AtlSelector.cxx:624
 AtlSelector.cxx:625
 AtlSelector.cxx:626
 AtlSelector.cxx:627
 AtlSelector.cxx:628
 AtlSelector.cxx:629
 AtlSelector.cxx:630
 AtlSelector.cxx:631
 AtlSelector.cxx:632
 AtlSelector.cxx:633
 AtlSelector.cxx:634
 AtlSelector.cxx:635
 AtlSelector.cxx:636
 AtlSelector.cxx:637
 AtlSelector.cxx:638
 AtlSelector.cxx:639
 AtlSelector.cxx:640
 AtlSelector.cxx:641
 AtlSelector.cxx:642
 AtlSelector.cxx:643
 AtlSelector.cxx:644
 AtlSelector.cxx:645
 AtlSelector.cxx:646
 AtlSelector.cxx:647
 AtlSelector.cxx:648
 AtlSelector.cxx:649
 AtlSelector.cxx:650
 AtlSelector.cxx:651
 AtlSelector.cxx:652
 AtlSelector.cxx:653
 AtlSelector.cxx:654
 AtlSelector.cxx:655
 AtlSelector.cxx:656
 AtlSelector.cxx:657
 AtlSelector.cxx:658
 AtlSelector.cxx:659
 AtlSelector.cxx:660
 AtlSelector.cxx:661
 AtlSelector.cxx:662
 AtlSelector.cxx:663
 AtlSelector.cxx:664
 AtlSelector.cxx:665
 AtlSelector.cxx:666
 AtlSelector.cxx:667
 AtlSelector.cxx:668
 AtlSelector.cxx:669
 AtlSelector.cxx:670
 AtlSelector.cxx:671
 AtlSelector.cxx:672
 AtlSelector.cxx:673
 AtlSelector.cxx:674
 AtlSelector.cxx:675
 AtlSelector.cxx:676
 AtlSelector.cxx:677
 AtlSelector.cxx:678
 AtlSelector.cxx:679
 AtlSelector.cxx:680
 AtlSelector.cxx:681
 AtlSelector.cxx:682
 AtlSelector.cxx:683
 AtlSelector.cxx:684
 AtlSelector.cxx:685
 AtlSelector.cxx:686
 AtlSelector.cxx:687
 AtlSelector.cxx:688
 AtlSelector.cxx:689
 AtlSelector.cxx:690
 AtlSelector.cxx:691
 AtlSelector.cxx:692
 AtlSelector.cxx:693
 AtlSelector.cxx:694
 AtlSelector.cxx:695
 AtlSelector.cxx:696
 AtlSelector.cxx:697
 AtlSelector.cxx:698
 AtlSelector.cxx:699
 AtlSelector.cxx:700
 AtlSelector.cxx:701
 AtlSelector.cxx:702
 AtlSelector.cxx:703
 AtlSelector.cxx:704
 AtlSelector.cxx:705
 AtlSelector.cxx:706
 AtlSelector.cxx:707
 AtlSelector.cxx:708
 AtlSelector.cxx:709
 AtlSelector.cxx:710
 AtlSelector.cxx:711
 AtlSelector.cxx:712
 AtlSelector.cxx:713
 AtlSelector.cxx:714
 AtlSelector.cxx:715
 AtlSelector.cxx:716
 AtlSelector.cxx:717
 AtlSelector.cxx:718
 AtlSelector.cxx:719
 AtlSelector.cxx:720
 AtlSelector.cxx:721
 AtlSelector.cxx:722
 AtlSelector.cxx:723
 AtlSelector.cxx:724
 AtlSelector.cxx:725
 AtlSelector.cxx:726
 AtlSelector.cxx:727
 AtlSelector.cxx:728
 AtlSelector.cxx:729
 AtlSelector.cxx:730
 AtlSelector.cxx:731
 AtlSelector.cxx:732
 AtlSelector.cxx:733
 AtlSelector.cxx:734
 AtlSelector.cxx:735
 AtlSelector.cxx:736
 AtlSelector.cxx:737
 AtlSelector.cxx:738
 AtlSelector.cxx:739
 AtlSelector.cxx:740
 AtlSelector.cxx:741
 AtlSelector.cxx:742
 AtlSelector.cxx:743
 AtlSelector.cxx:744
 AtlSelector.cxx:745
 AtlSelector.cxx:746
 AtlSelector.cxx:747
 AtlSelector.cxx:748
 AtlSelector.cxx:749
 AtlSelector.cxx:750
 AtlSelector.cxx:751
 AtlSelector.cxx:752
 AtlSelector.cxx:753
 AtlSelector.cxx:754
 AtlSelector.cxx:755
 AtlSelector.cxx:756
 AtlSelector.cxx:757
 AtlSelector.cxx:758
 AtlSelector.cxx:759
 AtlSelector.cxx:760
 AtlSelector.cxx:761
 AtlSelector.cxx:762
 AtlSelector.cxx:763
 AtlSelector.cxx:764
 AtlSelector.cxx:765
 AtlSelector.cxx:766
 AtlSelector.cxx:767
 AtlSelector.cxx:768
 AtlSelector.cxx:769
 AtlSelector.cxx:770
 AtlSelector.cxx:771
 AtlSelector.cxx:772
 AtlSelector.cxx:773
 AtlSelector.cxx:774
 AtlSelector.cxx:775
 AtlSelector.cxx:776
 AtlSelector.cxx:777
 AtlSelector.cxx:778
 AtlSelector.cxx:779
 AtlSelector.cxx:780
 AtlSelector.cxx:781
 AtlSelector.cxx:782
 AtlSelector.cxx:783
 AtlSelector.cxx:784
 AtlSelector.cxx:785
 AtlSelector.cxx:786
 AtlSelector.cxx:787
 AtlSelector.cxx:788
 AtlSelector.cxx:789
 AtlSelector.cxx:790
 AtlSelector.cxx:791
 AtlSelector.cxx:792
 AtlSelector.cxx:793
 AtlSelector.cxx:794
 AtlSelector.cxx:795
 AtlSelector.cxx:796
 AtlSelector.cxx:797
 AtlSelector.cxx:798
 AtlSelector.cxx:799
 AtlSelector.cxx:800
 AtlSelector.cxx:801
 AtlSelector.cxx:802
 AtlSelector.cxx:803
 AtlSelector.cxx:804
 AtlSelector.cxx:805
 AtlSelector.cxx:806
 AtlSelector.cxx:807
 AtlSelector.cxx:808
 AtlSelector.cxx:809
 AtlSelector.cxx:810
 AtlSelector.cxx:811
 AtlSelector.cxx:812
 AtlSelector.cxx:813
 AtlSelector.cxx:814
 AtlSelector.cxx:815
 AtlSelector.cxx:816
 AtlSelector.cxx:817
 AtlSelector.cxx:818
 AtlSelector.cxx:819
 AtlSelector.cxx:820
 AtlSelector.cxx:821
 AtlSelector.cxx:822
 AtlSelector.cxx:823
 AtlSelector.cxx:824
 AtlSelector.cxx:825
 AtlSelector.cxx:826
 AtlSelector.cxx:827
 AtlSelector.cxx:828
 AtlSelector.cxx:829
 AtlSelector.cxx:830
 AtlSelector.cxx:831
 AtlSelector.cxx:832
 AtlSelector.cxx:833
 AtlSelector.cxx:834
 AtlSelector.cxx:835
 AtlSelector.cxx:836
 AtlSelector.cxx:837
 AtlSelector.cxx:838
 AtlSelector.cxx:839
 AtlSelector.cxx:840
 AtlSelector.cxx:841
 AtlSelector.cxx:842
 AtlSelector.cxx:843
 AtlSelector.cxx:844
 AtlSelector.cxx:845
 AtlSelector.cxx:846
 AtlSelector.cxx:847
 AtlSelector.cxx:848
 AtlSelector.cxx:849
 AtlSelector.cxx:850
 AtlSelector.cxx:851
 AtlSelector.cxx:852
 AtlSelector.cxx:853
 AtlSelector.cxx:854
 AtlSelector.cxx:855
 AtlSelector.cxx:856
 AtlSelector.cxx:857
 AtlSelector.cxx:858
 AtlSelector.cxx:859
 AtlSelector.cxx:860
 AtlSelector.cxx:861
 AtlSelector.cxx:862
 AtlSelector.cxx:863
 AtlSelector.cxx:864
 AtlSelector.cxx:865
 AtlSelector.cxx:866
 AtlSelector.cxx:867
 AtlSelector.cxx:868
 AtlSelector.cxx:869
 AtlSelector.cxx:870
 AtlSelector.cxx:871
 AtlSelector.cxx:872
 AtlSelector.cxx:873
 AtlSelector.cxx:874
 AtlSelector.cxx:875
 AtlSelector.cxx:876
 AtlSelector.cxx:877
 AtlSelector.cxx:878
 AtlSelector.cxx:879
 AtlSelector.cxx:880
 AtlSelector.cxx:881
 AtlSelector.cxx:882
 AtlSelector.cxx:883
 AtlSelector.cxx:884
 AtlSelector.cxx:885
 AtlSelector.cxx:886
 AtlSelector.cxx:887
 AtlSelector.cxx:888
 AtlSelector.cxx:889
 AtlSelector.cxx:890
 AtlSelector.cxx:891
 AtlSelector.cxx:892
 AtlSelector.cxx:893
 AtlSelector.cxx:894
 AtlSelector.cxx:895
 AtlSelector.cxx:896
 AtlSelector.cxx:897
 AtlSelector.cxx:898
 AtlSelector.cxx:899
 AtlSelector.cxx:900
 AtlSelector.cxx:901
 AtlSelector.cxx:902
 AtlSelector.cxx:903
 AtlSelector.cxx:904
 AtlSelector.cxx:905
 AtlSelector.cxx:906
 AtlSelector.cxx:907
 AtlSelector.cxx:908
 AtlSelector.cxx:909
 AtlSelector.cxx:910
 AtlSelector.cxx:911
 AtlSelector.cxx:912
 AtlSelector.cxx:913
 AtlSelector.cxx:914
 AtlSelector.cxx:915
 AtlSelector.cxx:916
 AtlSelector.cxx:917
 AtlSelector.cxx:918
 AtlSelector.cxx:919
 AtlSelector.cxx:920
 AtlSelector.cxx:921
 AtlSelector.cxx:922
 AtlSelector.cxx:923
 AtlSelector.cxx:924
 AtlSelector.cxx:925
 AtlSelector.cxx:926
 AtlSelector.cxx:927
 AtlSelector.cxx:928
 AtlSelector.cxx:929
 AtlSelector.cxx:930
 AtlSelector.cxx:931
 AtlSelector.cxx:932
 AtlSelector.cxx:933
 AtlSelector.cxx:934
 AtlSelector.cxx:935
 AtlSelector.cxx:936
 AtlSelector.cxx:937
 AtlSelector.cxx:938
 AtlSelector.cxx:939
 AtlSelector.cxx:940
 AtlSelector.cxx:941
 AtlSelector.cxx:942
 AtlSelector.cxx:943
 AtlSelector.cxx:944
 AtlSelector.cxx:945
 AtlSelector.cxx:946
 AtlSelector.cxx:947
 AtlSelector.cxx:948
 AtlSelector.cxx:949
 AtlSelector.cxx:950
 AtlSelector.cxx:951
 AtlSelector.cxx:952
 AtlSelector.cxx:953
 AtlSelector.cxx:954
 AtlSelector.cxx:955
 AtlSelector.cxx:956
 AtlSelector.cxx:957
 AtlSelector.cxx:958
 AtlSelector.cxx:959
 AtlSelector.cxx:960
 AtlSelector.cxx:961
 AtlSelector.cxx:962
 AtlSelector.cxx:963
 AtlSelector.cxx:964
 AtlSelector.cxx:965
 AtlSelector.cxx:966
 AtlSelector.cxx:967
 AtlSelector.cxx:968
 AtlSelector.cxx:969
 AtlSelector.cxx:970
 AtlSelector.cxx:971
 AtlSelector.cxx:972
 AtlSelector.cxx:973
 AtlSelector.cxx:974
 AtlSelector.cxx:975
 AtlSelector.cxx:976
 AtlSelector.cxx:977
 AtlSelector.cxx:978
 AtlSelector.cxx:979
 AtlSelector.cxx:980
 AtlSelector.cxx:981
 AtlSelector.cxx:982
 AtlSelector.cxx:983
 AtlSelector.cxx:984
 AtlSelector.cxx:985
 AtlSelector.cxx:986
 AtlSelector.cxx:987
 AtlSelector.cxx:988
 AtlSelector.cxx:989
 AtlSelector.cxx:990
 AtlSelector.cxx:991
 AtlSelector.cxx:992
 AtlSelector.cxx:993
 AtlSelector.cxx:994
 AtlSelector.cxx:995
 AtlSelector.cxx:996
 AtlSelector.cxx:997
 AtlSelector.cxx:998
 AtlSelector.cxx:999
 AtlSelector.cxx:1000
 AtlSelector.cxx:1001
 AtlSelector.cxx:1002
 AtlSelector.cxx:1003
 AtlSelector.cxx:1004
 AtlSelector.cxx:1005
 AtlSelector.cxx:1006
 AtlSelector.cxx:1007
 AtlSelector.cxx:1008
 AtlSelector.cxx:1009
 AtlSelector.cxx:1010
 AtlSelector.cxx:1011
 AtlSelector.cxx:1012
 AtlSelector.cxx:1013
 AtlSelector.cxx:1014
 AtlSelector.cxx:1015
 AtlSelector.cxx:1016
 AtlSelector.cxx:1017
 AtlSelector.cxx:1018
 AtlSelector.cxx:1019
 AtlSelector.cxx:1020
 AtlSelector.cxx:1021
 AtlSelector.cxx:1022
 AtlSelector.cxx:1023
 AtlSelector.cxx:1024
 AtlSelector.cxx:1025
 AtlSelector.cxx:1026
 AtlSelector.cxx:1027
 AtlSelector.cxx:1028
 AtlSelector.cxx:1029
 AtlSelector.cxx:1030
 AtlSelector.cxx:1031
 AtlSelector.cxx:1032
 AtlSelector.cxx:1033
 AtlSelector.cxx:1034
 AtlSelector.cxx:1035
 AtlSelector.cxx:1036
 AtlSelector.cxx:1037
 AtlSelector.cxx:1038
 AtlSelector.cxx:1039
 AtlSelector.cxx:1040
 AtlSelector.cxx:1041
 AtlSelector.cxx:1042
 AtlSelector.cxx:1043
 AtlSelector.cxx:1044
 AtlSelector.cxx:1045
 AtlSelector.cxx:1046
 AtlSelector.cxx:1047
 AtlSelector.cxx:1048
 AtlSelector.cxx:1049
 AtlSelector.cxx:1050
 AtlSelector.cxx:1051
 AtlSelector.cxx:1052
 AtlSelector.cxx:1053
 AtlSelector.cxx:1054
 AtlSelector.cxx:1055
 AtlSelector.cxx:1056
 AtlSelector.cxx:1057
 AtlSelector.cxx:1058
 AtlSelector.cxx:1059
 AtlSelector.cxx:1060
 AtlSelector.cxx:1061
 AtlSelector.cxx:1062
 AtlSelector.cxx:1063
 AtlSelector.cxx:1064
 AtlSelector.cxx:1065
 AtlSelector.cxx:1066
 AtlSelector.cxx:1067
 AtlSelector.cxx:1068
 AtlSelector.cxx:1069
 AtlSelector.cxx:1070
 AtlSelector.cxx:1071
 AtlSelector.cxx:1072
 AtlSelector.cxx:1073
 AtlSelector.cxx:1074
 AtlSelector.cxx:1075
 AtlSelector.cxx:1076
 AtlSelector.cxx:1077
 AtlSelector.cxx:1078
 AtlSelector.cxx:1079
 AtlSelector.cxx:1080
 AtlSelector.cxx:1081
 AtlSelector.cxx:1082
 AtlSelector.cxx:1083
 AtlSelector.cxx:1084
 AtlSelector.cxx:1085
 AtlSelector.cxx:1086
 AtlSelector.cxx:1087
 AtlSelector.cxx:1088
 AtlSelector.cxx:1089
 AtlSelector.cxx:1090
 AtlSelector.cxx:1091
 AtlSelector.cxx:1092
 AtlSelector.cxx:1093
 AtlSelector.cxx:1094
 AtlSelector.cxx:1095
 AtlSelector.cxx:1096
 AtlSelector.cxx:1097
 AtlSelector.cxx:1098
 AtlSelector.cxx:1099
 AtlSelector.cxx:1100
 AtlSelector.cxx:1101
 AtlSelector.cxx:1102
 AtlSelector.cxx:1103
 AtlSelector.cxx:1104
 AtlSelector.cxx:1105
 AtlSelector.cxx:1106
 AtlSelector.cxx:1107
 AtlSelector.cxx:1108
 AtlSelector.cxx:1109
 AtlSelector.cxx:1110
 AtlSelector.cxx:1111
 AtlSelector.cxx:1112
 AtlSelector.cxx:1113
 AtlSelector.cxx:1114
 AtlSelector.cxx:1115
 AtlSelector.cxx:1116
 AtlSelector.cxx:1117
 AtlSelector.cxx:1118
 AtlSelector.cxx:1119
 AtlSelector.cxx:1120
 AtlSelector.cxx:1121
 AtlSelector.cxx:1122
 AtlSelector.cxx:1123
 AtlSelector.cxx:1124
 AtlSelector.cxx:1125
 AtlSelector.cxx:1126
 AtlSelector.cxx:1127
 AtlSelector.cxx:1128
 AtlSelector.cxx:1129
 AtlSelector.cxx:1130
 AtlSelector.cxx:1131
 AtlSelector.cxx:1132
 AtlSelector.cxx:1133
 AtlSelector.cxx:1134
 AtlSelector.cxx:1135
 AtlSelector.cxx:1136
 AtlSelector.cxx:1137
 AtlSelector.cxx:1138
 AtlSelector.cxx:1139
 AtlSelector.cxx:1140
 AtlSelector.cxx:1141
 AtlSelector.cxx:1142
 AtlSelector.cxx:1143
 AtlSelector.cxx:1144
 AtlSelector.cxx:1145
 AtlSelector.cxx:1146
 AtlSelector.cxx:1147
 AtlSelector.cxx:1148
 AtlSelector.cxx:1149
 AtlSelector.cxx:1150
 AtlSelector.cxx:1151
 AtlSelector.cxx:1152
 AtlSelector.cxx:1153
 AtlSelector.cxx:1154
 AtlSelector.cxx:1155
 AtlSelector.cxx:1156
 AtlSelector.cxx:1157
 AtlSelector.cxx:1158
 AtlSelector.cxx:1159
 AtlSelector.cxx:1160
 AtlSelector.cxx:1161
 AtlSelector.cxx:1162
 AtlSelector.cxx:1163
 AtlSelector.cxx:1164
 AtlSelector.cxx:1165
 AtlSelector.cxx:1166
 AtlSelector.cxx:1167
 AtlSelector.cxx:1168
 AtlSelector.cxx:1169
 AtlSelector.cxx:1170
 AtlSelector.cxx:1171
 AtlSelector.cxx:1172
 AtlSelector.cxx:1173
 AtlSelector.cxx:1174
 AtlSelector.cxx:1175
 AtlSelector.cxx:1176
 AtlSelector.cxx:1177
 AtlSelector.cxx:1178
 AtlSelector.cxx:1179
 AtlSelector.cxx:1180
 AtlSelector.cxx:1181
 AtlSelector.cxx:1182
 AtlSelector.cxx:1183
 AtlSelector.cxx:1184
 AtlSelector.cxx:1185
 AtlSelector.cxx:1186
 AtlSelector.cxx:1187
 AtlSelector.cxx:1188
 AtlSelector.cxx:1189
 AtlSelector.cxx:1190
 AtlSelector.cxx:1191
 AtlSelector.cxx:1192
 AtlSelector.cxx:1193
 AtlSelector.cxx:1194
 AtlSelector.cxx:1195
 AtlSelector.cxx:1196
 AtlSelector.cxx:1197
 AtlSelector.cxx:1198
 AtlSelector.cxx:1199
 AtlSelector.cxx:1200
 AtlSelector.cxx:1201
 AtlSelector.cxx:1202
 AtlSelector.cxx:1203
 AtlSelector.cxx:1204
 AtlSelector.cxx:1205
 AtlSelector.cxx:1206
 AtlSelector.cxx:1207
 AtlSelector.cxx:1208
 AtlSelector.cxx:1209
 AtlSelector.cxx:1210
 AtlSelector.cxx:1211
 AtlSelector.cxx:1212
 AtlSelector.cxx:1213
 AtlSelector.cxx:1214
 AtlSelector.cxx:1215
 AtlSelector.cxx:1216
 AtlSelector.cxx:1217
 AtlSelector.cxx:1218
 AtlSelector.cxx:1219
 AtlSelector.cxx:1220
 AtlSelector.cxx:1221
 AtlSelector.cxx:1222
 AtlSelector.cxx:1223
 AtlSelector.cxx:1224
 AtlSelector.cxx:1225
 AtlSelector.cxx:1226
 AtlSelector.cxx:1227
 AtlSelector.cxx:1228
 AtlSelector.cxx:1229
 AtlSelector.cxx:1230
 AtlSelector.cxx:1231
 AtlSelector.cxx:1232
 AtlSelector.cxx:1233
 AtlSelector.cxx:1234
 AtlSelector.cxx:1235
 AtlSelector.cxx:1236
 AtlSelector.cxx:1237
 AtlSelector.cxx:1238
 AtlSelector.cxx:1239
 AtlSelector.cxx:1240
 AtlSelector.cxx:1241
 AtlSelector.cxx:1242
 AtlSelector.cxx:1243
 AtlSelector.cxx:1244
 AtlSelector.cxx:1245
 AtlSelector.cxx:1246
 AtlSelector.cxx:1247
 AtlSelector.cxx:1248
 AtlSelector.cxx:1249
 AtlSelector.cxx:1250
 AtlSelector.cxx:1251
 AtlSelector.cxx:1252
 AtlSelector.cxx:1253
 AtlSelector.cxx:1254
 AtlSelector.cxx:1255
 AtlSelector.cxx:1256
 AtlSelector.cxx:1257
 AtlSelector.cxx:1258
 AtlSelector.cxx:1259
 AtlSelector.cxx:1260
 AtlSelector.cxx:1261
 AtlSelector.cxx:1262
 AtlSelector.cxx:1263
 AtlSelector.cxx:1264
 AtlSelector.cxx:1265
 AtlSelector.cxx:1266
 AtlSelector.cxx:1267
 AtlSelector.cxx:1268
 AtlSelector.cxx:1269
 AtlSelector.cxx:1270
 AtlSelector.cxx:1271
 AtlSelector.cxx:1272
 AtlSelector.cxx:1273
 AtlSelector.cxx:1274
 AtlSelector.cxx:1275
 AtlSelector.cxx:1276
 AtlSelector.cxx:1277
 AtlSelector.cxx:1278
 AtlSelector.cxx:1279
 AtlSelector.cxx:1280
 AtlSelector.cxx:1281
 AtlSelector.cxx:1282
 AtlSelector.cxx:1283
 AtlSelector.cxx:1284
 AtlSelector.cxx:1285
 AtlSelector.cxx:1286
 AtlSelector.cxx:1287
 AtlSelector.cxx:1288
 AtlSelector.cxx:1289
 AtlSelector.cxx:1290
 AtlSelector.cxx:1291
 AtlSelector.cxx:1292
 AtlSelector.cxx:1293
 AtlSelector.cxx:1294
 AtlSelector.cxx:1295
 AtlSelector.cxx:1296
 AtlSelector.cxx:1297
 AtlSelector.cxx:1298
 AtlSelector.cxx:1299
 AtlSelector.cxx:1300
 AtlSelector.cxx:1301
 AtlSelector.cxx:1302
 AtlSelector.cxx:1303
 AtlSelector.cxx:1304
 AtlSelector.cxx:1305
 AtlSelector.cxx:1306
 AtlSelector.cxx:1307
 AtlSelector.cxx:1308
 AtlSelector.cxx:1309
 AtlSelector.cxx:1310
 AtlSelector.cxx:1311
 AtlSelector.cxx:1312
 AtlSelector.cxx:1313
 AtlSelector.cxx:1314
 AtlSelector.cxx:1315
 AtlSelector.cxx:1316
 AtlSelector.cxx:1317
 AtlSelector.cxx:1318
 AtlSelector.cxx:1319
 AtlSelector.cxx:1320
 AtlSelector.cxx:1321
 AtlSelector.cxx:1322
 AtlSelector.cxx:1323
 AtlSelector.cxx:1324
 AtlSelector.cxx:1325
 AtlSelector.cxx:1326
 AtlSelector.cxx:1327
 AtlSelector.cxx:1328
 AtlSelector.cxx:1329
 AtlSelector.cxx:1330
 AtlSelector.cxx:1331
 AtlSelector.cxx:1332
 AtlSelector.cxx:1333
 AtlSelector.cxx:1334
 AtlSelector.cxx:1335
 AtlSelector.cxx:1336
 AtlSelector.cxx:1337
 AtlSelector.cxx:1338
 AtlSelector.cxx:1339
 AtlSelector.cxx:1340
 AtlSelector.cxx:1341
 AtlSelector.cxx:1342
 AtlSelector.cxx:1343
 AtlSelector.cxx:1344
 AtlSelector.cxx:1345
 AtlSelector.cxx:1346
 AtlSelector.cxx:1347
 AtlSelector.cxx:1348
 AtlSelector.cxx:1349
 AtlSelector.cxx:1350
 AtlSelector.cxx:1351
 AtlSelector.cxx:1352
 AtlSelector.cxx:1353
 AtlSelector.cxx:1354
 AtlSelector.cxx:1355
 AtlSelector.cxx:1356
 AtlSelector.cxx:1357
 AtlSelector.cxx:1358
 AtlSelector.cxx:1359
 AtlSelector.cxx:1360
 AtlSelector.cxx:1361
 AtlSelector.cxx:1362
 AtlSelector.cxx:1363
 AtlSelector.cxx:1364
 AtlSelector.cxx:1365
 AtlSelector.cxx:1366
 AtlSelector.cxx:1367
 AtlSelector.cxx:1368
 AtlSelector.cxx:1369
 AtlSelector.cxx:1370
 AtlSelector.cxx:1371
 AtlSelector.cxx:1372
 AtlSelector.cxx:1373
 AtlSelector.cxx:1374
 AtlSelector.cxx:1375
 AtlSelector.cxx:1376
 AtlSelector.cxx:1377
 AtlSelector.cxx:1378
 AtlSelector.cxx:1379
 AtlSelector.cxx:1380
 AtlSelector.cxx:1381
 AtlSelector.cxx:1382
 AtlSelector.cxx:1383
 AtlSelector.cxx:1384
 AtlSelector.cxx:1385
 AtlSelector.cxx:1386
 AtlSelector.cxx:1387
 AtlSelector.cxx:1388
 AtlSelector.cxx:1389
 AtlSelector.cxx:1390
 AtlSelector.cxx:1391
 AtlSelector.cxx:1392
 AtlSelector.cxx:1393
 AtlSelector.cxx:1394
 AtlSelector.cxx:1395
 AtlSelector.cxx:1396
 AtlSelector.cxx:1397
 AtlSelector.cxx:1398
 AtlSelector.cxx:1399
 AtlSelector.cxx:1400
 AtlSelector.cxx:1401
 AtlSelector.cxx:1402
 AtlSelector.cxx:1403
 AtlSelector.cxx:1404
 AtlSelector.cxx:1405
 AtlSelector.cxx:1406
 AtlSelector.cxx:1407
 AtlSelector.cxx:1408
 AtlSelector.cxx:1409
 AtlSelector.cxx:1410
 AtlSelector.cxx:1411
 AtlSelector.cxx:1412
 AtlSelector.cxx:1413
 AtlSelector.cxx:1414
 AtlSelector.cxx:1415
 AtlSelector.cxx:1416
 AtlSelector.cxx:1417
 AtlSelector.cxx:1418
 AtlSelector.cxx:1419
 AtlSelector.cxx:1420
 AtlSelector.cxx:1421
 AtlSelector.cxx:1422
 AtlSelector.cxx:1423
 AtlSelector.cxx:1424
 AtlSelector.cxx:1425
 AtlSelector.cxx:1426
 AtlSelector.cxx:1427
 AtlSelector.cxx:1428
 AtlSelector.cxx:1429
 AtlSelector.cxx:1430
 AtlSelector.cxx:1431
 AtlSelector.cxx:1432
 AtlSelector.cxx:1433
 AtlSelector.cxx:1434
 AtlSelector.cxx:1435
 AtlSelector.cxx:1436
 AtlSelector.cxx:1437
 AtlSelector.cxx:1438
 AtlSelector.cxx:1439
 AtlSelector.cxx:1440
 AtlSelector.cxx:1441
 AtlSelector.cxx:1442
 AtlSelector.cxx:1443
 AtlSelector.cxx:1444
 AtlSelector.cxx:1445
 AtlSelector.cxx:1446
 AtlSelector.cxx:1447
 AtlSelector.cxx:1448
 AtlSelector.cxx:1449
 AtlSelector.cxx:1450
 AtlSelector.cxx:1451
 AtlSelector.cxx:1452
 AtlSelector.cxx:1453
 AtlSelector.cxx:1454
 AtlSelector.cxx:1455
 AtlSelector.cxx:1456
 AtlSelector.cxx:1457
 AtlSelector.cxx:1458
 AtlSelector.cxx:1459
 AtlSelector.cxx:1460
 AtlSelector.cxx:1461
 AtlSelector.cxx:1462
 AtlSelector.cxx:1463
 AtlSelector.cxx:1464
 AtlSelector.cxx:1465
 AtlSelector.cxx:1466
 AtlSelector.cxx:1467
 AtlSelector.cxx:1468
 AtlSelector.cxx:1469
 AtlSelector.cxx:1470
 AtlSelector.cxx:1471
 AtlSelector.cxx:1472
 AtlSelector.cxx:1473
 AtlSelector.cxx:1474
 AtlSelector.cxx:1475
 AtlSelector.cxx:1476
 AtlSelector.cxx:1477
 AtlSelector.cxx:1478
 AtlSelector.cxx:1479
 AtlSelector.cxx:1480
 AtlSelector.cxx:1481
 AtlSelector.cxx:1482
 AtlSelector.cxx:1483
 AtlSelector.cxx:1484
 AtlSelector.cxx:1485
 AtlSelector.cxx:1486
 AtlSelector.cxx:1487
 AtlSelector.cxx:1488
 AtlSelector.cxx:1489
 AtlSelector.cxx:1490
 AtlSelector.cxx:1491
 AtlSelector.cxx:1492
 AtlSelector.cxx:1493
 AtlSelector.cxx:1494
 AtlSelector.cxx:1495
 AtlSelector.cxx:1496
 AtlSelector.cxx:1497
 AtlSelector.cxx:1498
 AtlSelector.cxx:1499
 AtlSelector.cxx:1500
 AtlSelector.cxx:1501
 AtlSelector.cxx:1502
 AtlSelector.cxx:1503
 AtlSelector.cxx:1504
 AtlSelector.cxx:1505
 AtlSelector.cxx:1506
 AtlSelector.cxx:1507
 AtlSelector.cxx:1508
 AtlSelector.cxx:1509
 AtlSelector.cxx:1510
 AtlSelector.cxx:1511
 AtlSelector.cxx:1512
 AtlSelector.cxx:1513
 AtlSelector.cxx:1514
 AtlSelector.cxx:1515
 AtlSelector.cxx:1516
 AtlSelector.cxx:1517
 AtlSelector.cxx:1518
 AtlSelector.cxx:1519
 AtlSelector.cxx:1520
 AtlSelector.cxx:1521
 AtlSelector.cxx:1522
 AtlSelector.cxx:1523
 AtlSelector.cxx:1524
 AtlSelector.cxx:1525
 AtlSelector.cxx:1526
 AtlSelector.cxx:1527
 AtlSelector.cxx:1528
 AtlSelector.cxx:1529
 AtlSelector.cxx:1530
 AtlSelector.cxx:1531
 AtlSelector.cxx:1532
 AtlSelector.cxx:1533
 AtlSelector.cxx:1534
 AtlSelector.cxx:1535
 AtlSelector.cxx:1536
 AtlSelector.cxx:1537
 AtlSelector.cxx:1538
 AtlSelector.cxx:1539
 AtlSelector.cxx:1540
 AtlSelector.cxx:1541
 AtlSelector.cxx:1542
 AtlSelector.cxx:1543
 AtlSelector.cxx:1544
 AtlSelector.cxx:1545
 AtlSelector.cxx:1546
 AtlSelector.cxx:1547
 AtlSelector.cxx:1548
 AtlSelector.cxx:1549
 AtlSelector.cxx:1550
 AtlSelector.cxx:1551
 AtlSelector.cxx:1552
 AtlSelector.cxx:1553
 AtlSelector.cxx:1554
 AtlSelector.cxx:1555
 AtlSelector.cxx:1556
 AtlSelector.cxx:1557
 AtlSelector.cxx:1558
 AtlSelector.cxx:1559
 AtlSelector.cxx:1560
 AtlSelector.cxx:1561
 AtlSelector.cxx:1562
 AtlSelector.cxx:1563
 AtlSelector.cxx:1564
 AtlSelector.cxx:1565
 AtlSelector.cxx:1566
 AtlSelector.cxx:1567
 AtlSelector.cxx:1568
 AtlSelector.cxx:1569
 AtlSelector.cxx:1570
 AtlSelector.cxx:1571
 AtlSelector.cxx:1572
 AtlSelector.cxx:1573
 AtlSelector.cxx:1574
 AtlSelector.cxx:1575
 AtlSelector.cxx:1576
 AtlSelector.cxx:1577
 AtlSelector.cxx:1578
 AtlSelector.cxx:1579
 AtlSelector.cxx:1580
 AtlSelector.cxx:1581
 AtlSelector.cxx:1582
 AtlSelector.cxx:1583
 AtlSelector.cxx:1584
 AtlSelector.cxx:1585
 AtlSelector.cxx:1586
 AtlSelector.cxx:1587
 AtlSelector.cxx:1588