ROOT logo
#ifndef  __HPARTICLEGEANT_H__
#define __HPARTICLEGEANT_H__

#include "hgeomvector.h"
#include "hparticledef.h"
#include "hparticlecandsim.h"
#include "hgeantkine.h"

#include "TObject.h"

#include <vector>

using namespace std;
using namespace Particle;

class HParticleGeantDecay;
class HParticleCandSim;

class HParticleGeant : public TObject {

private:

    HGeantKine*               fparticle;         // pointer to kine object
    HGeantKine*               fmother;           // pointer to mother kine object
    HParticleGeantDecay*      fmotherDecay;      // pointer to the mother decay
    vector<HParticleCandSim*> vReco;             // list of reconstructed candidates keeping the same Geant track
    Bool_t                    fInAcceptance;     // = kTRUE if particle is detected in Acceptance
    Int_t                     fgeneration;       // generation of this particle (number of mothers)
    HGeomVector               fdecayVertex;      // vertex of this particle

public:

    HParticleGeant() ;
    ~HParticleGeant();

    void                      setParticle(HGeantKine* part);
    HGeantKine*               getParticle()                                 { return fparticle;}
    HGeantKine*               getMother()                                   { return fmother;}
    void                      setMother  (HGeantKine* moth)                 { fmother = moth; }
    Int_t                     getID()                                       { return (fparticle ) ? fparticle->getID() : -1;}
    HGeomVector&              getDecayVertex()                              { return fdecayVertex;}
    Int_t                     getMedium()                                   { return (fparticle ) ? fparticle->getMedium() : -1;}
    Int_t                     getMechanism()                                { return (fparticle ) ? fparticle->getMechanism() : 0;}
    Int_t                     getGeneration()                               { return fgeneration;}
    HParticleGeantDecay*      getMotherDecay()                              { return fmotherDecay;}
    void                      setGeneration(Int_t gen)                      { fgeneration = gen;}
    void                      setDecayVertex(Float_t x,Float_t y,Float_t z) { fdecayVertex.setXYZ(x,y,z);}
    void                      setDecayVertex(HGeomVector& ver)              { fdecayVertex = ver;}
    void                      setMotherDecay(HParticleGeantDecay* mdecay)   { fmotherDecay = mdecay;}
    Float_t                   getDistFromVertex(HGeomVector* primVer=0);
    vector<HParticleCandSim*> getRecoCand()                                 { return vReco;}
    HParticleCandSim*         getRecoCand(UInt_t i)                         { return (i < vReco.size() ) ? vReco[i] : 0 ; }
    void                      addRecoCand(HParticleCandSim* c);
    UInt_t                    getNRecoCand();
    UInt_t                    getNRecoUsedCand();
    UInt_t                    getNGhosts(Bool_t isUsed=kFALSE);
    UInt_t                    getNTrueReco(Bool_t isUsed=kTRUE,UInt_t detbits=kIsInInnerMDC|kIsInOuterMDC|kIsInMETA);
    Bool_t                    isInAcceptance()                              {return fInAcceptance;}
    void                      print();
    void                      clear();

    ClassDef(HParticleGeant,0)

};

#endif

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