123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #ifndef STFEMTODSTMAKER_STARGEN_HH
- #define STFEMTODSTMAKER_STARGEN_HH
- #include "StMaker.h"
- #include "StThreeVector.hh"
- #include "StThreeVectorF.hh"
- #include "TRandom3.h"
- #include <StarGenerator/EVENT/StarGenParticle.h>
- #include <StarGenerator/EVENT/StarGenEvent.h>
- #include <TDatabasePDG.h>
- #include "TSystem.h"
- #include "TChain.h"
- #include "StFemtoEvent.h"
- #include "StFemtoTrack.h"
- #include <TString.h>
- #include <TFile.h>
- #include <TLorentzVector.h>
- #include <TTree.h>
- #include <TH1.h>
- #include <TH2.h>
- #include <TVectorT.h>
- #include <TMatrixTLazy.h>
- #include <TMatrixDSymEigen.h>
- #include <vector>
- #include <iostream>
- #ifndef St_NO_NAMESPACES
- using namespace std;
- #endif
- //
- // Predefinisions
- //
- class StFemtoEvent;
- class StFemtoTrack;
- //_________________
- class StFemtoDstMaker_StarGen : public StMaker
- {
- public:
- StFemtoDstMaker_StarGen(const char *dirName, const char *fileName, const char *oFileName,
- const char *filter = ".", int maxFiles = 1e9);
- ~StFemtoDstMaker_StarGen();
- void Clear(Option_t *option = "");
- Int_t Init();
- Int_t Make();
- Int_t Finish();
- void CleanVariables();
- int GetNEvents();
- void SetCompressionLevel(Int_t comp) { mCompression = comp; }
- //
- // Setters
- //
- // track
- void SetParticleMomentum(const float& lo, const float& hi) { mTrackMomentum[0]=lo; mTrackMomentum[1]=hi; }
- void SetTrackEta(const float& lo, const float& hi) { mTrackEta[0]=lo; mTrackEta[1]=hi; }
- void SetPtCut(float ptCut) { mPtCut = ptCut; }
- private:
- const char *mOutFileName;
- TFile *mOutFile;
- int mCompression; // see ROOT documentation for more info
- int mNBytes; // number of writed bytes to the mTree
- bool mIsGoodTrack;
- string mDir;
- string mFileName;
- string mFilter;
- unsigned int mEventIndex;
- unsigned int mNEvents;
- //
- // Single-particle cuts
- //
- float mTrackMomentum[2];
- float mTrackEta[2];
- //
- // Femto event structure
- //
- StFemtoEvent *mFemtoEvent;
- TDatabasePDG *mDb;
- TChain *mTChain;
- TTree *mTree;
- StarGenEvent *mSGEvent;
- float mTotalTracks;
- int mMaxFiles;
- TRandom3 *mRandy;
- float mPtCut;
- TMatrixTSym<double> *mMatrix; // transverse sphericity matrix
- //
- // Internal class methods
- //
- bool AcceptTrack(const TLorentzVector &p);
- int InitRead(string dir, string fileName,
- string filter, int maxFiles);
- int FillChain(TChain *aChain, const char *fileName,
- int faxFiles);
- int FillChain(TChain *chain, char *dir,
- const char *filter, int maxFiles);
- void UninitRead();
- float dedxMean(float mass, float momentum);
- void TopologyMap(unsigned int *tmap1, unsigned int *tmap2, float ptot);
- ClassDef(StFemtoDstMaker_StarGen, 1)
- };
- #endif
|