ROOT logo
#ifndef  __HPARTICLEGEANTPAIR_H__
#define  __HPARTICLEGEANTPAIR_H__

#include "hgeomvector.h"
#include "hgeantkine.h"
#include "TLorentzVector.h"

class HParticleGeantPair : public TLorentzVector
{
protected:


    HGeantKine*    fcand[2];    //! pointer to cand1 (reference: should be a lepton candidate) and cand2
    HGeantKine*    fmother;     //! pointer to other particle
    TLorentzVector    fc[2];    // local copy of lorentz vector of cand1 and cand2
    Int_t fPID[2];              // assigned PID for cand1 and cand2
    Int_t fMotherPID;           // assigned PID for Mother
    Float_t foAngle;            // opening angle of pair [deg]
    UInt_t fstatusFlags;        //  bit  0x01  true pair
                                //  bit  0x02  cand1 in acceptance
                                //  bit  0x04  cand2 in acceptance
                                //  bit  0x08  cand1 reconstuctable
                                //  bit  0x10  cand2 reconstuctable

    HGeomVector  fEventVertex;  // used event vertex
    HGeomVector  fDecayVertex;  // secondary vertex of both candidates
    Float_t fVerMinDistCand[2]; // vertex cut vars : mindist cand1 and cand2 to event vertex
    Float_t fVerMinDistMother;  // vertex cut vars : mindist mother to event vertex
    Float_t fVerDistMother;     // vertex cut vars
    Float_t fMinDistCandidates; // vertex cut vars : mindist between cand1 and cand2

    static Bool_t fbCheckAcceptance; //! run acceptance check (default: kTRUE)


    Bool_t          calcVertex();

public:
    HParticleGeantPair();
    ~HParticleGeantPair();

    HGeantKine*     getCand(Int_t ind)           { return fcand[ind];  }
    HGeantKine*     getMother()                  { return fmother;  }
    Float_t         getOpeningAngle()            { return foAngle; }
    Float_t         getPhi()                     { return (Phi() < 0 ? Phi()*TMath::RadToDeg()+360 : Phi()*TMath::RadToDeg());}
    Float_t         getTheta()                   { return Theta()*TMath::RadToDeg();}
    TLorentzVector& getCandVect(Int_t ind)       { return fc[ind];}

    Int_t           getCandPID(Int_t ind)        { return fPID[ind];}
    Int_t           getMotherPID()               { return fMotherPID;}

    Float_t         getVerMinDistCand(Int_t ind) { return fVerMinDistCand[ind];}
    Float_t         getVerMinDistMother()        { return fVerMinDistMother;}
    Float_t         getMinDistCandidates()       { return fMinDistCandidates;}
    Float_t         getVerDistMother()           { return fVerDistMother;}
    HGeomVector&    getEventVertex()             { return fEventVertex; }
    HGeomVector&    getDecayVertex()             { return fDecayVertex; }

    Int_t           isFakePair();
    Bool_t          isTruePair();
    Bool_t          isInAcceptance(Int_t ver=-1);
    void            print(UInt_t selection=31);
    void            clear();
    UInt_t          getStatusFlags() { return fstatusFlags; }
    Bool_t          checkStatus(UInt_t flag)  { return  (fstatusFlags|flag) == flag ? kTRUE: kFALSE; }

    Bool_t          calcVectors(Int_t pid1,Int_t pid2,Int_t motherpid,HGeomVector& vertex);
    Bool_t          setPair(HGeantKine* cnd1,Int_t pid1,HGeantKine* cnd2,Int_t pid2,HGeantKine* mother,Int_t motherpid,HGeomVector& vertex);
    Bool_t          setPair(HGeantKine* cnd1,HGeantKine* cnd2,HGeantKine* mother,Int_t motherpid,HGeomVector& vertex);

    static void     setAcceptanceCheck(Bool_t doit) { fbCheckAcceptance = doit;}

    ClassDef(HParticleGeantPair,1)

};

#endif

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