/****************************************************** JPsi->e+e- Reads the TPC tracks and reconstruct the InvariantMass of J/Psi: Dipak *******************************************************/ #include "PndJpsi2PiAna.h" // Fair #include "FairRootManager.h" // Rho #include "TPidSelector.h" #include "TCandidate.h" #include "TCandList.h" #include "VAbsMicroCandidate.h" // Root #include "TH1F.h" // general #include #include using std::cout; using std::endl; // ----- Default constructor ------------------------------------------- PndJpsi2PiAna::PndJpsi2PiAna() : PndAnaTask() { } // ------------------------------------------------------------------------- // ----- Destructor ---------------------------------------------------- PndJpsi2PiAna::~PndJpsi2PiAna() { } // ------------------------------------------------------------------------- InitStatus PndJpsi2PiAna::Init() { std::cout << "-I- PndJpsi2PiAna: Initialization" << std::endl; InitArrays(); jpsimass=new TH1F("mjpsi","jpsi",200,0,3.5); ppmass=new TH1F("mpp","mpp",200,0,4.5); mcmass=new TH1F("mmc","mmc",200,0,4.0); jpsiMSel=new TPidMassSelector("jpsi",3.1,0.1); fEvtCount=0; return kSUCCESS; } // ------------------------------------------------------------------------- void PndJpsi2PiAna::Exec(Option_t* opt) { if (0==(++fEvtCount)%100) cout <<"evt "<Fill(jpsi[j].M()); //jpsi.Select(jpsiMSel); pp.Combine(jpsi,pip,pim); for (j=0;jFill(pp[j].M()); for (j=0;jFill(mc[j].M()); } // ------------------------------------------------------------------------- void PndJpsi2PiAna::Finish() { jpsimass->Write(); ppmass->Write(); }