Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

RecoTruth - source file

// $Id: RecoTruth.cc,v 1.1 2005/01/05 13:08:21 pesce Exp $
// Author: R.Pesce   2005/01/04

/*****************************************************************************
 * ESAF: Euso Simulation and Analysis Framework                              *
 *                                                                           *
 *  Id: RecoTruth                                                            *
 *  Package: <packagename>                                                   *
 *  Coordinator: <coordinator>                                               *
 *                                                                           *
 *****************************************************************************/

//_____________________________________________________________________________
//
// RecoTruth
//
// <extensive class description>
//
//   Config file parameters
//   ======================
//
//   <parameter name>: <parameter description>
//   -Valid options: <available options>
//

#include "RecoTruth.hh"

ClassImp(RecoTruth)

//_____________________________________________________________________________
 RecoTruth::RecoTruth() {
    //
    // Constructor
    //
    Clear();
}

//_____________________________________________________________________________
 RecoTruth::~RecoTruth() {
    //
    // Destructor
    //
    Clear();
}

//_____________________________________________________________________________
 RecoTruth::RecoTruth( const RecoTruth& other ) {
    //
    // Copy Constructor
    //
    other.Copy( *this );
}

//_____________________________________________________________________________
 void RecoTruth::Copy( TObject& other ) const {
    //
    // Copy to a new object
    //
    TObject::Copy( other );

    ((RecoTruth&)other).fEnergy = fEnergy;
    ((RecoTruth&)other).fTheta = fTheta;
    ((RecoTruth&)other).fPhi = fPhi;
    ((RecoTruth&)other).fX1 = fX1;
    ((RecoTruth&)other).fXMax = fXMax;
    ((RecoTruth&)other).fEarthAge = fEarthAge;
    ((RecoTruth&)other).fInitPosX = fInitPosX;
    ((RecoTruth&)other).fInitPosY = fInitPosY;
    ((RecoTruth&)other).fInitPosZ = fInitPosZ;
    ((RecoTruth&)other).fMaxPosX = fMaxPosX;
    ((RecoTruth&)other).fMaxPosY = fMaxPosY;
    ((RecoTruth&)other).fMaxPosZ = fMaxPosZ;
    ((RecoTruth&)other).fEarthImpactX = fEarthImpactX;
    ((RecoTruth&)other).fEarthImpactY = fEarthImpactY;
    ((RecoTruth&)other).fEarthImpactZ = fEarthImpactZ;
}

//_____________________________________________________________________________
 void RecoTruth::Clear() {
    //
    // Clear method
    //
    fEnergy = -1;
    fTheta  = -1;
    fPhi    = -1;
    fX1     = -1;
    fInitPosX     = -1;
    fInitPosY     = -1;
    fInitPosZ     = -1;
    fMaxPosX      = -1;
    fMaxPosY      = -1;
    fMaxPosZ      = -1;
    fXMax         = -1;
    fEarthImpactX = -1;
    fEarthImpactY = -1;
    fEarthImpactZ = -1;
    fEarthAge     = -1;
}

//_____________________________________________________________________________
 Double_t RecoTruth::GetInitPos( Int_t i ) const {
    //
    // Return true init position by component: 0 for X, 1 for Y, 2 for Z
    //
    switch(i) {
        case 0:
            return fInitPosX;
        case 1:
            return fInitPosY;
        case 2:
            return fInitPosZ;
        default:
            Error("GetInitPos(i)","bad index (%d) returning 0",i);
    }
    return 0.;
}

//_____________________________________________________________________________
 Double_t RecoTruth::GetMaxPos( Int_t i ) const {
    //
    // Return true max position by component: 0 for X, 1 for Y, 2 for Z
    //
    switch(i) {
        case 0:
            return fMaxPosX;
        case 1:
            return fMaxPosY;
        case 2:
            return fMaxPosZ;
        default:
            Error("GetMaxPos(i)","bad index (%d) returning 0",i);
    }
    return 0.;
}

//_____________________________________________________________________________
 Double_t RecoTruth::GetEarthImpact( Int_t i ) const {
    //
    // Return true earth impact position by component: 0 for X, 1 for Y, 2 for Z
    //
    switch(i) {
        case 0:
            return fEarthImpactX;
        case 1:
            return fEarthImpactY;
        case 2:
            return fEarthImpactZ;
        default:
            Error("GetEarthImpact(i)","bad index (%d) returning 0",i);
    }
    return 0.;
}

About Us | EUSO Official Website | Web pages created by Roberto Pesce and Alessandro Thea - Last Update Wed Nov 16 16:57:39 2005 Wed Nov 16 16:29:22 2005