#ifndef CBM_KRES_CONVERSION_CORRECTED_PHOTONS #define CBM_KRES_CONVERSION_CORRECTED_PHOTONS #include #include "TH2D.h" #include "CbmMCTrack.h" #include "CbmStsTrack.h" #include "CbmRichRing.h" #include "CbmKFVertex.h" #include "CbmVertex.h" #include "KFParticle.h" #include "CbmRichRingFitterEllipseTau.h" #include "CbmKresTrainAnnDirectPhotons.h" #include "CbmKresSelectAnnPhotons.h" #include "CbmKresGammaCorrection.h" #include "CbmLmvmKinematicParams.h" class CbmRichRingFitterEllipseTau; using namespace std; class CbmKresConversionCorrectedPhotons { public: //***** brief Standard constructor. CbmKresConversionCorrectedPhotons(); //***** brief Standard destructor. virtual ~CbmKresConversionCorrectedPhotons(); void Init(double OA, double IM); void InitHistograms(); void Finish(); void Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut, int RealPID); void SaveOutsideTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing* RING); void SaveTargetTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing* RING); int FindInRich(int richInd, int stsMcTrackId); int CheckIfElectron(CbmRichRing* ring, double momentum); std::vector SaveAllHits(CbmStsTrack* track); void FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector MCtracks_minus, vector MCtracks_plus, vector StsTrack_minus, vector StsTrack_plus, vector Momenta_minus, vector Momenta_plus, std::vector Rings_minus, std::vector Rings_plus, std::vector stsIndex_minus, std::vector stsIndex_plus, vector richRing_minus, vector richRing_plus); void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector MCtracks_minus_Outside, vector MCtracks_plus_Outside, vector StsTrack_minus_Outside, vector StsTrack_plus_Outside, std::vector Rings_minus_Outside, std::vector Rings_plus_Outside, std::vector stsIndex_minus_Outside, std::vector stsIndex_plus_Outside, vector richRing_minus_Outside, vector richRing_plus_Outside); double CalculatePlaneAngle_last_fromHits(std::vector track_1, std::vector track_2); double CalculatePlaneAngle_last(CbmStsTrack* Sts_1, CbmStsTrack* Sts_2); double CalculatePlaneAngle_first(CbmStsTrack* Sts_1, CbmStsTrack* Sts_2); void CDP_likesign_Mixing_Target(double AngleCut, double InvMassCut); void CDP_likesign_Mixing_Outside(double AngleCut, double InvMassCut); void CDP_Mixing_Target(double AngleCut, double InvMassCut); void CDP_Mixing_Outside(double AngleCut, double InvMassCut); private: CbmKresTrainAnnDirectPhotons * fTrainPhotons; Int_t AnnTrainPhotons; CbmKresSelectAnnPhotons * fAnnPhotonsSelection; Int_t UseAnnPhotons; CbmKresGammaCorrection * fGammaCorrection; Int_t UseCorrection; std::vector< std::vector > corr_all; std::vector< std::vector > corr_two; std::vector< std::vector > corr_onetwo; double thresholdweight; TClonesArray* fMcTracks; TClonesArray* fGlobalTracks; TClonesArray* fStsTracks; TClonesArray* fStsTrackMatches; TClonesArray* fRichProjections; TClonesArray* fRichRings; TClonesArray* fRichRingMatches; TClonesArray* fRichHits; TClonesArray* fArrayMvdHit; TClonesArray* fArrayStsHit; CbmVertex * fPrimVertex; CbmKFVertex fKFVertex; CbmRichRingFitterEllipseTau* fTauFit; // charged tracks from outside vector VStsTrack_minus_Outside; vector VMCtracks_minus_Outside; std::vector VRings_minus_Outside; std::vector VStsIndex_minus_Outside; vector VRichRing_minus_Outside; vector VStsTrack_plus_Outside; vector VMCtracks_plus_Outside; std::vector VRings_plus_Outside; std::vector VStsIndex_plus_Outside; vector VRichRing_plus_Outside; // charged tracks from the target vector VMCtracks_minus_Target; vector VStsTrack_minus_Target; vector VMomenta_minus_Target; std::vector VRings_minus_Target; std::vector VStsIndex_minus_Target; vector VRichRing_minus_Target; vector VMCtracks_plus_Target; vector VStsTrack_plus_Target; vector VMomenta_plus_Target; std::vector VRings_plus_Target; std::vector VStsIndex_plus_Target; vector VRichRing_plus_Target; // CDP_LK_EMT Target std::vector CDP_LK_EMT_momenta_minus_Target; std::vector CDP_LK_EMT_NofRings_minus_Target; std::vector CDP_LK_EMT_STS_minus_Target; std::vector CDP_LK_EMT_STS_minus_index_Target; std::vector CDP_LK_EMT_momenta_plus_Target; std::vector CDP_LK_EMT_NofRings_plus_Target; std::vector CDP_LK_EMT_STS_plus_Target; std::vector CDP_LK_EMT_STS_plus_index_Target; // CDP_LK_EMT Outside std::vector CDP_LK_EMT_NofRings_minus_Outside; std::vector CDP_LK_EMT_STS_minus_Outside; std::vector CDP_LK_EMT_STS_minus_index_Outside; std::vector CDP_LK_EMT_NofRings_plus_Outside; std::vector CDP_LK_EMT_STS_plus_Outside; std::vector CDP_LK_EMT_STS_plus_index_Outside; // CDP_EMT Target std::vector CDP_EMT_Event_minus_Target; std::vector CDP_EMT_momenta_minus_Target; std::vector CDP_EMT_NofRings_minus_Target; std::vector< std::vector > CDP_EMT_Hits_minus_Target; std::vector CDP_EMT_Event_plus_Target; std::vector CDP_EMT_momenta_plus_Target; std::vector CDP_EMT_NofRings_plus_Target; std::vector< std::vector > CDP_EMT_Hits_plus_Target; // CDP_EMT Outside std::vector CDP_EMT_Event_minus_Outside; std::vector CDP_EMT_momenta_minus_Outside; std::vector CDP_EMT_KFTrack_minus_Outside; std::vector CDP_EMT_NofRings_minus_Outside; std::vector< std::vector > CDP_EMT_Hits_minus_Outside; std::vector CDP_EMT_Event_plus_Outside; std::vector CDP_EMT_momenta_plus_Outside; std::vector CDP_EMT_KFTrack_plus_Outside; std::vector CDP_EMT_NofRings_plus_Outside; std::vector< std::vector > CDP_EMT_Hits_plus_Outside; // histograms // Target vector fHistoList_dp_Target; TH1D * CMother_PDG_Target; TH1D * CGrandMother_PDG_Target; // Outside vector fHistoList_dp_Outside; TH1D * CMother_PDG_Outside; TH1D * CGrandMother_PDG_Outside; // Both vector fHistoList_dp_Both; TH2D * CPdg_vs_Distance_for_dp; TH2D * CP_vs_Distance_for_dp; TH1D * CDP_AnnTruePairs; TH1D * CDP_AnnFalsePairs; TH1D * CDP_AnnTruePairs_AfterCuts; TH1D * CDP_AnnFalsePairs_AfterCuts; /////// to check Cuts /////// Both vector fHistoList_dp_cuts_Both; TH2D * CDP_candidates_InvMass_vs_OA_Both; TH2D * CDP_InvMass_vs_OA_Both; TH1D * CDP_candidates_InvMass_Both; TH1D * CDP_InvMass_Both; TH1D * CDP_candidates_OA_Both; TH1D * CDP_OA_Both; TH1D * CDP_candidates_PlaneAngles_last_Both; TH1D * CDP_PlaneAngles_last_Both; TH1D * CDP_candidates_PlaneAngles_first_Both; TH1D * CDP_PlaneAngles_first_Both; /////// Target vector fHistoList_dp_cuts_Target; TH2D * CDP_candidates_InvMass_vs_OA_Target; TH2D * CDP_InvMass_vs_OA_Target; TH1D * CDP_candidates_InvMass_Target; TH1D * CDP_InvMass_Target; TH1D * CDP_candidates_OA_Target; TH1D * CDP_OA_Target; TH1D * CDP_candidates_PlaneAngles_last_Target; TH1D * CDP_PlaneAngles_last_Target; TH1D * CDP_candidates_PlaneAngles_first_Target; TH1D * CDP_PlaneAngles_first_Target; /////// Outside vector fHistoList_dp_cuts_Outside; TH2D * CDP_candidates_InvMass_vs_OA_Outside; TH2D * CDP_InvMass_vs_OA_Outside; TH1D * CDP_candidates_InvMass_Outside; TH1D * CDP_InvMass_Outside; TH1D * CDP_candidates_OA_Outside; TH1D * CDP_OA_Outside; TH1D * CDP_candidates_PlaneAngles_last_Outside; TH1D * CDP_PlaneAngles_last_Outside; TH1D * CDP_candidates_PlaneAngles_first_Outside; TH1D * CDP_PlaneAngles_first_Outside; // Target => all vector fHistoList_dp_all_Target; TH1D * CDP_InvMassReco_all_Target; TH1D * CDP_OpeningAngleReco_all_Target; TH1D * CDP_Pdg_all_Target; TH1D * CDP_P_reco_all_Target; TH1D * CDP_Pt_reco_all_Target; TH1D * CPh_fromTarget_Pt_reco_all_Target; TH1D * CPh_fromPions_Pt_reco_all_Target; TH1D * CPh_fromEtas_Pt_reco_all_Target; TH1D * CPh_fromDalitz_Pt_reco_all_Target; TH1D * CPh_fromXi_Pt_reco_all_Target; TH1D * CPh_fromOther_Pt_reco_all_Target; TH1D * CPh_twoFromTarget_Pt_reco_all_Target; TH1D * CPh_fromCombinatorial_Pt_reco_all_Target; TH1D * CPh_fromConversion_Pt_reco_all_Target; TH2D * CPh_pt_vs_rap_est_all_Target; TH2D * CPh_pt_vs_rap_est_corr_all_Target; // Target => two vector fHistoList_dp_two_Target; TH1D * CDP_InvMassReco_two_Target; TH1D * CDP_OpeningAngleReco_two_Target; TH1D * CDP_Pdg_two_Target; TH1D * CDP_P_reco_two_Target; TH1D * CDP_Pt_reco_two_Target; TH1D * CPh_fromTarget_Pt_reco_two_Target; TH1D * CPh_fromPions_Pt_reco_two_Target; TH1D * CPh_fromEtas_Pt_reco_two_Target; TH1D * CPh_fromDalitz_Pt_reco_two_Target; TH1D * CPh_fromXi_Pt_reco_two_Target; TH1D * CPh_fromOther_Pt_reco_two_Target; TH1D * CPh_twoFromTarget_Pt_reco_two_Target; TH1D * CPh_fromCombinatorial_Pt_reco_two_Target; TH1D * CPh_fromConversion_Pt_reco_two_Target; TH2D * CPh_pt_vs_rap_est_two_Target; TH2D * CPh_pt_vs_rap_est_corr_two_Target; // Target => onetwo vector fHistoList_dp_onetwo_Target; TH1D * CDP_InvMassReco_onetwo_Target; TH1D * CDP_OpeningAngleReco_onetwo_Target; TH1D * CDP_Pdg_onetwo_Target; TH1D * CDP_P_reco_onetwo_Target; TH1D * CDP_Pt_reco_onetwo_Target; TH1D * CPh_fromTarget_Pt_reco_onetwo_Target; TH1D * CPh_fromPions_Pt_reco_onetwo_Target; TH1D * CPh_fromEtas_Pt_reco_onetwo_Target; TH1D * CPh_fromDalitz_Pt_reco_onetwo_Target; TH1D * CPh_fromXi_Pt_reco_onetwo_Target; TH1D * CPh_fromOther_Pt_reco_onetwo_Target; TH1D * CPh_twoFromTarget_Pt_reco_onetwo_Target; TH1D * CPh_fromCombinatorial_Pt_reco_onetwo_Target; TH1D * CPh_fromConversion_Pt_reco_onetwo_Target; TH2D * CPh_pt_vs_rap_est_onetwo_Target; TH2D * CPh_pt_vs_rap_est_corr_onetwo_Target; // Outside => all vector fHistoList_dp_all_Outside; TH1D * CDP_InvMassReco_all_Outside; TH1D * CDP_OpeningAngleReco_all_Outside; TH1D * CDP_Pdg_all_Outside; TH1D * CDP_P_reco_all_Outside; TH1D * CDP_Pt_reco_all_Outside; TH1D * CPh_fromTarget_Pt_reco_all_Outside; TH1D * CPh_fromPions_Pt_reco_all_Outside; TH1D * CPh_fromEtas_Pt_reco_all_Outside; TH1D * CPh_fromDalitz_Pt_reco_all_Outside; TH1D * CPh_fromXi_Pt_reco_all_Outside; TH1D * CPh_fromOther_Pt_reco_all_Outside; TH1D * CPh_twoFromTarget_Pt_reco_all_Outside; TH1D * CPh_fromCombinatorial_Pt_reco_all_Outside; TH1D * CPh_fromConversion_Pt_reco_all_Outside; TH2D * CPh_pt_vs_rap_est_all_Outside; TH2D * CPh_pt_vs_rap_est_corr_all_Outside; // Outside => two vector fHistoList_dp_two_Outside; TH1D * CDP_InvMassReco_two_Outside; TH1D * CDP_OpeningAngleReco_two_Outside; TH1D * CDP_Pdg_two_Outside; TH1D * CDP_P_reco_two_Outside; TH1D * CDP_Pt_reco_two_Outside; TH1D * CPh_fromTarget_Pt_reco_two_Outside; TH1D * CPh_fromPions_Pt_reco_two_Outside; TH1D * CPh_fromEtas_Pt_reco_two_Outside; TH1D * CPh_fromDalitz_Pt_reco_two_Outside; TH1D * CPh_fromXi_Pt_reco_two_Outside; TH1D * CPh_fromOther_Pt_reco_two_Outside; TH1D * CPh_twoFromTarget_Pt_reco_two_Outside; TH1D * CPh_fromCombinatorial_Pt_reco_two_Outside; TH1D * CPh_fromConversion_Pt_reco_two_Outside; TH2D * CPh_pt_vs_rap_est_two_Outside; TH2D * CPh_pt_vs_rap_est_corr_two_Outside; // Outside => onetwo vector fHistoList_dp_onetwo_Outside; TH1D * CDP_InvMassReco_onetwo_Outside; TH1D * CDP_OpeningAngleReco_onetwo_Outside; TH1D * CDP_Pdg_onetwo_Outside; TH1D * CDP_P_reco_onetwo_Outside; TH1D * CDP_Pt_reco_onetwo_Outside; TH1D * CPh_fromTarget_Pt_reco_onetwo_Outside; TH1D * CPh_fromPions_Pt_reco_onetwo_Outside; TH1D * CPh_fromEtas_Pt_reco_onetwo_Outside; TH1D * CPh_fromDalitz_Pt_reco_onetwo_Outside; TH1D * CPh_fromXi_Pt_reco_onetwo_Outside; TH1D * CPh_fromOther_Pt_reco_onetwo_Outside; TH1D * CPh_twoFromTarget_Pt_reco_onetwo_Outside; TH1D * CPh_fromCombinatorial_Pt_reco_onetwo_Outside; TH1D * CPh_fromConversion_Pt_reco_onetwo_Outside; TH2D * CPh_pt_vs_rap_est_onetwo_Outside; TH2D * CPh_pt_vs_rap_est_corr_onetwo_Outside; // Both => all vector fHistoList_dp_all_Both; TH1D * CDP_InvMassReco_all_Both; TH1D * CDP_OpeningAngleReco_all_Both; TH1D * CDP_Pdg_all_Both; TH1D * CDP_P_reco_all_Both; TH1D * CDP_Pt_reco_all_Both; TH1D * CPh_fromTarget_Pt_reco_all_Both; TH1D * CPh_fromPions_Pt_reco_all_Both; TH1D * CPh_fromEtas_Pt_reco_all_Both; TH1D * CPh_fromDalitz_Pt_reco_all_Both; TH1D * CPh_fromXi_Pt_reco_all_Both; TH1D * CPh_fromOther_Pt_reco_all_Both; TH1D * CPh_twoFromTarget_Pt_reco_all_Both; TH1D * CPh_fromCombinatorial_Pt_reco_all_Both; TH1D * CPh_fromConversion_Pt_reco_all_Both; TH2D * CPh_pt_vs_rap_est_all_Both; TH2D * CPh_pt_vs_rap_est_corr_all_Both; // Both => two vector fHistoList_dp_two_Both; TH1D * CDP_InvMassReco_two_Both; TH1D * CDP_OpeningAngleReco_two_Both; TH1D * CDP_Pdg_two_Both; TH1D * CDP_P_reco_two_Both; TH1D * CDP_Pt_reco_two_Both; TH1D * CPh_fromTarget_Pt_reco_two_Both; TH1D * CPh_fromPions_Pt_reco_two_Both; TH1D * CPh_fromEtas_Pt_reco_two_Both; TH1D * CPh_fromDalitz_Pt_reco_two_Both; TH1D * CPh_fromXi_Pt_reco_two_Both; TH1D * CPh_fromOther_Pt_reco_two_Both; TH1D * CPh_twoFromTarget_Pt_reco_two_Both; TH1D * CPh_fromCombinatorial_Pt_reco_two_Both; TH1D * CPh_fromConversion_Pt_reco_two_Both; TH2D * CPh_pt_vs_rap_est_two_Both; TH2D * CPh_pt_vs_rap_est_corr_two_Both; // Both => onetwo vector fHistoList_dp_onetwo_Both; TH1D * CDP_InvMassReco_onetwo_Both; TH1D * CDP_OpeningAngleReco_onetwo_Both; TH1D * CDP_Pdg_onetwo_Both; TH1D * CDP_P_reco_onetwo_Both; TH1D * CDP_Pt_reco_onetwo_Both; TH1D * CPh_fromTarget_Pt_reco_onetwo_Both; TH1D * CPh_fromPions_Pt_reco_onetwo_Both; TH1D * CPh_fromEtas_Pt_reco_onetwo_Both; TH1D * CPh_fromDalitz_Pt_reco_onetwo_Both; TH1D * CPh_fromXi_Pt_reco_onetwo_Both; TH1D * CPh_fromOther_Pt_reco_onetwo_Both; TH1D * CPh_twoFromTarget_Pt_reco_onetwo_Both; TH1D * CPh_fromCombinatorial_Pt_reco_onetwo_Both; TH1D * CPh_fromConversion_Pt_reco_onetwo_Both; TH2D * CPh_pt_vs_rap_est_onetwo_Both; TH2D * CPh_pt_vs_rap_est_corr_onetwo_Both; // EMT CDP Target TH1D * CDP_EMT_Pt_all_Target; TH1D * CDP_EMT_Pt_two_Target; TH1D * CDP_EMT_Pt_onetwo_Target; // EMT CDP Outside TH1D * CDP_EMT_Pt_all_Outside; TH1D * CDP_EMT_Pt_two_Outside; TH1D * CDP_EMT_Pt_onetwo_Outside; // EMT CDP Both TH1D * CDP_EMT_Pt_all_Both; TH1D * CDP_EMT_Pt_two_Both; TH1D * CDP_EMT_Pt_onetwo_Both; /////////////////// CDP_LK_EMT Target TH1D * CDP_LK_EMT_Pt_all_Target; TH1D * CDP_LK_EMT_Pt_two_Target; TH1D * CDP_LK_EMT_Pt_onetwo_Target; ///////////////////////////////////// /////////////////// CDP_LK_EMT Outside TH1D * CDP_LK_EMT_Pt_all_Outside; TH1D * CDP_LK_EMT_Pt_two_Outside; TH1D * CDP_LK_EMT_Pt_onetwo_Outside; ///////////////////////////////////// /////////////////// CDP_LK_EMT Both TH1D * CDP_LK_EMT_Pt_all_Both; TH1D * CDP_LK_EMT_Pt_two_Both; TH1D * CDP_LK_EMT_Pt_onetwo_Both; ///////////////////////////////////// //***** brief Copy constructor. CbmKresConversionCorrectedPhotons(const CbmKresConversionCorrectedPhotons&); //***** brief Assignment operator. CbmKresConversionCorrectedPhotons operator=(const CbmKresConversionCorrectedPhotons&); ClassDef(CbmKresConversionCorrectedPhotons,1) }; #endif