123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- /****************************************/
- /*** ***/
- /*** StMuDstMinvMaker ***/
- /*** VERSION: 1.0 ***/
- /*** AUTHOR: Nikita Ermakov ***/
- /*** DATE: ***/
- /*** E-MAIL: coffe92@gmail.com ***/
- /*** ***/
- /****************************************/
- #ifndef STMUDSTMINVMAKER_HH
- #define STMUDSTMINVMAKER_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 <TString.h>
- #include <TFile.h>
- #include <TLorentzVector.h>
- #include <TTree.h>
- #include <TH1.h>
- #include <TH2.h>
- #include <vector>
- #include <iostream>
- #ifndef St_NO_NAMESPACES
- using namespace std;
- #endif
- class StMuDst;
- class StMuDstMaker;
- class StMuEvent;
- class StMuTrack;
- const float PION_MASS = 0.139569; // GeV/c^2
- const float PROTON_MASS = 0.938272; // GeV/c^2
- const float KAON_MASS = 0.4936; // GeV/c^2
- //_________________
- class StMuDstMinvMaker : public StMaker {
- public:
- StMuDstMinvMaker(StMuDstMaker *muMaker,
- const Char_t *oFileName);
- ~StMuDstMinvMaker();
- //
- // Chain methods
- //
- void Clear(Option_t *option = "");
- Int_t Init();
- Int_t Make();
- Int_t Finish();
- void CleanVariables();
- void SetMuDstMaker(StMuDstMaker *maker);
- //
- // Setup event
- //
- void SetTriggerId(unsigned int id);
- 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 *trk);
- private:
- const char *mFileName;
- TFile *mOutFile;
- vector<UInt_t> mTriggerIdCollection;
- //
- // Global counters
- //
- bool mEventIsGood;
- int mNEventsIn;
- int mNEventsPassed;
- bool mIsGoodTrack;
- 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];
- //
- // Minv arrays
- //
- unsigned int mPiPKP[50];
- unsigned int mPiPKM[50];
- unsigned int mPi;
- //
- // 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];
- //
- // Pointers to classes
- //
- StMuPrimaryVertex *mPrimVertex;
- StMuTrack *mPrimTrack;
- StMuTrack *mGlobTrack;
- StMuDstMaker *mMuDstMaker;
- StMuEvent *mMuEvent;
- StMuDst *mMuDst;
- //
- // Histograms
- //
- //
- // General event distributions
- //
- TH1F *hR;
- TH1F *hVx;
- TH1F *hVy;
- TH1F *hVz;
- TH2F *hVxVsVy;
- TH2F *hVxVsVz;
- TH2F *hVyVsVz;
- TH1F *hNPrimTr;
- TH1F *hNGlobTr;
- TH1F *hTofRefMult;
- TH2F *hTofRefMultVsRefMult;
- TH1F *hRefMult;
- TH1F *hRefMultAccept;
- TH1F *hVpd;
- TH1F *hVpdVz;
- TH1F *hNPrimVtx;
- //
- // 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 *hTOF;
- // 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(StMuDstMinvMaker, 1)
- };
- #endif
|