/****************************************/ /*** ***/ /*** StMuDstQAMaker ***/ /*** VERSION: 1.1 ***/ /*** AUTHOR: Nikita Ermakov ***/ /*** DATE: ***/ /*** E-MAIL: coffe92@gmail.com ***/ /*** ***/ /****************************************/ #ifndef STMUDSTQAMAKER_HH #define STMUDSTQAMAKER_HH #include "StMaker.h" #include "StThreeVector.hh" #include "StThreeVectorF.hh" #include "StPhysicalHelixD.hh" #include "StRefMultCorr/StRefMultCorr.h" #include "StMuDSTMaker/COMMON/StMuDstMaker.h" #include "StMuDSTMaker/COMMON/StMuDst.h" #include "StMuDSTMaker/COMMON/StMuEvent.h" #include "StMuDSTMaker/COMMON/StMuTrack.h" #include "StMuDSTMaker/COMMON/StMuPrimaryVertex.h" #include "StMuDSTMaker/COMMON/StMuBTofPidTraits.h" #include "StMuDSTMaker/COMMON/StMuBTofHit.h" #include "StMuDstMinvMaker.h" #include #include #include #include #include #include #include #include #include #ifndef St_NO_NAMESPACES using namespace std; #endif class StMuDst; class StMuDstMaker; class StMuEvent; class StMuTrack; class StMuDstQAMaker : public StMaker { public: StMuDstQAMaker(StMuDstMaker *muMaker, const Char_t *oFileName); ~StMuDstQAMaker(); // // Chain methods // void Clear(Option_t *option = ""); Int_t Init(); Int_t Make(); Int_t Finish(); void CleanVariables(); void SetMuDstMaker(StMuDstMaker *maker); void SetTracksLoop(bool val); // // Setup event // void SetTriggerId(unsigned int id); void SetTriggerCut(bool val); void SetVtxZCut(float lo, float hi); void SetVtxRCut(float lo, float hi); void SetVtxShift(float xShift, float yShift); void SetVtxVpdVzDiffCut(float lo, float hi); // // Setup track // void SetP(float lo, float hi); void SetPt(float lo, float hi); void SetTrackNHits(int lo, int hi); void SetTrackNHitsFit(int lo, int hi); void SetTrackEta(float lo, float hi); void SetTrackFlag(short lo, short hi); void SetTrackDCA(float lo, float hi); // // TPC PID // // Pion void SetPionPionNSigma(float lo, float hi); void SetPionKaonNSigma(float lo, float hi); void SetPionProtonNSigma(float lo, float hi); // Kaon void SetKaonPionNSigma(float lo, float hi); void SetKaonKaonNSigma(float lo, float hi); void SetKaonProtonNSigma(float lo, float hi); // Proton void SetProtonPionNSigma(float lo, float hi); void SetProtonKaonNSigma(float lo, float hi); void SetProtonProtonNSigma(float lo, float hi); // // TOF PID // void SetPionMassSqr(float lo, float hi); void SetKaonMassSqr(float lo, float hi); void SetProtonMassSqr(float lo, float hi); // // TOF and TPC momentum threshold // void SetTTTPThreshold(float pThresh); // // Cut methods // Bool_t AcceptTrigger(StMuEvent *muEvent); Bool_t AcceptPrimVtx(StThreeVectorF vtxPos, Float_t vpdVz); Bool_t AcceptTrack(StMuTrack *trk, UShort_t vtxInd); Bool_t IsTofTrack(StMuTrack *trkGlob, StMuTrack *trkPrim); private: const char *mFileName; TFile *mOutFile; vector mTriggerIdCollection; // // Global counters // bool mEventIsGood; int mNEventsIn; int mNEventsPassed; bool mIsGoodTrack; bool mTrackLoop; bool mTriggerCut; float mTTTPThreshold; // // Event cuts // float mPrimVtxZ[2]; float mPrimVtxR[2]; float mPrimVtxVpdVzDiff[2]; float mPrimVtxXShift; float mPrimVtxYShift; // // Single-particle cuts // float mTrackP[2]; float mTrackPt[2]; float mTrackDca[2]; float mTrackDcaGlobal[2]; unsigned short mTrackNHits[2]; unsigned short mTrackNHitsFit[2]; float mTrackEta[2]; short mTrackFlag[2]; // // TPC NSigma // // Pion float mPionPionNSigma[2]; float mPionKaonNSigma[2]; float mPionProtonNSigma[2]; // Kaon float mKaonPionNSigma[2]; float mKaonKaonNSigma[2]; float mKaonProtonNSigma[2]; // Proton float mProtonPionNSigma[2]; float mProtonKaonNSigma[2]; float mProtonProtonNSigma[2]; // // TOF Mass // float mPionMass[2]; float mKaonMass[2]; float mProtonMass[2]; // // Counter for the debug purposes // int mAcceptTriggerFail; int mRefMultFail; int mAntiPileupFail; int mRankingFail; int mVtxNullFail; int mNPrimVtxFail; int mAcceptPrimVtxFail; // // Pointers to classes // StMuPrimaryVertex *mPrimVertex; StMuTrack *mPrimTrack; StMuTrack *mGlobTrack; StMuDstMaker *mMuDstMaker; StMuEvent *mMuEvent; StMuDst *mMuDst; // // Histograms // // // General event distributions (before event cuts) // TH1F *hR_BeforeCut; TH1F *hVx_BeforeCut; TH1F *hVy_BeforeCut; TH1F *hVz_BeforeCut; TH2F *hVxVsVy_BeforeCut; TH2F *hVxVsVz_BeforeCut; TH2F *hVyVsVz_BeforeCut; TH2F *hVpdVz2D_BeforeCut; TH1F *hNPrimTr_BeforeCut; TH1F *hNGlobTr_BeforeCut; TH1F *hTofRefMult_BeforeCut; TH2F *hTofRefMultVsRefMult_BeforeCut; TH1F *hRefMult_BeforeCut; TH1F *hRefMultAccept_BeforeCut; TH1F *hVpd_BeforeCut; TH1F *hVpdVz_BeforeCut; TH1F *hNPrimVtx_BeforeCut; TH1I *hTriggerId_BeforePileupCut; TH1I *hTriggerId_BeforeVertexCut; TH1I *hTriggerId_BeforeAllCut; // // General event distributions (after event cuts) // TH1F *hR_AfterCut; TH1F *hVx_AfterCut; TH1F *hVy_AfterCut; TH1F *hVz_AfterCut; TH2F *hVxVsVy_AfterCut; TH2F *hVxVsVz_AfterCut; TH2F *hVyVsVz_AfterCut; TH2F *hVpdVz2D_AfterCut; TH1F *hNPrimTr_AfterCut; TH1F *hNGlobTr_AfterCut; TH1F *hTofRefMult_AfterCut; TH2F *hTofRefMultVsRefMult_AfterCut; TH1F *hRefMult_AfterCut; TH1F *hRefMultAccept_AfterCut; TH1F *hVpd_AfterCut; TH1F *hVpdVz_AfterCut; TH1F *hNPrimVtx_AfterCut; TH1I *hTriggerId_AfterCut; // // General track distributions // TH1F *hP; TH1F *hPt; TH1F *hPx; TH1F *hPy; TH1F *hPz; TH1F *hEta; TH1F *hPAccept; TH1F *hPtAccept; TH1F *hPxAccept; TH1F *hPyAccept; TH1F *hPzAccept; TH1F *hEtaAccept; TH2F *hMassSqrVsPt; TH2F *hDedxVsPt; TH2F *hInvBetaExpVsPt; TH2F *hInvBetaThVsPt; TH1F *hDiffBeta; // For check difference between global and TH1F *hDiffTOF; // primary tracks TH1F *hTOF; TH2F *hNHitsVsMom; TProfile *pNHitsVsMom; // Pion PID TH1F *hNSigmaPionPion; TH1F *hNSigmaPionKaon; TH1F *hNSigmaPionProton; TH2F *hNSigmaPionPionVsPt; TH2F *hNSigmaPionKaonVsPt; TH2F *hNSigmaPionProtonVsPt; TH2F *hDMassSqrVsPtPionTPC; TH2F *hDMassSqrVsPtPionTOF; TH2F *hInvBetaExpThPionTNT; TH2F *hInvBetaExpThPionTPC; TH2F *hInvBetaExpThPionTOF; TH2F *hInvBetaExpThPionTTT; TH2F *hInvBetaExpThPionINT; // Kaon PID TH1F *hNSigmaKaonPion; TH1F *hNSigmaKaonKaon; TH1F *hNSigmaKaonProton; TH2F *hNSigmaKaonPionVsPt; TH2F *hNSigmaKaonKaonVsPt; TH2F *hNSigmaKaonProtonVsPt; TH2F *hDMassSqrVsPtKaonTPC; TH2F *hDMassSqrVsPtKaonTOF; TH2F *hInvBetaExpThKaonTNT; TH2F *hInvBetaExpThKaonTPC; TH2F *hInvBetaExpThKaonTOF; TH2F *hInvBetaExpThKaonTTT; TH2F *hInvBetaExpThKaonINT; // Proton PID TH1F *hNSigmaProtonPion; TH1F *hNSigmaProtonKaon; TH1F *hNSigmaProtonProton; TH2F *hNSigmaProtonPionVsPt; TH2F *hNSigmaProtonKaonVsPt; TH2F *hNSigmaProtonProtonVsPt; TH2F *hDMassSqrVsPtProtonTPC; TH2F *hDMassSqrVsPtProtonTOF; TH2F *hInvBetaExpThProtonTNT; TH2F *hInvBetaExpThProtonTPC; TH2F *hInvBetaExpThProtonTOF; TH2F *hInvBetaExpThProtonTTT; TH2F *hInvBetaExpThProtonINT; // // Trigger // unsigned int mCurrentTrigger; ClassDef(StMuDstQAMaker, 2) }; #endif