#ifndef STNTUPLE_TStnPi0 #define STNTUPLE_TStnPi0 #include "TLorentzVector.h" class Pi0Candidate; class TStnPi0: public TObject { friend Int_t StntupleInitPi0(TStnPi0*, const Pi0Candidate*); //----------------------------------------------------------------------------- // data members //----------------------------------------------------------------------------- protected: TLorentzVector fMomentum; // 4-momentum //----------------------------------------------------------------------------- // block of integers //----------------------------------------------------------------------------- Int_t fNumber; Int_t fEtaPhi; // , side Int_t fNClusters[2]; // 0:strips, 1:wires //----------------------------------------------------------------------------- // block of floats //----------------------------------------------------------------------------- Float_t fWeight; // handle shared clusters, normally=1 Float_t fZ0; // assigned Z-coordinate of the vertex //----------------------------------------------------------------------------- // parameters of the clusters, 0:strip, 1:wire //----------------------------------------------------------------------------- Float_t fClusterEnergy[2]; Float_t fClusterCoord [2]; Float_t fClusterSigma [2]; Float_t fClusterChi2 [2]; // added in V2 Float_t fXCes; // Float_t fZCes; // global Z at R(CES) Pi0Candidate* fPi0Candidate; // ! backward link (internal use only) //----------------------------------------------------------------------------- // transient-only variables //----------------------------------------------------------------------------- Float_t fEScale; // ! renormalization scale (after fit) public: //----------------------------------------------------------------------------- // constructors and destructor //----------------------------------------------------------------------------- TStnPi0(Int_t I = -1); ~TStnPi0(); //----------------------------------------------------------------------------- // accessor functions //----------------------------------------------------------------------------- const TLorentzVector* Momentum () const { return &fMomentum; } Int_t Number () const { return fNumber; } Int_t NClusters(Int_t I) const { return fNClusters[I]; } double Chi2S () const { return fClusterChi2[0] ; } double Chi2W () const { return fClusterChi2[1] ; } Float_t XCes () const { return fXCes; } Float_t ZCes () const { return fZCes; } Float_t Z0 () const { return fZ0; } Float_t Weight () const { return fWeight; } double WSRatio () const { if (fClusterEnergy[0] != 0) return fClusterEnergy[1]/fClusterEnergy[0]; else return 1.e10; } double ClusterEnergy(Int_t i) const { return fClusterEnergy[i]; } double ClusterChi2 (Int_t i) const { return fClusterChi2 [i]; } double ClusterSigma (Int_t i) const { return fClusterSigma [i]; } double ClusterCoord (Int_t i) const { return fClusterCoord [i]; } Pi0Candidate* GetPi0Candidate() const { return fPi0Candidate; } Int_t EtaPhi () const { return fEtaPhi & 0xffff; } Int_t IEta () const { return (fEtaPhi >> 8) & 0xff; } Int_t IPhi () const { return (fEtaPhi ) & 0xff; } Int_t MatchType () const { return (fEtaPhi >> 16) & 0xff; } Int_t SplitFlag () const { return (fEtaPhi >> 24) & 0xff; } //----------------------------------------------------------------------------- // modifiers //----------------------------------------------------------------------------- int Init (int DetCode, int NCl1, int NCl2, float Weight); void ScaleMomentum(Double_t Scale); void SetClusterParameters(int I, float E, float X, float Sig, float Chi2) { fClusterEnergy[I] = E; fClusterCoord [I] = X; fClusterSigma [I] = Sig; fClusterChi2 [I] = Chi2; } void SetCesCoordinates (float XCes, float ZCes) { fXCes = XCes; fZCes = ZCes; } void SetZ0 (Float_t Z0) { fZ0 = Z0; } void SetEtaPhi (Int_t ieta, Int_t iphi) { fEtaPhi = (fEtaPhi & 0xffff0000) | (((ieta & 0xff) << 8) + (iphi & 0xff)); } void SetMatchType (Int_t MatchType) { fEtaPhi = (fEtaPhi & 0xff00ffff) | ((MatchType & 0xff) << 16); } void SetSplitFlag (Int_t SplitFlag) { fEtaPhi = (fEtaPhi & 0x00ffffff) | ((SplitFlag & 0xff) << 24); } void SetMomentum (TLorentzVector* Momentum) { fMomentum = *Momentum; } //----------------------------------------------------------------------------- // overloaded functions of TObject //----------------------------------------------------------------------------- void Print(Option_t* option = "") const; //----------------------------------------------------------------------------- // schema evolution //----------------------------------------------------------------------------- void ReadV1(TBuffer& R__b); ClassDef(TStnPi0,2) // STNTUPLE description of a Pi0 }; #endif