//____________________________________________________________________
//
// K0s decay finder class
//
// K0s will be reconstructed while looping over all secondary vertices
// with 2 daughter tracks. Oppositely charged tracks will be added to
// K0s-List in AtlEvent while same charged tracks will give a first
// first estimation for background K0s and will be stored in a TList
// called fKkgK0sDecays.
// The Decay decision will be done either by a cut bassed reconstruction
// or by using the kinemativ fitter. Switching is possible by a Flag
// EMode (kCutBased, kKinFit) that can be set in the constructor via
// SetMode(EMode)

//
// Author: Sebastian Beumler <mailto:beumler@physik.hu-berlin.de>
// Copyright: 2010 (C) Sebastian Beumler
//
#ifndef ATLAS_AtlK0sFinder
#include <AtlK0sFinder.h>
#endif
#include <TH1F.h>
#include <AtlEvent.h>
#include <TTree.h>
#include <TString.h>
#include <iostream>
#include <TROOT.h>
#include <TFile.h>
#include <vector>
#include <iomanip>


using namespace std;

#ifndef __CINT__
ClassImp(AtlK0sFinder);
#endif

//____________________________________________________________________

AtlK0sFinder::AtlK0sFinder(const char* name, const char* title) :
    AtlKinFitterTool(name, title) {
    //
    // Default constructor
    //

    // set default mode
    SetMode(kKinFit);
    SetDebugMode(kFALSE);
    
    fBkgK0sDecays = new TList;
    fNK0s = 0;

    // Bkg Decay Angle analysis
    NLambdapos           = 0;
    NLambdaBarpos        = 0;
    NPiPluspos           = 0;
    NProtonpos           = 0;

    NLambdaneg           = 0;
    NLambdaBarneg        = 0;
    NPiPlusneg           = 0;
    NProtonneg           = 0;

    
}

//____________________________________________________________________

AtlK0sFinder::~AtlK0sFinder() {
    //
    // Default destructor
    //
    fBkgK0sDecays->Delete();
    delete fBkgK0sDecays;

    if ( IsDebugRun() )    fDebugOutput.close();
    
}

//____________________________________________________________________

void AtlK0sFinder::SetBranchStatus() {
    //
    // Switch on needed branches
    //
    fTree->SetBranchStatus("fN_IDTracks*",         kTRUE);  
    fTree->SetBranchStatus("fIDTracks*",           kTRUE);
    fTree->SetBranchStatus("fN_Vertices*",         kTRUE);
    fTree->SetBranchStatus("fVertices*",           kTRUE);
    fTree->SetBranchStatus("fN_MCParticles*",      kTRUE);
    fTree->SetBranchStatus("fMCParticles*",        kTRUE);
}

//____________________________________________________________________

void AtlK0sFinder::BookHistograms() {
    //
    // Book histograms
    //
    
    
    //Debugging
    if (IsDebugRun() ){
	fDebugOutput.open("DebugOutput.dat");
    }
    
    // Book KinFitter Histograms
    AtlKinFitterTool::BookHistograms();
    // Set X-Variable for Efficiency Computation depending on R_Vtx
    AtlKinFitterTool::SetTruthMatchXTitle("cos_{#Theta*} (rad)");
    AtlKinFitterTool::SetTruthMatchBinning(20, 0.0, 1.);
    //Outout std::out
    PrintCutValues();

    
    // ======================
    //       SIGNAL
    // ======================
    gDirectory->mkdir("Signal", "Oppositely charged candidates");
    gDirectory->cd("Signal");

    // general tuning histograms
    fHistPionMatchingProb = new TH1F("h_Pion_MatchingProb",
				     "Matching probability (hitbased TruthMatching) of particles matching pions",
				     50, 0, 1);
    fHistPionMatchingProb->SetXTitle("MatchingProb");
    fHistPionMatchingProb->SetYTitle("Number of Entries");
    
    fHistTrkChi2ovNDoF  = new TH1F("h_Trk_Chi2overNDoF",
				   "Chi2/NDoF of track fit",
				   50, 0, 5);
    fHistTrkChi2ovNDoF->SetXTitle("Chi2ovNDoF");
    fHistTrkChi2ovNDoF->SetYTitle("Number of Entries");
    fHistVtxChi2ovNDoF  = new TH1F("h_Vertex_Chi2overNDoF",
				   "Chi2/NDoF of vertex fit",
				   50, 0, 5);
    fHistVtxChi2ovNDoF->SetXTitle("Chi2ovNDoF");
    fHistVtxChi2ovNDoF->SetYTitle("Number of Entries");
    
    
    // K0s
    // ---
    gDirectory->mkdir("PiPi", "K0s -> pi+pi-");
    gDirectory->cd("PiPi");

    if ( fMode == kKinFit ) {
	fHistK0sreco_m_PiPi   = new TH1F("h_K0s_m_PiPi", "Invariant K0s mass (K0s->PiPi)",
					 50, 0.49, 0.45);
    }else if (fMode == kCutBased){
	fHistK0sreco_m_PiPi   = new TH1F("h_K0s_m_PiPi", "Invariant K0s mass (K0s->PiPi)",
					 50, 0.4, 0.6);
    }
    fHistK0sreco_m_PiPi->SetXTitle("m_{K0s} (GeV)");
    fHistK0sreco_m_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_pt_PiPi  = new TH1F("h_K0s_pt_PiPi", "K0s-p_{#perp} (K0s->PiPi)",
				     400, 0, 400);
    fHistK0sreco_pt_PiPi->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_pt_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_phi_PiPi = new TH1F("h_K0s_phi_PiPi", "K0s #phi distribution (K0s->PiPi)",
				     128, -3.2, 3.2);
    fHistK0sreco_phi_PiPi->SetXTitle("#phi (rad)");
    fHistK0sreco_phi_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_eta_PiPi = new TH1F("h_K0s_eta_PiPi", "K0s #eta distribution (K0s->PiPi)",
				 50, -3, 3);
    fHistK0sreco_eta_PiPi->SetXTitle("#eta");
    fHistK0sreco_eta_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_N_PiPi   = new TH1F("h_K0s_N_PiPi", "Reconstructed K0s' per event (K0s->PiPi)",
				     11, -0.5, 10.5);
    fHistK0sreco_N_PiPi->SetXTitle("N_{K0s}/evt");
    fHistK0sreco_N_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_tau_PiPi = new TH1F("h_K0s_tau_PiPi", "Reconstructed K0s' lifetime (K0s->PPi)", 
				       100, 0, 300);
    fHistK0sreco_tau_PiPi->SetXTitle("#tau (ps)");
    fHistK0sreco_tau_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_DecayLength_PiPi = new TH1F("h_K0s_DecayLength_PiPi",
					     "Reconstructed K0s' decay length (K0s->PiPi)", 
				       100, 0, 300);
    fHistK0sreco_DecayLength_PiPi->SetXTitle("#DecayLength ");
    fHistK0sreco_DecayLength_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_OpeningAngle_PiPi = new TH1F("h_K0s_OpeningAngle_PiPi",
					      "opening angle between pion tracks",
				     128, 0, 3.2);
    fHistK0sreco_OpeningAngle_PiPi->SetXTitle("#alpha (rad)");
    fHistK0sreco_OpeningAngle_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_DecayAngle_PiPi = new TH1F("h_K0s_DecayAngle_PiPi",
					    "decay angle between K0s and pi+ in K0s' restframe (reconstructed K0s)",
				     50, -1, 1);
    fHistK0sreco_DecayAngle_PiPi->SetXTitle("cos(#beta)");
    fHistK0sreco_DecayAngle_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_PointingAngle_PiPi = new TH1F("h_K0s_PointingAngle_PiPi",
					       "Cos of angle between K0s' momentum and vec(PV)-vec(SecVtx)",
					       150, 0.8, 1);
    fHistK0sreco_PointingAngle_PiPi->SetXTitle("cos(#delta)");
    fHistK0sreco_PointingAngle_PiPi->SetYTitle("Number of Entries");
    fHistK0sreco_R_vtx = new TH1F("h_K0s_R_vtx", "Radial distance of secondary vertices", 120, 0.0, 60.0);
    fHistK0sreco_R_vtx->SetXTitle("r_{#perp} (cm)");
    fHistK0sreco_R_vtx->SetYTitle("Number of Entries");
    fHistK0sreco_RvtxMee = new TH2F("h_K0sreco_RvtxMee",
					  "Radial dust of sec vtx and Mee M_ee mass hypothesis",
					  60, 0.0, 60.0, 10, 0.0, 1.5);
    fHistK0sreco_RvtxMee    ->SetXTitle("R_{#perp} (cm)");
    fHistK0sreco_RvtxMee    ->SetYTitle("M_{ee}");
    fHistK0sreco_RvtxMee    ->SetZTitle("Number of Entries");
    fHistK0sreco_RvtxMee    ->SetOption("COLZ");

    fHistK0sreco_Pions_PtEta = new TH2F("h_K0s_Pions_PtEta", "#pion Pt and eta",
					400, 0, 400, 50, -5, 5);
    fHistK0sreco_Pions_PtEta->SetXTitle("p_{T} (GeV)");
    fHistK0sreco_Pions_PtEta->SetYTitle("#eta");
    fHistK0sreco_Pions_PtEta->SetZTitle("Number of Entries");
        
    // Pion (Pi+) histograms in sub-folder
    gDirectory->mkdir("Piplus", "Pi+ from K0s -> PiPi");
    gDirectory->cd("Piplus");
    
    fHistK0sreco_PiPlus_pt = new TH1F("h_K0s_PiPlus_pt", "#pi^{+}-p_{#perp} (K0s->#pi#pi)",
				      400, 0, 400);
    fHistK0sreco_PiPlus_pt->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_PiPlus_pt->SetYTitle("Number of Entries");
    fHistK0sreco_PiPlus_eta = new TH1F("h_K0s_PiPlus_eta", "#pi^{+}:  #eta distribution (K0s->#pi#pi)",
				       50, -3, 3);
    fHistK0sreco_PiPlus_eta->SetXTitle("#eta");
    fHistK0sreco_PiPlus_eta->SetYTitle("Number of Entries");
    fHistK0sreco_PiPlus_phi = new TH1F("h_K0s_PiPlus_phi", "#pi^{+}:  #phi distribution (K0s->#pi#pi)",
				    50, -3.14, 3.14);
    fHistK0sreco_PiPlus_phi->SetXTitle("#phi");
    fHistK0sreco_PiPlus_phi->SetYTitle("Number of Entries");
    
    gDirectory->cd("../"); 
    
    // Pion (Pi-) histograms in sub-folder
    gDirectory->mkdir("PiMinus", "Pi- from K0s0 -> PiPi");
    gDirectory->cd("PiMinus");
    
    fHistK0sreco_PiMinus_pt = new TH1F("h_K0s_PiMinus_pt", "#pi^{-}-p_{#perp} (K0s->#pi#pi)",
				       400, 0, 400);
    fHistK0sreco_PiMinus_pt->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_PiMinus_pt->SetYTitle("Number of Entries");
    fHistK0sreco_PiMinus_eta = new TH1F("h_K0s_PiMinus_eta", "#pi^{-}:  #eta distribution (K0s->#pi#pi)",
					50, -5, 5);
    fHistK0sreco_PiMinus_eta->SetXTitle("#eta");
    fHistK0sreco_PiMinus_eta->SetYTitle("Number of Entries");
    fHistK0sreco_PiMinus_phi = new TH1F("h_K0s_PiMinus_phi", "#pi^{-}:  #phi distribution (K0s->#pi#pi)",
					50, -3.14, 3.14);
    fHistK0sreco_PiMinus_phi->SetXTitle("#phi");
    fHistK0sreco_PiMinus_phi->SetYTitle("Number of Entries");
    
    
    

    gDirectory->cd("../../../");
    // =================
    //    BACKGROUND
    // =================
     gDirectory->mkdir("Background", "Same charged candidates");
     gDirectory->cd("Background");



    // ===========================================
    // Book bkg histograms for like-sign approach
    // ===========================================
           
    gDirectory->mkdir("Like-sign", "K0s -> pi+pi+ / pi-pi-");
    gDirectory->cd("Like-sign");

    if ( fMode == kKinFit ) {
	fHistK0sreco_m_LS_bkg   = new TH1F("h_K0s_m_LS_bkg", "Invariant K0s mass (equaly signed pions)",
					     50, 0.496, 0.4975);
     }else if (fMode == kCutBased){
	fHistK0sreco_m_LS_bkg   = new TH1F("h_K0s_m_PiPi", "Invariant K0s mass (equaly signed pions)",
					     50, 0.4, 0.6);
    }
    fHistK0sreco_m_LS_bkg->SetXTitle("m_{K0s} (GeV)");
    fHistK0sreco_m_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_pt_LS_bkg  = new TH1F("h_K0s_pt_LS_bkg", "K0s-p_{#perp} (equaly signed pions)",
				       400, 0, 400);
    fHistK0sreco_pt_LS_bkg->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_pt_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_phi_LS_bkg = new TH1F("h_K0s_phi_LS_bkg", "K0s #phi distribution (equaly signed pions)",
				       128, -3.2, 3.2);
    fHistK0sreco_phi_LS_bkg->SetXTitle("#phi (rad)");
    fHistK0sreco_phi_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_eta_LS_bkg = new TH1F("h_K0s_eta_LS_bkg", "K0s #eta distribution (equaly signed pions)",
				       50, -3, 3);
    fHistK0sreco_eta_LS_bkg->SetXTitle("#eta");
    fHistK0sreco_eta_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_N_LS_bkg   = new TH1F("h_K0s_N_LS_bkg", "Reconstructed K0s' per event (equaly signed pions)",
				       11, -0.5, 10.5);
    fHistK0sreco_N_LS_bkg->SetXTitle("N_{K0s}/evt");
    fHistK0sreco_N_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_tau_LS_bkg = new TH1F("h_K0s_tau_LS_bkg", "Reconstructed K0s' lifetime (equaly signed pions)", 
					 100, 0, 300);
    fHistK0sreco_tau_LS_bkg->SetXTitle("#tau (ps)");
    fHistK0sreco_tau_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_DecayLength_LS_bkg = new TH1F("h_K0s_DecayLength_LS_bkg",
					    "Reconstructed K0s' decay length (equaly signed pions)", 
					    100, 0, 300);
    fHistK0sreco_DecayLength_LS_bkg->SetXTitle("#DecayLength ");
    fHistK0sreco_DecayLength_LS_bkg->SetYTitle("Number of Entries");

    // Pion (Pi+) histograms in sub-folder
    gDirectory->mkdir("Piplus", "Pi+ from K0s -> Pi+Pi+");
    gDirectory->cd("Piplus");

    fHistK0sreco_PiPlus_pt_LS_bkg = new TH1F("h_K0s_PiPlus_pt_LS_bkg",
					   "#pi^{+}-p_{#perp} (K0s->#pi#pi)",
					   400, 0, 400);
    fHistK0sreco_PiPlus_pt_LS_bkg->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_PiPlus_pt_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_PiPlus_eta_LS_bkg = new TH1F("h_K0s_PiPlus_eta_LS_bkg",
					      "#pi^{+}:  #eta distribution (K0s->#pi#pi)",
					      50, -3, 3);
    fHistK0sreco_PiPlus_eta_LS_bkg->SetXTitle("#eta");
    fHistK0sreco_PiPlus_eta_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_PiPlus_phi_LS_bkg = new TH1F("h_K0s_PiPlus_phi_LS_bkg",
					      "#pi^{+}:  #phi distribution (K0s->#pi#pi)",
					      50, -3.14, 3.14);
    fHistK0sreco_PiPlus_phi_LS_bkg->SetXTitle("#phi");
    fHistK0sreco_PiPlus_phi_LS_bkg->SetYTitle("Number of Entries");
    
    gDirectory->cd("../"); 
    // Pion (Pi-) histograms in sub-folder
    gDirectory->mkdir("PiMinus", "Pi- from K0s0 -> Pi-Pi-");
    gDirectory->cd("PiMinus");
    
    fHistK0sreco_PiMinus_pt_LS_bkg = new TH1F("h_K0s_PiMinus_pt_LS_bkg",
					      "#pi^{-}-p_{#perp} (K0s->#pi#pi)",
					      400, 0, 400);
    fHistK0sreco_PiMinus_pt_LS_bkg->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_PiMinus_pt_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_PiMinus_eta_LS_bkg = new TH1F("h_K0s_PiMinus_eta_LS_bkg",
					     "#pi^{-}:  #eta distribution (K0s->#pi#pi)",
					       50, -5, 5);
    fHistK0sreco_PiMinus_eta_LS_bkg->SetXTitle("#eta");
    fHistK0sreco_PiMinus_eta_LS_bkg->SetYTitle("Number of Entries");
    fHistK0sreco_PiMinus_phi_LS_bkg = new TH1F("h_K0s_PiMinus_phi_LS_bkg",
					       "#pi^{-}:  #phi distribution (K0s->#pi#pi)",
					       50, -3.14, 3.14);
    fHistK0sreco_PiMinus_phi_LS_bkg->SetXTitle("#phi");
    fHistK0sreco_PiMinus_phi_LS_bkg->SetYTitle("Number of Entries");
     


    gDirectory->cd("../../../");


    
    // ========================
    //     MC TRUTH STUDY
    // ========================

    gDirectory->mkdir("MCTruthStudy", "Small Truth Study with hitbased Truth-matching");
    gDirectory->cd("MCTruthStudy");


    fHistK0sreco_truthtype = new TH2F("h_K0sreco_truthtype", "truth type of K0s candidates", 6260, -3130, 3130, 50, 0.0, 1.0);
    fHistK0sreco_truthtype->SetXTitle("");
    fHistK0sreco_truthtype->SetYTitle("P(#Chi^{2})");
    fHistK0sreco_truthtype->SetZTitle("Number of Entries");
    fHistK0sreco_truthtype->SetOption("COLZ");
    

    
    // =============================================================================
    // Book signal histograms for K0s-candidates that fulfill the MC Truth Matching
    // =============================================================================
    
    gDirectory->mkdir("Signal_MC", "K0s-candidates that fulfill the MC Truth Matching");
    gDirectory->cd("Signal_MC");

    if ( fMode == kKinFit ) {
	fHistK0sreco_m_MCsignal   = new TH1F("h_K0s_m_MCsignal", "Invariant K0s mass (equaly signed pions)",
					    50, 0.496, 0.4975);
    }else if (fMode == kCutBased){
	fHistK0sreco_m_MCsignal   = new TH1F("h_K0s_m_PiPi", "Invariant K0s mass (equaly signed pions)",
					50, 0.4, 0.6);
    }
    fHistK0sreco_m_MCsignal->SetXTitle("m_{K0s} (GeV)");
    fHistK0sreco_m_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_pt_MCsignal  = new TH1F("h_K0s_pt_MCsignal", "K0s-p_{#perp} (equaly signed pions)",
				    400, 0, 400);
    fHistK0sreco_pt_MCsignal->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_pt_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_phi_MCsignal = new TH1F("h_K0s_phi_MCsignal", "K0s #phi distribution (equaly signed pions)",
				    128, -3.2, 3.2);
    fHistK0sreco_phi_MCsignal->SetXTitle("#phi (rad)");
    fHistK0sreco_phi_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_eta_MCsignal = new TH1F("h_K0s_eta_MCsignal", "K0s #eta distribution (equaly signed pions)",
				    50, -3, 3);
    fHistK0sreco_eta_MCsignal->SetXTitle("#eta");
    fHistK0sreco_eta_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_N_MCsignal   = new TH1F("h_K0s_N_MCsignal", "Reconstructed K0s' per event (equaly signed pions)",
				    11,-0.5,10.5);
    fHistK0sreco_N_MCsignal->SetXTitle("N_{K0s}/evt");
    fHistK0sreco_N_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_tau_MCsignal = new TH1F("h_K0s_tau_MCsignal", "Reconstructed K0s' lifetime (equaly signed pions)", 
				    100, 0, 300);
    fHistK0sreco_tau_MCsignal->SetXTitle("#tau (ps)");
    fHistK0sreco_tau_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_DecayLength_MCsignal = new TH1F("h_K0s_DecayLength_MCsignal",
					    "Reconstructed K0s' decay length (equaly signed pions)", 
					    100, 0, 50);
    fHistK0sreco_DecayLength_MCsignal->SetXTitle("DecayLength ");
    fHistK0sreco_DecayLength_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_OpeningAngle_MCsignal = new TH1F("h_K0s_OpeningAngle_MCsignal",
					     "opening angle between pion tracks",
					     128, 0, 3.2);
    fHistK0sreco_OpeningAngle_MCsignal->SetXTitle("#alpha (rad)");
    fHistK0sreco_OpeningAngle_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_DecayAngle_MCsignal = new TH1F("h_K0s_DecayAngle_MCsignal",
					   "decay angle for reconstructed K0s that fulfill truthmatching",
					   50, -1, 1);
    fHistK0sreco_DecayAngle_MCsignal->SetXTitle("cos(#beta) (rad)");
    fHistK0sreco_DecayAngle_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_PointingAngle_MCsignal = new TH1F("h_K0s_PointingAngle_MCsignal",
					      "cos of angle between K0s' momentum and vec(PV)-vec(SecVtx)",
					      1000, 0.99, 1);
    fHistK0sreco_PointingAngle_MCsignal->SetXTitle("cos(#delta)");
    fHistK0sreco_PointingAngle_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_R_vtx_MCsignal = new TH1F("h_K0s_R_vtx_MCsignal",
					   "Radial distance of secondary vertices",
					   120, 0.0, 60.0);
    fHistK0sreco_R_vtx_MCsignal->SetXTitle("r_{#perp} (cm)");
    fHistK0sreco_R_vtx_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_RvtxMee_MCsignal = new TH2F("h_K0sreco_RvtxMee",
					  "Radial dust of sec vtx and Mee M_ee mass hypothesis",
					  60, 0.0, 60.0, 10, 0.0, 1.5);
    fHistK0sreco_RvtxMee_MCsignal    ->SetXTitle("R_{#perp} (cm)");
    fHistK0sreco_RvtxMee_MCsignal    ->SetYTitle("M_{ee}");
    fHistK0sreco_RvtxMee_MCsignal    ->SetZTitle("Number of Entries");
    fHistK0sreco_RvtxMee_MCsignal    ->SetOption("COLZ");

    fHistK0sreco_Chi2_MCsignal = new TH1F("h_fHistK0sreco_Chi2_MCsignal",
					  "chi2 signal",
					  300, 0, 100);
    fHistK0sreco_Chi2_MCsignal->SetXTitle("#chi^{2} / N_{DoF}");
    fHistK0sreco_Chi2_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_pValue_MCsignal = new TH1F("h_fHistK0sreco_pValue_MCsignal",
					    "pValue signal",
					    100, 0, 1);
    fHistK0sreco_pValue_MCsignal->SetXTitle("p-Value");
    fHistK0sreco_pValue_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_Chi2Trk_MCsignal = new TH1F("h_fHistK0sreco_Chi2Trk_MCsignal",
					  "chi2 signal",
					  300, 0, 100);
    fHistK0sreco_Chi2Trk_MCsignal->SetXTitle("#chi^{2} / N_{DoF}");
    fHistK0sreco_Chi2Trk_MCsignal->SetYTitle("Number of Entries");
    fHistK0sreco_Chi2Vtx_MCsignal = new TH1F("h_fHistK0sreco_Chi2Vtx_MCsignal",
					  "chi2 signal",
					  300, 0, 100);
    fHistK0sreco_Chi2Vtx_MCsignal->SetXTitle("#chi^{2} / N_{DoF}");
    fHistK0sreco_Chi2Vtx_MCsignal->SetYTitle("Number of Entries");

    
    
    gDirectory->cd("../");

    // ==========================================================================
    // Book bkg histograms for K0s-candidates that fail the MC Truth Matching
    // ==========================================================================

    gDirectory->mkdir("Bkg_MC", "K0s-candidates that fail the MC Truth Matching");
    gDirectory->cd("Bkg_MC");

     if ( fMode == kKinFit ) {
	fHistK0sreco_m_MCbkg   = new TH1F("h_K0s_m_MCbkg", "Invariant K0s mass (equaly signed pions)",
					50, 0.496, 0.4975);
    }else if (fMode == kCutBased){
	fHistK0sreco_m_MCbkg   = new TH1F("h_K0s_m_PiPi", "Invariant K0s mass (equaly signed pions)",
					50, 0.4, 0.6);
    }
    fHistK0sreco_m_MCbkg->SetXTitle("m_{K0s} (GeV)");
    fHistK0sreco_m_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_pt_MCbkg  = new TH1F("h_K0s_pt_MCbkg", "K0s-p_{#perp} (equaly signed pions)",
				    400, 0, 400);
    fHistK0sreco_pt_MCbkg->SetXTitle("p_{#perp} (GeV)");
    fHistK0sreco_pt_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_phi_MCbkg = new TH1F("h_K0s_phi_MCbkg", "K0s #phi distribution (equaly signed pions)",
				    128, -3.2, 3.2);
    fHistK0sreco_phi_MCbkg->SetXTitle("#phi (rad)");
    fHistK0sreco_phi_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_eta_MCbkg = new TH1F("h_K0s_eta_MCbkg", "K0s #eta distribution (equaly signed pions)",
				    50, -3, 3);
    fHistK0sreco_eta_MCbkg->SetXTitle("#eta");
    fHistK0sreco_eta_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_N_MCbkg   = new TH1F("h_K0s_N_MCbkg", "Reconstructed K0s' per event (equaly signed pions)",
				    11,-0.5,10.5);
    fHistK0sreco_N_MCbkg->SetXTitle("N_{K0s}/evt");
    fHistK0sreco_N_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_tau_MCbkg = new TH1F("h_K0s_tau_MCbkg", "Reconstructed K0s' lifetime (equaly signed pions)", 
				    100, 0, 300);
    fHistK0sreco_tau_MCbkg->SetXTitle("#tau (ps)");
    fHistK0sreco_tau_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_DecayLength_MCbkg = new TH1F("h_K0s_DecayLength_MCbkg",
					    "Reconstructed K0s' decay length (equaly signed pions)", 
					    100, 0, 50);
    fHistK0sreco_DecayLength_MCbkg->SetXTitle("#DecayLength ");
    fHistK0sreco_DecayLength_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_OpeningAngle_MCbkg = new TH1F("h_K0s_OpeningAngle_MCbkg",
					     "opening angle between pion tracks",
					     128, 0, 3.2);
    fHistK0sreco_OpeningAngle_MCbkg->SetXTitle("#alpha (rad)");
    fHistK0sreco_OpeningAngle_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_DecayAngle_MCbkg = new TH1F("h_K0s_DecayAngle_MCbkg",
					   "decay angle of reconstructed K0s that fail truthmatching",
					   50, -1, 1);
    fHistK0sreco_DecayAngle_MCbkg->SetXTitle("cos(#beta) (rad)");
    fHistK0sreco_DecayAngle_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_PointingAngle_MCbkg = new TH1F("h_K0s_PointingAngle_MCbkg",
					      "cos of angle between K0s' momentum and vec(PV)-vec(SecVtx)",
					      1000, 0.99, 1);
    fHistK0sreco_PointingAngle_MCbkg->SetXTitle("cos(#delta)");
    fHistK0sreco_PointingAngle_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_R_vtx_MCbkg = new TH1F("h_K0s_R_vtx_MCbkg",
					   "Radial distance of secondary vertices",
					   120, 0.0, 60.0);
    fHistK0sreco_R_vtx_MCbkg->SetXTitle("r_{#perp} (cm)");
    fHistK0sreco_R_vtx_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_R_vtx_MCbkg_gamma = new TH1F("h_K0s_R_vtx_MCbkg_gamma",
					      "Radial distance of secondary vertices that came from photo-conversions",
					      120, 0.0, 60.0);
    fHistK0sreco_R_vtx_MCbkg_gamma->SetXTitle("r_{#perp} (cm)");
    fHistK0sreco_R_vtx_MCbkg_gamma->SetYTitle("Number of Entries");
    fHistK0sreco_RvtxMee_MCbkg = new TH2F("h_K0sreco_RvtxMee",
					  "Radial dust of sec vtx and Mee M_ee mass hypothesis",
					  60, 0.0, 60.0, 10, 0.0, 1.5);
    fHistK0sreco_RvtxMee_MCbkg    ->SetXTitle("R_{#perp} (cm)");
    fHistK0sreco_RvtxMee_MCbkg    ->SetYTitle("M_{ee}");
    fHistK0sreco_RvtxMee_MCbkg    ->SetZTitle("Number of Entries");
    fHistK0sreco_RvtxMee_MCbkg    ->SetOption("COLZ");

    fHistK0sreco_Chi2_MCbkg = new TH1F("h_fHistK0sreco_Chi2_MCbkg",
					  "chi2 bkg",
					  300, 0, 100);
    fHistK0sreco_Chi2_MCbkg->SetXTitle("#chi^{2} / N_{DoF}");
    fHistK0sreco_Chi2_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_pValue_MCbkg = new TH1F("h_fHistK0sreco_pValue_MCbkg",
					    "pValue bkg",
					    100, 0, 1);
    fHistK0sreco_pValue_MCbkg->SetXTitle("p-Value");
    fHistK0sreco_pValue_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_Chi2Trk_MCbkg = new TH1F("h_fHistK0sreco_Chi2Trk_MCbkg",
					  "chi2 bkg",
					  300, 0, 100);
    fHistK0sreco_Chi2Trk_MCbkg->SetXTitle("#chi^{2} / N_{DoF}");
    fHistK0sreco_Chi2Trk_MCbkg->SetYTitle("Number of Entries");
    fHistK0sreco_Chi2Vtx_MCbkg = new TH1F("h_fHistK0sreco_Chi2Vtx_MCbkg",
					  "chi2 bkg",
					  300, 0, 100);
    fHistK0sreco_Chi2Vtx_MCbkg->SetXTitle("#chi^{2} / N_{DoF}");
    fHistK0sreco_Chi2Vtx_MCbkg->SetYTitle("Number of Entries");
    
    
    gDirectory->cd("../");

    // Decay Angle MC study
    
    gDirectory->mkdir("DecayAngle_Analysis",
		      "Analyzing the 3 areas in bkg decay angle distribution");
    gDirectory->cd("DecayAngle_Analysis");

    // DecayAngle areas
    fHist_DecayAngle_0to06 = new TH1F("h_DecayAngle_0to06",
				      "truth type with DecayAngle from 0 to 0.6",
				      6230, -3130,3130);
    fHist_DecayAngle_06to094 = new TH1F("h_DecayAngle_06to094",
					"truth type with DecayAngle from 0.6 to 0.94",
				      6230, -3130,3130);
    fHist_DecayAngle_094to1 = new TH1F("h_DecayAngle_094to1",
				       "truth type with DecayAngle from 0.94 to 1.0",
				       6230, -3130,3130);
    fHist_DecayAngleNeg_0to06 = new TH1F("h_DecayAngleNeg_0to06",
				      "truth type with DecayAngle from 0 to -0.6",
				      6230, -3130,3130);
    fHist_DecayAngleNeg_06to094 = new TH1F("h_DecayAngleNeg_06to094",
					"truth type with DecayAngle from -0.6 to -0.94",
				      6230, -3130,3130);
    fHist_DecayAngleNeg_094to1 = new TH1F("h_DecayAngleNeg_094to1",
				       "truth type with DecayAngle from -0.94 to -1.0",
				       6230, -3130,3130);
    
    fHist_MCK0s_DecayAngle = new TH1F("h_MCK0s_DecayAngle",
				      "decay angle of reconstructable mc K0s",
				      50, -1, 1);
    fHist_MCK0s_DecayAngle->SetXTitle("cos(#beta) (rad)");
    fHist_MCK0s_DecayAngle->SetYTitle("Number of Entries");
    fHistAllMCK0s_DecayAngle = new TH1F("h_AllMCK0s_DecayAngle",
					"decay angle of all mc K0s",
					50, -1, 1);
    fHistAllMCK0s_DecayAngle->SetXTitle("cos(#beta) (rad)");
    fHistAllMCK0s_DecayAngle->SetYTitle("Number of Entries");

    
    fHist_DA_Comb = new TH1F("h_DA_Comb", "decay angle of Comb Bkg",
			     50, -1, 1);
    fHist_DA_Comb->SetXTitle("Decay Angle cos(#theta*) (rad)");
    fHist_DA_Comb->SetYTitle("Number of Entries");
    fHist_DA_Gamma = new TH1F("h_DA_Gamma", "decay angle of PhotonConv",
			      50, -1, 1);
    fHist_DA_Gamma->SetXTitle("Decay Angle cos(#theta*) (rad)");
    fHist_DA_Gamma->SetYTitle("Number of Entries");
    fHist_DA_Lambda = new TH1F("h_DA_Lambda", "decay angle of Lambda Decays",
			       50, -1, 1);
    fHist_DA_Lambda->SetXTitle("Decay Angle cos(#theta*) (rad)");
    fHist_DA_Lambda->SetYTitle("Number of Entries");
    
    
    fHist_SubView = new TH1F("h_SubView", "SuvView", 1000, -1, -0.5);
    fHist_SubView->SetXTitle("cos(#beta) (rad)");
    fHist_SubView->SetYTitle("Number of Entries");

    fHist_InvMass = new TH1F("h_InvMass", "Invariant K0s mass (RootBoost)",
			     100, 0.2, 0.8);
    fHist_InvMass->SetXTitle("m_{K0s} (GeV)");
    fHist_InvMass->SetYTitle("Number of Entries");
    fHist_InvMass_OwnBoost = new TH1F("h_InvMass_OwnBoost", "Invariant K0s mass (Own Boost)",
				      100, 0.2, 0.8);
    fHist_InvMass_OwnBoost->SetXTitle("m_{K0s} (GeV)");
    fHist_InvMass_OwnBoost->SetYTitle("Number of Entries");
    
    fHist_OwnBoost = new TH1F("h_AllOwnBoost",
			      "Own LorentzTrafo",
			      50, -1, 1);
    fHist_OwnBoost->SetXTitle("cos(#beta) (rad)");
    fHist_OwnBoost->SetYTitle("Number of Entries");


    // hier
    fHist_PionsRight_Pt = new TH1F("h_PionsRight_Pt",
				  "Pt of Pions in DecayAngle Area 06 to 094",
				  60, 0, 20);
    fHist_PionsRight_Pt->SetXTitle("Pt");
    fHist_PionsRight_Pt->SetYTitle("Number of Entries");
    fHist_PionsLeft_Pt = new TH1F("h_PionsLeft_Pt",
				 "Pt of Pions in DecayAngle Area -06 to -094",
				 60, 0, 20);
    fHist_PionsLeft_Pt->SetXTitle("Pt");
    fHist_PionsLeft_Pt->SetYTitle("Number of Entries");
    

    
    gDirectory->cd("../../../");
}


//____________________________________________________________________

Bool_t AtlK0sFinder::AnalyzeEvent() {
    //
    // Event analysis
    //

    // Clean-up bkg list from previous event
    for (Int_t i = 0; i < fBkgK0sDecays->GetEntries(); i++) {
	AtlK0sDecayPiPi *obj = (AtlK0sDecayPiPi*)fBkgK0sDecays->At(i);
	delete obj;
    }
    fBkgK0sDecays->Clear("C");
    
    // Reconstruct K0s decays
    if ( fMode == kKinFit ) {
	
	// Count real K0s to compute efficiency and do DecayAngle Analysis
	if (fEvent->IsMC() ){
	    TList *K0s_list = fEvent->GetMCParticles("K_S0");
	    Int_t Nr_K0sMC = 0;
	    
	    for( Int_t i = 0; i < K0s_list->GetEntries(); i++ ){
		HepMCParticle *prt = (HepMCParticle*)(K0s_list->At(i));
		if (prt->GetN_Daughters() != 2) continue;
		// compute Decay Angle for all mc K0s
		TLorentzVector P_PiPlus_RFK0s,P_other;
		if( ((HepMCParticle*)(prt->GetDaughters()->At(0)))->IsPiPlus() ){
		    P_PiPlus_RFK0s = ((HepMCParticle*)(prt->GetDaughters()->At(0)))->P();
		    P_other = ((HepMCParticle*)(prt->GetDaughters()->At(1)))->P();
		}
		else if ( ((HepMCParticle*)(prt->GetDaughters()->At(1)))->IsPiPlus() ){
		    P_PiPlus_RFK0s = ((HepMCParticle*)(prt->GetDaughters()->At(1)))->P();
		    P_other = ((HepMCParticle*)(prt->GetDaughters()->At(0)))->P();
		}
		else continue;
		TVector3 boost = -prt->P().BoostVector();
		TLorentzVector P_Own = P_PiPlus_RFK0s;
		TLorentzVector Pother_Own = P_other;
		P_PiPlus_RFK0s.Boost(boost); // boosting trks momentum in K0s restframe
		P_other.Boost(boost);
		Float_t DecayAngle = TMath::Cos(prt->P().Angle(P_PiPlus_RFK0s.Vect()));
		fHistAllMCK0s_DecayAngle->Fill(DecayAngle, GetPreTagEvtWeight());
		
		if(DecayAngle < -0.8){
		    fHist_InvMass->Fill((P_PiPlus_RFK0s + P_other).M(),GetPreTagEvtWeight());
		    fHist_SubView->Fill(DecayAngle,GetPreTagEvtWeight());
		}

		// own boost:
		TVector3 p = P_Own.Vect();
		Float_t  E = P_Own.E();
		TVector3 pother = Pother_Own.Vect();
		Float_t Eother = Pother_Own.E();
		Float_t  Eprime = 0;
		Double_t pprime[3];
		Float_t  Eotherprime = 0;
		Double_t potherprime[3];
		Float_t gamma = prt->E()/prt->M();
		Float_t dummy = 0;
		Float_t dummy2 = 0;
		
		for( Int_t b = 0; b < 3; b++) {
		    dummy  += -boost[b]*p[b];
		    dummy2 += -boost[b]*pother[b];
		}
		for( Int_t a = 0; a < 3; a++){
		    pprime[a] = p[a] + boost[a]*gamma*(E - gamma*dummy/(gamma + 1));
		    potherprime[a] = pother[a] + boost[a]*gamma*(Eother - gamma*dummy2/(gamma + 1));
		}
		Eprime = gamma*(E - dummy);
		Eotherprime = gamma*(Eother - dummy2);
		// Abspeichern und eigenen DecayWinkel fuellen
		TVector3 pprime_save(pprime[0],pprime[1],pprime[2]);
		TVector3 pprimeother_save(potherprime[0],potherprime[1],potherprime[2]);
		P_Own.SetE(Eprime);
		P_Own.SetVect(pprime_save);
		Pother_Own.SetE(Eotherprime);
		Pother_Own.SetVect(pprimeother_save);

		fHist_OwnBoost->Fill( TMath::Cos(prt->P().Angle(P_Own.Vect())) , GetPreTagEvtWeight());
		if(DecayAngle < -0.8)
		    fHist_InvMass_OwnBoost->Fill((P_Own + Pother_Own).M(),GetPreTagEvtWeight());
		

		
	        // Fill computated Decay Angle for reconstructable mc K0s  
		AtlIDTrack *daughter1 =
		       fEvent->GetAssociatedIDTrack((HepMCParticle*)prt->GetDaughters()->At(0));
		AtlIDTrack *daughter2 =
		    fEvent->GetAssociatedIDTrack((HepMCParticle*)prt->GetDaughters()->At(1));
		if( (daughter1 == 0) || (daughter2 == 0) ) continue;
		if( (TMath::Abs(prt->Eta()) < 2.5) && (prt->Pt() > 0.5) ){
		    if (daughter1->HasValidTruthMatch(fMatchingProb_min) &&
			daughter2->HasValidTruthMatch(fMatchingProb_min) ){
			fHist_MCK0s_DecayAngle->Fill( DecayAngle,GetPreTagEvtWeight());
			Nr_K0sMC++;
		    }
		}
	    }
	    AddAbundanceTrue( Nr_K0sMC );
	}
	ReconstructK0sKinFit();
    } else if ( fMode == kCutBased ) {
	ReconstructK0sCutBased();
    } else {
	Error("AnalyzeEvent",
	      "Invalid mode given. Abort!");
	gSystem->Abort(0);
    }
    return kTRUE;
}

//____________________________________________________________________


void AtlK0sFinder::ReconstructK0sCutBased(){
    //
    // Cut Based K0s reconstruction  
    // 
    
    // Looping over all trk-combinations at a sec Vertex for K0s reconstruction
    AtlIDTrack *trk1 = 0;
    AtlIDTrack *trk2 = 0;                    // compared trks
    HepVertex *Vtx=0;                        // associated DecayVertex 
    HepVertex *PrimVtx=0;                    // Primary Vertex

    Int_t i;                                 // Vertex Loop iterator
    Int_t BgkCount = 1;                      // gives ID of background K0s (from same charged pions) 

    TLorentzVector p_trk1, p_trk2, p_K0s;    // 4 Momentum
    Float_t m_K0s = 0;                       // Reconstructed K0s-mass


    //storing primary Vtx
    PrimVtx = fEvent->GetPrimaryVtx();
    
    // Vertex-Loop
    for ( i = 0; i < fEvent->GetN_Vertices(); i++ ) {
	
	Vtx = (HepVertex*)fEvent->GetVertices()->At(i);

	
	// regarding only sec vtx containing 2 outgoing tracks
	if ( !( (Vtx->IsSecondary()) && (Vtx->GetNDaughters() == 2) )) continue;
	SetCutFlow("Sec Vtx & 2 Dght");

	trk1 = (AtlIDTrack*)Vtx->GetDaughters()->At(0);
	trk2 = (AtlIDTrack*)Vtx->GetDaughters()->At(1);
	
	// Momenta of outgoing pion tracks
	if ( (trk1->Pt() > fSignalPion_Pt_max) ||
	     (trk1->Pt() < fSignalPion_Pt_min) ) continue;
	if ( (trk2->Pt() > fSignalPion_Pt_max) ||
	     (trk2->Pt() < fSignalPion_Pt_min) ) continue;
	SetCutFlow("#pi p_{#perp}");
	// Eta of outgoing pion tracks
	if ( (trk1->Eta() > fSignalPion_Eta_max) ||
	     (trk1->Eta() < fSignalPion_Eta_min) ) continue;
	if ( (trk2->Eta() > fSignalPion_Eta_max) ||
	     (trk2->Eta() < fSignalPion_Eta_min) ) continue;
	SetCutFlow("#pi #eta");

	// Quality of sec. Vertex fit
	if (Vtx->GetChi2overNDoF() > fVertexChi2ovNDoF_max) continue;
	SetCutFlow("Vtx #chi^{2}");
	// Cut on Transverse Decay Length
	if( (PrimVtx->GetPos() - Vtx->GetPos()).Perp() < fTransvDecayLength_min) continue;
	SetCutFlow("Transv. Dcy. Len.");
	
		
       // Quality of Track-Fit
	if (  (trk1->Chi2ovNDoF() > fTrackChi2ovNDoF_max) ||
	      (trk2->Chi2ovNDoF() > fTrackChi2ovNDoF_max)  ) continue;
	SetCutFlow("Trk #chi^{2}");
	
	
	// Discard all tracks without reference to a truth particle for all
	// MC-Runs to compute the purity correctly
	if( fEvent->IsMC() ){
	    if( !( trk1->HasValidTruthMatch(0.0001) &&
		   trk2->HasValidTruthMatch(0.0001)) )  continue;
	}
	SetCutFlow("MC exists");
	
	// Get 4 Momentum and compute inv. mass of K0s candidate
	p_trk1.SetVectM(trk1->P(), fm_pi);
	p_trk2.SetVectM(trk2->P(), fm_pi);
	p_K0s = p_trk1 + p_trk2;
	m_K0s = p_K0s.M();   

	// Cut on cosine of pointing angle
	if( TMath::Abs( TMath::Cos( p_K0s.Angle( (Vtx->GetPos() - PrimVtx->GetPos()) ))) < fPointingAngle_min)
	    continue;
	SetCutFlow("Pointing Angle)");

	// Cut on cos of Decay Angle
	TVector3 boost = -p_K0s.BoostVector();
	TLorentzVector P_trk1_RFK0s = p_trk1;
	TLorentzVector P_trk2_RFK0s = p_trk2;
	P_trk1_RFK0s.Boost(boost); // boosting trks momentum in K0s restframe
	P_trk2_RFK0s.Boost(boost); // boosting trks momentum in K0s restframe
	if ( (TMath::Cos(p_K0s.Angle(P_trk1_RFK0s.Vect())) > fDecayAngle_max)
	     || (TMath::Cos(p_K0s.Angle(P_trk2_RFK0s.Vect())) > fDecayAngle_max) )
	    continue;
	SetCutFlow("Decay Angle)");

	// Cut on Opening Angle
	if ( p_trk1.Angle(p_trk2.Vect()) < fOpeningAngle_min)
	    continue;
	SetCutFlow("Opening Angle");
	
       // Invariant Mass
	// -------------------------
	if( (m_K0s>fK0s_M_min) && (m_K0s<fK0s_M_max) ){     // mass peak:
	    SetCutFlow("inv. mass window)");
	    if ( trk1->GetQovP()*trk2->QovP() < 0.) {       // request opposite sign for signal
		SetCutFlow("opp. sign");
		// Add K0sDecay to fEvents Decay-list
		TLorentzVector P1,P2;
		P1.SetVectM(trk1->P(),fm_pi);
		P2.SetVectM(trk2->P(),fm_pi);

		AtlK0sDecayPiPi *decay = 0;
                // look for right order:
		if(trk1->GetQovP_Vtx()>0.){
		    HepParticle Fit_Daughter1(1,P1.Px(),P1.Py(),P2.Pz(),P1.E(),211);
		    HepParticle Fit_Daughter2(2,P2.Px(),P2.Py(),P2.Pz(),P2.E(),-211);
		    decay = fEvent->AddK0sDecayPiPi(p_K0s.Px(),p_K0s.Py(),p_K0s.Pz(),p_K0s.E(),
					    trk1,trk2,Vtx,
					    Fit_Daughter1,Fit_Daughter2);\
		    fNK0s++;
		} else {
		    HepParticle Fit_Daughter1(1,P2.Px(),P2.Py(),P2.Pz(),P2.E(),211);
		    HepParticle Fit_Daughter2(2,P1.Px(),P1.Py(),P1.Pz(),P1.E(),-211);
		    decay = fEvent->AddK0sDecayPiPi(p_K0s.Px(),p_K0s.Py(),p_K0s.Pz(),p_K0s.E(),
					    trk2,trk1,Vtx,
					    Fit_Daughter1, Fit_Daughter2);
		    fNK0s++;
		}
		
		// Hitbased TruthMatching
		if ( fEvent->IsMC() ){
		    switch ( DoTruthMatch(decay) ){
			case  1:
			    fTrueReco = kTRUE;
			    FillHistograms_MCTruthStudy(decay,'s');
			    break;
			case -1:
			    fTrueReco = kFALSE;
			    FillHistograms_MCTruthStudy(decay,'b');
			    break;
			case  0:
			    continue;
		    }
		}
		
		// DebugOutput
		if ( IsDebugRun() ) {
		    if( trk1->HasValidTruthMatch(0.0001) && trk2->HasValidTruthMatch(0.0001) ){
			fDebugOutput << endl
				     << "Event Nr. :" << fTree->GetReadEntry() << "Vertex ID: "
				     << Vtx->GetId() << endl
				     << "Trk1: " << trk1->GetMCParticle()->GetPdgName() << " Mother: "
				     << trk1->GetMCParticle()->GetMother()->GetPdgName() << endl
				     << "Trk2: " << trk2->GetMCParticle()->GetPdgName() << " Mother: "
				     << trk2->GetMCParticle()->GetMother()->GetPdgName() << endl
				     << endl;
		    }
		    } 
		
	    } else { // Add same charged combinations to the bkg list (like-sign)
		TLorentzVector P1,P2;
		P1.SetVectM(trk1->P(),fm_pi);
		P2.SetVectM(trk2->P(),fm_pi);
		
		Int_t pdgCode = 0;
		if (trk1->QovP()>0.) pdgCode = 211;
		else pdgCode = -211;

		HepParticle Fit_Daughter1(1,P1.Px(),P1.Py(),P2.Pz(),P1.E(),pdgCode);
		HepParticle Fit_Daughter2(2,P2.Px(),P2.Py(),P2.Pz(),P2.E(),pdgCode);
		fEvent->AddK0sDecayPiPi(p_K0s.Px(),p_K0s.Py(),p_K0s.Pz(),p_K0s.E(),
					trk1,trk2,Vtx,
					Fit_Daughter1,Fit_Daughter2);
		fBkgK0sDecays->Add(new AtlK0sDecayPiPi(BgkCount++,p_K0s.Px(), p_K0s.Py(),
						       p_K0s.Pz(), p_K0s.E(),
						       trk1,trk2,
						       Vtx, PrimVtx, Fit_Daughter1,Fit_Daughter2));
	    }
	}
    } // end of vertex loop
}


//____________________________________________________________________

void AtlK0sFinder::ReconstructK0sKinFit(){
    //
    // K0s reconstruction from track-pairs assuming being pions using KinFitter
    //


    
    HepVertex *Vtx = 0;
    HepVertex *PrimVtx = 0;
    AtlIDTrack *trk1 = 0;  
    AtlIDTrack *trk2 = 0;
    
    TLorentzVector p_K0s;
    
    TMatrixD cov_trk1(3,3);
    TMatrixD cov_trk2(3,3);

    Int_t BgkCount = 1;  // gives ID of background K0s (from same charged pions)
    Float_t PvalueKinFit = 0.0;

     //storing primary Vtx
    PrimVtx = fEvent->GetPrimaryVtx();
        
    // Vertex-Loop
    for ( Int_t i = 0; i < fEvent->GetN_Vertices(); i++){
	
	Vtx = (HepVertex*)fEvent->GetVertices()->At(i);
	
	// regarding only sec vtx containing 2 outgoing tracks
	if ( !( (Vtx->IsSecondary()) && (Vtx->GetNDaughters() == 2) )) continue;
	SetCutFlow("Sec. Vtx & 2 Dght.");

	trk1 = (AtlIDTrack*)Vtx->GetDaughters()->At(0);
	trk2 = (AtlIDTrack*)Vtx->GetDaughters()->At(1);
	
	// Momenta of outgoing pion tracks
	if ( (trk1->Pt() > fSignalPion_Pt_max) ||
	     (trk1->Pt() < fSignalPion_Pt_min) ) continue;
	if ( (trk2->Pt() > fSignalPion_Pt_max) ||
	     (trk2->Pt() < fSignalPion_Pt_min) ) continue;
	SetCutFlow("#pi p_{#perp}");
	// Eta of outgoing pion tracks
	if ( (trk1->Eta() > fSignalPion_Eta_max) ||
	     (trk1->Eta() < fSignalPion_Eta_min) ) continue;
	if ( (trk2->Eta() > fSignalPion_Eta_max) ||
	     (trk2->Eta() < fSignalPion_Eta_min) ) continue;
	SetCutFlow("#eta (pions)");

       // Quality of sec. Vertex fit
	if (Vtx->GetChi2overNDoF() > fVertexChi2ovNDoF_max) continue;
	SetCutFlow("Vtx #chi^{2}");
	// Cut on Transverse Decay Length
	if( (PrimVtx->GetPos() - Vtx->GetPos()).Perp() < fTransvDecayLength_min) continue;
	SetCutFlow("Decay Len.");
	
      // Quality of Track-Fit
	if (  (trk1->Chi2ovNDoF() > fTrackChi2ovNDoF_max) ||
	      (trk2->Chi2ovNDoF() > fTrackChi2ovNDoF_max)  ) continue;
	SetCutFlow("Trk #chi^{2}");
	
	// Discard all tracks without reference to a truth particle for all
	// MC-Runs to compute the purity correctly
	if( fEvent->IsMC() ){
	    if( !( trk1->HasValidTruthMatch(0.0001) &&
		   trk2->HasValidTruthMatch(0.0001)) )  continue;
	}
	SetCutFlow("MC exists");
		
	// covariance matrices, taken from track fit
	trk1->GetCovMatrixPtEtaPhi(cov_trk1);
	trk2->GetCovMatrixPtEtaPhi(cov_trk2);
	
	// define momentum used as output of the fit
	TLorentzVector FitP_trk1;
	TLorentzVector FitP_trk2;
	
	// define particels necessary for execution of the fit
	// using pion mass hypothesis; fit variables are pt, eta, phi
	TVector3 dummy1 = trk1->P(); // instead of const cast
	TFitParticlePtEtaPhi FitExec_trk1("FitExec_trk1","FitExec_trk1 for K0sFit",
					  &dummy1,fm_pi,&cov_trk1);
	TVector3 dummy2 = trk2->P(); // instead of const cast
	TFitParticlePtEtaPhi FitExec_trk2("FitExec_trk2","FitExec_trk2 for K0sFit",
					  &dummy2,fm_pi,&cov_trk2);
	
	// definition of K0s mass constraint
	TFitConstraintM MK0sCons("K0sMassConstraint","K0sMassConstraintGaus",0,0,0.497);
	MK0sCons.addParticles1(&FitExec_trk1,&FitExec_trk2);
	
	// fitting characteristics
	TKinFitter fitter;
	fitter.addMeasParticle(&FitExec_trk1);
	fitter.addMeasParticle(&FitExec_trk2);
	fitter.addConstraint(&MK0sCons);
	
	fitter.setMaxNbIter(50);   // maximum number of iterations
	fitter.setMaxDeltaS(5e-5); // maximum deviation of the minimum function within two iterations
	fitter.setMaxF(1e-6);      // maximum value of constraints
	fitter.setVerbosity(0);    // verbosity level

	// Kinematic Fitting
	fitter.fit();
	
	// Fill Histogram IF(!) the fit converged (fitter.getStatus==0)
	if ( fitter.getS()<0. ) {
	    continue;
	}
	if ( !fitter.getStatus() ) {
	    SetCutFlow("Fit converged");
	    // Copy fittet Vectors
	    FitP_trk1=(*FitExec_trk1.getCurr4Vec());
	    FitP_trk2=(*FitExec_trk2.getCurr4Vec());
	    
	    // Reconstruct K0s 4-momentum
	    p_K0s = FitP_trk1 + FitP_trk2;

	    // Cut on cosine of pointing angle
	    if( TMath::Abs( TMath::Cos(p_K0s.Angle( (Vtx->GetPos() - PrimVtx->GetPos() ) ))) < fPointingAngle_min)
		continue;
	    SetCutFlow("Pointing Angle");
	    
	    // Cut on cos of Decay Angle
	    TVector3 boost = -p_K0s.BoostVector();
	    TLorentzVector P_trk1_RFK0s = FitP_trk1;
	    TLorentzVector P_trk2_RFK0s = FitP_trk2;
	    P_trk1_RFK0s.Boost(boost); // boosting trks momentum in K0s restframe
	    P_trk2_RFK0s.Boost(boost); // boosting trks momentum in K0s restframe
	    if ( (TMath::Abs(TMath::Cos(p_K0s.Angle(P_trk1_RFK0s.Vect()))) > fDecayAngle_max)
		 || TMath::Abs((TMath::Cos(p_K0s.Angle(P_trk2_RFK0s.Vect()))) > fDecayAngle_max) )
		continue;
	    SetCutFlow("Decay Angle");


	    // Cut on Opening Angle
	    if ( FitP_trk1.Angle(FitP_trk2.Vect()) < fOpeningAngle_min)
		continue;
	    SetCutFlow("Opening Angle");
	    
	    //setting Chi2,NDoF
	    SetChi2(fitter.getS());
	    SetNDoF(fitter.getNDF());
	    PvalueKinFit = TMath::Prob(fChi2, fNDoF);

	    // Adding K0s to event
	    if (PvalueKinFit >= fKinFitPvalue_min) {
		SetCutFlow("KinFit p-value");

		// Discard all Candidates that are Lambda Candidates as well
		if( IsLambdaCandidate(Vtx) ) continue;
		SetCutFlow("#Lambda Veto");


		//Fill Signal or Background
		AtlKinFitterTool::SetX_TruthHistograms(Vtx->GetPos().Perp());
		
                AtlK0sDecayPiPi *decay;
		if ( trk1->Charge()*trk2->Charge() < 0. ) { //require opposite sign
		    SetCutFlow("opp. sign");

                      // look for right order
		    if ( trk1->QovP()>0. ) {
			HepParticle Fit_Daughter1(1,FitP_trk1.Px(),FitP_trk1.Py(),
						  FitP_trk1.Pz(), FitP_trk1.E(),211);
			HepParticle Fit_Daughter2(2,FitP_trk2.Px(),FitP_trk2.Py(),
						  FitP_trk2.Pz(), FitP_trk2.E(),-211);
			decay = fEvent->AddK0sDecayPiPi(p_K0s.Px(),p_K0s.Py(),p_K0s.Pz(),p_K0s.E(),
							trk1,trk2,Vtx,
							Fit_Daughter1,Fit_Daughter2);
			fNK0s++;
		    } else {
			HepParticle Fit_Daughter1(1,FitP_trk2.Px(),FitP_trk2.Py(),
						  FitP_trk2.Pz(), FitP_trk2.E(),211);
			HepParticle Fit_Daughter2(2,FitP_trk1.Px(),FitP_trk1.Py(),
						  FitP_trk1.Pz(), FitP_trk1.E(),-211);
			decay = fEvent->AddK0sDecayPiPi(p_K0s.Px(),p_K0s.Py(),p_K0s.Pz(),p_K0s.E(),
						trk2,trk1,Vtx,
						Fit_Daughter1, Fit_Daughter2);
			fNK0s++;
		    }
		    decay->SetChi2NDoF(fChi2, fNDoF);

		    // Hitbased TruthMatching
		    if ( fEvent->IsMC() ){
			switch ( DoTruthMatch(decay) ){
			    case  1:
				fTrueReco = kTRUE;
				FillHistograms_MCTruthStudy(decay,'s');
				break;
			    case -1:
				fTrueReco = kFALSE;
				FillHistograms_MCTruthStudy(decay,'b');
				break;
			    case  0:
				continue;
			}
		    }
		    
		    // DebugOutput
		      if ( IsDebugRun() ) {
			if( trk1->HasValidTruthMatch(0.0001) && trk2->HasValidTruthMatch(0.0001) ){
			    //fDebugOutput
			    cout << endl
				 << "Event Nr. :" << fTree->GetReadEntry() << "Vertex ID: "
				 << Vtx->GetId() << endl
				 << "Trk1: " << trk1->GetMCParticle()->GetPdgName() << " Mother: "
				 << trk1->GetMCParticle()->GetMother()->GetPdgName() << endl
				 << "Trk2: " << trk2->GetMCParticle()->GetPdgName() << " Mother: "
				 << trk2->GetMCParticle()->GetMother()->GetPdgName() << endl
				 << endl;
			}
			}
		    // fill fitter histograms depending on Chi2 and NDoF
		    // AtlKinFitterTool::SetX_TruthHistograms( decay->GetDecayAngle() ); 
		    AtlKinFitterTool::FillHistograms("Signal"); 
		} else {
		    
		    // Add same charged combinations to the bkg list
		    Int_t pdgCode = 0;
		    if (trk1->QovP()>0.) pdgCode = 211;
		    else pdgCode = -211;
		    HepParticle Fit_Daughter1(1,FitP_trk1.Px(),FitP_trk1.Py(),
					      FitP_trk1.Pz(), FitP_trk1.E(),pdgCode);
		    HepParticle Fit_Daughter2(2,FitP_trk2.Px(),FitP_trk2.Py(),
					      FitP_trk2.Pz(), FitP_trk2.E(),pdgCode);
		    decay = new AtlK0sDecayPiPi(BgkCount++,p_K0s.Px(), p_K0s.Py(),
						p_K0s.Pz(), p_K0s.E(),
						trk1, trk2,
						Vtx, PrimVtx,
						Fit_Daughter1,Fit_Daughter2);
		    decay->SetChi2NDoF(fChi2, fNDoF);
		    fBkgK0sDecays->Add(decay);
		    // fill Chi2 and NDoFa
		    AtlKinFitterTool::FillHistograms("Bkg");
		}

	    }// End of Prob(Chi2ovNDoF) > x  request
	}
    } //end of vertex loop
}

//____________________________________________________________________    

void AtlK0sFinder::FillHistograms() {
    //
    // Fill histograms
    //

    AtlK0sDecayPiPi *K0s = 0;
    TLorentzVector P_K0s,P_PiPlus,P_PiMinus;
    Float_t OpeningAngle = 0.;
    Float_t PointingAngle = 0.;
    

    // Signal (opposite charged)
    // ________________________________________
    
    for ( Int_t i = 0; i < fEvent->GetN_K0sDecaysPiPi(); i++ ) {

       	K0s = (AtlK0sDecayPiPi*)fEvent->GetK0sDecaysPiPi()->At(i);
	P_K0s     = K0s->P();
	P_PiPlus  = K0s->GetReFitPiPlus().P();
	P_PiMinus = K0s->GetReFitPiMinus().P();

        //filling the standard histograms
	//----------------------------------
	fHistK0sreco_m_PiPi     ->Fill(K0s->M("REC")      ,GetPreTagEvtWeight());
	fHistK0sreco_pt_PiPi    ->Fill(K0s->Pt()          ,GetPreTagEvtWeight());  
	fHistK0sreco_phi_PiPi   ->Fill(K0s->Phi()         ,GetPreTagEvtWeight()); 
	fHistK0sreco_eta_PiPi   ->Fill(K0s->Eta()         ,GetPreTagEvtWeight());
	fHistK0sreco_tau_PiPi   ->Fill(K0s->GetLifeTime() ,GetPreTagEvtWeight());
	fHistK0sreco_DecayLength_PiPi   ->Fill(K0s->GetDecayLength(),  GetPreTagEvtWeight());
	fHistK0sreco_R_vtx->Fill(K0s->GetVtx()->GetPos().Perp(),       GetPreTagEvtWeight());
	
	// FlightDirection
	TVector3 FlightDirection = (K0s->GetVtx())->GetPos();
	FlightDirection -= (fEvent->GetPrimaryVtx())->GetPos();
	PointingAngle = P_K0s.Angle(FlightDirection);
	fHistK0sreco_PointingAngle_PiPi ->Fill(TMath::Abs(TMath::Cos(PointingAngle)),GetPreTagEvtWeight());

        // Opening Angle
	OpeningAngle = P_PiPlus.Angle(P_PiMinus.Vect());
	fHistK0sreco_OpeningAngle_PiPi  ->Fill(OpeningAngle, GetPreTagEvtWeight());

        // Decay Angle is the angle between K0s' momentum and the momentum of the pi+
	// in K0s' restframe
	fHistK0sreco_DecayAngle_PiPi    ->Fill(TMath::Cos(K0s->GetDecayAngle()),  GetPreTagEvtWeight());
	
	
       // filling pion histograms
	// --------------------------
	fHistK0sreco_PiPlus_pt     ->Fill(P_PiPlus.Pt()   ,GetPreTagEvtWeight());
	fHistK0sreco_PiMinus_pt    ->Fill(P_PiMinus.Pt()  ,GetPreTagEvtWeight());
	fHistK0sreco_PiPlus_eta    ->Fill(P_PiPlus.Eta()  ,GetPreTagEvtWeight());
	fHistK0sreco_PiMinus_eta   ->Fill(P_PiMinus.Eta() ,GetPreTagEvtWeight());
	fHistK0sreco_PiPlus_phi    ->Fill(P_PiPlus.Phi()  ,GetPreTagEvtWeight());
	fHistK0sreco_PiMinus_phi   ->Fill(P_PiMinus.Phi() ,GetPreTagEvtWeight());

	fHistK0sreco_Pions_PtEta   ->Fill(P_PiMinus.Pt() ,P_PiMinus.Eta(), GetPreTagEvtWeight());
	fHistK0sreco_Pions_PtEta   ->Fill(P_PiPlus.Pt() , P_PiPlus.Eta(),  GetPreTagEvtWeight());
	
	// general tuning histograms
	fHistVtxChi2ovNDoF->Fill(K0s->GetVtx()->GetChi2overNDoF(),GetPreTagEvtWeight());
	fHistTrkChi2ovNDoF->Fill(K0s->GetPiPlus()->Chi2ovNDoF(),  GetPreTagEvtWeight());
	fHistTrkChi2ovNDoF->Fill(K0s->GetPiMinus()->Chi2ovNDoF(), GetPreTagEvtWeight());


	// filing 2d Histogram (R_Vtx and M_ee), therefore the invariant mass of the
	// 2track-system will be computed while asuming a electron mass hypothesis
	P_PiPlus.SetVectM(K0s->GetReFitPiPlus().P3(),0.000510998910);
	P_PiMinus.SetVectM(K0s->GetReFitPiMinus().P3(),0.000510998910);
	fHistK0sreco_RvtxMee->Fill(K0s->GetVtx()->GetPos().Perp(),(P_PiPlus+P_PiMinus).M(),GetPreTagEvtWeight());
	
    }
    fHistK0sreco_N_PiPi ->Fill(fEvent->GetN_K0sDecaysPiPi(), GetPreTagEvtWeight());
    
    
    // Combinatorial Background (Like-sign approach)
    // ____________________________________________

     TIter next(fBkgK0sDecays);
    while ( (K0s = (AtlK0sDecayPiPi*)next()) ) {
	
	TLorentzVector P_Pi1 = K0s->GetReFitPiPlus().P();
	TLorentzVector P_Pi2 = K0s->GetReFitPiMinus().P();
	
	P_K0s  = K0s->P();
	P_Pi1  = K0s->GetReFitPiPlus().P();
	P_Pi2  = K0s->GetReFitPiMinus().P();

        //filling the standard histograms
	//----------------------------------
	fHistK0sreco_m_LS_bkg     ->Fill(K0s->M("REC")      ,GetPreTagEvtWeight());
	fHistK0sreco_pt_LS_bkg    ->Fill(K0s->Pt()          ,GetPreTagEvtWeight());  
	fHistK0sreco_phi_LS_bkg   ->Fill(K0s->Phi()         ,GetPreTagEvtWeight()); 
	fHistK0sreco_eta_LS_bkg   ->Fill(K0s->Eta()         ,GetPreTagEvtWeight());
	fHistK0sreco_tau_LS_bkg   ->Fill(K0s->GetLifeTime() ,GetPreTagEvtWeight());
	fHistK0sreco_DecayLength_LS_bkg   ->Fill(K0s->GetDecayLength(),  GetPreTagEvtWeight());
	
        //filling pion histograms
	//-----------------------------
        // Get Daughters: both are same charged -> fill either positive or
	// negative daughter histograms
	
	// Check if positive or negative charged daughters   
	if( K0s->GetPiPlus()->IsPositive() ) {    
	    fHistK0sreco_PiPlus_pt_LS_bkg     ->Fill(P_Pi1.Pt(),   GetPreTagEvtWeight());
	    fHistK0sreco_PiPlus_eta_LS_bkg    ->Fill(P_Pi1.Eta(),  GetPreTagEvtWeight());
	    fHistK0sreco_PiPlus_phi_LS_bkg    ->Fill(P_Pi1.Phi(),  GetPreTagEvtWeight());
	} else {
	    fHistK0sreco_PiMinus_pt_LS_bkg    ->Fill(P_Pi2.Pt(),   GetPreTagEvtWeight());
	    fHistK0sreco_PiMinus_eta_LS_bkg   ->Fill(P_Pi2.Eta(),  GetPreTagEvtWeight());
	    fHistK0sreco_PiMinus_phi_LS_bkg   ->Fill(P_Pi2.Phi(),  GetPreTagEvtWeight());
	}
    }
    fHistK0sreco_N_LS_bkg ->Fill(fBkgK0sDecays->GetEntries(), GetPreTagEvtWeight());
}

//____________________________________________________________________

void AtlK0sFinder::SetCutDefaults() {
    //
    // Selection cut defaults and Constraint parameters
    //
    
    // Cuts for Tracks  
    fSignalPion_Pt_min       = 0.5;      // Min. Pt of signal electrons
    fSignalPion_Pt_max       = 1.e10;    // Max. Pt of signal electrons
    fSignalPion_Eta_min      = -2.5;     // Min. eta of signal electrons
    fSignalPion_Eta_max      =  2.5;     // Max. eta of signal electrons
    
    fm_pi                    = 0.13957;  // Pion mass hypothesis
}


//____________________________________________________________________


void AtlK0sFinder::PrintCutValues(){
        
    if ( fMode == kKinFit ){
	cout << endl << " Used mode: kKinFit";
	cout << endl << " ----------------------------------------------" << endl;
	cout << " Used CutDefaults:" <<endl;
	cout << " ----------------------------------------------" << endl;
	cout << scientific << setprecision(3) << " Prob(Chi2/NDoF) > "
	     << fKinFitPvalue_min << endl;
	cout << scientific << setprecision(3) << " Min. of Matching Probability > "
	     << fMatchingProb_min << endl;
    }
    else if (fMode == kCutBased)  {
	cout << endl << " Used mode: kCutBased " << endl;  
	cout << " ----------------------------------------------" << endl;
	cout << " Used CutDefaults:" <<endl;
	cout << " ----------------------------------------------" << endl;
	
	cout << scientific << setprecision(3) << " " << fSignalPion_Pt_min <<
	    " < Pt(Pion)  < " << fSignalPion_Pt_max << endl;
	cout << scientific << fSignalPion_Eta_min << " < Eta(Pion) < "
	     << fSignalPion_Eta_max << endl;
	cout << scientific << " " << fK0s_M_min << " < M(K0s)    < " << fK0s_M_max << endl;
	cout << scientific << " Pion mass hypothesis: " << endl
	     << "           M_Pi = " << fm_pi << endl;
    }
    cout << scientific << " maximum Chi2/NDoF of Vertex Fit: " << endl
	 << "  Chi2/NDoF_Vtx = "
	 << fVertexChi2ovNDoF_max << endl
         << scientific << " maximum Chi2/NDoF of Track Fit: " << endl
	 << "  Chi2/NDoF_Vtx = "
	 << fTrackChi2ovNDoF_max << endl
	 << "  Minimum (abs) cos of Pointing Angle  = "
	 << fPointingAngle_min << endl
	 << "  Minimum of  transverse decay length  = "
	 << fTransvDecayLength_min << endl
	 << "  Maximum of  Decay Angle  = "
	 << fDecayAngle_max << endl
	 << "  Minimum of  Opening Angle  = "
	 << fOpeningAngle_min << endl;
    cout << "----------------------------------------------" << endl;




    
    
}

//____________________________________________________________________

Int_t AtlK0sFinder::DoTruthMatch(AtlK0sDecayPiPi *K0sCandidate) {
    //
    // retuns 1 in case of true K0s, -1 if not
    // returns 0 if no decision possible (see fMatchingProb_min)
    //

    AtlIDTrack *trk1 = K0sCandidate->GetPiPlus();
    AtlIDTrack *trk2 = K0sCandidate->GetPiMinus();
    
    fHistPionMatchingProb->Fill(trk1->GetMCParticleProb(), GetPreTagEvtWeight());
    fHistPionMatchingProb->Fill(trk2->GetMCParticleProb(), GetPreTagEvtWeight());


   
    // remove "_bar" from particle name to collect antiparticle and particle in the same bin
    if( trk1->HasValidTruthMatch(0.0001) ){
	const char* fullPdgName = trk1->GetMCParticle()->GetMother()->GetPdgName();
	char pdgName[strlen(fullPdgName)];
	if (strstr(fullPdgName, "_bar") == NULL) {
	    strcpy(pdgName, fullPdgName);
	} else {
	    strncpy(pdgName, fullPdgName, strlen(fullPdgName)-4);
	    pdgName[strlen(fullPdgName)-4] = '\0';
	}
    
    
    // Hitbased TruthMatching
    if( trk1->HasValidTruthMatch(fMatchingProb_min)
	&& trk2->HasValidTruthMatch(fMatchingProb_min)) {
	if( TMath::Abs(trk1->GetMCParticle()->GetPdgCode())== 211
	    && TMath::Abs(trk2->GetMCParticle()->GetPdgCode())== 211
	    && TMath::Abs(trk1->GetMCParticle()->GetMother()->GetPdgCode())== 310
	    && trk1->GetMCParticle()->GetMother() == trk2->GetMCParticle()->GetMother()){
	    fHistK0sreco_truthtype->Fill(pdgName, K0sCandidate->GetProb(), GetPreTagEvtWeight());
	    return 1;
	}else{
	    if (trk1->GetMCParticle()->GetMother() != trk2->GetMCParticle()->GetMother()) {
		fHistK0sreco_truthtype->Fill("Comb", K0sCandidate->GetProb(), GetPreTagEvtWeight());
	    } else {
		fHistK0sreco_truthtype->Fill(pdgName, K0sCandidate->GetProb(), GetPreTagEvtWeight());
	    }
	    return -1;
	}
    }else{
	return 0;
    }


    }

    return 0;
}

//____________________________________________________________________

Bool_t AtlK0sFinder::IsLambdaCandidate(HepVertex *vtx) {
    //
    // Return true, if the given vertex is already assigned
    // to a lambda decay. Return false otherwise or if
    // there are no  lambda decays (eg. the Lambda finder didn't run).
    //
    if (fEvent->GetN_LambdaDecaysPiPi() < 1)
	return kFALSE;

    TClonesArray *Lambdas = fEvent->GetLambdaDecaysPiPi();
    for (Int_t i = 0; i < fEvent->GetN_LambdaDecaysPiPi(); i++) {
	if (((AtlLambdaDecayPPi*)Lambdas->At(i))->GetVtx() == vtx)
	    return kTRUE;
    }
    return kFALSE;
}


//____________________________________________________________________


void AtlK0sFinder::FillHistograms_MCTruthStudy(AtlK0sDecayPiPi *K0sCandidate, char type) {
    // !!! key 'type' must be "s" for signal or "b" for background !!!
    // !!! routine could only be processed in case of a mc sample  !!!
    //
    // fills several histograms like pointing angle, invariant mass,
    // decay angle, ... separately for bkg and signal (K0s candiates that fulfill
    // the monte-carlo truth-matching as well as those that fail)
    
    TLorentzVector P_K0s,P_PiPlus,P_PiMinus;
    Float_t OpeningAngle = 0.;
    Float_t DecayAngle = 0.;
    Float_t PointingAngle = 0.;
    
    P_K0s     = K0sCandidate->P();
    P_PiPlus  = K0sCandidate->GetReFitPiPlus().P();
    P_PiMinus = K0sCandidate->GetReFitPiMinus().P();

    // Opening Angle
    OpeningAngle = P_PiPlus.Angle(P_PiMinus.Vect());
    // FlightDirection
    TVector3 FlightDirection = (K0sCandidate->GetVtx())->GetPos();
    FlightDirection -= (fEvent->GetPrimaryVtx())->GetPos();
    PointingAngle = P_K0s.Angle(FlightDirection);
    // Decay Angle is the angle between K0s' momentum and the momentum of the pi+
    // in K0s' restframe
    DecayAngle = TMath::Cos(K0sCandidate->GetDecayAngle());

    // filing 2d Histogram (R_Vtx and M_ee), therefore the invariant mass of the
    // 2track-system will be computed while asuming a electron mass hypothesis
    // !!! Originaly momenta of Pi+ and pi- candidates are now overwritten !!!
    P_PiPlus.SetVectM(K0sCandidate->GetReFitPiPlus().P3(),0.000510998910);
    P_PiMinus.SetVectM(K0sCandidate->GetReFitPiMinus().P3(),0.000510998910);
    
    // filling histograms // decay angle, N,  
    switch (type) {
	case 's':
	    fHistK0sreco_m_MCsignal     ->Fill(K0sCandidate->M("REC")  ,GetPreTagEvtWeight());
	    fHistK0sreco_pt_MCsignal    ->Fill(K0sCandidate->Pt()          ,GetPreTagEvtWeight());  
	    fHistK0sreco_phi_MCsignal   ->Fill(K0sCandidate->Phi()         ,GetPreTagEvtWeight()); 
	    fHistK0sreco_eta_MCsignal   ->Fill(K0sCandidate->Eta()         ,GetPreTagEvtWeight());
	    fHistK0sreco_tau_MCsignal   ->Fill(K0sCandidate->GetLifeTime() ,GetPreTagEvtWeight());
	    fHistK0sreco_DecayLength_MCsignal   ->Fill(K0sCandidate->GetTransvDecayLength(),  GetPreTagEvtWeight());
	    fHistK0sreco_PointingAngle_MCsignal ->Fill(TMath::Abs(TMath::Cos(PointingAngle)),GetPreTagEvtWeight());
	    fHistK0sreco_OpeningAngle_MCsignal  ->Fill(OpeningAngle, GetPreTagEvtWeight());
	    fHistK0sreco_DecayAngle_MCsignal    ->Fill(DecayAngle, GetPreTagEvtWeight());
	    fHistK0sreco_N_MCsignal             ->Fill(1, GetPreTagEvtWeight());
	    fHistK0sreco_R_vtx_MCsignal ->Fill(K0sCandidate->GetVtx()->GetPos().Perp(), GetPreTagEvtWeight());
	    fHistK0sreco_RvtxMee_MCsignal->Fill(K0sCandidate->GetVtx()->GetPos().Perp(),
						(P_PiPlus+P_PiMinus).M(), GetPreTagEvtWeight());
	    fHistK0sreco_Chi2_MCsignal   ->Fill(K0sCandidate->GetChi2overNDoF(), GetPreTagEvtWeight());
	    fHistK0sreco_pValue_MCsignal ->Fill(K0sCandidate->GetProb(),         GetPreTagEvtWeight());
	    fHistK0sreco_Chi2Trk_MCsignal   ->Fill(K0sCandidate->GetPiPlus()->Chi2ovNDoF(), GetPreTagEvtWeight());
	    fHistK0sreco_Chi2Trk_MCsignal   ->Fill(K0sCandidate->GetPiMinus()->Chi2ovNDoF(), GetPreTagEvtWeight());
	    fHistK0sreco_Chi2Vtx_MCsignal   ->Fill(K0sCandidate->GetVtx()->GetChi2overNDoF(), GetPreTagEvtWeight());
	    break;
	case 'b':
	    fHistK0sreco_m_MCbkg     ->Fill(K0sCandidate->M("REC")  ,GetPreTagEvtWeight());
	    fHistK0sreco_pt_MCbkg    ->Fill(K0sCandidate->Pt()          ,GetPreTagEvtWeight());  
	    fHistK0sreco_phi_MCbkg   ->Fill(K0sCandidate->Phi()         ,GetPreTagEvtWeight()); 
	    fHistK0sreco_eta_MCbkg   ->Fill(K0sCandidate->Eta()         ,GetPreTagEvtWeight());
	    fHistK0sreco_tau_MCbkg   ->Fill(K0sCandidate->GetLifeTime() ,GetPreTagEvtWeight());
	    fHistK0sreco_DecayLength_MCbkg   ->Fill(K0sCandidate->GetTransvDecayLength(),  GetPreTagEvtWeight());
	    fHistK0sreco_PointingAngle_MCbkg ->Fill(TMath::Abs(TMath::Cos(PointingAngle)),GetPreTagEvtWeight());
	    fHistK0sreco_OpeningAngle_MCbkg  ->Fill(OpeningAngle, GetPreTagEvtWeight());
	    fHistK0sreco_DecayAngle_MCbkg    ->Fill(DecayAngle, GetPreTagEvtWeight());
	    fHistK0sreco_N_MCbkg             ->Fill(1, GetPreTagEvtWeight());
	    fHistK0sreco_R_vtx_MCbkg ->Fill(K0sCandidate->GetVtx()->GetPos().Perp(), GetPreTagEvtWeight());
	    fHistK0sreco_Chi2_MCbkg   ->Fill(K0sCandidate->GetChi2overNDoF(), GetPreTagEvtWeight());
	    fHistK0sreco_pValue_MCbkg ->Fill(K0sCandidate->GetProb(),         GetPreTagEvtWeight());
	    fHistK0sreco_Chi2Trk_MCbkg   ->Fill(K0sCandidate->GetPiPlus()->Chi2ovNDoF(), GetPreTagEvtWeight());
	    fHistK0sreco_Chi2Trk_MCbkg   ->Fill(K0sCandidate->GetPiMinus()->Chi2ovNDoF(), GetPreTagEvtWeight());
	    fHistK0sreco_Chi2Vtx_MCbkg   ->Fill(K0sCandidate->GetVtx()->GetChi2overNDoF(), GetPreTagEvtWeight());
	    // Analyzing tBkg Type
	    // Photon Conv
	    if( (K0sCandidate->GetPiMinus()->GetMCParticle()->GetMother()
		 == K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother())
		&& (K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother()->GetPdgCode() == 22))
	    {
		fHistK0sreco_R_vtx_MCbkg_gamma->Fill(K0sCandidate->GetVtx()->GetPos().Perp(), GetPreTagEvtWeight());
		fHistK0sreco_RvtxMee_MCbkg->Fill(K0sCandidate->GetVtx()->GetPos().Perp(),
						 (P_PiPlus+P_PiMinus).M(), GetPreTagEvtWeight());
		fHist_DA_Gamma->Fill(DecayAngle, GetPreTagEvtWeight());
	    }
	    // Lambda
	    if( (K0sCandidate->GetPiMinus()->GetMCParticle()->GetMother()
		 == K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother())
		&& TMath::Abs( (K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother()->GetPdgCode()) ) == 3122)
	    {
		fHist_DA_Lambda->Fill(DecayAngle, GetPreTagEvtWeight());
	    }
	    // Comb Bkg
	    if( (K0sCandidate->GetPiMinus()->GetMCParticle()->GetMother()
		 != K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother()) )
	    {
		fHist_DA_Comb->Fill(DecayAngle, GetPreTagEvtWeight());
	    }
		
	    // Decay Angle Bkg Analysis
	    if( TMath::Abs(DecayAngle) < 0.94){
		if( TMath::Abs(DecayAngle) < 0.6){
		    if ( K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother() ==
			 K0sCandidate->GetPiMinus()->GetMCParticle()->GetMother() )
		    {
			if( DecayAngle > 0 ) fHist_DecayAngle_0to06->Fill(K0sCandidate->GetPiPlus()->GetMCParticle()
									  ->GetMother()->GetPdgName(),GetPreTagEvtWeight());
			else                 fHist_DecayAngleNeg_0to06->Fill(K0sCandidate->GetPiPlus()->GetMCParticle()
									     ->GetMother()->GetPdgName(),GetPreTagEvtWeight());
		    }else{
			if( DecayAngle > 0 ) fHist_DecayAngle_0to06->Fill("Comb", GetPreTagEvtWeight());
			else                 fHist_DecayAngleNeg_0to06->Fill("Comb", GetPreTagEvtWeight());
		    }
		}else{ // 0.6 < DecayAngle < 0.94
		    if ( K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother() ==
			 K0sCandidate->GetPiMinus()->GetMCParticle()->GetMother() )
		    {
			if( DecayAngle > 0 )  {
			    fHist_DecayAngle_06to094->Fill(K0sCandidate->GetPiPlus()->GetMCParticle()
									     ->GetMother()->GetPdgName(),GetPreTagEvtWeight());
			    fHist_PionsRight_Pt->Fill(K0sCandidate->GetPiPlus()->Pt(),GetPreTagEvtWeight());
			    
                       // Control Output: Bkg should be from Lambda-Decays, that means Protons that make the fake
			    // Peak!
			    AtlIDTrack *trkpos = K0sCandidate->GetPiPlus();
			    			    
			    if (trkpos->HasValidTruthMatch(0.9) ) {
				HepMCParticle *mcpos = trkpos->GetMCParticle();
				if( strcmp( mcpos->GetPdgName(), "pi+" ) == 0 ) {
				    if( strcmp( mcpos->GetMother()->GetPdgName(), "Lambda0_bar" ) != 0 ) {
					//cout << endl << " pi+ von Nicht Lambda_bar !!!! -> "
					//   << mcpos->GetMother()->GetPdgName()<< endl;
				    }else{
					NLambdaBarpos++;
					NPiPluspos++;
				    }
				}
				if( strcmp( mcpos->GetPdgName(), "proton" ) == 0 ) {
				    if( strcmp( mcpos->GetMother()->GetPdgName(), "Lambda0" ) != 0 ) {
					//cout << endl << " proton nicht von Nicht Lambda !!!!  -> "
					//   << mcpos->GetMother()->GetPdgName() << endl;
				    }else{
					NLambdapos++;
					NProtonpos++;
				    }
				}
			    }
			}
			else{
			    fHist_DecayAngleNeg_06to094->Fill(K0sCandidate->GetPiPlus()->GetMCParticle()
							      ->GetMother()->GetPdgName(),GetPreTagEvtWeight());
			    fHist_PionsLeft_Pt->Fill(K0sCandidate->GetPiPlus()->Pt(),GetPreTagEvtWeight());


                            // Control Output: Bkg should be from LambdaBar-Decays, that means piPlus that make the fake
			    // Peak!
			    AtlIDTrack *trkpos = K0sCandidate->GetPiPlus();

			    if (trkpos->HasValidTruthMatch(0.9) ) {
				HepMCParticle *mcpos = trkpos->GetMCParticle();
				if( strcmp( mcpos->GetPdgName(), "pi+" ) == 0 ) {
				    if( strcmp( mcpos->GetMother()->GetPdgName(), "Lambda0_bar" ) != 0 ) {
					//cout << endl << " pi+ von Nicht Lambda_bar !!!!  -> "
					//   << mcpos->GetMother()->GetPdgName() << endl;
				    }else{
					NLambdaBarneg++;
					NPiPlusneg++;
				    }
				}
				if( strcmp( mcpos->GetPdgName(), "proton" ) == 0 ) {
				    if( strcmp( mcpos->GetMother()->GetPdgName(), "Lambda0" ) != 0 ) {
					//cout << endl << " proton nicht von Nicht Lambda !!!!  -> "
					//   << mcpos->GetMother()->GetPdgName() << endl;
				    }else{
					NLambdaneg++;
					NProtonneg++;
				    }
				}
			    }
			    
			}
		    }else{
			if (DecayAngle > 0) fHist_DecayAngle_06to094->Fill("Comb", GetPreTagEvtWeight());
			else                fHist_DecayAngleNeg_06to094->Fill("Comb", GetPreTagEvtWeight());
		    }
		}
	    }else{ // DecayAngle > 0.94
		if ( K0sCandidate->GetPiPlus()->GetMCParticle()->GetMother() ==
		     K0sCandidate->GetPiMinus()->GetMCParticle()->GetMother() )
		{
		    if (DecayAngle > 0)  fHist_DecayAngle_094to1->Fill(K0sCandidate->GetPiPlus()->GetMCParticle()
								       ->GetMother()->GetPdgName(),GetPreTagEvtWeight());
		    else                 fHist_DecayAngleNeg_094to1->Fill(K0sCandidate->GetPiPlus()->GetMCParticle()
									  ->GetMother()->GetPdgName(),GetPreTagEvtWeight());
		}else{
		    if (DecayAngle > 0)  fHist_DecayAngle_094to1->Fill("Comb", GetPreTagEvtWeight());
		    else                 fHist_DecayAngleNeg_094to1->Fill("Comb", GetPreTagEvtWeight());
		} 
		} 
	    
	    break;
	default:
	    cout << endl << endl
		 <<"!!! Error using FillHistograms_MCTruthStudy(AtlK0sDecayPiPi*,char) in AtlK0sFinder"
		 << endl << "Select either 's' or 'b' as key !!!"
		 << endl << endl;
	    break;
    }
}

//____________________________________________________________________

void AtlK0sFinder::Terminate() {

    AtlKinFitterTool::Terminate();
    // print truth matching statistics
    fHistK0sreco_truthtype->LabelsDeflate("X");
    fHistK0sreco_truthtype->SetStats(kFALSE);
    fHistK0sreco_truthtype->GetXaxis()->SetLabelSize(0.06);
    fHistK0sreco_truthtype->GetXaxis()->LabelsOption("v");

    // Decay Angle Analysis
    fHist_DecayAngle_0to06->LabelsDeflate();
    fHist_DecayAngle_06to094->LabelsDeflate();
    fHist_DecayAngle_094to1->LabelsDeflate();
    fHist_DecayAngleNeg_0to06->LabelsDeflate();
    fHist_DecayAngleNeg_06to094->LabelsDeflate();
    fHist_DecayAngleNeg_094to1->LabelsDeflate();
    
    cout << endl << endl << "NO. OF RECONSTRUCTED K0s':  " << fNK0s << endl;


    cout << endl << "NLambdapos  " << NLambdapos
	 << endl << "NLambdaBarpos  " << NLambdaBarpos
	 << endl << "NPiPluspos  " << NPiPluspos
	 << endl << "NProtonpos  " << NProtonpos
	 << endl
	 << endl << "NLambdaneg  " << NLambdaneg
	 << endl << "NLambdaBarneg  " << NLambdaBarneg
	 << endl << "NPiPlusneg  " << NPiPlusneg
	 << endl << "NProtonneg  " << NProtonneg;
	
}


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