//____________________________________________________________________
//
// Dstar -> D0 Pion
// 
//  
// Author: Thomas Kintscher <mailto: kintscher@physik.hu-berlin.de>
// Update: $Id: AtlDstarDecayDPi.cxx,v 1.1 2011/01/16 18:23:47 schade Exp $
// Copyright: 2010 (C) Thomas Kintscher
//
#ifndef ATLAS_AtlDstarDecayDPi
#include <AtlDstarDecayDPi.h>
#endif
#include <iostream>

using namespace std;

#ifndef __CINT__
ClassImp(AtlDstarDecayDPi);
#endif

//____________________________________________________________________

AtlDstarDecayDPi::AtlDstarDecayDPi() {
    //
    // Default constructor
    //

}

//____________________________________________________________________

AtlDstarDecayDPi::AtlDstarDecayDPi(Int_t Id, Float_t Px, Float_t Py, Float_t Pz,
				     Float_t E, AtlD0DecayKPi *D0, AtlIDTrack *Pion, 
				     HepVertex *Vtx, HepVertex *PrimaryVtx,
				     HepParticle ReFitDaughter1, HepParticle ReFitDaughter2) :
    Hep2BodyDecay(Id, Px, Py, Pz, E, D0, Pion, Vtx, PrimaryVtx, ReFitDaughter1, ReFitDaughter2) {
    //
    // Normal constructor
    //
    fPdgCode = 3122;
}

//____________________________________________________________________


AtlDstarDecayDPi::~AtlDstarDecayDPi(){
    //
    // Default destructor
    //

}


//____________________________________________________________________

void AtlDstarDecayDPi::Clear(Option_t *option) {
    //
    // Clear this object
    //
    HepDecayParticle::Clear(option);
}

//____________________________________________________________________

void AtlDstarDecayDPi::Print(Option_t *option) {
    //
    // Print K0s decay information
    //
    // Options available:
    //    "VTX" - Print information about vtx and outgoing tracks
    //
    TString opt = option;
    opt.ToLower();

    // Print header
    if ( !opt.Contains("nohead") ) PrintHeader();

    // Print
    cout.setf(ios::showpoint | ios::fixed, ios::floatfield);
    cout.precision(3);
    cout.width(4);  cout << fId;
    cout.width(8);  cout << GetDecayLength();
    cout.width(8);  cout << GetLifeTime();
    cout.width(10); cout << Pmag();
    cout.width(12); cout << M("rec");
    cout.width(12); cout << Theta()*180/TMath::Pi();
    cout.width(11); cout << Phi()*180/TMath::Pi();
    cout.width(8);  cout << Eta();
    cout.width(5);  cout << GetVtx()->GetId();
    cout.width(5);  cout << "-1"; // GetKaon()->GetId();
    cout.width(5);  cout << GetPion()->GetId();
    cout << endl;

    // Print footer
    if ( !opt.Contains("nohead") ) PrintFooter();

    // Print vertex info
    if ( opt.Contains("vtx") || opt.Contains("all") ) {
	cout << endl << "D0 Decay vertex:" << endl;
	GetVtx()->Print("daughters");
    }
}

//____________________________________________________________________

void AtlDstarDecayDPi::PrintHeader() {
    //
    // Print information header
    //
    cout << "----------------------------------------------------------------------------------------"
	 << endl
	 << " Id   d (cm)  t (ps)   P (GeV)  Mrec (GeV) Theta (deg)  Phi (deg)     Eta  Vtx  Pi+  Pi-"
	 << endl
	 << "----------------------------------------------------------------------------------------"
	 << endl;
}

//____________________________________________________________________

void AtlDstarDecayDPi::PrintFooter() {
    //
    // Print footer
    //
    cout << "----------------------------------------------------------------------------------------"
	 << endl;
}
 AtlDstarDecayDPi.cxx:1
 AtlDstarDecayDPi.cxx:2
 AtlDstarDecayDPi.cxx:3
 AtlDstarDecayDPi.cxx:4
 AtlDstarDecayDPi.cxx:5
 AtlDstarDecayDPi.cxx:6
 AtlDstarDecayDPi.cxx:7
 AtlDstarDecayDPi.cxx:8
 AtlDstarDecayDPi.cxx:9
 AtlDstarDecayDPi.cxx:10
 AtlDstarDecayDPi.cxx:11
 AtlDstarDecayDPi.cxx:12
 AtlDstarDecayDPi.cxx:13
 AtlDstarDecayDPi.cxx:14
 AtlDstarDecayDPi.cxx:15
 AtlDstarDecayDPi.cxx:16
 AtlDstarDecayDPi.cxx:17
 AtlDstarDecayDPi.cxx:18
 AtlDstarDecayDPi.cxx:19
 AtlDstarDecayDPi.cxx:20
 AtlDstarDecayDPi.cxx:21
 AtlDstarDecayDPi.cxx:22
 AtlDstarDecayDPi.cxx:23
 AtlDstarDecayDPi.cxx:24
 AtlDstarDecayDPi.cxx:25
 AtlDstarDecayDPi.cxx:26
 AtlDstarDecayDPi.cxx:27
 AtlDstarDecayDPi.cxx:28
 AtlDstarDecayDPi.cxx:29
 AtlDstarDecayDPi.cxx:30
 AtlDstarDecayDPi.cxx:31
 AtlDstarDecayDPi.cxx:32
 AtlDstarDecayDPi.cxx:33
 AtlDstarDecayDPi.cxx:34
 AtlDstarDecayDPi.cxx:35
 AtlDstarDecayDPi.cxx:36
 AtlDstarDecayDPi.cxx:37
 AtlDstarDecayDPi.cxx:38
 AtlDstarDecayDPi.cxx:39
 AtlDstarDecayDPi.cxx:40
 AtlDstarDecayDPi.cxx:41
 AtlDstarDecayDPi.cxx:42
 AtlDstarDecayDPi.cxx:43
 AtlDstarDecayDPi.cxx:44
 AtlDstarDecayDPi.cxx:45
 AtlDstarDecayDPi.cxx:46
 AtlDstarDecayDPi.cxx:47
 AtlDstarDecayDPi.cxx:48
 AtlDstarDecayDPi.cxx:49
 AtlDstarDecayDPi.cxx:50
 AtlDstarDecayDPi.cxx:51
 AtlDstarDecayDPi.cxx:52
 AtlDstarDecayDPi.cxx:53
 AtlDstarDecayDPi.cxx:54
 AtlDstarDecayDPi.cxx:55
 AtlDstarDecayDPi.cxx:56
 AtlDstarDecayDPi.cxx:57
 AtlDstarDecayDPi.cxx:58
 AtlDstarDecayDPi.cxx:59
 AtlDstarDecayDPi.cxx:60
 AtlDstarDecayDPi.cxx:61
 AtlDstarDecayDPi.cxx:62
 AtlDstarDecayDPi.cxx:63
 AtlDstarDecayDPi.cxx:64
 AtlDstarDecayDPi.cxx:65
 AtlDstarDecayDPi.cxx:66
 AtlDstarDecayDPi.cxx:67
 AtlDstarDecayDPi.cxx:68
 AtlDstarDecayDPi.cxx:69
 AtlDstarDecayDPi.cxx:70
 AtlDstarDecayDPi.cxx:71
 AtlDstarDecayDPi.cxx:72
 AtlDstarDecayDPi.cxx:73
 AtlDstarDecayDPi.cxx:74
 AtlDstarDecayDPi.cxx:75
 AtlDstarDecayDPi.cxx:76
 AtlDstarDecayDPi.cxx:77
 AtlDstarDecayDPi.cxx:78
 AtlDstarDecayDPi.cxx:79
 AtlDstarDecayDPi.cxx:80
 AtlDstarDecayDPi.cxx:81
 AtlDstarDecayDPi.cxx:82
 AtlDstarDecayDPi.cxx:83
 AtlDstarDecayDPi.cxx:84
 AtlDstarDecayDPi.cxx:85
 AtlDstarDecayDPi.cxx:86
 AtlDstarDecayDPi.cxx:87
 AtlDstarDecayDPi.cxx:88
 AtlDstarDecayDPi.cxx:89
 AtlDstarDecayDPi.cxx:90
 AtlDstarDecayDPi.cxx:91
 AtlDstarDecayDPi.cxx:92
 AtlDstarDecayDPi.cxx:93
 AtlDstarDecayDPi.cxx:94
 AtlDstarDecayDPi.cxx:95
 AtlDstarDecayDPi.cxx:96
 AtlDstarDecayDPi.cxx:97
 AtlDstarDecayDPi.cxx:98
 AtlDstarDecayDPi.cxx:99
 AtlDstarDecayDPi.cxx:100
 AtlDstarDecayDPi.cxx:101
 AtlDstarDecayDPi.cxx:102
 AtlDstarDecayDPi.cxx:103
 AtlDstarDecayDPi.cxx:104
 AtlDstarDecayDPi.cxx:105
 AtlDstarDecayDPi.cxx:106
 AtlDstarDecayDPi.cxx:107
 AtlDstarDecayDPi.cxx:108
 AtlDstarDecayDPi.cxx:109
 AtlDstarDecayDPi.cxx:110
 AtlDstarDecayDPi.cxx:111
 AtlDstarDecayDPi.cxx:112
 AtlDstarDecayDPi.cxx:113
 AtlDstarDecayDPi.cxx:114
 AtlDstarDecayDPi.cxx:115
 AtlDstarDecayDPi.cxx:116
 AtlDstarDecayDPi.cxx:117
 AtlDstarDecayDPi.cxx:118
 AtlDstarDecayDPi.cxx:119
 AtlDstarDecayDPi.cxx:120
 AtlDstarDecayDPi.cxx:121
 AtlDstarDecayDPi.cxx:122
 AtlDstarDecayDPi.cxx:123
 AtlDstarDecayDPi.cxx:124
 AtlDstarDecayDPi.cxx:125
 AtlDstarDecayDPi.cxx:126