13 JCalibration *jcalib = dapp->GetJCalibration((locEventLoop->GetJEvent()).GetRunNumber());
17 map<string, double> photon_endpoint_energy;
18 if(jcalib->Get(
"/PHOTON_BEAM/endpoint_energy", photon_endpoint_energy) ==
false) {
19 endpoint_energy = photon_endpoint_energy[
"PHOTON_BEAM_ENDPOINT_ENERGY"];
25 map<string, double> photon_beam_param;
26 if(jcalib->Get(
"/ANALYSIS/beam_asymmetry/coherent_energy", photon_beam_param) ==
false) {
38 japp->RootWriteLock();
45 dInvariantMass = GetOrCreate_Histogram<TH1I>(
"InvariantMass",
"Invariant Mass of K^{+}K^{-};Invariant Mass of K^{+}K^{-} (GeV/c^{2}",270,0.9,1.8);
46 dMissingMassSq = GetOrCreate_Histogram<TH1I>(
"MissingMassSq",
"Missing Mass Sq. of K^{+}K^{-};MM^{2}_{K^{+}K^{-}} (GeV/c^{2}",600,-0.6,0.6);
47 dKplus_deltaInvBeta_P = GetOrCreate_Histogram<TH2I>(
"Kplus_deltaInvBeta_P",
"K+ Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
48 dKminus_deltaInvBeta_P = GetOrCreate_Histogram<TH2I>(
"Kminus_deltaInvBeta_P",
"K- Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
50 dMM2_M2k = GetOrCreate_Histogram<TH2I>(
"MM2_M2k",
"MM^{2} off k^{+}k^{-} vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; MM^{2}", 800, 0.0, 2.0, 200, -1., 1.);
51 dProton_dEdx_P = GetOrCreate_Histogram<TH2I>(
"Proton_dEdx_P",
"dE/dx vs p; p; dE/dx",200,0,2,500,0,5);
52 dProton_P_Theta = GetOrCreate_Histogram<TH2I>(
"Proton_P_Theta",
"p vs #theta; #theta; p (GeV/c)",180,0,180,120,0,12);
53 dDeltaE_M2k = GetOrCreate_Histogram<TH2I>(
"DeltaE_M2k",
"#DeltaE vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; #DeltaE (tagger - tracks)", 800, 0.0, 2.0, 200, -5., 5.);
54 dM2pi_M2k = GetOrCreate_Histogram<TH2I>(
"M2pi_M2k",
"M_{#pi^{+}#pi^{-}} vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; M_{#pi^{+}#pi^{-}}", 800, 0.0, 2.0, 800, 0.0, 2.0);
56 dMM2_M2k_ProtonTag = GetOrCreate_Histogram<TH2I>(
"MM2_M2k_ProtonTag",
"MM^{2} off k^{+}k^{-} vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; MM^{2}", 800, 0.0, 2.0, 200, -1., 1.);
57 dDeltaE_M2k_ProtonTag = GetOrCreate_Histogram<TH2I>(
"DeltaE_M2k_ProtonTag",
"#DeltaE vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; #DeltaE (tagger - tracks)", 800, 0.0, 2.0, 200, -5., 5.);
58 dM2pi_M2k_ProtonTag = GetOrCreate_Histogram<TH2I>(
"M2pi_M2k_ProtonTag",
"M_{#pi^{+}#pi^{-}} vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; M_{#pi^{+}#pi^{-}}", 800, 0.0, 2.0, 800, 0.0, 2.0);
60 dEgamma_M2k_ProtonTag = GetOrCreate_Histogram<TH2I>(
"Egamma_M2k",
"TAGGER photon energy vs M_{k^{+}k^{-}}; M_{k^{+}k^{-}}; E_{#gamma}", 800, 0.0, 2.0, 400, 2., 12.);
61 dKplus_deltaInvBeta_P_ProtonTag = GetOrCreate_Histogram<TH2I>(
"Kplus_deltaInvBeta_P_ProtonTag",
"K+ Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
62 dKminus_deltaInvBeta_P_ProtonTag = GetOrCreate_Histogram<TH2I>(
"Kminus_deltaInvBeta_P_ProtonTag",
"K- Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
64 dKplus_deltaInvBeta_P_PhiTag = GetOrCreate_Histogram<TH2I>(
"Kplus_deltaInvBeta_P_PhiTag",
"K+ Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
65 dKminus_deltaInvBeta_P_PhiTag = GetOrCreate_Histogram<TH2I>(
"Kminus_deltaInvBeta_P_PhiTag",
"K- Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
66 dKplus_Beta_P_PhiTag = GetOrCreate_Histogram<TH2I>(
"Kplus_Beta_P_PhiTag",
"K+ #beta vs p; p; #beta",200,0,10,500,-0.5,1.5);
67 dKminus_Beta_P_PhiTag = GetOrCreate_Histogram<TH2I>(
"Kminus_Beta_P_PhiTag",
"K- #beta vs p; p; #beta",200,0,10,500,-0.5,1.5);
69 dKplus_deltaInvBeta_P_RhoTag = GetOrCreate_Histogram<TH2I>(
"Kplus_deltaInvBeta_P_RhoTag",
"K+ Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
70 dKminus_deltaInvBeta_P_RhoTag = GetOrCreate_Histogram<TH2I>(
"Kminus_deltaInvBeta_P_RhoTag",
"K- Inverse #Delta#beta vs p; p; 1/#beta_{exp} - 1/#beta_{meas}",200,0,10,500,-0.5,0.5);
71 dKplus_Beta_P_RhoTag = GetOrCreate_Histogram<TH2I>(
"Kplus_Beta_P_RhoTag",
"K+ #beta vs p; p; #beta",200,0,10,500,-0.5,1.5);
72 dKminus_Beta_P_RhoTag = GetOrCreate_Histogram<TH2I>(
"Kminus_Beta_P_RhoTag",
"K- #beta vs p; p; #beta",200,0,10,500,-0.5,1.5);
74 dKplus_P_Theta_PhiTag = GetOrCreate_Histogram<TH2I>(
"Kplus_P_Theta_PhiTag",
"K+ p vs #theta; #theta; p (GeV)",180,0,180,200,0.,10.);
75 dKminus_P_Theta_PhiTag = GetOrCreate_Histogram<TH2I>(
"Kminus_P_Theta_PhiTag",
"K- p vs #theta; #theta; p (GeV)",180,0,180,200,0.,10.);
76 dKplus_P_Theta_RhoTag = GetOrCreate_Histogram<TH2I>(
"Kplus_P_Theta_RhoTag",
"K+ p vs #theta; #theta; p (GeV)",180,0,180,200,0.,10.);
77 dKminus_P_Theta_RhoTag = GetOrCreate_Histogram<TH2I>(
"Kminus_P_Theta_RhoTag",
"K- p vs #theta; #theta; p (GeV)",180,0,180,200,0.,10.);
93 double locBeamPhotonEnergy = locBeamPhoton->
energy();
96 double kplus_beta = -1.;
97 double kminus_beta = -1.;
98 double kplus_deltaInvBeta = -1.;
99 double kminus_deltaInvBeta = -1.;
101 for(
size_t loc_i = 0; loc_i < 2; ++loc_i) {
106 if(locChargedTrackHypothesis == NULL) { cout<<
"Missing K+"<<endl;
continue; }
108 kplus_deltaInvBeta = 1.0/locChargedTrackHypothesis->
lorentzMomentum().Beta() - 1.0/kplus_beta;
111 if(locChargedTrackPion != NULL)
115 kplus_PionHypothesis.SetXYZM(locParticles[0]->lorentzMomentum().
X(), locParticles[0]->lorentzMomentum().Y(), locParticles[0]->lorentzMomentum().Z(), 0.13957);
119 if(locChargedTrackHypothesis == NULL) { cout<<
"Missing K-"<<endl;
continue; }
120 kminus_beta = locChargedTrackHypothesis->
measuredBeta();
121 kplus_deltaInvBeta = 1.0/locChargedTrackHypothesis->
lorentzMomentum().Beta() - 1.0/kplus_beta;
124 if(locChargedTrackPion != NULL)
128 kminus_PionHypothesis.SetXYZM(locParticles[1]->lorentzMomentum().
X(), locParticles[1]->lorentzMomentum().Y(), locParticles[1]->lorentzMomentum().Z(), 0.13957);
133 DLorentzVector locP4_2k = locParticles[0]->lorentzMomentum() + locParticles[1]->lorentzMomentum();
134 DLorentzVector locP4_2pi = kplus_PionHypothesis + kminus_PionHypothesis;
153 dEgamma->Fill(locBeamPhotonEnergy);
158 dMM2_M2k->Fill(locP4_2k.M(), locMissingP4.M2());
160 dM2pi_M2k->Fill(locP4_2k.M(), locP4_2pi.M());
167 dProton_P_Theta->Fill(locProtonP4.Vect().Theta()*180/TMath::Pi(), locProtonP4.Vect().Mag());
189 dKplus_P_Theta_PhiTag->Fill(locParticles[0]->lorentzMomentum().Theta()*180./TMath::Pi(),locParticles[0]->lorentzMomentum().Vect().Mag());
190 dKminus_P_Theta_PhiTag->Fill(locParticles[1]->lorentzMomentum().Theta()*180./TMath::Pi(),locParticles[1]->lorentzMomentum().Vect().Mag());
199 dKplus_P_Theta_RhoTag->Fill(locParticles[0]->lorentzMomentum().Theta()*180./TMath::Pi(),locParticles[0]->lorentzMomentum().Vect().Mag());
200 dKminus_P_Theta_RhoTag->Fill(locParticles[1]->lorentzMomentum().Theta()*180./TMath::Pi(),locParticles[1]->lorentzMomentum().Vect().Mag());
vector< const DKinematicData * > Get_FinalParticles_Measured(void) const
TH2I * dM2pi_M2k_ProtonTag
TDirectoryFile * ChangeTo_BaseDirectory(void)
TH2I * dKminus_deltaInvBeta_P_PhiTag
const DReaction * Get_Reaction(void) const
double energy(void) const
TH2I * dKplus_deltaInvBeta_P_ProtonTag
TH2I * dEgamma_M2k_ProtonTag
TH2I * dKplus_deltaInvBeta_P_RhoTag
TH2I * dKminus_Beta_P_RhoTag
const DTrackTimeBased * Get_TrackTimeBased(void) const
TDirectoryFile * CreateAndChangeTo_ActionDirectory(void)
TH2I * dKminus_deltaInvBeta_P_ProtonTag
double measuredBeta(void) const
const DKinematicData * Get_InitialParticle_Measured(void) const
TLorentzVector DLorentzVector
const DChargedTrackHypothesis * Get_Hypothesis(Particle_t locPID) const
bool Get_UseKinFitResultsFlag(void) const
TH2I * dKminus_Beta_P_PhiTag
TH2I * dKminus_deltaInvBeta_P
TH2I * dKplus_P_Theta_PhiTag
DLorentzVector Calc_MissingP4(const DReaction *locReaction, const DParticleCombo *locParticleCombo, bool locUseKinFitDataFlag) const
void Initialize(JEventLoop *locEventLoop)
vector< const DKinematicData * > Get_FinalParticles(void) const
DLorentzVector lorentzMomentum(void) const
const JObject * Get_FinalParticle_SourceObject(size_t locFinalParticleIndex) const
TH2I * dKplus_deltaInvBeta_P_PhiTag
const DKinematicData * Get_InitialParticle(void) const
const DAnalysisUtilities * dAnalysisUtilities
TH2I * dKplus_P_Theta_RhoTag
TH2I * dKminus_deltaInvBeta_P_RhoTag
bool Perform_Action(JEventLoop *locEventLoop, const DParticleCombo *locParticleCombo)
TH2I * dMM2_M2k_ProtonTag
const DParticleComboStep * Get_ParticleComboStep(size_t locStepIndex) const
TH2I * dKplus_Beta_P_PhiTag
TH2I * dKplus_deltaInvBeta_P
TH2I * dDeltaE_M2k_ProtonTag
TH2I * dKplus_Beta_P_RhoTag
TH2I * dKminus_P_Theta_PhiTag
TH2I * dKminus_P_Theta_RhoTag