From c5a4bb42799e47c83d3f9ac0794c7fd2446f5d73 Mon Sep 17 00:00:00 2001 From: Kunal Gautam Date: Mon, 3 Oct 2022 14:37:48 +0200 Subject: [PATCH 01/49] adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils --- .../FCCAnalyses/ReconstructedParticle2Track.h | 8 + .../dataframe/FCCAnalyses/VertexingUtils.h | 188 +++++++++++++++++- .../src/ReconstructedParticle2Track.cc | 30 +++ 3 files changed, 223 insertions(+), 3 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h index d090e77ec3..fead5f4f9e 100644 --- a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h +++ b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h @@ -67,6 +67,14 @@ namespace ReconstructedParticle2Track{ const ROOT::VecOps::RVec& tracks, const float& Bz); + /// Return the momentum of a track to a reconstructed particle + ROOT::VecOps::RVec getRP2TRK_mom (ROOT::VecOps::RVec in, + ROOT::VecOps::RVec tracks); + + /// Return the charge of a track to a reconstructed particle + ROOT::VecOps::RVec getRP2TRK_charge(ROOT::VecOps::RVec in, + ROOT::VecOps::RVec tracks); + /// Return the D0 of a track to a reconstructed particle ROOT::VecOps::RVec getRP2TRK_D0 (ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks); diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index 53ca02886e..ce2807d3a1 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -110,6 +110,7 @@ namespace VertexingUtils{ /// Return the number of tracks in a given track collection int get_nTracks(ROOT::VecOps::RVec tracks); +<<<<<<< HEAD /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; @@ -308,9 +309,190 @@ namespace VertexingUtils{ std::array Delphes2Edm4hep_TrackCovMatrix( const TMatrixDSym& cov, bool Units_mm ) ; - /// --- Internal methods needed by the code of Franco B: - TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; - TMatrixDSym get_trackCov( edm4hep::TrackState & atrack, bool Units_mm = false) ; + /////////////////////////////////////////////////// + /// functions used for SV reconstruction + + /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV + * first entry: PV, all subsequent entries: SVs + */ + ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, + ROOT::VecOps::RVec SV ); + + ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, + ROOT::VecOps::RVec> SV ); + + /** returns the invariant mass of a two-track vertex + * CAUTION: m1 -> mass of first track, m2 -> mass of second track + * by default both pions + */ + double get_invM_pairs( FCCAnalysesVertex vertex, + double m1 = 0.13957039, + double m2 = 0.13957039) ; + + ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, + double m1 = 0.13957039, + double m2 = 0.13957039 ) ; + + /** returns the invariant mass of a vertex + * assuming all tracks to be pions + */ + double get_invM( FCCAnalysesVertex vertex ) ; + + /** returns the invariant mass of a vector of vertices + * assuming all tracks to be pions + */ + ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; + + /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ + double get_PV2V0angle( FCCAnalysesVertex V0, + FCCAnalysesVertex PV) ; + + /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ + double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, + FCCAnalysesVertex vtx, + FCCAnalysesVertex PV ) ; + + /** returns a track's energy + * assuming the track to be a pion + */ + double get_trackE( edm4hep::TrackState track ) ; + + /////////////////////////////////////////////////// + /// V0 Reconstruction + /// Return the number of reconstructed V0s + int get_n_SV( FCCAnalysesV0 SV ); + + /// Return the vertex position of all reconstructed V0s (in mm) + ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); + + /// Return the PDG IDs of all reconstructed V0s + ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); + + /// Return the invariant masses of all reconstructed V0s + ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); + + /// Return the momentum of all reconstructed V0s + ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); + + /// Return chi2 of all reconstructed V0s + ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); + + /////////////////////////////////////////////////// + + /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 + /// Return the number of reconstructed SVs + int get_n_SV( ROOT::VecOps::RVec vertices ); + + /// Return the momentum of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); + + /// Return the vertex position of all reconstructed SVs (in mm) + ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); + + /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); + + /// Return chi2 of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); + + /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); + + /// Return no of DOF of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); + + /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); + + /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); + + /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) + ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet, + ROOT::VecOps::RVec jets ); + + /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) + ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet, + ROOT::VecOps::RVec jets ); + + /// Return the pointing angle of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); + + /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); + + /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); + + /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, + TVector3 location ); + + /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, + edm4hep::Vector3d location ); + + /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, + TVector3 location ); + + /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, + edm4hep::Vector3d location ); + + /////////////////////////////////////////////////// + + /// For get_SV_jets /// + + /// Return the number of reconstructed SVs + ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); + + /// Return the total number of reconstructed SVs + int get_n_SV( ROOT::VecOps::RVec> vertices ); + + /// Return the number of reconstructed SVs per jet + ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); + + /// Return the tracks separated by jets + std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, + ROOT::VecOps::RVec thetracks, + ROOT::VecOps::RVec jets, + std::vector> jet_consti ); + + /// Return V0s separated by jets + ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet ); + + // --- for get_SV_jets --- // + ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); + ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); + ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); + ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); + ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); + ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); + ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); + /// Return the vertex position of all reconstructed SVs (in mm) + ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); + // --- for get_SV_jets --- // + + // --- Internal methods needed by the code of Franco B : + float get_trackMom( edm4hep::TrackState & atrack ); + TVectorD get_trackParam( edm4hep::TrackState & atrack) ; + TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; TVectorD ParToACTS(TVectorD Par); TMatrixDSym CovToACTS(TMatrixDSym Cov,TVectorD Par); diff --git a/analyzers/dataframe/src/ReconstructedParticle2Track.cc b/analyzers/dataframe/src/ReconstructedParticle2Track.cc index f8aa59e890..385dab19bb 100644 --- a/analyzers/dataframe/src/ReconstructedParticle2Track.cc +++ b/analyzers/dataframe/src/ReconstructedParticle2Track.cc @@ -242,6 +242,36 @@ namespace ReconstructedParticle2Track{ } + + + + + +ROOT::VecOps::RVec +getRP2TRK_mom(ROOT::VecOps::RVec in, + ROOT::VecOps::RVec tracks) { + ROOT::VecOps::RVec result; + for (auto & p: in) { + if (p.tracks_begin +getRP2TRK_charge(ROOT::VecOps::RVec in, + ROOT::VecOps::RVec tracks) { + ROOT::VecOps::RVec result; + for (auto & p: in) { + if (p.tracks_begin>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) ROOT::VecOps::RVec getRP2TRK_D0(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { From d2dce02375e29013598997b6315c61189a274c47 Mon Sep 17 00:00:00 2001 From: Kunal Gautam Date: Mon, 10 Oct 2022 12:01:27 +0200 Subject: [PATCH 02/49] example analysis.py files to test SV & V0 finder --- examples/FCCee/vertex_lcfiplus/analysis_SV.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/FCCee/vertex_lcfiplus/analysis_SV.py b/examples/FCCee/vertex_lcfiplus/analysis_SV.py index cf7a7b7930..cafeb5c61a 100644 --- a/examples/FCCee/vertex_lcfiplus/analysis_SV.py +++ b/examples/FCCee/vertex_lcfiplus/analysis_SV.py @@ -42,6 +42,11 @@ def analysers(df): # Select the tracks that are reconstructed as primaries .Define("RecoedPrimaryTracks", "VertexFitterSimple::get_PrimaryTracks( EFlowTrack_1, true, 4.5, 20e-3, 300, 0., 0., 0.)") + # First, reconstruct a vertex from all tracks + .Define("VertexObject_allTracks", "VertexFitterSimple::VertexFitter_Tk ( 1, EFlowTrack_1, true, 4.5, 20e-3, 300)") + # Select the tracks that are reconstructed as primaries + .Define("RecoedPrimaryTracks", "VertexFitterSimple::get_PrimaryTracks( VertexObject_allTracks, EFlowTrack_1, true, 4.5, 20e-3, 300, 0., 0., 0., 0)") +>>>>>>> ed10f206e (example analysis.py files to test SV & V0 finder) .Define("n_RecoedPrimaryTracks", "ReconstructedParticle2Track::getTK_n( RecoedPrimaryTracks )") # the final primary vertex : .Define("PrimaryVertexObject", "VertexFitterSimple::VertexFitter_Tk ( 1, RecoedPrimaryTracks, true, 4.5, 20e-3, 300) ") From f1f510aeba4b478e33bf87034b571b5a76483fe3 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Wed, 19 Oct 2022 16:07:31 +0200 Subject: [PATCH 03/49] add example to run analysis_stage1 over privately-produced LL HNL signals --- .../bsm/LLPs/DisplacedHNL/analysis_stage1.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py index d3a49f9d1e..42591b13ab 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py @@ -1,25 +1,41 @@ #Mandatory: List of processes processList = { + + #centrally-produced backgrounds 'p8_ee_Zee_ecm91':{'chunks':100}, 'p8_ee_Zbb_ecm91':{'chunks':100}, 'p8_ee_Ztautau_ecm91':{'chunks':100}, 'p8_ee_Zuds_ecm91':{'chunks':100}, 'p8_ee_Zcc_ecm91':{'chunks':100}, + #privately-produced signals + #'eenu_30GeV_1p41e-6Ve':{}, + #'eenu_50GeV_1p41e-6Ve':{}, + #'eenu_70GeV_1p41e-6Ve':{}, + #'eenu_90GeV_1p41e-6Ve':{}, + #test - #'p8_ee_Zuds_ecm91':{'fraction':0.000001}, + #'p8_ee_Zee_ecm91':{'fraction':0.000001}, #'p8_ee_Zuds_ecm91':{'chunks':10,'fraction':0.000001}, } -#Mandatory: Production tag when running over EDM4Hep centrally produced events, this points to the yaml files for getting sample statistics +#Production tag. This points to the yaml files for getting sample statistics +#Mandatory when running over EDM4Hep centrally produced events +#Comment out when running over privately produced events prodTag = "FCCee/spring2021/IDEA/" +#Input directory +#Comment out when running over centrally produced events +#Mandatory when running over privately produced events +#inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/HNL_eenu_MadgraphPythiaDelphes" + + #Optional: output directory, default is local dir -outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/" +outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/output_stage1/" #outputDir = "/eos/user/j/jalimena/FCCeeLLP/" #outputDir = "output_stage1/" -outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/" +outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/output_stage1/" #outputDirEos = "/eos/user/j/jalimena/FCCeeLLP/" #eosType = "eosuser" From 3521545a76985577fb4d22c003b8a46e2b5207ae Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Wed, 19 Oct 2022 17:23:56 +0200 Subject: [PATCH 04/49] add example to run analysis_final over privately-produced LL HNL signals --- .../FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py index 0b11d73245..8ed767b8e6 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py @@ -1,5 +1,5 @@ #Input directory where the files produced at the stage1 level are -inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/" +inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/output_stage1" #inputDir = "/eos/user/j/jalimena/FCCeeLLP/" #inputDir = "output_stage1/" @@ -17,11 +17,19 @@ processList = { #run over the full statistics from stage1 + + #backgrounds 'p8_ee_Zee_ecm91':{}, 'p8_ee_Ztautau_ecm91':{}, 'p8_ee_Zbb_ecm91':{}, 'p8_ee_Zcc_ecm91':{}, 'p8_ee_Zuds_ecm91':{}, + + #signals + 'eenu_30GeV_1p41e-6Ve':{}, + 'eenu_50GeV_1p41e-6Ve':{}, + 'eenu_70GeV_1p41e-6Ve':{}, + 'eenu_90GeV_1p41e-6Ve':{}, } #Link to the dictonary that contains all the cross section information etc... @@ -30,6 +38,10 @@ #Add MySample_p8_ee_ZH_ecm240 as it is not an offical process procDictAdd={ #"MySample_p8_ee_ZH_ecm240":{"numberOfEvents": 10000000, "sumOfWeights": 10000000, "crossSection": 0.201868, "kfactor": 1.0, "matchingEfficiency": 1.0} + "eenu_30GeV_1p41e-6Ve": {"numberOfEvents": 50000, "sumOfWeights": 50000, "crossSection": 6.638e-10, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "eenu_50GeV_1p41e-6Ve": {"numberOfEvents": 50000, "sumOfWeights": 50000, "crossSection": 4.535e-10, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "eenu_70GeV_1p41e-6Ve": {"numberOfEvents": 50000, "sumOfWeights": 50000, "crossSection": 1.968e-10, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "eenu_90GeV_1p41e-6Ve": {"numberOfEvents": 50000, "sumOfWeights": 50000, "crossSection": 1.749e-12, "kfactor": 1.0, "matchingEfficiency": 1.0}, } #Number of CPUs to use From 984cc3f1be03b58e46800dc65d15c397a23ef8c1 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Fri, 21 Oct 2022 17:29:41 +0200 Subject: [PATCH 05/49] add processLabels option for runFinal --- .../bsm/LLPs/DisplacedHNL/analysis_final.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py index 8ed767b8e6..1b9f08c174 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py @@ -32,6 +32,22 @@ 'eenu_90GeV_1p41e-6Ve':{}, } +###Dictionary for prettier names of processes (optional) +processLabels = { + #backgrounds + 'p8_ee_Zee_ecm91':"Z $\rightarrow$ ee", + 'p8_ee_Ztautau_ecm91':"Z $\rightarrow \tau \tau$", + 'p8_ee_Zbb_ecm91':"Z $\rightarrow$ bb", + 'p8_ee_Zcc_ecm91':"Z $\rightarrow$ cc", + 'p8_ee_Zuds_ecm91':"Z $\rightarrow$ uds", + + #signals + 'eenu_30GeV_1p41e-6Ve': "$m_N =$ 30 GeV, $|V_{eN}| = 1.41 * 10^{-6}$", + 'eenu_50GeV_1p41e-6Ve': "$m_N =$ 50 GeV, $|V_{eN}| = 1.41 * 10^{-6}$", + 'eenu_70GeV_1p41e-6Ve': "$m_N =$ 70 GeV, $|V_{eN}| = 1.41 * 10^{-6}$", + 'eenu_90GeV_1p41e-6Ve': "$m_N =$ 90 GeV, $|V_{eN}| = 1.41 * 10^{-6}$", +} + #Link to the dictonary that contains all the cross section information etc... procDict = "FCCee_procDict_spring2021_IDEA.json" From b0753efd1b98621c601c5a9399bcd76645deb4ed Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Fri, 21 Oct 2022 18:13:27 +0200 Subject: [PATCH 06/49] minor updates for tutorial --- .../bsm/LLPs/DisplacedHNL/analysis_plots.py | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py index 479d5d460a..b0dd01f911 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py @@ -5,8 +5,8 @@ ###If scaleSig=0 or scaleBack=0, we don't apply any additional scaling, on top of the normalization to cross section and integrated luminosity, as defined in finalSel.py ###If scaleSig or scaleBack is not defined, plots will be normalized to 1 -scaleSig = 0. -scaleBack = 0. +#scaleSig = 0. +#scaleBack = 0. ana_tex = 'e^{+}e^{-} #rightarrow N #nu, N #rightarrow ee#nu' delphesVersion = '3.4.2' energy = 91 @@ -181,28 +181,28 @@ extralabel['sel2RecoEle_vetoes_MissingEnergyGt10_absD0Gt0p5'] = "2 electrons with |d_0|>0.5 mm; No muons, jets, or photons; Missing momentum > 10 GeV" colors = {} -# colors['HNL_eenu_30GeV_1p41e-6Ve'] = ROOT.kOrange+1 -# colors['HNL_eenu_50GeV_1p41e-6Ve'] = ROOT.kRed -# colors['HNL_eenu_70GeV_1p41e-6Ve'] = ROOT.kBlue -# colors['HNL_eenu_90GeV_1p41e-6Ve'] = ROOT.kGreen+1 - -colors['Zbb'] = ROOT.kAzure-4 -colors['Zcc'] = ROOT.kCyan-9 -colors['Zuds'] = ROOT.kViolet-4 +colors['eenu_30GeV_1p41e-6Ve'] = ROOT.kOrange+1 +colors['eenu_50GeV_1p41e-6Ve'] = ROOT.kRed +colors['eenu_70GeV_1p41e-6Ve'] = ROOT.kBlue +colors['eenu_90GeV_1p41e-6Ve'] = ROOT.kGreen+1 + +#colors['Zbb'] = ROOT.kAzure-4 +#colors['Zcc'] = ROOT.kCyan-9 +#colors['Zuds'] = ROOT.kViolet-4 colors['Ztautau'] = ROOT.kRed-3 colors['Zee'] = ROOT.kGray+2 plots = {} plots['HNL'] = {'signal':{ - # 'HNL_eenu_30GeV_1p41e-6Ve':['HNL_eenu_30GeV_1p41e-6Ve'], - # 'HNL_eenu_50GeV_1p41e-6Ve':['HNL_eenu_50GeV_1p41e-6Ve'], - # 'HNL_eenu_70GeV_1p41e-6Ve':['HNL_eenu_70GeV_1p41e-6Ve'], - # 'HNL_eenu_90GeV_1p41e-6Ve':['HNL_eenu_90GeV_1p41e-6Ve'], + 'eenu_30GeV_1p41e-6Ve':['eenu_30GeV_1p41e-6Ve'], + 'eenu_50GeV_1p41e-6Ve':['eenu_50GeV_1p41e-6Ve'], + 'eenu_70GeV_1p41e-6Ve':['eenu_70GeV_1p41e-6Ve'], + 'eenu_90GeV_1p41e-6Ve':['eenu_90GeV_1p41e-6Ve'], }, 'backgrounds':{ - 'Zbb':['p8_ee_Zbb_ecm91'], - 'Zcc': ['p8_ee_Zcc_ecm91'], - 'Zuds': ['p8_ee_Zuds_ecm91'], + #'Zbb':['p8_ee_Zbb_ecm91'], + #'Zcc': ['p8_ee_Zcc_ecm91'], + #'Zuds': ['p8_ee_Zuds_ecm91'], 'Ztautau': ['p8_ee_Ztautau_ecm91'], 'Zee':['p8_ee_Zee_ecm91'], } @@ -210,13 +210,13 @@ legend = {} -# legend['HNL_eenu_30GeV_1p41e-6Ve'] = 'm_{N} = 30 GeV, V_{e} = 1.41e-6' -# legend['HNL_eenu_50GeV_1p41e-6Ve'] = 'm_{N} = 50 GeV, V_{e} = 1.41e-6' -# legend['HNL_eenu_70GeV_1p41e-6Ve'] = 'm_{N} = 70 GeV, V_{e} = 1.41e-6' -# legend['HNL_eenu_90GeV_1p41e-6Ve'] = 'm_{N} = 90 GeV, V_{e} = 1.41e-6' - -legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' -legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' -legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' +legend['eenu_30GeV_1p41e-6Ve'] = 'm_{N} = 30 GeV, V_{e} = 1.41e-6' +legend['eenu_50GeV_1p41e-6Ve'] = 'm_{N} = 50 GeV, V_{e} = 1.41e-6' +legend['eenu_70GeV_1p41e-6Ve'] = 'm_{N} = 70 GeV, V_{e} = 1.41e-6' +legend['eenu_90GeV_1p41e-6Ve'] = 'm_{N} = 90 GeV, V_{e} = 1.41e-6' + +#legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' +#legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' +#legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' legend['Ztautau'] = 'e^{+}e^{-} #rightarrow Z #rightarrow #tau#tau' legend['Zee'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' From 69ec62d1aa865e31f0f5cff366c9d549ace00bd5 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 11:25:21 +0200 Subject: [PATCH 07/49] add ALP UFO model from Andrea Thamm --- .../bsm/LLPs/ALP_NLO_UFO/ALP_NLO_UFO.log | 88 +++ .../bsm/LLPs/ALP_NLO_UFO/CT_couplings.py | 11 + .../FCCee/bsm/LLPs/ALP_NLO_UFO/__init__.py | 50 ++ .../bsm/LLPs/ALP_NLO_UFO/coupling_orders.py | 20 + .../FCCee/bsm/LLPs/ALP_NLO_UFO/couplings.py | 303 +++++++++ examples/FCCee/bsm/LLPs/ALP_NLO_UFO/decays.py | 123 ++++ .../bsm/LLPs/ALP_NLO_UFO/function_library.py | 71 +++ .../FCCee/bsm/LLPs/ALP_NLO_UFO/lorentz.py | 110 ++++ .../bsm/LLPs/ALP_NLO_UFO/object_library.py | 373 +++++++++++ .../FCCee/bsm/LLPs/ALP_NLO_UFO/parameters.py | 559 +++++++++++++++++ .../FCCee/bsm/LLPs/ALP_NLO_UFO/particles.py | 401 ++++++++++++ .../FCCee/bsm/LLPs/ALP_NLO_UFO/propagators.py | 35 ++ .../FCCee/bsm/LLPs/ALP_NLO_UFO/vertices.py | 581 ++++++++++++++++++ .../bsm/LLPs/ALP_NLO_UFO/write_param_card.py | 180 ++++++ 14 files changed, 2905 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/ALP_NLO_UFO.log create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/CT_couplings.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/__init__.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/coupling_orders.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/couplings.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/decays.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/function_library.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/lorentz.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/object_library.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/parameters.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/particles.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/propagators.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/vertices.py create mode 100644 examples/FCCee/bsm/LLPs/ALP_NLO_UFO/write_param_card.py diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/ALP_NLO_UFO.log b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/ALP_NLO_UFO.log new file mode 100644 index 0000000000..cc1867480b --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/ALP_NLO_UFO.log @@ -0,0 +1,88 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:10 + + +# +# This is the logfile for the model ALP_NLO + +# Authors: M. Bauer, M. Neubert, S. Renner, M. Schnubel, A. Thamm +# Model version: 1 +# Checking the Quantum numbers + * Electric charge defined. +# Checking the Lagrangians + * All Lagrangians are ok. +# +# Particle definitions +# + + * No particles removed. All particles correspond to GenInt setup. + +# Automatically assigned PDG numbers + * Assigned PDG number 9000001 to particle ghA + * Assigned PDG number 9000002 to particle ghZ + * Assigned PDG number 9000003 to particle ghWp + * Assigned PDG number 9000004 to particle ghWm + * Assigned PDG number 9000005 to particle ALP + + +# Compulsory PDG codes: + * Class SM leptons complete. + * Class SM neutrinos complete. + * Class SM quarks complete. + * Class SM gauge bosons complete. +# +# Parameter definitions +# + + * All parameters are ok. + + +# Vertices + * Calling FeynmanRules for 1 Lagrangians. + * Number of classes vertices: 95 + * Number of flavored vertices: 95 + * Saved vertices in InterfaceRun[ 1 ]. + * Checked QNumber conservation. + - Quantum number GhostNumber conserved in all vertices. + - Quantum number LeptonNumber conserved in all vertices. + - Quantum number Q conserved in all vertices. + - Quantum number Y conserved in all vertices. + * particles.py written. + * parameters.py written. +# +# Vertex definitions +# + + * 95 vertices written. + * vertices.py written. +# +# Lorentz structure definitions +# + + * 24 lorentz structures written. + * lorentz.py written. +# +# Coupling definitions +# + + * 73 couplings written. + * couplings.py written. +# +# Coupling order definitions +# + + * 0 couplings orders written. + * coupling_orders.py written. +# +# Decay definitions +# + + * 13 decays written. + * decay.py not written +# +# CTCoupling definitions +# + + * 0 CTcouplings written. + * CT_couplings.py written. diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/CT_couplings.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/CT_couplings.py new file mode 100644 index 0000000000..ffaff7cf98 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/CT_couplings.py @@ -0,0 +1,11 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:43 + + +from object_library import all_couplings, Coupling + +from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot + + + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/__init__.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/__init__.py new file mode 100644 index 0000000000..d078b3291b --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/__init__.py @@ -0,0 +1,50 @@ + +import particles +import couplings +import lorentz +import parameters +import vertices +import coupling_orders +#import write_param_card +import propagators +import object_library +import function_library + + +all_particles = particles.all_particles +all_vertices = vertices.all_vertices +all_couplings = couplings.all_couplings +all_lorentz = lorentz.all_lorentz +all_parameters = parameters.all_parameters +all_orders = coupling_orders.all_orders +all_functions = function_library.all_functions +all_propagators = propagators.all_propagators + +try: + import decays +except ImportError: + pass +else: + all_decays = decays.all_decays + +try: + import form_factors +except ImportError: + pass +else: + all_form_factors = form_factors.all_form_factors + +try: + import CT_vertices +except ImportError: + pass +else: + all_CTvertices = CT_vertices.all_CTvertices + + +gauge = [0] + + +__author__ = "M. Bauer, M. Neubert, S. Renner, M. Schnubel, A. Thamm" +__date__ = "19/04/2021" +__version__= "1" diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/coupling_orders.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/coupling_orders.py new file mode 100644 index 0000000000..16cbc72bfd --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/coupling_orders.py @@ -0,0 +1,20 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:43 + + +from object_library import all_orders, CouplingOrder + + +NP = CouplingOrder(name = 'NP', + expansion_order = 99, + hierarchy = 2) + +QCD = CouplingOrder(name = 'QCD', + expansion_order = 99, + hierarchy = 1) + +QED = CouplingOrder(name = 'QED', + expansion_order = 99, + hierarchy = 2) + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/couplings.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/couplings.py new file mode 100644 index 0000000000..02cca0d98d --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/couplings.py @@ -0,0 +1,303 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:43 + + +from object_library import all_couplings, Coupling + +from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot + + + +GC_1 = Coupling(name = 'GC_1', + value = '-(ee*complex(0,1))/3.', + order = {'QED':1}) + +GC_2 = Coupling(name = 'GC_2', + value = '(2*ee*complex(0,1))/3.', + order = {'QED':1}) + +GC_3 = Coupling(name = 'GC_3', + value = '-(ee*complex(0,1))', + order = {'QED':1}) + +GC_4 = Coupling(name = 'GC_4', + value = 'ee*complex(0,1)', + order = {'QED':1}) + +GC_5 = Coupling(name = 'GC_5', + value = 'ee**2*complex(0,1)', + order = {'QED':2}) + +GC_6 = Coupling(name = 'GC_6', + value = '(-2*cah*complex(0,1))/falp**2', + order = {'QED':2}) + +GC_7 = Coupling(name = 'GC_7', + value = '-cbb/(2.*falp)', + order = {'NP':1}) + +GC_8 = Coupling(name = 'GC_8', + value = '-ccc/(2.*falp)', + order = {'NP':1}) + +GC_9 = Coupling(name = 'GC_9', + value = '-cdd/(2.*falp)', + order = {'NP':1}) + +GC_10 = Coupling(name = 'GC_10', + value = '-cee/(2.*falp)', + order = {'NP':1}) + +GC_11 = Coupling(name = 'GC_11', + value = '-cmumu/(2.*falp)', + order = {'NP':1}) + +GC_12 = Coupling(name = 'GC_12', + value = '-css/(2.*falp)', + order = {'NP':1}) + +GC_13 = Coupling(name = 'GC_13', + value = '-ctt/(2.*falp)', + order = {'NP':1}) + +GC_14 = Coupling(name = 'GC_14', + value = '-cuu/(2.*falp)', + order = {'NP':1}) + +GC_15 = Coupling(name = 'GC_15', + value = '-G', + order = {'QCD':1}) + +GC_16 = Coupling(name = 'GC_16', + value = 'complex(0,1)*G', + order = {'QCD':1}) + +GC_17 = Coupling(name = 'GC_17', + value = 'complex(0,1)*G**2', + order = {'QCD':2}) + +GC_18 = Coupling(name = 'GC_18', + value = '-6*complex(0,1)*lam', + order = {'QED':2}) + +GC_19 = Coupling(name = 'GC_19', + value = '-(cWW*ee**2*complex(0,1))/(8.*falp*cmath.pi**2) - (cYY*ee**2*complex(0,1))/(8.*falp*cmath.pi**2)', + order = {'NP':1,'QED':2}) + +GC_20 = Coupling(name = 'GC_20', + value = '-(cGG*complex(0,1)*G**2)/(32.*falp*cmath.pi**2)', + order = {'NP':1,'QCD':2}) + +GC_21 = Coupling(name = 'GC_21', + value = '-(cGG*G**3)/(16.*falp*cmath.pi**2)', + order = {'NP':1,'QCD':3}) + +GC_22 = Coupling(name = 'GC_22', + value = '(cw*cWW*ee**3*complex(0,1))/(4.*falp*cmath.pi**2*sw**3)', + order = {'NP':1,'QED':3}) + +GC_23 = Coupling(name = 'GC_23', + value = '(ee**2*complex(0,1))/(2.*sw**2)', + order = {'QED':2}) + +GC_24 = Coupling(name = 'GC_24', + value = '-((ee**2*complex(0,1))/sw**2)', + order = {'QED':2}) + +GC_25 = Coupling(name = 'GC_25', + value = '(cw**2*ee**2*complex(0,1))/sw**2', + order = {'QED':2}) + +GC_26 = Coupling(name = 'GC_26', + value = '-(cWW*ee**2*complex(0,1))/(8.*falp*cmath.pi**2*sw**2)', + order = {'NP':1,'QED':2}) + +GC_27 = Coupling(name = 'GC_27', + value = '(cWW*ee**3*complex(0,1))/(4.*falp*cmath.pi**2*sw**2)', + order = {'NP':1,'QED':3}) + +GC_28 = Coupling(name = 'GC_28', + value = '(ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_29 = Coupling(name = 'GC_29', + value = '(CKM1x1*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_30 = Coupling(name = 'GC_30', + value = '(CKM1x2*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_31 = Coupling(name = 'GC_31', + value = '(CKM1x3*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_32 = Coupling(name = 'GC_32', + value = '(CKM2x1*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_33 = Coupling(name = 'GC_33', + value = '(CKM2x2*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_34 = Coupling(name = 'GC_34', + value = '(CKM2x3*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_35 = Coupling(name = 'GC_35', + value = '(CKM3x1*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_36 = Coupling(name = 'GC_36', + value = '(CKM3x2*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_37 = Coupling(name = 'GC_37', + value = '(CKM3x3*ee*complex(0,1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_38 = Coupling(name = 'GC_38', + value = '(cw*ee*complex(0,1))/sw', + order = {'QED':1}) + +GC_39 = Coupling(name = 'GC_39', + value = '(-2*cw*ee**2*complex(0,1))/sw', + order = {'QED':2}) + +GC_40 = Coupling(name = 'GC_40', + value = '(ee*complex(0,1)*sw)/(3.*cw)', + order = {'QED':1}) + +GC_41 = Coupling(name = 'GC_41', + value = '(-2*ee*complex(0,1)*sw)/(3.*cw)', + order = {'QED':1}) + +GC_42 = Coupling(name = 'GC_42', + value = '(ee*complex(0,1)*sw)/cw', + order = {'QED':1}) + +GC_43 = Coupling(name = 'GC_43', + value = '-(cw*ee*complex(0,1))/(2.*sw) - (ee*complex(0,1)*sw)/(6.*cw)', + order = {'QED':1}) + +GC_44 = Coupling(name = 'GC_44', + value = '(cw*ee*complex(0,1))/(2.*sw) - (ee*complex(0,1)*sw)/(6.*cw)', + order = {'QED':1}) + +GC_45 = Coupling(name = 'GC_45', + value = '-(cw*ee*complex(0,1))/(2.*sw) + (ee*complex(0,1)*sw)/(2.*cw)', + order = {'QED':1}) + +GC_46 = Coupling(name = 'GC_46', + value = '(cw*ee*complex(0,1))/(2.*sw) + (ee*complex(0,1)*sw)/(2.*cw)', + order = {'QED':1}) + +GC_47 = Coupling(name = 'GC_47', + value = '(cw*cZh5*ee)/(falp*sw) + (cZh5*ee*sw)/(cw*falp)', + order = {'NP':1,'QED':1}) + +GC_48 = Coupling(name = 'GC_48', + value = '-(cw*cWW*ee**2*complex(0,1))/(8.*falp*cmath.pi**2*sw) + (cYY*ee**2*complex(0,1)*sw)/(8.*cw*falp*cmath.pi**2)', + order = {'NP':1,'QED':2}) + +GC_49 = Coupling(name = 'GC_49', + value = 'ee**2*complex(0,1) + (cw**2*ee**2*complex(0,1))/(2.*sw**2) + (ee**2*complex(0,1)*sw**2)/(2.*cw**2)', + order = {'QED':2}) + +GC_50 = Coupling(name = 'GC_50', + value = '-(cw**2*cWW*ee**2*complex(0,1))/(8.*falp*cmath.pi**2*sw**2) - (cYY*ee**2*complex(0,1)*sw**2)/(8.*cw**2*falp*cmath.pi**2)', + order = {'NP':1,'QED':2}) + +GC_51 = Coupling(name = 'GC_51', + value = '(-2*cah*complex(0,1)*vev)/falp**2', + order = {'QED':1}) + +GC_52 = Coupling(name = 'GC_52', + value = '-6*complex(0,1)*lam*vev', + order = {'QED':1}) + +GC_53 = Coupling(name = 'GC_53', + value = '(ee**2*complex(0,1)*vev)/(2.*sw**2)', + order = {'QED':1}) + +GC_54 = Coupling(name = 'GC_54', + value = '(cw*cZh5*ee*vev)/(falp*sw) + (cZh5*ee*sw*vev)/(cw*falp)', + order = {'NP':1}) + +GC_55 = Coupling(name = 'GC_55', + value = 'ee**2*complex(0,1)*vev + (cw**2*ee**2*complex(0,1)*vev)/(2.*sw**2) + (ee**2*complex(0,1)*sw**2*vev)/(2.*cw**2)', + order = {'QED':1}) + +GC_56 = Coupling(name = 'GC_56', + value = '-((complex(0,1)*yb)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_57 = Coupling(name = 'GC_57', + value = '-((complex(0,1)*yc)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_58 = Coupling(name = 'GC_58', + value = '-((complex(0,1)*ydo)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_59 = Coupling(name = 'GC_59', + value = '-((complex(0,1)*ye)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_60 = Coupling(name = 'GC_60', + value = '-((complex(0,1)*ym)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_61 = Coupling(name = 'GC_61', + value = '-((complex(0,1)*ys)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_62 = Coupling(name = 'GC_62', + value = '-((complex(0,1)*yt)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_63 = Coupling(name = 'GC_63', + value = '-((complex(0,1)*ytau)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_64 = Coupling(name = 'GC_64', + value = '-((complex(0,1)*yup)/cmath.sqrt(2))', + order = {'QED':1}) + +GC_65 = Coupling(name = 'GC_65', + value = '(ee*complex(0,1)*complexconjugate(CKM1x1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_66 = Coupling(name = 'GC_66', + value = '(ee*complex(0,1)*complexconjugate(CKM1x2))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_67 = Coupling(name = 'GC_67', + value = '(ee*complex(0,1)*complexconjugate(CKM1x3))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_68 = Coupling(name = 'GC_68', + value = '(ee*complex(0,1)*complexconjugate(CKM2x1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_69 = Coupling(name = 'GC_69', + value = '(ee*complex(0,1)*complexconjugate(CKM2x2))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_70 = Coupling(name = 'GC_70', + value = '(ee*complex(0,1)*complexconjugate(CKM2x3))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_71 = Coupling(name = 'GC_71', + value = '(ee*complex(0,1)*complexconjugate(CKM3x1))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_72 = Coupling(name = 'GC_72', + value = '(ee*complex(0,1)*complexconjugate(CKM3x2))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + +GC_73 = Coupling(name = 'GC_73', + value = '(ee*complex(0,1)*complexconjugate(CKM3x3))/(sw*cmath.sqrt(2))', + order = {'QED':1}) + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/decays.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/decays.py new file mode 100644 index 0000000000..d6d198a149 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/decays.py @@ -0,0 +1,123 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:43 + + +from object_library import all_decays, Decay +import particles as P + + +Decay_ALP = Decay(name = 'Decay_ALP', + particle = P.ALP, + partial_widths = {(P.a,P.a):'(Ma**2*((cWW**2*ee**4*Ma**4)/(32.*falp**2*cmath.pi**4) + (cWW*cYY*ee**4*Ma**4)/(16.*falp**2*cmath.pi**4) + (cYY**2*ee**4*Ma**4)/(32.*falp**2*cmath.pi**4)))/(32.*cmath.pi*abs(Ma)**3)', + (P.a,P.Z):'((Ma**2 - MZ**2)*(-(cWW*cYY*ee**4*Ma**4)/(16.*falp**2*cmath.pi**4) + (cWW*cYY*ee**4*Ma**2*MZ**2)/(8.*falp**2*cmath.pi**4) - (cWW*cYY*ee**4*MZ**4)/(16.*falp**2*cmath.pi**4) + (cw**2*cWW**2*ee**4*Ma**4)/(32.*falp**2*cmath.pi**4*sw**2) - (cw**2*cWW**2*ee**4*Ma**2*MZ**2)/(16.*falp**2*cmath.pi**4*sw**2) + (cw**2*cWW**2*ee**4*MZ**4)/(32.*falp**2*cmath.pi**4*sw**2) + (cYY**2*ee**4*Ma**4*sw**2)/(32.*cw**2*falp**2*cmath.pi**4) - (cYY**2*ee**4*Ma**2*MZ**2*sw**2)/(16.*cw**2*falp**2*cmath.pi**4) + (cYY**2*ee**4*MZ**4*sw**2)/(32.*cw**2*falp**2*cmath.pi**4)))/(16.*cmath.pi*abs(Ma)**3)', + (P.b,P.b__tilde__):'(3*cbb**2*Ma**2*MB**2*cmath.sqrt(Ma**4 - 4*Ma**2*MB**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.c,P.c__tilde__):'(3*ccc**2*Ma**2*MC**2*cmath.sqrt(Ma**4 - 4*Ma**2*MC**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.d,P.d__tilde__):'(3*cdd**2*Ma**2*MD**2*cmath.sqrt(Ma**4 - 4*Ma**2*MD**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.e__minus__,P.e__plus__):'(cee**2*Ma**2*Me**2*cmath.sqrt(Ma**4 - 4*Ma**2*Me**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.g,P.g):'(cGG**2*G**4*Ma**6)/(128.*falp**2*cmath.pi**5*abs(Ma)**3)', + (P.H,P.Z):'((-((cZh5**2*ee**2*Ma**2*vev**2)/falp**2) - (cZh5**2*ee**2*MH**2*vev**2)/falp**2 + (cZh5**2*ee**2*Ma**4*vev**2)/(2.*falp**2*MZ**2) - (cZh5**2*ee**2*Ma**2*MH**2*vev**2)/(falp**2*MZ**2) + (cZh5**2*ee**2*MH**4*vev**2)/(2.*falp**2*MZ**2) + (cZh5**2*ee**2*MZ**2*vev**2)/(2.*falp**2) - (cw**2*cZh5**2*ee**2*Ma**2*vev**2)/(2.*falp**2*sw**2) - (cw**2*cZh5**2*ee**2*MH**2*vev**2)/(2.*falp**2*sw**2) + (cw**2*cZh5**2*ee**2*Ma**4*vev**2)/(4.*falp**2*MZ**2*sw**2) - (cw**2*cZh5**2*ee**2*Ma**2*MH**2*vev**2)/(2.*falp**2*MZ**2*sw**2) + (cw**2*cZh5**2*ee**2*MH**4*vev**2)/(4.*falp**2*MZ**2*sw**2) + (cw**2*cZh5**2*ee**2*MZ**2*vev**2)/(4.*falp**2*sw**2) - (cZh5**2*ee**2*Ma**2*sw**2*vev**2)/(2.*cw**2*falp**2) - (cZh5**2*ee**2*MH**2*sw**2*vev**2)/(2.*cw**2*falp**2) + (cZh5**2*ee**2*Ma**4*sw**2*vev**2)/(4.*cw**2*falp**2*MZ**2) - (cZh5**2*ee**2*Ma**2*MH**2*sw**2*vev**2)/(2.*cw**2*falp**2*MZ**2) + (cZh5**2*ee**2*MH**4*sw**2*vev**2)/(4.*cw**2*falp**2*MZ**2) + (cZh5**2*ee**2*MZ**2*sw**2*vev**2)/(4.*cw**2*falp**2))*cmath.sqrt(Ma**4 - 2*Ma**2*MH**2 + MH**4 - 2*Ma**2*MZ**2 - 2*MH**2*MZ**2 + MZ**4))/(16.*cmath.pi*abs(Ma)**3)', + (P.mu__minus__,P.mu__plus__):'(cmumu**2*Ma**2*MMU**2*cmath.sqrt(Ma**4 - 4*Ma**2*MMU**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.s,P.s__tilde__):'(3*css**2*Ma**2*MS**2*cmath.sqrt(Ma**4 - 4*Ma**2*MS**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.t,P.t__tilde__):'(3*ctt**2*Ma**2*MT**2*cmath.sqrt(Ma**4 - 4*Ma**2*MT**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.u,P.u__tilde__):'(3*cuu**2*Ma**2*MU**2*cmath.sqrt(Ma**4 - 4*Ma**2*MU**2))/(8.*falp**2*cmath.pi*abs(Ma)**3)', + (P.W__minus__,P.W__plus__):'(((cWW**2*ee**4*Ma**4)/(32.*falp**2*cmath.pi**4*sw**4) - (cWW**2*ee**4*Ma**2*MW**2)/(8.*falp**2*cmath.pi**4*sw**4))*cmath.sqrt(Ma**4 - 4*Ma**2*MW**2))/(16.*cmath.pi*abs(Ma)**3)', + (P.Z,P.Z):'(((cWW*cYY*ee**4*Ma**4)/(16.*falp**2*cmath.pi**4) - (cWW*cYY*ee**4*Ma**2*MZ**2)/(4.*falp**2*cmath.pi**4) + (cw**4*cWW**2*ee**4*Ma**4)/(32.*falp**2*cmath.pi**4*sw**4) - (cw**4*cWW**2*ee**4*Ma**2*MZ**2)/(8.*falp**2*cmath.pi**4*sw**4) + (cYY**2*ee**4*Ma**4*sw**4)/(32.*cw**4*falp**2*cmath.pi**4) - (cYY**2*ee**4*Ma**2*MZ**2*sw**4)/(8.*cw**4*falp**2*cmath.pi**4))*cmath.sqrt(Ma**4 - 4*Ma**2*MZ**2))/(32.*cmath.pi*abs(Ma)**3)'}) + +Decay_b = Decay(name = 'Decay_b', + particle = P.b, + partial_widths = {(P.W__minus__,P.c):'(((3*CKM2x3*ee**2*MB**2*complexconjugate(CKM2x3))/(2.*sw**2) + (3*CKM2x3*ee**2*MC**2*complexconjugate(CKM2x3))/(2.*sw**2) + (3*CKM2x3*ee**2*MB**4*complexconjugate(CKM2x3))/(2.*MW**2*sw**2) - (3*CKM2x3*ee**2*MB**2*MC**2*complexconjugate(CKM2x3))/(MW**2*sw**2) + (3*CKM2x3*ee**2*MC**4*complexconjugate(CKM2x3))/(2.*MW**2*sw**2) - (3*CKM2x3*ee**2*MW**2*complexconjugate(CKM2x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MC**2 + MC**4 - 2*MB**2*MW**2 - 2*MC**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MB)**3)', + (P.W__minus__,P.t):'(((3*CKM3x3*ee**2*MB**2*complexconjugate(CKM3x3))/(2.*sw**2) + (3*CKM3x3*ee**2*MT**2*complexconjugate(CKM3x3))/(2.*sw**2) + (3*CKM3x3*ee**2*MB**4*complexconjugate(CKM3x3))/(2.*MW**2*sw**2) - (3*CKM3x3*ee**2*MB**2*MT**2*complexconjugate(CKM3x3))/(MW**2*sw**2) + (3*CKM3x3*ee**2*MT**4*complexconjugate(CKM3x3))/(2.*MW**2*sw**2) - (3*CKM3x3*ee**2*MW**2*complexconjugate(CKM3x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MT**2 + MT**4 - 2*MB**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MB)**3)', + (P.W__minus__,P.u):'(((3*CKM1x3*ee**2*MB**2*complexconjugate(CKM1x3))/(2.*sw**2) + (3*CKM1x3*ee**2*MU**2*complexconjugate(CKM1x3))/(2.*sw**2) + (3*CKM1x3*ee**2*MB**4*complexconjugate(CKM1x3))/(2.*MW**2*sw**2) - (3*CKM1x3*ee**2*MB**2*MU**2*complexconjugate(CKM1x3))/(MW**2*sw**2) + (3*CKM1x3*ee**2*MU**4*complexconjugate(CKM1x3))/(2.*MW**2*sw**2) - (3*CKM1x3*ee**2*MW**2*complexconjugate(CKM1x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MU**2 + MU**4 - 2*MB**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MB)**3)'}) + +Decay_c = Decay(name = 'Decay_c', + particle = P.c, + partial_widths = {(P.W__plus__,P.b):'(((3*CKM2x3*ee**2*MB**2*complexconjugate(CKM2x3))/(2.*sw**2) + (3*CKM2x3*ee**2*MC**2*complexconjugate(CKM2x3))/(2.*sw**2) + (3*CKM2x3*ee**2*MB**4*complexconjugate(CKM2x3))/(2.*MW**2*sw**2) - (3*CKM2x3*ee**2*MB**2*MC**2*complexconjugate(CKM2x3))/(MW**2*sw**2) + (3*CKM2x3*ee**2*MC**4*complexconjugate(CKM2x3))/(2.*MW**2*sw**2) - (3*CKM2x3*ee**2*MW**2*complexconjugate(CKM2x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MC**2 + MC**4 - 2*MB**2*MW**2 - 2*MC**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MC)**3)', + (P.W__plus__,P.d):'(((3*CKM2x1*ee**2*MC**2*complexconjugate(CKM2x1))/(2.*sw**2) + (3*CKM2x1*ee**2*MD**2*complexconjugate(CKM2x1))/(2.*sw**2) + (3*CKM2x1*ee**2*MC**4*complexconjugate(CKM2x1))/(2.*MW**2*sw**2) - (3*CKM2x1*ee**2*MC**2*MD**2*complexconjugate(CKM2x1))/(MW**2*sw**2) + (3*CKM2x1*ee**2*MD**4*complexconjugate(CKM2x1))/(2.*MW**2*sw**2) - (3*CKM2x1*ee**2*MW**2*complexconjugate(CKM2x1))/sw**2)*cmath.sqrt(MC**4 - 2*MC**2*MD**2 + MD**4 - 2*MC**2*MW**2 - 2*MD**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MC)**3)', + (P.W__plus__,P.s):'(((3*CKM2x2*ee**2*MC**2*complexconjugate(CKM2x2))/(2.*sw**2) + (3*CKM2x2*ee**2*MS**2*complexconjugate(CKM2x2))/(2.*sw**2) + (3*CKM2x2*ee**2*MC**4*complexconjugate(CKM2x2))/(2.*MW**2*sw**2) - (3*CKM2x2*ee**2*MC**2*MS**2*complexconjugate(CKM2x2))/(MW**2*sw**2) + (3*CKM2x2*ee**2*MS**4*complexconjugate(CKM2x2))/(2.*MW**2*sw**2) - (3*CKM2x2*ee**2*MW**2*complexconjugate(CKM2x2))/sw**2)*cmath.sqrt(MC**4 - 2*MC**2*MS**2 + MS**4 - 2*MC**2*MW**2 - 2*MS**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MC)**3)'}) + +Decay_d = Decay(name = 'Decay_d', + particle = P.d, + partial_widths = {(P.W__minus__,P.c):'(((3*CKM2x1*ee**2*MC**2*complexconjugate(CKM2x1))/(2.*sw**2) + (3*CKM2x1*ee**2*MD**2*complexconjugate(CKM2x1))/(2.*sw**2) + (3*CKM2x1*ee**2*MC**4*complexconjugate(CKM2x1))/(2.*MW**2*sw**2) - (3*CKM2x1*ee**2*MC**2*MD**2*complexconjugate(CKM2x1))/(MW**2*sw**2) + (3*CKM2x1*ee**2*MD**4*complexconjugate(CKM2x1))/(2.*MW**2*sw**2) - (3*CKM2x1*ee**2*MW**2*complexconjugate(CKM2x1))/sw**2)*cmath.sqrt(MC**4 - 2*MC**2*MD**2 + MD**4 - 2*MC**2*MW**2 - 2*MD**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MD)**3)', + (P.W__minus__,P.t):'(((3*CKM3x1*ee**2*MD**2*complexconjugate(CKM3x1))/(2.*sw**2) + (3*CKM3x1*ee**2*MT**2*complexconjugate(CKM3x1))/(2.*sw**2) + (3*CKM3x1*ee**2*MD**4*complexconjugate(CKM3x1))/(2.*MW**2*sw**2) - (3*CKM3x1*ee**2*MD**2*MT**2*complexconjugate(CKM3x1))/(MW**2*sw**2) + (3*CKM3x1*ee**2*MT**4*complexconjugate(CKM3x1))/(2.*MW**2*sw**2) - (3*CKM3x1*ee**2*MW**2*complexconjugate(CKM3x1))/sw**2)*cmath.sqrt(MD**4 - 2*MD**2*MT**2 + MT**4 - 2*MD**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MD)**3)', + (P.W__minus__,P.u):'(((3*CKM1x1*ee**2*MD**2*complexconjugate(CKM1x1))/(2.*sw**2) + (3*CKM1x1*ee**2*MU**2*complexconjugate(CKM1x1))/(2.*sw**2) + (3*CKM1x1*ee**2*MD**4*complexconjugate(CKM1x1))/(2.*MW**2*sw**2) - (3*CKM1x1*ee**2*MD**2*MU**2*complexconjugate(CKM1x1))/(MW**2*sw**2) + (3*CKM1x1*ee**2*MU**4*complexconjugate(CKM1x1))/(2.*MW**2*sw**2) - (3*CKM1x1*ee**2*MW**2*complexconjugate(CKM1x1))/sw**2)*cmath.sqrt(MD**4 - 2*MD**2*MU**2 + MU**4 - 2*MD**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MD)**3)'}) + +Decay_e__minus__ = Decay(name = 'Decay_e__minus__', + particle = P.e__minus__, + partial_widths = {(P.W__minus__,P.ve):'((Me**2 - MW**2)*((ee**2*Me**2)/(2.*sw**2) + (ee**2*Me**4)/(2.*MW**2*sw**2) - (ee**2*MW**2)/sw**2))/(32.*cmath.pi*abs(Me)**3)'}) + +Decay_H = Decay(name = 'Decay_H', + particle = P.H, + partial_widths = {(P.ALP,P.ALP):'(((4*cah**2*Ma**4*vev**2)/falp**4 - (4*cah**2*Ma**2*MH**2*vev**2)/falp**4 + (cah**2*MH**4*vev**2)/falp**4)*cmath.sqrt(-4*Ma**2*MH**2 + MH**4))/(32.*cmath.pi*abs(MH)**3)', + (P.ALP,P.Z):'((-((cZh5**2*ee**2*Ma**2*vev**2)/falp**2) - (cZh5**2*ee**2*MH**2*vev**2)/falp**2 + (cZh5**2*ee**2*Ma**4*vev**2)/(2.*falp**2*MZ**2) - (cZh5**2*ee**2*Ma**2*MH**2*vev**2)/(falp**2*MZ**2) + (cZh5**2*ee**2*MH**4*vev**2)/(2.*falp**2*MZ**2) + (cZh5**2*ee**2*MZ**2*vev**2)/(2.*falp**2) - (cw**2*cZh5**2*ee**2*Ma**2*vev**2)/(2.*falp**2*sw**2) - (cw**2*cZh5**2*ee**2*MH**2*vev**2)/(2.*falp**2*sw**2) + (cw**2*cZh5**2*ee**2*Ma**4*vev**2)/(4.*falp**2*MZ**2*sw**2) - (cw**2*cZh5**2*ee**2*Ma**2*MH**2*vev**2)/(2.*falp**2*MZ**2*sw**2) + (cw**2*cZh5**2*ee**2*MH**4*vev**2)/(4.*falp**2*MZ**2*sw**2) + (cw**2*cZh5**2*ee**2*MZ**2*vev**2)/(4.*falp**2*sw**2) - (cZh5**2*ee**2*Ma**2*sw**2*vev**2)/(2.*cw**2*falp**2) - (cZh5**2*ee**2*MH**2*sw**2*vev**2)/(2.*cw**2*falp**2) + (cZh5**2*ee**2*Ma**4*sw**2*vev**2)/(4.*cw**2*falp**2*MZ**2) - (cZh5**2*ee**2*Ma**2*MH**2*sw**2*vev**2)/(2.*cw**2*falp**2*MZ**2) + (cZh5**2*ee**2*MH**4*sw**2*vev**2)/(4.*cw**2*falp**2*MZ**2) + (cZh5**2*ee**2*MZ**2*sw**2*vev**2)/(4.*cw**2*falp**2))*cmath.sqrt(Ma**4 - 2*Ma**2*MH**2 + MH**4 - 2*Ma**2*MZ**2 - 2*MH**2*MZ**2 + MZ**4))/(16.*cmath.pi*abs(MH)**3)', + (P.b,P.b__tilde__):'((-12*MB**2*yb**2 + 3*MH**2*yb**2)*cmath.sqrt(-4*MB**2*MH**2 + MH**4))/(16.*cmath.pi*abs(MH)**3)', + (P.c,P.c__tilde__):'((-12*MC**2*yc**2 + 3*MH**2*yc**2)*cmath.sqrt(-4*MC**2*MH**2 + MH**4))/(16.*cmath.pi*abs(MH)**3)', + (P.d,P.d__tilde__):'((-12*MD**2*ydo**2 + 3*MH**2*ydo**2)*cmath.sqrt(-4*MD**2*MH**2 + MH**4))/(16.*cmath.pi*abs(MH)**3)', + (P.e__minus__,P.e__plus__):'((-4*Me**2*ye**2 + MH**2*ye**2)*cmath.sqrt(-4*Me**2*MH**2 + MH**4))/(16.*cmath.pi*abs(MH)**3)', + (P.mu__minus__,P.mu__plus__):'((MH**2*ym**2 - 4*MMU**2*ym**2)*cmath.sqrt(MH**4 - 4*MH**2*MMU**2))/(16.*cmath.pi*abs(MH)**3)', + (P.s,P.s__tilde__):'((3*MH**2*ys**2 - 12*MS**2*ys**2)*cmath.sqrt(MH**4 - 4*MH**2*MS**2))/(16.*cmath.pi*abs(MH)**3)', + (P.t,P.t__tilde__):'((3*MH**2*yt**2 - 12*MT**2*yt**2)*cmath.sqrt(MH**4 - 4*MH**2*MT**2))/(16.*cmath.pi*abs(MH)**3)', + (P.ta__minus__,P.ta__plus__):'((MH**2*ytau**2 - 4*MTA**2*ytau**2)*cmath.sqrt(MH**4 - 4*MH**2*MTA**2))/(16.*cmath.pi*abs(MH)**3)', + (P.u,P.u__tilde__):'((3*MH**2*yup**2 - 12*MU**2*yup**2)*cmath.sqrt(MH**4 - 4*MH**2*MU**2))/(16.*cmath.pi*abs(MH)**3)', + (P.W__minus__,P.W__plus__):'(((3*ee**4*vev**2)/(4.*sw**4) + (ee**4*MH**4*vev**2)/(16.*MW**4*sw**4) - (ee**4*MH**2*vev**2)/(4.*MW**2*sw**4))*cmath.sqrt(MH**4 - 4*MH**2*MW**2))/(16.*cmath.pi*abs(MH)**3)', + (P.Z,P.Z):'(((9*ee**4*vev**2)/2. + (3*ee**4*MH**4*vev**2)/(8.*MZ**4) - (3*ee**4*MH**2*vev**2)/(2.*MZ**2) + (3*cw**4*ee**4*vev**2)/(4.*sw**4) + (cw**4*ee**4*MH**4*vev**2)/(16.*MZ**4*sw**4) - (cw**4*ee**4*MH**2*vev**2)/(4.*MZ**2*sw**4) + (3*cw**2*ee**4*vev**2)/sw**2 + (cw**2*ee**4*MH**4*vev**2)/(4.*MZ**4*sw**2) - (cw**2*ee**4*MH**2*vev**2)/(MZ**2*sw**2) + (3*ee**4*sw**2*vev**2)/cw**2 + (ee**4*MH**4*sw**2*vev**2)/(4.*cw**2*MZ**4) - (ee**4*MH**2*sw**2*vev**2)/(cw**2*MZ**2) + (3*ee**4*sw**4*vev**2)/(4.*cw**4) + (ee**4*MH**4*sw**4*vev**2)/(16.*cw**4*MZ**4) - (ee**4*MH**2*sw**4*vev**2)/(4.*cw**4*MZ**2))*cmath.sqrt(MH**4 - 4*MH**2*MZ**2))/(32.*cmath.pi*abs(MH)**3)'}) + +Decay_mu__minus__ = Decay(name = 'Decay_mu__minus__', + particle = P.mu__minus__, + partial_widths = {(P.W__minus__,P.vm):'((MMU**2 - MW**2)*((ee**2*MMU**2)/(2.*sw**2) + (ee**2*MMU**4)/(2.*MW**2*sw**2) - (ee**2*MW**2)/sw**2))/(32.*cmath.pi*abs(MMU)**3)'}) + +Decay_s = Decay(name = 'Decay_s', + particle = P.s, + partial_widths = {(P.W__minus__,P.c):'(((3*CKM2x2*ee**2*MC**2*complexconjugate(CKM2x2))/(2.*sw**2) + (3*CKM2x2*ee**2*MS**2*complexconjugate(CKM2x2))/(2.*sw**2) + (3*CKM2x2*ee**2*MC**4*complexconjugate(CKM2x2))/(2.*MW**2*sw**2) - (3*CKM2x2*ee**2*MC**2*MS**2*complexconjugate(CKM2x2))/(MW**2*sw**2) + (3*CKM2x2*ee**2*MS**4*complexconjugate(CKM2x2))/(2.*MW**2*sw**2) - (3*CKM2x2*ee**2*MW**2*complexconjugate(CKM2x2))/sw**2)*cmath.sqrt(MC**4 - 2*MC**2*MS**2 + MS**4 - 2*MC**2*MW**2 - 2*MS**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MS)**3)', + (P.W__minus__,P.t):'(((3*CKM3x2*ee**2*MS**2*complexconjugate(CKM3x2))/(2.*sw**2) + (3*CKM3x2*ee**2*MT**2*complexconjugate(CKM3x2))/(2.*sw**2) + (3*CKM3x2*ee**2*MS**4*complexconjugate(CKM3x2))/(2.*MW**2*sw**2) - (3*CKM3x2*ee**2*MS**2*MT**2*complexconjugate(CKM3x2))/(MW**2*sw**2) + (3*CKM3x2*ee**2*MT**4*complexconjugate(CKM3x2))/(2.*MW**2*sw**2) - (3*CKM3x2*ee**2*MW**2*complexconjugate(CKM3x2))/sw**2)*cmath.sqrt(MS**4 - 2*MS**2*MT**2 + MT**4 - 2*MS**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MS)**3)', + (P.W__minus__,P.u):'(((3*CKM1x2*ee**2*MS**2*complexconjugate(CKM1x2))/(2.*sw**2) + (3*CKM1x2*ee**2*MU**2*complexconjugate(CKM1x2))/(2.*sw**2) + (3*CKM1x2*ee**2*MS**4*complexconjugate(CKM1x2))/(2.*MW**2*sw**2) - (3*CKM1x2*ee**2*MS**2*MU**2*complexconjugate(CKM1x2))/(MW**2*sw**2) + (3*CKM1x2*ee**2*MU**4*complexconjugate(CKM1x2))/(2.*MW**2*sw**2) - (3*CKM1x2*ee**2*MW**2*complexconjugate(CKM1x2))/sw**2)*cmath.sqrt(MS**4 - 2*MS**2*MU**2 + MU**4 - 2*MS**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MS)**3)'}) + +Decay_t = Decay(name = 'Decay_t', + particle = P.t, + partial_widths = {(P.W__plus__,P.b):'(((3*CKM3x3*ee**2*MB**2*complexconjugate(CKM3x3))/(2.*sw**2) + (3*CKM3x3*ee**2*MT**2*complexconjugate(CKM3x3))/(2.*sw**2) + (3*CKM3x3*ee**2*MB**4*complexconjugate(CKM3x3))/(2.*MW**2*sw**2) - (3*CKM3x3*ee**2*MB**2*MT**2*complexconjugate(CKM3x3))/(MW**2*sw**2) + (3*CKM3x3*ee**2*MT**4*complexconjugate(CKM3x3))/(2.*MW**2*sw**2) - (3*CKM3x3*ee**2*MW**2*complexconjugate(CKM3x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MT**2 + MT**4 - 2*MB**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MT)**3)', + (P.W__plus__,P.d):'(((3*CKM3x1*ee**2*MD**2*complexconjugate(CKM3x1))/(2.*sw**2) + (3*CKM3x1*ee**2*MT**2*complexconjugate(CKM3x1))/(2.*sw**2) + (3*CKM3x1*ee**2*MD**4*complexconjugate(CKM3x1))/(2.*MW**2*sw**2) - (3*CKM3x1*ee**2*MD**2*MT**2*complexconjugate(CKM3x1))/(MW**2*sw**2) + (3*CKM3x1*ee**2*MT**4*complexconjugate(CKM3x1))/(2.*MW**2*sw**2) - (3*CKM3x1*ee**2*MW**2*complexconjugate(CKM3x1))/sw**2)*cmath.sqrt(MD**4 - 2*MD**2*MT**2 + MT**4 - 2*MD**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MT)**3)', + (P.W__plus__,P.s):'(((3*CKM3x2*ee**2*MS**2*complexconjugate(CKM3x2))/(2.*sw**2) + (3*CKM3x2*ee**2*MT**2*complexconjugate(CKM3x2))/(2.*sw**2) + (3*CKM3x2*ee**2*MS**4*complexconjugate(CKM3x2))/(2.*MW**2*sw**2) - (3*CKM3x2*ee**2*MS**2*MT**2*complexconjugate(CKM3x2))/(MW**2*sw**2) + (3*CKM3x2*ee**2*MT**4*complexconjugate(CKM3x2))/(2.*MW**2*sw**2) - (3*CKM3x2*ee**2*MW**2*complexconjugate(CKM3x2))/sw**2)*cmath.sqrt(MS**4 - 2*MS**2*MT**2 + MT**4 - 2*MS**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MT)**3)'}) + +Decay_ta__minus__ = Decay(name = 'Decay_ta__minus__', + particle = P.ta__minus__, + partial_widths = {(P.W__minus__,P.vt):'((MTA**2 - MW**2)*((ee**2*MTA**2)/(2.*sw**2) + (ee**2*MTA**4)/(2.*MW**2*sw**2) - (ee**2*MW**2)/sw**2))/(32.*cmath.pi*abs(MTA)**3)'}) + +Decay_u = Decay(name = 'Decay_u', + particle = P.u, + partial_widths = {(P.W__plus__,P.b):'(((3*CKM1x3*ee**2*MB**2*complexconjugate(CKM1x3))/(2.*sw**2) + (3*CKM1x3*ee**2*MU**2*complexconjugate(CKM1x3))/(2.*sw**2) + (3*CKM1x3*ee**2*MB**4*complexconjugate(CKM1x3))/(2.*MW**2*sw**2) - (3*CKM1x3*ee**2*MB**2*MU**2*complexconjugate(CKM1x3))/(MW**2*sw**2) + (3*CKM1x3*ee**2*MU**4*complexconjugate(CKM1x3))/(2.*MW**2*sw**2) - (3*CKM1x3*ee**2*MW**2*complexconjugate(CKM1x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MU**2 + MU**4 - 2*MB**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MU)**3)', + (P.W__plus__,P.d):'(((3*CKM1x1*ee**2*MD**2*complexconjugate(CKM1x1))/(2.*sw**2) + (3*CKM1x1*ee**2*MU**2*complexconjugate(CKM1x1))/(2.*sw**2) + (3*CKM1x1*ee**2*MD**4*complexconjugate(CKM1x1))/(2.*MW**2*sw**2) - (3*CKM1x1*ee**2*MD**2*MU**2*complexconjugate(CKM1x1))/(MW**2*sw**2) + (3*CKM1x1*ee**2*MU**4*complexconjugate(CKM1x1))/(2.*MW**2*sw**2) - (3*CKM1x1*ee**2*MW**2*complexconjugate(CKM1x1))/sw**2)*cmath.sqrt(MD**4 - 2*MD**2*MU**2 + MU**4 - 2*MD**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MU)**3)', + (P.W__plus__,P.s):'(((3*CKM1x2*ee**2*MS**2*complexconjugate(CKM1x2))/(2.*sw**2) + (3*CKM1x2*ee**2*MU**2*complexconjugate(CKM1x2))/(2.*sw**2) + (3*CKM1x2*ee**2*MS**4*complexconjugate(CKM1x2))/(2.*MW**2*sw**2) - (3*CKM1x2*ee**2*MS**2*MU**2*complexconjugate(CKM1x2))/(MW**2*sw**2) + (3*CKM1x2*ee**2*MU**4*complexconjugate(CKM1x2))/(2.*MW**2*sw**2) - (3*CKM1x2*ee**2*MW**2*complexconjugate(CKM1x2))/sw**2)*cmath.sqrt(MS**4 - 2*MS**2*MU**2 + MU**4 - 2*MS**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MU)**3)'}) + +Decay_W__plus__ = Decay(name = 'Decay_W__plus__', + particle = P.W__plus__, + partial_widths = {(P.c,P.b__tilde__):'(((-3*CKM2x3*ee**2*MB**2*complexconjugate(CKM2x3))/(2.*sw**2) - (3*CKM2x3*ee**2*MC**2*complexconjugate(CKM2x3))/(2.*sw**2) - (3*CKM2x3*ee**2*MB**4*complexconjugate(CKM2x3))/(2.*MW**2*sw**2) + (3*CKM2x3*ee**2*MB**2*MC**2*complexconjugate(CKM2x3))/(MW**2*sw**2) - (3*CKM2x3*ee**2*MC**4*complexconjugate(CKM2x3))/(2.*MW**2*sw**2) + (3*CKM2x3*ee**2*MW**2*complexconjugate(CKM2x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MC**2 + MC**4 - 2*MB**2*MW**2 - 2*MC**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.c,P.d__tilde__):'(((-3*CKM2x1*ee**2*MC**2*complexconjugate(CKM2x1))/(2.*sw**2) - (3*CKM2x1*ee**2*MD**2*complexconjugate(CKM2x1))/(2.*sw**2) - (3*CKM2x1*ee**2*MC**4*complexconjugate(CKM2x1))/(2.*MW**2*sw**2) + (3*CKM2x1*ee**2*MC**2*MD**2*complexconjugate(CKM2x1))/(MW**2*sw**2) - (3*CKM2x1*ee**2*MD**4*complexconjugate(CKM2x1))/(2.*MW**2*sw**2) + (3*CKM2x1*ee**2*MW**2*complexconjugate(CKM2x1))/sw**2)*cmath.sqrt(MC**4 - 2*MC**2*MD**2 + MD**4 - 2*MC**2*MW**2 - 2*MD**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.c,P.s__tilde__):'(((-3*CKM2x2*ee**2*MC**2*complexconjugate(CKM2x2))/(2.*sw**2) - (3*CKM2x2*ee**2*MS**2*complexconjugate(CKM2x2))/(2.*sw**2) - (3*CKM2x2*ee**2*MC**4*complexconjugate(CKM2x2))/(2.*MW**2*sw**2) + (3*CKM2x2*ee**2*MC**2*MS**2*complexconjugate(CKM2x2))/(MW**2*sw**2) - (3*CKM2x2*ee**2*MS**4*complexconjugate(CKM2x2))/(2.*MW**2*sw**2) + (3*CKM2x2*ee**2*MW**2*complexconjugate(CKM2x2))/sw**2)*cmath.sqrt(MC**4 - 2*MC**2*MS**2 + MS**4 - 2*MC**2*MW**2 - 2*MS**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.t,P.b__tilde__):'(((-3*CKM3x3*ee**2*MB**2*complexconjugate(CKM3x3))/(2.*sw**2) - (3*CKM3x3*ee**2*MT**2*complexconjugate(CKM3x3))/(2.*sw**2) - (3*CKM3x3*ee**2*MB**4*complexconjugate(CKM3x3))/(2.*MW**2*sw**2) + (3*CKM3x3*ee**2*MB**2*MT**2*complexconjugate(CKM3x3))/(MW**2*sw**2) - (3*CKM3x3*ee**2*MT**4*complexconjugate(CKM3x3))/(2.*MW**2*sw**2) + (3*CKM3x3*ee**2*MW**2*complexconjugate(CKM3x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MT**2 + MT**4 - 2*MB**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.t,P.d__tilde__):'(((-3*CKM3x1*ee**2*MD**2*complexconjugate(CKM3x1))/(2.*sw**2) - (3*CKM3x1*ee**2*MT**2*complexconjugate(CKM3x1))/(2.*sw**2) - (3*CKM3x1*ee**2*MD**4*complexconjugate(CKM3x1))/(2.*MW**2*sw**2) + (3*CKM3x1*ee**2*MD**2*MT**2*complexconjugate(CKM3x1))/(MW**2*sw**2) - (3*CKM3x1*ee**2*MT**4*complexconjugate(CKM3x1))/(2.*MW**2*sw**2) + (3*CKM3x1*ee**2*MW**2*complexconjugate(CKM3x1))/sw**2)*cmath.sqrt(MD**4 - 2*MD**2*MT**2 + MT**4 - 2*MD**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.t,P.s__tilde__):'(((-3*CKM3x2*ee**2*MS**2*complexconjugate(CKM3x2))/(2.*sw**2) - (3*CKM3x2*ee**2*MT**2*complexconjugate(CKM3x2))/(2.*sw**2) - (3*CKM3x2*ee**2*MS**4*complexconjugate(CKM3x2))/(2.*MW**2*sw**2) + (3*CKM3x2*ee**2*MS**2*MT**2*complexconjugate(CKM3x2))/(MW**2*sw**2) - (3*CKM3x2*ee**2*MT**4*complexconjugate(CKM3x2))/(2.*MW**2*sw**2) + (3*CKM3x2*ee**2*MW**2*complexconjugate(CKM3x2))/sw**2)*cmath.sqrt(MS**4 - 2*MS**2*MT**2 + MT**4 - 2*MS**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.u,P.b__tilde__):'(((-3*CKM1x3*ee**2*MB**2*complexconjugate(CKM1x3))/(2.*sw**2) - (3*CKM1x3*ee**2*MU**2*complexconjugate(CKM1x3))/(2.*sw**2) - (3*CKM1x3*ee**2*MB**4*complexconjugate(CKM1x3))/(2.*MW**2*sw**2) + (3*CKM1x3*ee**2*MB**2*MU**2*complexconjugate(CKM1x3))/(MW**2*sw**2) - (3*CKM1x3*ee**2*MU**4*complexconjugate(CKM1x3))/(2.*MW**2*sw**2) + (3*CKM1x3*ee**2*MW**2*complexconjugate(CKM1x3))/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MU**2 + MU**4 - 2*MB**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.u,P.d__tilde__):'(((-3*CKM1x1*ee**2*MD**2*complexconjugate(CKM1x1))/(2.*sw**2) - (3*CKM1x1*ee**2*MU**2*complexconjugate(CKM1x1))/(2.*sw**2) - (3*CKM1x1*ee**2*MD**4*complexconjugate(CKM1x1))/(2.*MW**2*sw**2) + (3*CKM1x1*ee**2*MD**2*MU**2*complexconjugate(CKM1x1))/(MW**2*sw**2) - (3*CKM1x1*ee**2*MU**4*complexconjugate(CKM1x1))/(2.*MW**2*sw**2) + (3*CKM1x1*ee**2*MW**2*complexconjugate(CKM1x1))/sw**2)*cmath.sqrt(MD**4 - 2*MD**2*MU**2 + MU**4 - 2*MD**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.u,P.s__tilde__):'(((-3*CKM1x2*ee**2*MS**2*complexconjugate(CKM1x2))/(2.*sw**2) - (3*CKM1x2*ee**2*MU**2*complexconjugate(CKM1x2))/(2.*sw**2) - (3*CKM1x2*ee**2*MS**4*complexconjugate(CKM1x2))/(2.*MW**2*sw**2) + (3*CKM1x2*ee**2*MS**2*MU**2*complexconjugate(CKM1x2))/(MW**2*sw**2) - (3*CKM1x2*ee**2*MU**4*complexconjugate(CKM1x2))/(2.*MW**2*sw**2) + (3*CKM1x2*ee**2*MW**2*complexconjugate(CKM1x2))/sw**2)*cmath.sqrt(MS**4 - 2*MS**2*MU**2 + MU**4 - 2*MS**2*MW**2 - 2*MU**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', + (P.ve,P.e__plus__):'((-Me**2 + MW**2)*(-(ee**2*Me**2)/(2.*sw**2) - (ee**2*Me**4)/(2.*MW**2*sw**2) + (ee**2*MW**2)/sw**2))/(48.*cmath.pi*abs(MW)**3)', + (P.vm,P.mu__plus__):'((-MMU**2 + MW**2)*(-(ee**2*MMU**2)/(2.*sw**2) - (ee**2*MMU**4)/(2.*MW**2*sw**2) + (ee**2*MW**2)/sw**2))/(48.*cmath.pi*abs(MW)**3)', + (P.vt,P.ta__plus__):'((-MTA**2 + MW**2)*(-(ee**2*MTA**2)/(2.*sw**2) - (ee**2*MTA**4)/(2.*MW**2*sw**2) + (ee**2*MW**2)/sw**2))/(48.*cmath.pi*abs(MW)**3)'}) + +Decay_Z = Decay(name = 'Decay_Z', + particle = P.Z, + partial_widths = {(P.a,P.ALP):'((-Ma**2 + MZ**2)*(-(cWW*cYY*ee**4*Ma**4)/(16.*falp**2*cmath.pi**4) + (cWW*cYY*ee**4*Ma**2*MZ**2)/(8.*falp**2*cmath.pi**4) - (cWW*cYY*ee**4*MZ**4)/(16.*falp**2*cmath.pi**4) + (cw**2*cWW**2*ee**4*Ma**4)/(32.*falp**2*cmath.pi**4*sw**2) - (cw**2*cWW**2*ee**4*Ma**2*MZ**2)/(16.*falp**2*cmath.pi**4*sw**2) + (cw**2*cWW**2*ee**4*MZ**4)/(32.*falp**2*cmath.pi**4*sw**2) + (cYY**2*ee**4*Ma**4*sw**2)/(32.*cw**2*falp**2*cmath.pi**4) - (cYY**2*ee**4*Ma**2*MZ**2*sw**2)/(16.*cw**2*falp**2*cmath.pi**4) + (cYY**2*ee**4*MZ**4*sw**2)/(32.*cw**2*falp**2*cmath.pi**4)))/(48.*cmath.pi*abs(MZ)**3)', + (P.ALP,P.H):'((-((cZh5**2*ee**2*Ma**2*vev**2)/falp**2) - (cZh5**2*ee**2*MH**2*vev**2)/falp**2 + (cZh5**2*ee**2*Ma**4*vev**2)/(2.*falp**2*MZ**2) - (cZh5**2*ee**2*Ma**2*MH**2*vev**2)/(falp**2*MZ**2) + (cZh5**2*ee**2*MH**4*vev**2)/(2.*falp**2*MZ**2) + (cZh5**2*ee**2*MZ**2*vev**2)/(2.*falp**2) - (cw**2*cZh5**2*ee**2*Ma**2*vev**2)/(2.*falp**2*sw**2) - (cw**2*cZh5**2*ee**2*MH**2*vev**2)/(2.*falp**2*sw**2) + (cw**2*cZh5**2*ee**2*Ma**4*vev**2)/(4.*falp**2*MZ**2*sw**2) - (cw**2*cZh5**2*ee**2*Ma**2*MH**2*vev**2)/(2.*falp**2*MZ**2*sw**2) + (cw**2*cZh5**2*ee**2*MH**4*vev**2)/(4.*falp**2*MZ**2*sw**2) + (cw**2*cZh5**2*ee**2*MZ**2*vev**2)/(4.*falp**2*sw**2) - (cZh5**2*ee**2*Ma**2*sw**2*vev**2)/(2.*cw**2*falp**2) - (cZh5**2*ee**2*MH**2*sw**2*vev**2)/(2.*cw**2*falp**2) + (cZh5**2*ee**2*Ma**4*sw**2*vev**2)/(4.*cw**2*falp**2*MZ**2) - (cZh5**2*ee**2*Ma**2*MH**2*sw**2*vev**2)/(2.*cw**2*falp**2*MZ**2) + (cZh5**2*ee**2*MH**4*sw**2*vev**2)/(4.*cw**2*falp**2*MZ**2) + (cZh5**2*ee**2*MZ**2*sw**2*vev**2)/(4.*cw**2*falp**2))*cmath.sqrt(Ma**4 - 2*Ma**2*MH**2 + MH**4 - 2*Ma**2*MZ**2 - 2*MH**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.b,P.b__tilde__):'((-7*ee**2*MB**2 + ee**2*MZ**2 - (3*cw**2*ee**2*MB**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) - (17*ee**2*MB**2*sw**2)/(6.*cw**2) + (5*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MB**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.c,P.c__tilde__):'((-11*ee**2*MC**2 - ee**2*MZ**2 - (3*cw**2*ee**2*MC**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MC**2*sw**2)/(6.*cw**2) + (17*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MC**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.d,P.d__tilde__):'((-7*ee**2*MD**2 + ee**2*MZ**2 - (3*cw**2*ee**2*MD**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) - (17*ee**2*MD**2*sw**2)/(6.*cw**2) + (5*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MD**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.e__minus__,P.e__plus__):'((-5*ee**2*Me**2 - ee**2*MZ**2 - (cw**2*ee**2*Me**2)/(2.*sw**2) + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*Me**2*sw**2)/(2.*cw**2) + (5*ee**2*MZ**2*sw**2)/(2.*cw**2))*cmath.sqrt(-4*Me**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.mu__minus__,P.mu__plus__):'((-5*ee**2*MMU**2 - ee**2*MZ**2 - (cw**2*ee**2*MMU**2)/(2.*sw**2) + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MMU**2*sw**2)/(2.*cw**2) + (5*ee**2*MZ**2*sw**2)/(2.*cw**2))*cmath.sqrt(-4*MMU**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.s,P.s__tilde__):'((-7*ee**2*MS**2 + ee**2*MZ**2 - (3*cw**2*ee**2*MS**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) - (17*ee**2*MS**2*sw**2)/(6.*cw**2) + (5*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MS**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.t,P.t__tilde__):'((-11*ee**2*MT**2 - ee**2*MZ**2 - (3*cw**2*ee**2*MT**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MT**2*sw**2)/(6.*cw**2) + (17*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MT**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.ta__minus__,P.ta__plus__):'((-5*ee**2*MTA**2 - ee**2*MZ**2 - (cw**2*ee**2*MTA**2)/(2.*sw**2) + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MTA**2*sw**2)/(2.*cw**2) + (5*ee**2*MZ**2*sw**2)/(2.*cw**2))*cmath.sqrt(-4*MTA**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.u,P.u__tilde__):'((-11*ee**2*MU**2 - ee**2*MZ**2 - (3*cw**2*ee**2*MU**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MU**2*sw**2)/(6.*cw**2) + (17*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MU**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', + (P.ve,P.ve__tilde__):'(MZ**2*(ee**2*MZ**2 + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', + (P.vm,P.vm__tilde__):'(MZ**2*(ee**2*MZ**2 + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', + (P.vt,P.vt__tilde__):'(MZ**2*(ee**2*MZ**2 + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', + (P.W__minus__,P.W__plus__):'(((-12*cw**2*ee**2*MW**2)/sw**2 - (17*cw**2*ee**2*MZ**2)/sw**2 + (4*cw**2*ee**2*MZ**4)/(MW**2*sw**2) + (cw**2*ee**2*MZ**6)/(4.*MW**4*sw**2))*cmath.sqrt(-4*MW**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)'}) + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/function_library.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/function_library.py new file mode 100644 index 0000000000..c96d23f8b6 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/function_library.py @@ -0,0 +1,71 @@ +# This file is part of the UFO. +# +# This file contains definitions for functions that +# are extensions of the cmath library, and correspond +# either to functions that are in cmath, but inconvenient +# to access from there (e.g. z.conjugate()), +# or functions that are simply not defined. +# +# + +__date__ = "22 July 2010" +__author__ = "claude.duhr@durham.ac.uk" + +import cmath +from object_library import all_functions, Function + +# +# shortcuts for functions from cmath +# + +complexconjugate = Function(name = 'complexconjugate', + arguments = ('z',), + expression = 'z.conjugate()') + + +re = Function(name = 're', + arguments = ('z',), + expression = 'z.real') + +im = Function(name = 'im', + arguments = ('z',), + expression = 'z.imag') + +# New functions (trigonometric) + +sec = Function(name = 'sec', + arguments = ('z',), + expression = '1./cmath.cos(z.real)') + +asec = Function(name = 'asec', + arguments = ('z',), + expression = 'cmath.acos(1./(z.real))') + +csc = Function(name = 'csc', + arguments = ('z',), + expression = '1./cmath.sin(z.real)') + +acsc = Function(name = 'acsc', + arguments = ('z',), + expression = 'cmath.asin(1./(z.real))') + +cot = Function(name = 'cot', + arguments = ('z',), + expression = '1./cmath.tan(z.real)') + +# Heaviside theta function + +theta_function = Function(name = 'theta_function', + arguments = ('x','y','z'), + expression = 'y if x else z') + +# Auxiliary functions for NLO + +cond = Function(name = 'cond', + arguments = ('condition','ExprTrue','ExprFalse'), + expression = '(ExprTrue if condition==0.0 else ExprFalse)') + +reglog = Function(name = 'reglog', + arguments = ('z'), + expression = '(0.0 if z==0.0 else cmath.log(z.real))') + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/lorentz.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/lorentz.py new file mode 100644 index 0000000000..2e591a6f12 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/lorentz.py @@ -0,0 +1,110 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:43 + + +from object_library import all_lorentz, Lorentz + +from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot +try: + import form_factors as ForFac +except ImportError: + pass + + +UUV1 = Lorentz(name = 'UUV1', + spins = [ -1, -1, 3 ], + structure = 'P(3,2) + P(3,3)') + +SSS1 = Lorentz(name = 'SSS1', + spins = [ 1, 1, 1 ], + structure = '1') + +SSS2 = Lorentz(name = 'SSS2', + spins = [ 1, 1, 1 ], + structure = 'P(-1,1)*P(-1,2)') + +FFS1 = Lorentz(name = 'FFS1', + spins = [ 2, 2, 1 ], + structure = 'P(-1,3)*Gamma5(-2,1)*Gamma(-1,2,-2)') + +FFS2 = Lorentz(name = 'FFS2', + spins = [ 2, 2, 1 ], + structure = 'ProjM(2,1) + ProjP(2,1)') + +FFV1 = Lorentz(name = 'FFV1', + spins = [ 2, 2, 3 ], + structure = 'Gamma(3,2,1)') + +FFV2 = Lorentz(name = 'FFV2', + spins = [ 2, 2, 3 ], + structure = 'Gamma(3,2,-1)*ProjM(-1,1)') + +FFV3 = Lorentz(name = 'FFV3', + spins = [ 2, 2, 3 ], + structure = 'Gamma(3,2,-1)*ProjP(-1,1)') + +VSS1 = Lorentz(name = 'VSS1', + spins = [ 3, 1, 1 ], + structure = 'P(1,2)') + +VVS1 = Lorentz(name = 'VVS1', + spins = [ 3, 3, 1 ], + structure = '-4*Epsilon(1,2,-1,-2)*P(-2,2)*P(-1,1) + 4*Epsilon(1,2,-1,-2)*P(-2,1)*P(-1,2)') + +VVS2 = Lorentz(name = 'VVS2', + spins = [ 3, 3, 1 ], + structure = '-(Epsilon(1,2,-1,-2)*P(-2,2)*P(-1,1)) + Epsilon(1,2,-1,-2)*P(-2,1)*P(-1,2)') + +VVS3 = Lorentz(name = 'VVS3', + spins = [ 3, 3, 1 ], + structure = 'Metric(1,2)') + +VVV1 = Lorentz(name = 'VVV1', + spins = [ 3, 3, 3 ], + structure = 'P(3,1)*Metric(1,2) - P(3,2)*Metric(1,2) - P(2,1)*Metric(1,3) + P(2,3)*Metric(1,3) + P(1,2)*Metric(2,3) - P(1,3)*Metric(2,3)') + +SSSS1 = Lorentz(name = 'SSSS1', + spins = [ 1, 1, 1, 1 ], + structure = '1') + +SSSS2 = Lorentz(name = 'SSSS2', + spins = [ 1, 1, 1, 1 ], + structure = 'P(-1,1)*P(-1,2)') + +VSSS1 = Lorentz(name = 'VSSS1', + spins = [ 3, 1, 1, 1 ], + structure = 'P(1,2)') + +VVSS1 = Lorentz(name = 'VVSS1', + spins = [ 3, 3, 1, 1 ], + structure = 'Metric(1,2)') + +VVVS1 = Lorentz(name = 'VVVS1', + spins = [ 3, 3, 3, 1 ], + structure = '-(Epsilon(1,2,3,-1)*P(-1,1)) - Epsilon(1,2,3,-1)*P(-1,2) - Epsilon(1,2,3,-1)*P(-1,3)') + +VVVS2 = Lorentz(name = 'VVVS2', + spins = [ 3, 3, 3, 1 ], + structure = '-4*Epsilon(1,2,3,-1)*P(-1,1) - 4*Epsilon(1,2,3,-1)*P(-1,2) - 4*Epsilon(1,2,3,-1)*P(-1,3)') + +VVVV1 = Lorentz(name = 'VVVV1', + spins = [ 3, 3, 3, 3 ], + structure = 'Metric(1,4)*Metric(2,3) - Metric(1,3)*Metric(2,4)') + +VVVV2 = Lorentz(name = 'VVVV2', + spins = [ 3, 3, 3, 3 ], + structure = 'Metric(1,4)*Metric(2,3) + Metric(1,3)*Metric(2,4) - 2*Metric(1,2)*Metric(3,4)') + +VVVV3 = Lorentz(name = 'VVVV3', + spins = [ 3, 3, 3, 3 ], + structure = 'Metric(1,4)*Metric(2,3) - Metric(1,2)*Metric(3,4)') + +VVVV4 = Lorentz(name = 'VVVV4', + spins = [ 3, 3, 3, 3 ], + structure = 'Metric(1,3)*Metric(2,4) - Metric(1,2)*Metric(3,4)') + +VVVV5 = Lorentz(name = 'VVVV5', + spins = [ 3, 3, 3, 3 ], + structure = 'Metric(1,4)*Metric(2,3) - (Metric(1,3)*Metric(2,4))/2. - (Metric(1,2)*Metric(3,4))/2.') + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/object_library.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/object_library.py new file mode 100644 index 0000000000..c196c695c6 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/object_library.py @@ -0,0 +1,373 @@ +## +## +## Feynrules Header +## +## +## +## +## + +import cmath +import re + +class UFOError(Exception): + """Exception raised if when inconsistencies are detected in the UFO model.""" + pass + +class UFOBaseClass(object): + """The class from which all FeynRules classes are derived.""" + + require_args = [] + + def __init__(self, *args, **options): + assert(len(self.require_args) == len (args)) + + for i, name in enumerate(self.require_args): + setattr(self, name, args[i]) + + for (option, value) in options.items(): + setattr(self, option, value) + + def get(self, name): + return getattr(self, name) + + def set(self, name, value): + setattr(self, name, value) + + def get_all(self): + """Return a dictionary containing all the information of the object""" + return self.__dict__ + + def __str__(self): + return self.name + + def nice_string(self): + """ return string with the full information """ + return '\n'.join(['%s \t: %s' %(name, value) for name, value in self.__dict__.items()]) + + def __repr__(self): + replacements = [ + ('+','__plus__'), + ('-','__minus__'), + ('@','__at__'), + ('!','__exclam__'), + ('?','__quest__'), + ('*','__star__'), + ('~','__tilde__') + ] + text = self.name + for orig,sub in replacements: + text = text.replace(orig,sub) + return text + + + +all_particles = [] + +class Particle(UFOBaseClass): + """A standard Particle""" + + require_args=['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname', 'charge'] + + require_args_all = ['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname','counterterm','charge', 'line', 'propagating', 'goldstoneboson', 'propagator'] + + def __init__(self, pdg_code, name, antiname, spin, color, mass, width, texname, + antitexname, charge , line=None, propagating=True, counterterm=None, goldstoneboson=False, + propagator=None, **options): + + args= (pdg_code, name, antiname, spin, color, mass, width, texname, + antitexname, float(charge)) + + UFOBaseClass.__init__(self, *args, **options) + + global all_particles + all_particles.append(self) + + self.propagating = propagating + self.goldstoneboson= goldstoneboson + + self.selfconjugate = (name == antiname) + if not line: + self.line = self.find_line_type() + else: + self.line = line + + if propagator: + if isinstance(propagator, dict): + self.propagator = propagator + else: + self.propagator = {0: propagator, 1: propagator} + + def find_line_type(self): + """ find how we draw a line if not defined + valid output: dashed/straight/wavy/curly/double/swavy/scurly + """ + + spin = self.spin + color = self.color + + #use default + if spin == 1: + return 'dashed' + elif spin == 2: + if not self.selfconjugate: + return 'straight' + elif color == 1: + return 'swavy' + else: + return 'scurly' + elif spin == 3: + if color == 1: + return 'wavy' + + else: + return 'curly' + elif spin == 5: + return 'double' + elif spin == -1: + return 'dotted' + else: + return 'dashed' # not supported yet + + def anti(self): + if self.selfconjugate: + raise Exception('%s has no anti particle.' % self.name) + outdic = {} + for k,v in self.__dict__.items(): + if k not in self.require_args_all: + outdic[k] = -v + if self.color in [1,8]: + newcolor = self.color + else: + newcolor = -self.color + + return Particle(-self.pdg_code, self.antiname, self.name, self.spin, newcolor, self.mass, self.width, + self.antitexname, self.texname, -self.charge, self.line, self.propagating, self.goldstoneboson, **outdic) + + + +all_parameters = [] + +class Parameter(UFOBaseClass): + + require_args=['name', 'nature', 'type', 'value', 'texname'] + + def __init__(self, name, nature, type, value, texname, lhablock=None, lhacode=None): + + args = (name,nature,type,value,texname) + + UFOBaseClass.__init__(self, *args) + + args=(name,nature,type,value,texname) + + global all_parameters + all_parameters.append(self) + + if (lhablock is None or lhacode is None) and nature == 'external': + raise Exception('Need LHA information for external parameter "%s".' % name) + self.lhablock = lhablock + self.lhacode = lhacode + +all_CTparameters = [] + +class CTParameter(UFOBaseClass): + + require_args=['name', 'type', 'value', 'texname'] + + def __init__(self, name, type, value, texname): + + args = (name,type,value,texname) + + UFOBaseClass.__init__(self, *args) + + global all_CTparameters + all_CTparameters.append(self) + + def finite(self): + try: + return self.value[0] + except KeyError: + return 'ZERO' + + def pole(self, x): + try: + return self.value[-x] + except KeyError: + return 'ZERO' + +all_vertices = [] + +class Vertex(UFOBaseClass): + + require_args=['name', 'particles', 'color', 'lorentz', 'couplings'] + + def __init__(self, name, particles, color, lorentz, couplings, **opt): + + args = (name, particles, color, lorentz, couplings) + + UFOBaseClass.__init__(self, *args, **opt) + + args=(particles,color,lorentz,couplings) + + global all_vertices + all_vertices.append(self) + +all_CTvertices = [] + +class CTVertex(UFOBaseClass): + + require_args=['name', 'particles', 'color', 'lorentz', 'couplings', 'type', 'loop_particles'] + + def __init__(self, name, particles, color, lorentz, couplings, type, loop_particles, **opt): + + args = (name, particles, color, lorentz, couplings, type, loop_particles) + + UFOBaseClass.__init__(self, *args, **opt) + + args=(particles,color,lorentz,couplings, type, loop_particles) + + global all_CTvertices + all_CTvertices.append(self) + +all_couplings = [] + +class Coupling(UFOBaseClass): + + require_args=['name', 'value', 'order'] + + require_args_all=['name', 'value', 'order', 'loop_particles', 'counterterm'] + + def __init__(self, name, value, order, **opt): + + args =(name, value, order) + UFOBaseClass.__init__(self, *args, **opt) + global all_couplings + all_couplings.append(self) + + def value(self): + return self.pole(0) + + def pole(self, x): + """ the self.value attribute can be a dictionary directly specifying the Laurent serie using normal + parameter or just a string which can possibly contain CTparameter defining the Laurent serie.""" + + if isinstance(self.value,dict): + if -x in self.value.keys(): + return self.value[-x] + else: + return 'ZERO' + + CTparam=None + for param in all_CTparameters: + pattern=re.compile(r"(?P\A|\*|\+|\-|\()(?P"+param.name+r")(?P\Z|\*|\+|\-|\))") + numberOfMatches=len(pattern.findall(self.value)) + if numberOfMatches==1: + if not CTparam: + CTparam=param + else: + raise UFOError, "UFO does not support yet more than one occurence of CTParameters in the couplings values." + elif numberOfMatches>1: + raise UFOError, "UFO does not support yet more than one occurence of CTParameters in the couplings values." + + if not CTparam: + if x==0: + return self.value + else: + return 'ZERO' + else: + if CTparam.pole(x)=='ZERO': + return 'ZERO' + else: + def substitution(matchedObj): + return matchedObj.group('first')+"("+CTparam.pole(x)+")"+matchedObj.group('second') + pattern=re.compile(r"(?P\A|\*|\+|\-|\()(?P"+CTparam.name+r")(?P\Z|\*|\+|\-|\))") + return pattern.sub(substitution,self.value) + +all_lorentz = [] + +class Lorentz(UFOBaseClass): + + require_args=['name','spins','structure'] + + def __init__(self, name, spins, structure='external', **opt): + args = (name, spins, structure) + UFOBaseClass.__init__(self, *args, **opt) + + global all_lorentz + all_lorentz.append(self) + + +all_functions = [] + +class Function(object): + + def __init__(self, name, arguments, expression): + + global all_functions + all_functions.append(self) + + self.name = name + self.arguments = arguments + self.expr = expression + + def __call__(self, *opt): + + for i, arg in enumerate(self.arguments): + exec('%s = %s' % (arg, opt[i] )) + + return eval(self.expr) + +all_orders = [] + +class CouplingOrder(object): + + def __init__(self, name, expansion_order, hierarchy, perturbative_expansion = 0): + + global all_orders + all_orders.append(self) + + self.name = name + self.expansion_order = expansion_order + self.hierarchy = hierarchy + self.perturbative_expansion = perturbative_expansion + +all_decays = [] + +class Decay(UFOBaseClass): + require_args = ['particle','partial_widths'] + + def __init__(self, particle, partial_widths, **opt): + args = (particle, partial_widths) + UFOBaseClass.__init__(self, *args, **opt) + + global all_decays + all_decays.append(self) + + # Add the information directly to the particle + particle.partial_widths = partial_widths + +all_form_factors = [] + +class FormFactor(UFOBaseClass): + require_args = ['name','type','value'] + + def __init__(self, name, type, value, **opt): + args = (name, type, value) + UFOBaseClass.__init__(self, *args, **opt) + + global all_form_factors + all_form_factors.append(self) + + +all_propagators = [] + +class Propagator(UFOBaseClass): + + require_args = ['name','numerator','denominator'] + + def __init__(self, name, numerator, denominator=None, **opt): + args = (name, numerator, denominator) + UFOBaseClass.__init__(self, *args, **opt) + + global all_propagators + all_propagators.append(self) diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/parameters.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/parameters.py new file mode 100644 index 0000000000..b32500f710 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/parameters.py @@ -0,0 +1,559 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:42 + + + +from object_library import all_parameters, Parameter + + +from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot + +# This is a default parameter object representing 0. +ZERO = Parameter(name = 'ZERO', + nature = 'internal', + type = 'real', + value = '0.0', + texname = '0') + +# User-defined parameters. +falp = Parameter(name = 'falp', + nature = 'external', + type = 'real', + value = 1000, + texname = '\\text{falp}', + lhablock = 'ALPPARAMS', + lhacode = [ 1 ]) + +cbb = Parameter(name = 'cbb', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cbb}', + lhablock = 'ALPPARAMS', + lhacode = [ 2 ]) + +ctt = Parameter(name = 'ctt', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{ctt}', + lhablock = 'ALPPARAMS', + lhacode = [ 3 ]) + +css = Parameter(name = 'css', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{css}', + lhablock = 'ALPPARAMS', + lhacode = [ 4 ]) + +ccc = Parameter(name = 'ccc', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{ccc}', + lhablock = 'ALPPARAMS', + lhacode = [ 5 ]) + +cdd = Parameter(name = 'cdd', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cdd}', + lhablock = 'ALPPARAMS', + lhacode = [ 6 ]) + +cuu = Parameter(name = 'cuu', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cuu}', + lhablock = 'ALPPARAMS', + lhacode = [ 7 ]) + +ctautau = Parameter(name = 'ctautau', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{ctautau}', + lhablock = 'ALPPARAMS', + lhacode = [ 8 ]) + +cmumu = Parameter(name = 'cmumu', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cmumu}', + lhablock = 'ALPPARAMS', + lhacode = [ 9 ]) + +cee = Parameter(name = 'cee', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cee}', + lhablock = 'ALPPARAMS', + lhacode = [ 10 ]) + +cah = Parameter(name = 'cah', + nature = 'external', + type = 'real', + value = 0., + texname = '\\text{cah}', + lhablock = 'ALPPARAMS', + lhacode = [ 11 ]) + +cZh5 = Parameter(name = 'cZh5', + nature = 'external', + type = 'real', + value = 0., + texname = '\\text{cZh5}', + lhablock = 'ALPPARAMS', + lhacode = [ 12 ]) + +cWW = Parameter(name = 'cWW', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cWW}', + lhablock = 'ALPPARAMS', + lhacode = [ 13 ]) + +cYY = Parameter(name = 'cYY', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cYY}', + lhablock = 'ALPPARAMS', + lhacode = [ 14 ]) + +cGG = Parameter(name = 'cGG', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{cGG}', + lhablock = 'ALPPARAMS', + lhacode = [ 15 ]) + +cabi = Parameter(name = 'cabi', + nature = 'external', + type = 'real', + value = 0.227736, + texname = '\\theta _c', + lhablock = 'CKMBLOCK', + lhacode = [ 1 ]) + +aEWM1 = Parameter(name = 'aEWM1', + nature = 'external', + type = 'real', + value = 127.9, + texname = '\\text{aEWM1}', + lhablock = 'SMINPUTS', + lhacode = [ 1 ]) + +Gf = Parameter(name = 'Gf', + nature = 'external', + type = 'real', + value = 0.0000116637, + texname = 'G_f', + lhablock = 'SMINPUTS', + lhacode = [ 2 ]) + +aS = Parameter(name = 'aS', + nature = 'external', + type = 'real', + value = 0.1184, + texname = '\\alpha _s', + lhablock = 'SMINPUTS', + lhacode = [ 3 ]) + +ymdo = Parameter(name = 'ymdo', + nature = 'external', + type = 'real', + value = 0.00504, + texname = '\\text{ymdo}', + lhablock = 'YUKAWA', + lhacode = [ 1 ]) + +ymup = Parameter(name = 'ymup', + nature = 'external', + type = 'real', + value = 0.00255, + texname = '\\text{ymup}', + lhablock = 'YUKAWA', + lhacode = [ 2 ]) + +yms = Parameter(name = 'yms', + nature = 'external', + type = 'real', + value = 0.101, + texname = '\\text{yms}', + lhablock = 'YUKAWA', + lhacode = [ 3 ]) + +ymc = Parameter(name = 'ymc', + nature = 'external', + type = 'real', + value = 1.27, + texname = '\\text{ymc}', + lhablock = 'YUKAWA', + lhacode = [ 4 ]) + +ymb = Parameter(name = 'ymb', + nature = 'external', + type = 'real', + value = 4.7, + texname = '\\text{ymb}', + lhablock = 'YUKAWA', + lhacode = [ 5 ]) + +ymt = Parameter(name = 'ymt', + nature = 'external', + type = 'real', + value = 172, + texname = '\\text{ymt}', + lhablock = 'YUKAWA', + lhacode = [ 6 ]) + +yme = Parameter(name = 'yme', + nature = 'external', + type = 'real', + value = 0.000511, + texname = '\\text{yme}', + lhablock = 'YUKAWA', + lhacode = [ 11 ]) + +ymm = Parameter(name = 'ymm', + nature = 'external', + type = 'real', + value = 0.10566, + texname = '\\text{ymm}', + lhablock = 'YUKAWA', + lhacode = [ 13 ]) + +ymtau = Parameter(name = 'ymtau', + nature = 'external', + type = 'real', + value = 1.777, + texname = '\\text{ymtau}', + lhablock = 'YUKAWA', + lhacode = [ 15 ]) + +MZ = Parameter(name = 'MZ', + nature = 'external', + type = 'real', + value = 91.1876, + texname = '\\text{MZ}', + lhablock = 'MASS', + lhacode = [ 23 ]) + +Me = Parameter(name = 'Me', + nature = 'external', + type = 'real', + value = 0.000511, + texname = '\\text{Me}', + lhablock = 'MASS', + lhacode = [ 11 ]) + +MMU = Parameter(name = 'MMU', + nature = 'external', + type = 'real', + value = 0.10566, + texname = '\\text{MMU}', + lhablock = 'MASS', + lhacode = [ 13 ]) + +MTA = Parameter(name = 'MTA', + nature = 'external', + type = 'real', + value = 1.777, + texname = '\\text{MTA}', + lhablock = 'MASS', + lhacode = [ 15 ]) + +MU = Parameter(name = 'MU', + nature = 'external', + type = 'real', + value = 0.00255, + texname = 'M', + lhablock = 'MASS', + lhacode = [ 2 ]) + +MC = Parameter(name = 'MC', + nature = 'external', + type = 'real', + value = 1.27, + texname = '\\text{MC}', + lhablock = 'MASS', + lhacode = [ 4 ]) + +MT = Parameter(name = 'MT', + nature = 'external', + type = 'real', + value = 172, + texname = '\\text{MT}', + lhablock = 'MASS', + lhacode = [ 6 ]) + +MD = Parameter(name = 'MD', + nature = 'external', + type = 'real', + value = 0.00504, + texname = '\\text{MD}', + lhablock = 'MASS', + lhacode = [ 1 ]) + +MS = Parameter(name = 'MS', + nature = 'external', + type = 'real', + value = 0.101, + texname = '\\text{MS}', + lhablock = 'MASS', + lhacode = [ 3 ]) + +MB = Parameter(name = 'MB', + nature = 'external', + type = 'real', + value = 4.7, + texname = '\\text{MB}', + lhablock = 'MASS', + lhacode = [ 5 ]) + +MH = Parameter(name = 'MH', + nature = 'external', + type = 'real', + value = 125, + texname = '\\text{MH}', + lhablock = 'MASS', + lhacode = [ 25 ]) + +Ma = Parameter(name = 'Ma', + nature = 'external', + type = 'real', + value = 1., + texname = '\\text{Ma}', + lhablock = 'MASS', + lhacode = [ 9000005 ]) + +WZ = Parameter(name = 'WZ', + nature = 'external', + type = 'real', + value = 2.4952, + texname = '\\text{WZ}', + lhablock = 'DECAY', + lhacode = [ 23 ]) + +WW = Parameter(name = 'WW', + nature = 'external', + type = 'real', + value = 2.085, + texname = '\\text{WW}', + lhablock = 'DECAY', + lhacode = [ 24 ]) + +WT = Parameter(name = 'WT', + nature = 'external', + type = 'real', + value = 1.50833649, + texname = '\\text{WT}', + lhablock = 'DECAY', + lhacode = [ 6 ]) + +WH = Parameter(name = 'WH', + nature = 'external', + type = 'real', + value = 0.00407, + texname = '\\text{WH}', + lhablock = 'DECAY', + lhacode = [ 25 ]) + +WALP = Parameter(name = 'WALP', + nature = 'external', + type = 'real', + value = 1, + texname = '\\text{WALP}', + lhablock = 'DECAY', + lhacode = [ 9000005 ]) + +aEW = Parameter(name = 'aEW', + nature = 'internal', + type = 'real', + value = '1/aEWM1', + texname = '\\alpha _{\\text{EW}}') + +G = Parameter(name = 'G', + nature = 'internal', + type = 'real', + value = '2*cmath.sqrt(aS)*cmath.sqrt(cmath.pi)', + texname = 'G') + +CKM1x1 = Parameter(name = 'CKM1x1', + nature = 'internal', + type = 'complex', + value = 'cmath.cos(cabi)', + texname = '\\text{CKM1x1}') + +CKM1x2 = Parameter(name = 'CKM1x2', + nature = 'internal', + type = 'complex', + value = 'cmath.sin(cabi)', + texname = '\\text{CKM1x2}') + +CKM1x3 = Parameter(name = 'CKM1x3', + nature = 'internal', + type = 'complex', + value = '0', + texname = '\\text{CKM1x3}') + +CKM2x1 = Parameter(name = 'CKM2x1', + nature = 'internal', + type = 'complex', + value = '-cmath.sin(cabi)', + texname = '\\text{CKM2x1}') + +CKM2x2 = Parameter(name = 'CKM2x2', + nature = 'internal', + type = 'complex', + value = 'cmath.cos(cabi)', + texname = '\\text{CKM2x2}') + +CKM2x3 = Parameter(name = 'CKM2x3', + nature = 'internal', + type = 'complex', + value = '0', + texname = '\\text{CKM2x3}') + +CKM3x1 = Parameter(name = 'CKM3x1', + nature = 'internal', + type = 'complex', + value = '0', + texname = '\\text{CKM3x1}') + +CKM3x2 = Parameter(name = 'CKM3x2', + nature = 'internal', + type = 'complex', + value = '0', + texname = '\\text{CKM3x2}') + +CKM3x3 = Parameter(name = 'CKM3x3', + nature = 'internal', + type = 'complex', + value = '1', + texname = '\\text{CKM3x3}') + +MW = Parameter(name = 'MW', + nature = 'internal', + type = 'real', + value = 'cmath.sqrt(MZ**2/2. + cmath.sqrt(MZ**4/4. - (aEW*cmath.pi*MZ**2)/(Gf*cmath.sqrt(2))))', + texname = 'M_W') + +ee = Parameter(name = 'ee', + nature = 'internal', + type = 'real', + value = '2*cmath.sqrt(aEW)*cmath.sqrt(cmath.pi)', + texname = 'e') + +sw2 = Parameter(name = 'sw2', + nature = 'internal', + type = 'real', + value = '1 - MW**2/MZ**2', + texname = '\\text{sw2}') + +cw = Parameter(name = 'cw', + nature = 'internal', + type = 'real', + value = 'cmath.sqrt(1 - sw2)', + texname = 'c_w') + +sw = Parameter(name = 'sw', + nature = 'internal', + type = 'real', + value = 'cmath.sqrt(sw2)', + texname = 's_w') + +g1 = Parameter(name = 'g1', + nature = 'internal', + type = 'real', + value = 'ee/cw', + texname = 'g_1') + +gw = Parameter(name = 'gw', + nature = 'internal', + type = 'real', + value = 'ee/sw', + texname = 'g_w') + +vev = Parameter(name = 'vev', + nature = 'internal', + type = 'real', + value = '(2*MW*sw)/ee', + texname = '\\text{vev}') + +lam = Parameter(name = 'lam', + nature = 'internal', + type = 'real', + value = 'MH**2/(2.*vev**2)', + texname = '\\text{lam}') + +yb = Parameter(name = 'yb', + nature = 'internal', + type = 'real', + value = '(ymb*cmath.sqrt(2))/vev', + texname = '\\text{yb}') + +yc = Parameter(name = 'yc', + nature = 'internal', + type = 'real', + value = '(ymc*cmath.sqrt(2))/vev', + texname = '\\text{yc}') + +ydo = Parameter(name = 'ydo', + nature = 'internal', + type = 'real', + value = '(ymdo*cmath.sqrt(2))/vev', + texname = '\\text{ydo}') + +ye = Parameter(name = 'ye', + nature = 'internal', + type = 'real', + value = '(yme*cmath.sqrt(2))/vev', + texname = '\\text{ye}') + +ym = Parameter(name = 'ym', + nature = 'internal', + type = 'real', + value = '(ymm*cmath.sqrt(2))/vev', + texname = '\\text{ym}') + +ys = Parameter(name = 'ys', + nature = 'internal', + type = 'real', + value = '(yms*cmath.sqrt(2))/vev', + texname = '\\text{ys}') + +yt = Parameter(name = 'yt', + nature = 'internal', + type = 'real', + value = '(ymt*cmath.sqrt(2))/vev', + texname = '\\text{yt}') + +ytau = Parameter(name = 'ytau', + nature = 'internal', + type = 'real', + value = '(ymtau*cmath.sqrt(2))/vev', + texname = '\\text{ytau}') + +yup = Parameter(name = 'yup', + nature = 'internal', + type = 'real', + value = '(ymup*cmath.sqrt(2))/vev', + texname = '\\text{yup}') + +muH = Parameter(name = 'muH', + nature = 'internal', + type = 'real', + value = 'cmath.sqrt(lam*vev**2)', + texname = '\\mu') + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/particles.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/particles.py new file mode 100644 index 0000000000..62aafd1fb7 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/particles.py @@ -0,0 +1,401 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:42 + + +from __future__ import division +from object_library import all_particles, Particle +import parameters as Param + +import propagators as Prop + +a = Particle(pdg_code = 22, + name = 'a', + antiname = 'a', + spin = 3, + color = 1, + mass = Param.ZERO, + width = Param.ZERO, + texname = 'a', + antitexname = 'a', + charge = 0, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +Z = Particle(pdg_code = 23, + name = 'Z', + antiname = 'Z', + spin = 3, + color = 1, + mass = Param.MZ, + width = Param.WZ, + texname = 'Z', + antitexname = 'Z', + charge = 0, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +W__plus__ = Particle(pdg_code = 24, + name = 'W+', + antiname = 'W-', + spin = 3, + color = 1, + mass = Param.MW, + width = Param.WW, + texname = 'W+', + antitexname = 'W-', + charge = 1, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +W__minus__ = W__plus__.anti() + +g = Particle(pdg_code = 21, + name = 'g', + antiname = 'g', + spin = 3, + color = 8, + mass = Param.ZERO, + width = Param.ZERO, + texname = 'g', + antitexname = 'g', + charge = 0, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +ghA = Particle(pdg_code = 9000001, + name = 'ghA', + antiname = 'ghA~', + spin = -1, + color = 1, + mass = Param.ZERO, + width = Param.ZERO, + texname = 'ghA', + antitexname = 'ghA~', + charge = 0, + GhostNumber = 1, + LeptonNumber = 0, + Y = 0) + +ghA__tilde__ = ghA.anti() + +ghZ = Particle(pdg_code = 9000002, + name = 'ghZ', + antiname = 'ghZ~', + spin = -1, + color = 1, + mass = Param.MZ, + width = Param.WZ, + texname = 'ghZ', + antitexname = 'ghZ~', + charge = 0, + GhostNumber = 1, + LeptonNumber = 0, + Y = 0) + +ghZ__tilde__ = ghZ.anti() + +ghWp = Particle(pdg_code = 9000003, + name = 'ghWp', + antiname = 'ghWp~', + spin = -1, + color = 1, + mass = Param.MW, + width = Param.WW, + texname = 'ghWp', + antitexname = 'ghWp~', + charge = 1, + GhostNumber = 1, + LeptonNumber = 0, + Y = 0) + +ghWp__tilde__ = ghWp.anti() + +ghWm = Particle(pdg_code = 9000004, + name = 'ghWm', + antiname = 'ghWm~', + spin = -1, + color = 1, + mass = Param.MW, + width = Param.WW, + texname = 'ghWm', + antitexname = 'ghWm~', + charge = -1, + GhostNumber = 1, + LeptonNumber = 0, + Y = 0) + +ghWm__tilde__ = ghWm.anti() + +ghG = Particle(pdg_code = 82, + name = 'ghG', + antiname = 'ghG~', + spin = -1, + color = 8, + mass = Param.ZERO, + width = Param.ZERO, + texname = 'ghG', + antitexname = 'ghG~', + charge = 0, + GhostNumber = 1, + LeptonNumber = 0, + Y = 0) + +ghG__tilde__ = ghG.anti() + +ve = Particle(pdg_code = 12, + name = 've', + antiname = 've~', + spin = 2, + color = 1, + mass = Param.ZERO, + width = Param.ZERO, + texname = 've', + antitexname = 've~', + charge = 0, + GhostNumber = 0, + LeptonNumber = 1, + Y = 0) + +ve__tilde__ = ve.anti() + +vm = Particle(pdg_code = 14, + name = 'vm', + antiname = 'vm~', + spin = 2, + color = 1, + mass = Param.ZERO, + width = Param.ZERO, + texname = 'vm', + antitexname = 'vm~', + charge = 0, + GhostNumber = 0, + LeptonNumber = 1, + Y = 0) + +vm__tilde__ = vm.anti() + +vt = Particle(pdg_code = 16, + name = 'vt', + antiname = 'vt~', + spin = 2, + color = 1, + mass = Param.ZERO, + width = Param.ZERO, + texname = 'vt', + antitexname = 'vt~', + charge = 0, + GhostNumber = 0, + LeptonNumber = 1, + Y = 0) + +vt__tilde__ = vt.anti() + +e__minus__ = Particle(pdg_code = 11, + name = 'e-', + antiname = 'e+', + spin = 2, + color = 1, + mass = Param.Me, + width = Param.ZERO, + texname = 'e-', + antitexname = 'e+', + charge = -1, + GhostNumber = 0, + LeptonNumber = 1, + Y = 0) + +e__plus__ = e__minus__.anti() + +mu__minus__ = Particle(pdg_code = 13, + name = 'mu-', + antiname = 'mu+', + spin = 2, + color = 1, + mass = Param.MMU, + width = Param.ZERO, + texname = 'mu-', + antitexname = 'mu+', + charge = -1, + GhostNumber = 0, + LeptonNumber = 1, + Y = 0) + +mu__plus__ = mu__minus__.anti() + +ta__minus__ = Particle(pdg_code = 15, + name = 'ta-', + antiname = 'ta+', + spin = 2, + color = 1, + mass = Param.MTA, + width = Param.ZERO, + texname = 'ta-', + antitexname = 'ta+', + charge = -1, + GhostNumber = 0, + LeptonNumber = 1, + Y = 0) + +ta__plus__ = ta__minus__.anti() + +u = Particle(pdg_code = 2, + name = 'u', + antiname = 'u~', + spin = 2, + color = 3, + mass = Param.MU, + width = Param.ZERO, + texname = 'u', + antitexname = 'u~', + charge = 2/3, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +u__tilde__ = u.anti() + +c = Particle(pdg_code = 4, + name = 'c', + antiname = 'c~', + spin = 2, + color = 3, + mass = Param.MC, + width = Param.ZERO, + texname = 'c', + antitexname = 'c~', + charge = 2/3, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +c__tilde__ = c.anti() + +t = Particle(pdg_code = 6, + name = 't', + antiname = 't~', + spin = 2, + color = 3, + mass = Param.MT, + width = Param.WT, + texname = 't', + antitexname = 't~', + charge = 2/3, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +t__tilde__ = t.anti() + +d = Particle(pdg_code = 1, + name = 'd', + antiname = 'd~', + spin = 2, + color = 3, + mass = Param.MD, + width = Param.ZERO, + texname = 'd', + antitexname = 'd~', + charge = -1/3, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +d__tilde__ = d.anti() + +s = Particle(pdg_code = 3, + name = 's', + antiname = 's~', + spin = 2, + color = 3, + mass = Param.MS, + width = Param.ZERO, + texname = 's', + antitexname = 's~', + charge = -1/3, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +s__tilde__ = s.anti() + +b = Particle(pdg_code = 5, + name = 'b', + antiname = 'b~', + spin = 2, + color = 3, + mass = Param.MB, + width = Param.ZERO, + texname = 'b', + antitexname = 'b~', + charge = -1/3, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +b__tilde__ = b.anti() + +H = Particle(pdg_code = 25, + name = 'H', + antiname = 'H', + spin = 1, + color = 1, + mass = Param.MH, + width = Param.WH, + texname = 'H', + antitexname = 'H', + charge = 0, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +G0 = Particle(pdg_code = 250, + name = 'G0', + antiname = 'G0', + spin = 1, + color = 1, + mass = Param.MZ, + width = Param.WZ, + texname = 'G0', + antitexname = 'G0', + goldstone = True, + charge = 0, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +G__plus__ = Particle(pdg_code = 251, + name = 'G+', + antiname = 'G-', + spin = 1, + color = 1, + mass = Param.MW, + width = Param.WW, + texname = 'G+', + antitexname = 'G-', + goldstone = True, + charge = 1, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + +G__minus__ = G__plus__.anti() + +ALP = Particle(pdg_code = 9000005, + name = 'ALP', + antiname = 'ALP', + spin = 1, + color = 1, + mass = Param.Ma, + width = Param.WALP, + texname = 'ALP', + antitexname = 'ALP', + charge = 0, + GhostNumber = 0, + LeptonNumber = 0, + Y = 0) + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/propagators.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/propagators.py new file mode 100644 index 0000000000..afd2520e65 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/propagators.py @@ -0,0 +1,35 @@ +# This file was automatically created by FeynRules 2.0 (static file) +# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (November 6, 2010) +# Date: Mon 1 Oct 2012 14:58:26 + +from object_library import all_propagators, Propagator + + +# define only once the denominator since this is always the same +denominator = "P('mu', id) * P('mu', id) - Mass(id) * Mass(id) + complex(0,1) * Mass(id) * Width(id)" + +# propagator for the scalar +S = Propagator(name = "S", + numerator = "complex(0,1)", + denominator = denominator + ) + +# propagator for the incoming fermion # the one for the outcomming is computed on the flight +F = Propagator(name = "F", + numerator = "complex(0,1) * (Gamma('mu', 1, 2) * P('mu', id) + Mass(id) * Identity(1, 2))", + denominator = denominator + ) + +# massive vector in the unitary gauge, can't be use for massless particles +V1 = Propagator(name = "V1", + numerator = "complex(0,1) * (-1 * Metric(1, 2) + Metric(1,'mu')* P('mu', id) * P(2, id) / Mass(id)**2)", + denominator = denominator + ) + +# massless vector and massive vector in unitary gauge +V2 = Propagator(name = "V2", + numerator = "complex(0,-1) * Metric(1, 2)", + denominator = "P('mu', id) * P('mu', id)" + ) + + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/vertices.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/vertices.py new file mode 100644 index 0000000000..99d50be220 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/vertices.py @@ -0,0 +1,581 @@ +# This file was automatically created by FeynRules 2.3.43 +# Mathematica version: 12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020) +# Date: Mon 19 Apr 2021 15:23:42 + + +from object_library import all_vertices, Vertex +import particles as P +import couplings as C +import lorentz as L + + +V_1 = Vertex(name = 'V_1', + particles = [ P.H, P.H, P.H, P.H ], + color = [ '1' ], + lorentz = [ L.SSSS1 ], + couplings = {(0,0):C.GC_18}) + +V_2 = Vertex(name = 'V_2', + particles = [ P.H, P.H, P.H ], + color = [ '1' ], + lorentz = [ L.SSS1 ], + couplings = {(0,0):C.GC_52}) + +V_3 = Vertex(name = 'V_3', + particles = [ P.ALP, P.ALP, P.H, P.H ], + color = [ '1' ], + lorentz = [ L.SSSS2 ], + couplings = {(0,0):C.GC_6}) + +V_4 = Vertex(name = 'V_4', + particles = [ P.ALP, P.ALP, P.H ], + color = [ '1' ], + lorentz = [ L.SSS2 ], + couplings = {(0,0):C.GC_51}) + +V_5 = Vertex(name = 'V_5', + particles = [ P.a, P.a, P.ALP ], + color = [ '1' ], + lorentz = [ L.VVS2 ], + couplings = {(0,0):C.GC_19}) + +V_6 = Vertex(name = 'V_6', + particles = [ P.a, P.Z, P.ALP ], + color = [ '1' ], + lorentz = [ L.VVS2 ], + couplings = {(0,0):C.GC_48}) + +V_7 = Vertex(name = 'V_7', + particles = [ P.Z, P.Z, P.ALP ], + color = [ '1' ], + lorentz = [ L.VVS2 ], + couplings = {(0,0):C.GC_50}) + +V_8 = Vertex(name = 'V_8', + particles = [ P.W__minus__, P.W__plus__, P.ALP ], + color = [ '1' ], + lorentz = [ L.VVS2 ], + couplings = {(0,0):C.GC_26}) + +V_9 = Vertex(name = 'V_9', + particles = [ P.g, P.g, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.VVS1 ], + couplings = {(0,0):C.GC_20}) + +V_10 = Vertex(name = 'V_10', + particles = [ P.ghG, P.ghG__tilde__, P.g ], + color = [ 'f(1,2,3)' ], + lorentz = [ L.UUV1 ], + couplings = {(0,0):C.GC_15}) + +V_11 = Vertex(name = 'V_11', + particles = [ P.g, P.g, P.g ], + color = [ 'f(1,2,3)' ], + lorentz = [ L.VVV1 ], + couplings = {(0,0):C.GC_15}) + +V_12 = Vertex(name = 'V_12', + particles = [ P.g, P.g, P.g, P.g ], + color = [ 'f(-1,1,2)*f(3,4,-1)', 'f(-1,1,3)*f(2,4,-1)', 'f(-1,1,4)*f(2,3,-1)' ], + lorentz = [ L.VVVV1, L.VVVV3, L.VVVV4 ], + couplings = {(1,1):C.GC_17,(0,0):C.GC_17,(2,2):C.GC_17}) + +V_13 = Vertex(name = 'V_13', + particles = [ P.g, P.g, P.g, P.ALP ], + color = [ 'f(1,2,3)' ], + lorentz = [ L.VVVS2 ], + couplings = {(0,0):C.GC_21}) + +V_14 = Vertex(name = 'V_14', + particles = [ P.b__tilde__, P.b, P.H ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_56}) + +V_15 = Vertex(name = 'V_15', + particles = [ P.d__tilde__, P.d, P.H ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_58}) + +V_16 = Vertex(name = 'V_16', + particles = [ P.s__tilde__, P.s, P.H ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_61}) + +V_17 = Vertex(name = 'V_17', + particles = [ P.e__plus__, P.e__minus__, P.H ], + color = [ '1' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_59}) + +V_18 = Vertex(name = 'V_18', + particles = [ P.mu__plus__, P.mu__minus__, P.H ], + color = [ '1' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_60}) + +V_19 = Vertex(name = 'V_19', + particles = [ P.ta__plus__, P.ta__minus__, P.H ], + color = [ '1' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_63}) + +V_20 = Vertex(name = 'V_20', + particles = [ P.c__tilde__, P.c, P.H ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_57}) + +V_21 = Vertex(name = 'V_21', + particles = [ P.t__tilde__, P.t, P.H ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_62}) + +V_22 = Vertex(name = 'V_22', + particles = [ P.u__tilde__, P.u, P.H ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS2 ], + couplings = {(0,0):C.GC_64}) + +V_23 = Vertex(name = 'V_23', + particles = [ P.a, P.W__minus__, P.W__plus__ ], + color = [ '1' ], + lorentz = [ L.VVV1 ], + couplings = {(0,0):C.GC_4}) + +V_24 = Vertex(name = 'V_24', + particles = [ P.a, P.W__minus__, P.W__plus__, P.ALP ], + color = [ '1' ], + lorentz = [ L.VVVS1 ], + couplings = {(0,0):C.GC_27}) + +V_25 = Vertex(name = 'V_25', + particles = [ P.W__minus__, P.W__plus__, P.H, P.H ], + color = [ '1' ], + lorentz = [ L.VVSS1 ], + couplings = {(0,0):C.GC_23}) + +V_26 = Vertex(name = 'V_26', + particles = [ P.W__minus__, P.W__plus__, P.H ], + color = [ '1' ], + lorentz = [ L.VVS3 ], + couplings = {(0,0):C.GC_53}) + +V_27 = Vertex(name = 'V_27', + particles = [ P.a, P.a, P.W__minus__, P.W__plus__ ], + color = [ '1' ], + lorentz = [ L.VVVV2 ], + couplings = {(0,0):C.GC_5}) + +V_28 = Vertex(name = 'V_28', + particles = [ P.W__minus__, P.W__plus__, P.Z ], + color = [ '1' ], + lorentz = [ L.VVV1 ], + couplings = {(0,0):C.GC_38}) + +V_29 = Vertex(name = 'V_29', + particles = [ P.W__minus__, P.W__plus__, P.Z, P.ALP ], + color = [ '1' ], + lorentz = [ L.VVVS1 ], + couplings = {(0,0):C.GC_22}) + +V_30 = Vertex(name = 'V_30', + particles = [ P.W__minus__, P.W__minus__, P.W__plus__, P.W__plus__ ], + color = [ '1' ], + lorentz = [ L.VVVV2 ], + couplings = {(0,0):C.GC_24}) + +V_31 = Vertex(name = 'V_31', + particles = [ P.Z, P.ALP, P.H, P.H ], + color = [ '1' ], + lorentz = [ L.VSSS1 ], + couplings = {(0,0):C.GC_47}) + +V_32 = Vertex(name = 'V_32', + particles = [ P.Z, P.ALP, P.H ], + color = [ '1' ], + lorentz = [ L.VSS1 ], + couplings = {(0,0):C.GC_54}) + +V_33 = Vertex(name = 'V_33', + particles = [ P.a, P.W__minus__, P.W__plus__, P.Z ], + color = [ '1' ], + lorentz = [ L.VVVV5 ], + couplings = {(0,0):C.GC_39}) + +V_34 = Vertex(name = 'V_34', + particles = [ P.Z, P.Z, P.H, P.H ], + color = [ '1' ], + lorentz = [ L.VVSS1 ], + couplings = {(0,0):C.GC_49}) + +V_35 = Vertex(name = 'V_35', + particles = [ P.Z, P.Z, P.H ], + color = [ '1' ], + lorentz = [ L.VVS3 ], + couplings = {(0,0):C.GC_55}) + +V_36 = Vertex(name = 'V_36', + particles = [ P.W__minus__, P.W__plus__, P.Z, P.Z ], + color = [ '1' ], + lorentz = [ L.VVVV2 ], + couplings = {(0,0):C.GC_25}) + +V_37 = Vertex(name = 'V_37', + particles = [ P.e__plus__, P.e__minus__, P.a ], + color = [ '1' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_3}) + +V_38 = Vertex(name = 'V_38', + particles = [ P.mu__plus__, P.mu__minus__, P.a ], + color = [ '1' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_3}) + +V_39 = Vertex(name = 'V_39', + particles = [ P.ta__plus__, P.ta__minus__, P.a ], + color = [ '1' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_3}) + +V_40 = Vertex(name = 'V_40', + particles = [ P.c__tilde__, P.c, P.a ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_2}) + +V_41 = Vertex(name = 'V_41', + particles = [ P.t__tilde__, P.t, P.a ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_2}) + +V_42 = Vertex(name = 'V_42', + particles = [ P.u__tilde__, P.u, P.a ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_2}) + +V_43 = Vertex(name = 'V_43', + particles = [ P.b__tilde__, P.b, P.a ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_1}) + +V_44 = Vertex(name = 'V_44', + particles = [ P.d__tilde__, P.d, P.a ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_1}) + +V_45 = Vertex(name = 'V_45', + particles = [ P.s__tilde__, P.s, P.a ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_1}) + +V_46 = Vertex(name = 'V_46', + particles = [ P.c__tilde__, P.c, P.g ], + color = [ 'T(3,2,1)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_16}) + +V_47 = Vertex(name = 'V_47', + particles = [ P.t__tilde__, P.t, P.g ], + color = [ 'T(3,2,1)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_16}) + +V_48 = Vertex(name = 'V_48', + particles = [ P.u__tilde__, P.u, P.g ], + color = [ 'T(3,2,1)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_16}) + +V_49 = Vertex(name = 'V_49', + particles = [ P.b__tilde__, P.b, P.g ], + color = [ 'T(3,2,1)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_16}) + +V_50 = Vertex(name = 'V_50', + particles = [ P.d__tilde__, P.d, P.g ], + color = [ 'T(3,2,1)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_16}) + +V_51 = Vertex(name = 'V_51', + particles = [ P.s__tilde__, P.s, P.g ], + color = [ 'T(3,2,1)' ], + lorentz = [ L.FFV1 ], + couplings = {(0,0):C.GC_16}) + +V_52 = Vertex(name = 'V_52', + particles = [ P.b__tilde__, P.c, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_34}) + +V_53 = Vertex(name = 'V_53', + particles = [ P.d__tilde__, P.c, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_32}) + +V_54 = Vertex(name = 'V_54', + particles = [ P.s__tilde__, P.c, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_33}) + +V_55 = Vertex(name = 'V_55', + particles = [ P.b__tilde__, P.t, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_37}) + +V_56 = Vertex(name = 'V_56', + particles = [ P.d__tilde__, P.t, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_35}) + +V_57 = Vertex(name = 'V_57', + particles = [ P.s__tilde__, P.t, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_36}) + +V_58 = Vertex(name = 'V_58', + particles = [ P.b__tilde__, P.u, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_31}) + +V_59 = Vertex(name = 'V_59', + particles = [ P.d__tilde__, P.u, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_29}) + +V_60 = Vertex(name = 'V_60', + particles = [ P.s__tilde__, P.u, P.W__minus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_30}) + +V_61 = Vertex(name = 'V_61', + particles = [ P.c__tilde__, P.b, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_70}) + +V_62 = Vertex(name = 'V_62', + particles = [ P.t__tilde__, P.b, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_73}) + +V_63 = Vertex(name = 'V_63', + particles = [ P.u__tilde__, P.b, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_67}) + +V_64 = Vertex(name = 'V_64', + particles = [ P.c__tilde__, P.d, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_68}) + +V_65 = Vertex(name = 'V_65', + particles = [ P.t__tilde__, P.d, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_71}) + +V_66 = Vertex(name = 'V_66', + particles = [ P.u__tilde__, P.d, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_65}) + +V_67 = Vertex(name = 'V_67', + particles = [ P.c__tilde__, P.s, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_69}) + +V_68 = Vertex(name = 'V_68', + particles = [ P.t__tilde__, P.s, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_72}) + +V_69 = Vertex(name = 'V_69', + particles = [ P.u__tilde__, P.s, P.W__plus__ ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_66}) + +V_70 = Vertex(name = 'V_70', + particles = [ P.e__plus__, P.ve, P.W__minus__ ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_28}) + +V_71 = Vertex(name = 'V_71', + particles = [ P.mu__plus__, P.vm, P.W__minus__ ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_28}) + +V_72 = Vertex(name = 'V_72', + particles = [ P.ta__plus__, P.vt, P.W__minus__ ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_28}) + +V_73 = Vertex(name = 'V_73', + particles = [ P.ve__tilde__, P.e__minus__, P.W__plus__ ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_28}) + +V_74 = Vertex(name = 'V_74', + particles = [ P.vm__tilde__, P.mu__minus__, P.W__plus__ ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_28}) + +V_75 = Vertex(name = 'V_75', + particles = [ P.vt__tilde__, P.ta__minus__, P.W__plus__ ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_28}) + +V_76 = Vertex(name = 'V_76', + particles = [ P.c__tilde__, P.c, P.Z ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_44,(0,1):C.GC_41}) + +V_77 = Vertex(name = 'V_77', + particles = [ P.t__tilde__, P.t, P.Z ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_44,(0,1):C.GC_41}) + +V_78 = Vertex(name = 'V_78', + particles = [ P.u__tilde__, P.u, P.Z ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_44,(0,1):C.GC_41}) + +V_79 = Vertex(name = 'V_79', + particles = [ P.b__tilde__, P.b, P.Z ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_43,(0,1):C.GC_40}) + +V_80 = Vertex(name = 'V_80', + particles = [ P.d__tilde__, P.d, P.Z ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_43,(0,1):C.GC_40}) + +V_81 = Vertex(name = 'V_81', + particles = [ P.s__tilde__, P.s, P.Z ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_43,(0,1):C.GC_40}) + +V_82 = Vertex(name = 'V_82', + particles = [ P.ve__tilde__, P.ve, P.Z ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_46}) + +V_83 = Vertex(name = 'V_83', + particles = [ P.vm__tilde__, P.vm, P.Z ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_46}) + +V_84 = Vertex(name = 'V_84', + particles = [ P.vt__tilde__, P.vt, P.Z ], + color = [ '1' ], + lorentz = [ L.FFV2 ], + couplings = {(0,0):C.GC_46}) + +V_85 = Vertex(name = 'V_85', + particles = [ P.e__plus__, P.e__minus__, P.Z ], + color = [ '1' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_45,(0,1):C.GC_42}) + +V_86 = Vertex(name = 'V_86', + particles = [ P.mu__plus__, P.mu__minus__, P.Z ], + color = [ '1' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_45,(0,1):C.GC_42}) + +V_87 = Vertex(name = 'V_87', + particles = [ P.ta__plus__, P.ta__minus__, P.Z ], + color = [ '1' ], + lorentz = [ L.FFV2, L.FFV3 ], + couplings = {(0,0):C.GC_45,(0,1):C.GC_42}) + +V_88 = Vertex(name = 'V_88', + particles = [ P.b__tilde__, P.b, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_7}) + +V_89 = Vertex(name = 'V_89', + particles = [ P.c__tilde__, P.c, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_8}) + +V_90 = Vertex(name = 'V_90', + particles = [ P.d__tilde__, P.d, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_9}) + +V_91 = Vertex(name = 'V_91', + particles = [ P.e__plus__, P.e__minus__, P.ALP ], + color = [ '1' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_10}) + +V_92 = Vertex(name = 'V_92', + particles = [ P.mu__plus__, P.mu__minus__, P.ALP ], + color = [ '1' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_11}) + +V_93 = Vertex(name = 'V_93', + particles = [ P.s__tilde__, P.s, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_12}) + +V_94 = Vertex(name = 'V_94', + particles = [ P.t__tilde__, P.t, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_13}) + +V_95 = Vertex(name = 'V_95', + particles = [ P.u__tilde__, P.u, P.ALP ], + color = [ 'Identity(1,2)' ], + lorentz = [ L.FFS1 ], + couplings = {(0,0):C.GC_14}) + diff --git a/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/write_param_card.py b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/write_param_card.py new file mode 100644 index 0000000000..72781aa14c --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALP_NLO_UFO/write_param_card.py @@ -0,0 +1,180 @@ + +__date__ = "6 March 2020" +__author__ = 'olivier.mattelaer@uclouvain.be' + + +class ParamCardWriter(object): + + header = \ + """######################################################################\n""" + \ + """## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################\n""" + \ + """######################################################################\n""" + + def __init__(self, filename, list_of_parameters=None, generic=False): + """write a valid param_card.dat""" + + if not list_of_parameters: + from parameters import all_parameters + list_of_parameters = [param for param in all_parameters if \ + param.nature=='external'] + + self.generic_output = generic + if generic: + self.define_not_dep_param(list_of_parameters) + + + self.fsock = open(filename, 'w') + self.fsock.write(self.header) + + self.write_card(list_of_parameters) + + def define_not_dep_param(self, list_of_parameters): + """define self.dep_mass and self.dep_width in case that they are + requested in the param_card.dat""" + from particles import all_particles + + self.dep_mass = [(part, part.mass) for part in all_particles \ + if part.pdg_code > 0 and \ + part.mass not in list_of_parameters] + self.dep_width = [(part, part.width) for part in all_particles\ + if part.pdg_code > 0 and \ + part.width not in list_of_parameters] + + @staticmethod + def order_param(obj1, obj2): + """ order parameter of a given block """ + + maxlen = min([len(obj1.lhacode), len(obj2.lhacode)]) + + for i in range(maxlen): + if obj1.lhacode[i] < obj2.lhacode[i]: + return -1 + elif obj1.lhacode[i] == obj2.lhacode[i]: + return 0 + else: + return 1 + #identical up to the first finish + if len(obj1.lhacode) > len(obj2.lhacode): + return 1 + elif len(obj1.lhacode) == len(obj2.lhacode): + return 0 + else: + return -1 + + def write_card(self, all_ext_param): + """ """ + + # list all lhablock + all_lhablock = set([param.lhablock for param in all_ext_param]) + + # ordonate lhablock alphabeticaly + all_lhablock = list(all_lhablock) + all_lhablock.sort() + # put at the beginning SMINPUT + MASS + DECAY + for name in ['DECAY', 'MASS','SMINPUTS']: + if name in all_lhablock: + all_lhablock.remove(name) + all_lhablock.insert(0, name) + + for lhablock in all_lhablock: + self.write_block(lhablock) + need_writing = [ param for param in all_ext_param if \ + param.lhablock == lhablock] + from functools import cmp_to_key + need_writing.sort(key=cmp_to_key(self.order_param)) + [self.write_param(param, lhablock) for param in need_writing] + + if self.generic_output: + if lhablock in ['MASS', 'DECAY']: + self.write_dep_param_block(lhablock) + + if self.generic_output: + self.write_qnumber() + + def write_block(self, name): + """ write a comment for a block""" + + self.fsock.writelines( + """\n###################################""" + \ + """\n## INFORMATION FOR %s""" % name.upper() +\ + """\n###################################\n""" + ) + if name!='DECAY': + self.fsock.write("""Block %s \n""" % name) + + def write_param(self, param, lhablock): + + lhacode=' '.join(['%3s' % key for key in param.lhacode]) + if lhablock != 'DECAY': + text = """ %s %e # %s \n""" % (lhacode, complex(param.value).real, param.name ) + else: + text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) + self.fsock.write(text) + + + + + def write_dep_param_block(self, lhablock): + import cmath + from parameters import all_parameters + for parameter in all_parameters: + exec("%s = %s" % (parameter.name, parameter.value)) + text = "## Not dependent paramater.\n" + text += "## Those values should be edited following analytical the \n" + text += "## analytical expression. Some generator could simply ignore \n" + text += "## those values and use the analytical expression\n" + + if lhablock == 'MASS': + data = self.dep_mass + prefix = " " + else: + data = self.dep_width + prefix = "DECAY " + for part, param in data: + if isinstance(param.value, str): + value = complex(eval(param.value)).real + else: + value = param.value + + text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + value, part.name, param.value) + self.fsock.write(text) + + sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] + data="""Block QNUMBERS %(pdg)d # %(name)s + 1 %(charge)d # 3 times electric charge + 2 %(spin)d # number of spin states (2S+1) + 3 %(color)d # colour rep (1: singlet, 3: triplet, 8: octet) + 4 %(antipart)d # Particle/Antiparticle distinction (0=own anti)\n""" + + def write_qnumber(self): + """ write qnumber """ + from particles import all_particles + + text="""#===========================================================\n""" + text += """# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)\n""" + text += """#===========================================================\n\n""" + + for part in all_particles: + if part.pdg_code in self.sm_pdg or part.pdg_code < 0: + continue + text += self.data % {'pdg': part.pdg_code, + 'name': part.name, + 'charge': 3 * part.charge, + 'spin': 2 * part.spin + 1, + 'color': part.color, + 'antipart': part.name != part.antiname and 1 or 0} + + self.fsock.write(text) + + + + + + + + +if '__main__' == __name__: + ParamCardWriter('./param_card.dat', generic=True) + print('write ./param_card.dat') + From 62908489a19ff1a757625c2e2bcf37f582d9e7d3 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 11:30:48 +0200 Subject: [PATCH 08/49] add ALP sample creation files --- .../ALPs/ALP_sample_creation/ALP_pythia.cmnd | 20 +++++ .../mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat | 78 +++++++++++++++++++ .../ALP_sample_creation/runPythiaDephies.sh | 6 ++ 3 files changed, 104 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd create mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat create mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd new file mode 100644 index 0000000000..878b55b426 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd @@ -0,0 +1,20 @@ +! File: ALP_pythia.cmd +Random:setSeed = on +Main:timesAllowErrors = 10 ! how many aborts before run stops +Main:numberOfEvents = 10000 ! number of events to generate + + +! 2) Settings related to output in init(), next() and stat(). +Next:numberCount = 100 ! print message every n events +!Beams:idA = 11 ! first beam, e+ = 11 +!Beams:idB = -11 ! second beam, e- = -11 + +Beams:frameType = 4 ! read info from a LHEF +! Change the LHE file here +Beams:LHEF = ALP_test.lhe + +! 3) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! initial-state radiation +PartonLevel:FSR = on ! final-state radiation + +LesHouches:setLifetime = 2 diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat new file mode 100644 index 0000000000..8e9c041903 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat @@ -0,0 +1,78 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.2.0 2021-08-22 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +set auto_convert_model T +import model sm +define p = g u c d s u~ c~ d~ s~ +define j = g u c d s u~ c~ d~ s~ +define l+ = e+ mu+ +define l- = e- mu- +define vl = ve vm vt +define vl~ = ve~ vm~ vt~ +import model ALP_NLO_UFO +generate e+ e- > Z, (Z > a ALP, (ALP > a a)) +output ALP_Z_aa_1GeV_cYY_0p5 +launch ALP_Z_aa_1GeV_cYY_0p5 +done +# set to electron beams (0 for ele, 1 for proton) +set lpp1 0 +set lpp2 0 +set ebeam1 45.594 +set ebeam2 45.594 +# set ALP mass +set Ma 1. +# set ALP couplings +set cWW = 0.0 +set CYY = 0.5 +set cGG = 0. +set cuu = 0. +set cdd = 0. +set ccc = 0. +set css = 0. +set ctt = 0. +set cbb = 0. +set cee = 0. +set cmumu = 0. +set ctautau = 0. +set cah = 0. +set cZh5 = 0. +# set supression scale in the effective operators coupling the ALP to SM particles +set falp = 1000 + +# set the decay width of the ALP to auto +set WALP auto +set time_of_flight 0 +set nevents 10000 +done diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh new file mode 100644 index 0000000000..476df1f598 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# quick command to run DelphesPythia8_EDM4HEP +# needs one input for the name of the output root-file + +DelphesPythia8_EDM4HEP ../../../../../../FCC-config/FCCee/Delphes/card_IDEA.tcl ../../../../../../FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl ALP_pythia.cmnd $1 \ No newline at end of file From 20ccc120de7a7e9c79e7a735fbdd71e48fece1e2 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 11:43:14 +0200 Subject: [PATCH 09/49] add HNL sample creation files --- .../HNL_sample_creation/HNL_pythia.cmd | 21 ++++++ .../HNL_sample_creation/Readme.md | 51 ++++++++++++++ ...mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat | 67 +++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/HNL_pythia.cmd create mode 100644 examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/Readme.md create mode 100644 examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/HNL_pythia.cmd b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/HNL_pythia.cmd new file mode 100644 index 0000000000..32f7bb8250 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/HNL_pythia.cmd @@ -0,0 +1,21 @@ +! File: HNL_pythia.cmd +Random:setSeed = on +Main:timesAllowErrors = 10 ! how many aborts before run stops +Main:numberOfEvents = 50000 ! number of events to generate + + +! 2) Settings related to output in init(), next() and stat(). +Next:numberCount = 100 ! print message every n events +!Beams:idA = 11 ! first beam, e+ = 11 +!Beams:idB = -11 ! second beam, e- = -11 + +Beams:frameType = 4 ! read info from a LHEF +! Change the LHE file here +Beams:LHEF = HNL_eenu_50GeV_1p41e-6Ve.lhe +! Beams:LHEF = HNL_ejj_50GeV_1p41e-6Ve.lhe + +! 3) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! initial-state radiation +PartonLevel:FSR = on ! final-state radiation + +LesHouches:setLifetime = 2 diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/Readme.md b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/Readme.md new file mode 100644 index 0000000000..3eba9be26d --- /dev/null +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/Readme.md @@ -0,0 +1,51 @@ +Author: Suchita Kulkarni +Contact: suchita.kulkarni@cern.ch +This folder will allow you to create your own madgraph sample for heavy neutral lepton decaying to e j j final state. + +To create a sample where the HNL decays to e e nu final state change the following lines in mg5_proc_card.dat + +generate e+ e- > ve n1, (n1 > e j j) +add process e+ e- > ve~ n1, (n1 > e j j) + +to + +generate e+ e- > ve n1, (n1 > e e nu) +add process e+ e- > ve~ n1, (n1 > e e nu) + +First create the LHE file. To do this, you'll need to download the latest version of madgraph (http://madgraph.phys.ucl.ac.be/) and make sure you're using python 3.7 or greater. For the Snowmass study, we're using MadGraph5 v3.2.0. Copy the Madgraph tarball to your local area on lxplus: + +``` +scp MG5_aMC_v3.2.0.tar.gz username@lxplus7.cern.ch:/afs_path/yadda_yadda/ +``` + +Then ssh to lxplus and unzip the tarball (tar -xf MG5_aMC_v3.2.0.tar.gz). If you're going to generate ALPs, copy the ALP_NLO_UFO/ directory into MG5_aMC_v3_2_0/models. + +Then you can do: + +``` +./bin/mg5_aMC mg5_proc_card.dat +``` +to create the LHE file, where mg5_proc_card.dat is the madgraph proc card you are interested in generating. + + +The resulting events will be stored in HNL_ljj/Events/run_01/unweighted_events.lhe.gz file. + +Unzip it (gunzip unweighted_events.lhe.gz) and give the path to HNL_pythia.cmnd file to generate the delphes root file. + +You also need to grab the latest official Delphes card and edm4hep tcl file: +``` +#cd to one directory up from FCCeePhysicsPerformance/ +git clone https://github.com/HEP-FCC/FCC-config.git +cd FCC-config/ +git checkout spring2021 +cd ../FCCeePhysicsPerformance/case-studies/BSM/LLP/DisplacedHNL/HNL_sample_creation/ +``` + +To create delphes root file you need to do the following on your command line: + +``` +source /cvmfs/fcc.cern.ch/sw/latest/setup.sh +DelphesPythia8_EDM4HEP ../../../../../../FCC-config/FCCee/Delphes/card_IDEA.tcl ../../../../../../FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl HNL_eenu_pythia.cmnd HNL_ejj.root +``` + +the resulting HNL_ejj.root is your EDM sample. diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat new file mode 100644 index 0000000000..8f6c5a4b6f --- /dev/null +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat @@ -0,0 +1,67 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 2.7.3 2020-06-21 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +# card is made by suchita Kulkarni +#contact suchita.kulkarni@cern.ch +set default_unset_couplings 99 +set group_subprocesses Auto +set ignore_six_quark_processes False +set loop_optimized_output True +set loop_color_flows False +set gauge unitary +set complex_mass_scheme False +set max_npoint_for_channel 0 +set auto_convert_model T +import model sm +define p = g u c d s u~ c~ d~ s~ +define j = g u c d s u~ c~ d~ s~ +define l+ = e+ mu+ +define l- = e- mu- +define vl = ve vm vt +define vl~ = ve~ vm~ vt~ +import model SM_HeavyN_CKM_AllMasses_LO +define e = e+ e- +define nue = ve ve~ +generate e+ e- > nue n1, (n1 > e e nue) +output HNL_eenu_50GeV_1p41e-6Ve +launch HNL_eenu_50GeV_1p41e-6Ve +done +# set to electron beams (0 for ele, 1 for proton) +set lpp1 0 +set lpp2 0 +set ebeam1 45.594 +set ebeam2 45.594 +set no_parton_cut +# Here I set mass of the electron HNL +set mn1 50 +# set mass of muon HNL, made heavy here +set mn2 10000 +# set mass of tau HNL, made heavy here +set mn3 10000 +# set electron mixing angle +set ven1 1.41e-6 +# this is important, set the decay width of HNL flavour of interest to auto +# if this is not done, lifetime calculations won'e be right +set WN1 auto +set time_of_flight 0 +set nevents 50000 +done From 57e18bd4fd77b0e75a818e38564f5f9d05d5b572 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 13:38:17 +0200 Subject: [PATCH 10/49] rename mg5 proc card to be clearer --- ...at => mg5_proc_card_HNL_Majorana_eenu_50GeV_1p41e-6Ve.dat} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/{mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat => mg5_proc_card_HNL_Majorana_eenu_50GeV_1p41e-6Ve.dat} (96%) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1p41e-6Ve.dat similarity index 96% rename from examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat rename to examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1p41e-6Ve.dat index 8f6c5a4b6f..2d1461d0b5 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1p41e-6Ve.dat @@ -42,8 +42,8 @@ import model SM_HeavyN_CKM_AllMasses_LO define e = e+ e- define nue = ve ve~ generate e+ e- > nue n1, (n1 > e e nue) -output HNL_eenu_50GeV_1p41e-6Ve -launch HNL_eenu_50GeV_1p41e-6Ve +output HNL_Majorana_eenu_50GeV_1p41e-6Ve +launch HNL_Majorana_eenu_50GeV_1p41e-6Ve done # set to electron beams (0 for ele, 1 for proton) set lpp1 0 From 1c5a043b48ea7b9092976937de2858d0842db7a8 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Thu, 17 Nov 2022 10:10:06 +0100 Subject: [PATCH 11/49] add HNL-->eenu mg5 proc card for validation --- ...oc_card_HNL_Majorana_eenu_50GeV_1e-5Ve.dat | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1e-5Ve.dat diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1e-5Ve.dat b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1e-5Ve.dat new file mode 100644 index 0000000000..63cbb8338e --- /dev/null +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_Majorana_eenu_50GeV_1e-5Ve.dat @@ -0,0 +1,67 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 2.7.3 2020-06-21 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +# card is made by suchita Kulkarni +#contact suchita.kulkarni@cern.ch +set default_unset_couplings 99 +set group_subprocesses Auto +set ignore_six_quark_processes False +set loop_optimized_output True +set loop_color_flows False +set gauge unitary +set complex_mass_scheme False +set max_npoint_for_channel 0 +set auto_convert_model T +import model sm +define p = g u c d s u~ c~ d~ s~ +define j = g u c d s u~ c~ d~ s~ +define l+ = e+ mu+ +define l- = e- mu- +define vl = ve vm vt +define vl~ = ve~ vm~ vt~ +import model SM_HeavyN_CKM_AllMasses_LO +define e = e+ e- +define nue = ve ve~ +generate e+ e- > nue n1, (n1 > e e nue) +output HNL_Majorana_eenu_50GeV_1e-5Ve +launch HNL_Majorana_eenu_50GeV_1e-5Ve +done +# set to electron beams (0 for ele, 1 for proton) +set lpp1 0 +set lpp2 0 +set ebeam1 45.594 +set ebeam2 45.594 +set no_parton_cut +# Here I set mass of the electron HNL +set mn1 50 +# set mass of muon HNL, made heavy here +set mn2 10000 +# set mass of tau HNL, made heavy here +set mn3 10000 +# set electron mixing angle +set ven1 1e-5 +# this is important, set the decay width of HNL flavour of interest to auto +# if this is not done, lifetime calculations won'e be right +set WN1 auto +set time_of_flight 0 +set nevents 50000 +done From 9ded366d4e933a030e1fe0ec908d4dd28f080a9f Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Wed, 23 Nov 2022 11:51:29 +0100 Subject: [PATCH 12/49] updates to run over winter 2023 test v2 samples --- .../bsm/LLPs/DisplacedHNL/analysis_final.py | 10 ++++-- .../bsm/LLPs/DisplacedHNL/analysis_plots.py | 36 +++++++++++++------ .../bsm/LLPs/DisplacedHNL/analysis_stage1.py | 8 +++-- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py index 1b9f08c174..75f2ab64e5 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_final.py @@ -1,10 +1,13 @@ #Input directory where the files produced at the stage1 level are -inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/output_stage1" +inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/spring2021/output_stage1/" +#inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/pre_winter2023_tests_v2/output_stage1/" #inputDir = "/eos/user/j/jalimena/FCCeeLLP/" #inputDir = "output_stage1/" #Output directory where the files produced at the final-selection level are -outputDir = "output_finalSel/" +outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/spring2021/output_finalSel/" +#outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/pre_winter2023_tests_v2/output_finalSel/" +#outputDir = "output_finalSel/" #Integrated luminosity for scaling number of events (required only if setting doScale to true) #intLumi = 150e6 #pb^-1 @@ -13,7 +16,7 @@ #doScale = True #Save event yields in a table (optional) -#saveTabular = True +saveTabular = True processList = { #run over the full statistics from stage1 @@ -185,6 +188,7 @@ "RecoElectronTrack_absZ0": {"name":"RecoElectronTrack_absZ0", "title":"Reco electron tracks |z_{0}| [mm]", "bin":100,"xmin":0, "xmax":2000}, "RecoElectronTrack_absZ0_prompt": {"name":"RecoElectronTrack_absZ0", "title":"Reco electron tracks |z_{0}| [mm]", "bin":100,"xmin":0, "xmax":1}, "RecoElectronTrack_absD0sig": {"name":"RecoElectronTrack_absD0sig", "title":"Reco electron tracks |d_{0} significance|", "bin":100,"xmin":0, "xmax":600000}, + "RecoElectronTrack_absD0sig_med": {"name":"RecoElectronTrack_absD0sig", "title":"Reco electron tracks |d_{0} significance|", "bin":100,"xmin":0, "xmax":1000}, "RecoElectronTrack_absD0sig_prompt": {"name":"RecoElectronTrack_absD0sig", "title":"Reco electron tracks |d_{0} significance|", "bin":100,"xmin":0, "xmax":5}, "RecoElectronTrack_absZ0sig": {"name":"RecoElectronTrack_absZ0sig", "title":"Reco electron tracks |z_{0} significance|", "bin":100,"xmin":0, "xmax":600000}, "RecoElectronTrack_absZ0sig_prompt": {"name":"RecoElectronTrack_absZ0sig", "title":"Reco electron tracks |z_{0} significance|", "bin":100,"xmin":0, "xmax":5}, diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py index b0dd01f911..4d0bd19f72 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py @@ -8,15 +8,19 @@ #scaleSig = 0. #scaleBack = 0. ana_tex = 'e^{+}e^{-} #rightarrow N #nu, N #rightarrow ee#nu' +#ana_tex = '' delphesVersion = '3.4.2' +#delphesVersion = '' energy = 91 collider = 'FCC-ee' inputDir = 'output_finalSel/' +#inputDir = 'output_finalSel_Ztautau/' #formats = ['png','pdf'] formats = ['pdf'] yaxis = ['lin','log'] stacksig = ['nostack'] outdir = 'plots/' +#outdir = 'plots_Ztautau_spring2021_vs_prewinter2023/' splitLeg = True variables = [ @@ -105,6 +109,7 @@ "RecoElectronTrack_absZ0", "RecoElectronTrack_absZ0_prompt", "RecoElectronTrack_absD0sig", + "RecoElectronTrack_absD0sig_med", "RecoElectronTrack_absD0sig_prompt", "RecoElectronTrack_absZ0sig", "RecoElectronTrack_absZ0sig_prompt", @@ -186,25 +191,31 @@ colors['eenu_70GeV_1p41e-6Ve'] = ROOT.kBlue colors['eenu_90GeV_1p41e-6Ve'] = ROOT.kGreen+1 -#colors['Zbb'] = ROOT.kAzure-4 -#colors['Zcc'] = ROOT.kCyan-9 -#colors['Zuds'] = ROOT.kViolet-4 +colors['Zbb'] = ROOT.kAzure-4 +colors['Zcc'] = ROOT.kCyan-9 +colors['Zuds'] = ROOT.kViolet-4 colors['Ztautau'] = ROOT.kRed-3 colors['Zee'] = ROOT.kGray+2 +#colors['Ztautau_spring2021'] = ROOT.kBlack +#colors['Ztautau_pre_winter2023_tests_v2'] = ROOT.kRed + + plots = {} plots['HNL'] = {'signal':{ 'eenu_30GeV_1p41e-6Ve':['eenu_30GeV_1p41e-6Ve'], 'eenu_50GeV_1p41e-6Ve':['eenu_50GeV_1p41e-6Ve'], 'eenu_70GeV_1p41e-6Ve':['eenu_70GeV_1p41e-6Ve'], 'eenu_90GeV_1p41e-6Ve':['eenu_90GeV_1p41e-6Ve'], -}, - 'backgrounds':{ - #'Zbb':['p8_ee_Zbb_ecm91'], - #'Zcc': ['p8_ee_Zcc_ecm91'], - #'Zuds': ['p8_ee_Zuds_ecm91'], + }, + 'backgrounds':{}, + 'Zbb':['p8_ee_Zbb_ecm91'], + 'Zcc': ['p8_ee_Zcc_ecm91'], + 'Zuds': ['p8_ee_Zuds_ecm91'], 'Ztautau': ['p8_ee_Ztautau_ecm91'], 'Zee':['p8_ee_Zee_ecm91'], + #'Ztautau_spring2021': ['p8_ee_Ztautau_ecm91_spring2021'], + #'Ztautau_pre_winter2023_tests_v2': ['p8_ee_Ztautau_ecm91_pre_winter2023_tests_v2'], } } @@ -215,8 +226,11 @@ legend['eenu_70GeV_1p41e-6Ve'] = 'm_{N} = 70 GeV, V_{e} = 1.41e-6' legend['eenu_90GeV_1p41e-6Ve'] = 'm_{N} = 90 GeV, V_{e} = 1.41e-6' -#legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' -#legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' -#legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' +legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' +legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' +legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' legend['Ztautau'] = 'e^{+}e^{-} #rightarrow Z #rightarrow #tau#tau' legend['Zee'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' +#legend['Ztautau_spring2021'] = 'Z #rightarrow #tau#tau Spring2021' +#legend['Ztautau_pre_winter2023_tests_v2'] = 'Z #rightarrow #tau#tau pre winter2023 tests v2' + diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py index 42591b13ab..5fe62966fc 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_stage1.py @@ -27,15 +27,17 @@ #Input directory #Comment out when running over centrally produced events #Mandatory when running over privately produced events -#inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/HNL_eenu_MadgraphPythiaDelphes" +#inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/spring2021/output_MadgraphPythiaDelphes" +#inputDir = "/eos/experiment/fcc/ee/generation/DelphesStandalone/Edm4Hep/pre_winter2023_tests_v2" #Optional: output directory, default is local dir -outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/output_stage1/" +outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/spring2021/output_stage1/" +#outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/pre_winter2023_tests_v2/output_stage1/" #outputDir = "/eos/user/j/jalimena/FCCeeLLP/" #outputDir = "output_stage1/" -outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNLs/output_stage1/" +#outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/HNL_Majorana_eenu/spring2021/output_stage1/" #outputDirEos = "/eos/user/j/jalimena/FCCeeLLP/" #eosType = "eosuser" From 7b1bbaa71c1c811c4422b906488a2ee03440ffcd Mon Sep 17 00:00:00 2001 From: mvoorde Date: Fri, 2 Dec 2022 12:49:17 +0100 Subject: [PATCH 13/49] Add analysis code --- .../CMakeLists.txt | 48 +++++++++++++++++ .../include/ExoticHiggsDecays_analysis_code.h | 36 +++++++++++++ .../scripts/analysis_cfg.py | 38 ++++++++++++++ .../src/ExoticHiggsDecays_analysis_code.cc | 51 +++++++++++++++++++ ExoticHiggsDecays_analysis_code/src/classes.h | 3 ++ .../src/classes_def.xml | 3 ++ 6 files changed, 179 insertions(+) create mode 100644 ExoticHiggsDecays_analysis_code/CMakeLists.txt create mode 100644 ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h create mode 100644 ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py create mode 100644 ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc create mode 100644 ExoticHiggsDecays_analysis_code/src/classes.h create mode 100644 ExoticHiggsDecays_analysis_code/src/classes_def.xml diff --git a/ExoticHiggsDecays_analysis_code/CMakeLists.txt b/ExoticHiggsDecays_analysis_code/CMakeLists.txt new file mode 100644 index 0000000000..7e41c5209f --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.16.9) +project(ExoticHiggsDecays_analysis_code CXX) +set(lib_name "FCCAnalysis_ExoticHiggsDecays_analysis_code") +find_package(ROOT COMPONENTS ROOTVecOps ROOTDataFrame REQUIRED) +find_package(EDM4HEP REQUIRED) +#--- Set a better default for installation directory--------------------------- +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP/install" CACHE PATH "default install path" FORCE) +endif() +#--- Offer the user the choice of overriding the installation directories +set(FCCANALYSES_DIR "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP" CACHE PATH + "Installation directory for FCCAnalyses framework") +#--- Find all paths to 'ExoticHiggsDecays_analysis_code' library pieces +file(GLOB headers "include/*.h") +file(GLOB sources "src/*.cc") +file(GLOB classes "src/classes.h") +file(GLOB reflex_sel "src/classes_def.xml") +#--- generate the ROOT dictionary using a REFLEX selection +set(CMAKE_ROOTTEST_NOROOTMAP OFF) +reflex_generate_dictionary(lib${lib_name} ${headers} ${classes} + SELECTION ${reflex_sel}) +#--- build the analysis library (linked against FCCAnalyses) +add_library(${lib_name} SHARED ${sources} ${headers} lib${lib_name}.cxx) +target_include_directories(${lib_name} PUBLIC include + ${FCCANALYSES_DIR} + ${FCCANALYSES_DIR}/addons + ${FCCANALYSES_DIR}/analyzers/dataframe + $) +target_link_directories(${lib_name} PUBLIC ${FCCANALYSES_DIR} + ${FCCANALYSES_DIR}/install/lib) +target_link_libraries(${lib_name} PUBLIC FCCAnalyses + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ROOT::ROOTVecOps) +set_target_properties(${lib_name} PROPERTIES PUBLIC_HEADER "${headers}") +install(TARGETS ${lib_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" COMPONENT shlib + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/include/ExoticHiggsDecays_analysis_code" + COMPONENT analyses) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}.rootmap" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" + COMPONENT analyses) +if(${ROOT_VERSION} GREATER 6) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}_rdict.pcm" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" + COMPONENT analyses) +endif() +message(STATUS "Built standalone analyser package: ExoticHiggsDecays_analysis_code") diff --git a/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h b/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h new file mode 100644 index 0000000000..47425ddbf5 --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h @@ -0,0 +1,36 @@ +// -*- C++ -*- +// +/** FCCAnalysis module: ExoticHiggsDecays_analysis_code + * + * \file ExoticHiggsDecays_analysis_code.h + * \author <> + * + * Description: + * [...] + */ + +#ifndef ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h +#define ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h + +#include "ROOT/RVec.hxx" +#include "edm4hep/ReconstructedParticle.h" +#include "edm4hep/MCParticle.h" +#include "FCCAnalyses/MCParticle.h" + +namespace ExoticHiggsDecays_analysis_code { + namespace rv = ROOT::VecOps; + + void dummy_analysis(); + rv::RVec dummy_collection(const rv::RVec&); + + ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); + + struct selMC_leg{ + selMC_leg( int arg_idx ); + int m_idx; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, + ROOT::VecOps::RVec in) ; + }; +} // end namespace ExoticHiggsDecays_analysis_code + +#endif diff --git a/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py b/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py new file mode 100644 index 0000000000..8aae2c14dc --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py @@ -0,0 +1,38 @@ +#Optional: List of analysis packages to load in runtime +analysesList = ['ExoticHiggsDecays_analysis_code'] + +#Mandatory: List of processes +processList = { + 'p8_noBES_ee_H_Hbb_ecm125':{'fraction': 0.01, 'chunks': 1, 'output': 'test_out'} +} + +#Mandatory: Production tag when running over EDM4Hep centrally produced events, this points to the yaml files for getting sample statistics +prodTag = "FCCee/spring2021/IDEA/" + +#Optional: output directory, default is local running directory +outputDir = "." + +#Optional +nCPUS = 8 +runBatch = False +#batchQueue = "longlunch" +#compGroup = "group_u_FCC.local_gen" + +#Optional test file +testFile = "root://eospublic.cern.ch//eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_ZH_ecm240/events_101027117.root" + +#Mandatory: RDFanalysis class where the use defines the operations on the TTree +class RDFanalysis(): + #__________________________________________________________ + #Mandatory: analysers function to define the analysers to process, please make sure you return the last dataframe, in this example it is df2 + def analysers(df): + df2 = (df + .Define("dummy_collection", "ExoticHiggsDecays_analysis_code::dummy_collection(ReconstructedParticles)") + ) + return df2 + + #__________________________________________________________ + #Mandatory: output function, please make sure you return the branchlist as a python list + def output(): + branchList = ['dummy_collection'] + return branchList diff --git a/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc b/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc new file mode 100644 index 0000000000..99bda51f9a --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc @@ -0,0 +1,51 @@ +// -*- C++ -*- +// +/** FCCAnalysis module: ExoticHiggsDecays_analysis_code + * + * \file ExoticHiggsDecays_analysis_code.cc + * \author <> + */ + +#include "ExoticHiggsDecays_analysis_code.h" +#include + +using namespace std; + +namespace ExoticHiggsDecays_analysis_code { + void dummy_analysis() { cout << "Dummy analysis initialised." << endl; } + + rv::RVec dummy_collection(const rv::RVec& parts) { + rv::RVec output; + for (size_t i = 0; i < parts.size(); ++i) + output.emplace_back(parts.at(i).momentum.x); + return output; + } + + ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value) { + ROOT::VecOps::RVec sum; + for (auto i: scalar1_value) { + sum.push_back(i); + } + for (auto j: scalar2_value) { + sum.push_back(j); + } + return sum; +} + +// following code is copied from https://github.com/HEP-FCC/FCCAnalyses/blob/09c52e107e308cf57d59ca840d4bba60e25d94c2/examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py +// used to find the b quarks from respective hs. Can't directly apply sel_byIndex since this function returns a 'edm4hep::MCParticleData' object and we need 'ROOT::VecOps::RVec' + +selMC_leg::selMC_leg( int arg_idx ) : m_idx(arg_idx) { }; +ROOT::VecOps::RVec selMC_leg::operator() ( ROOT::VecOps::RVec list_of_indices, ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec res; + if ( list_of_indices.size() == 0) return res; + if ( m_idx < list_of_indices.size() ) { + res.push_back( FCCAnalyses::MCParticle::sel_byIndex( list_of_indices[m_idx], in ) ); + return res; + } + else { + std::cout << " !!! in selMC_leg: idx = " << m_idx << " but size of list_of_indices = " << list_of_indices.size() << std::endl; + } + return res; +} +} // end namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes.h b/ExoticHiggsDecays_analysis_code/src/classes.h new file mode 100644 index 0000000000..e1f92d4d77 --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/src/classes.h @@ -0,0 +1,3 @@ +namespace ExoticHiggsDecays_analysis_code { + struct dictionary {}; +} // namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes_def.xml b/ExoticHiggsDecays_analysis_code/src/classes_def.xml new file mode 100644 index 0000000000..33446d12b0 --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/src/classes_def.xml @@ -0,0 +1,3 @@ + + + From a176464d3ede6eeba971247227efb8fcd9a81bef Mon Sep 17 00:00:00 2001 From: mvoorde Date: Fri, 2 Dec 2022 13:30:07 +0100 Subject: [PATCH 14/49] Add analysis scripts --- .../ExoticHiggsDecays/MC_analysis_final.py | 90 +++++++++ .../ExoticHiggsDecays/MC_analysis_plots.py | 79 ++++++++ .../ExoticHiggsDecays/MC_analysis_stage1.py | 181 ++++++++++++++++++ 3 files changed, 350 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_final.py create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_plots.py create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_final.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_final.py new file mode 100644 index 0000000000..b9b7fb6ba8 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_final.py @@ -0,0 +1,90 @@ +#Input directory where the files produced at the stage1 level are +#inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/MC_output_stage1/" +inputDir = "MC_output_stage1/" + +#Output directory where the files produced at the final-selection level are +outputDir = "MC_output_finalSel/" + +#Integrated luminosity for scaling number of events (required only if setting doScale to true) +#intLumi = 5e6 #pb^-1 + +#Scale event yields by intLumi and cross section (optional) +#doScale = True + +#Save event yields in a table (optional) +#saveTabular = True + +#Mandatory: List of processes +processList = { + + #privately-produced signals + 'exoticHiggs_scalar_ms20GeV_sine-5':{}, + # 'exoticHiggs_scalar_ms20GeV_sine-6':{}, + # 'exoticHiggs_scalar_ms20GeV_sine-7':{}, + # 'exoticHiggs_scalar_ms60GeV_sine-5':{}, + # 'exoticHiggs_scalar_ms60GeV_sine-6':{}, + # 'exoticHiggs_scalar_ms60GeV_sine-7':{}, + +} + +###Dictionary for prettier names of processes (optional) +processLabels = { + #signals + 'exoticHiggs_scalar_ms20GeV_sine-5': "$m_S$ = 20 GeV, sin $\theta = 1 * 10^{-5}$", + 'exoticHiggs_scalar_ms20GeV_sine-6': "$m_S$ = 20 GeV, sin $\theta = 1 * 10^{-6}$", + 'exoticHiggs_scalar_ms20GeV_sine-7': "$m_S$ = 20 GeV, sin $\theta = 1 * 10^{-7}$", + 'exoticHiggs_scalar_ms60GeV_sine-5': "$m_S$ = 60 GeV, sin $\theta = 1 * 10^{-5}$", + 'exoticHiggs_scalar_ms60GeV_sine-6': "$m_S$ = 60 GeV, sin $\theta = 1 * 10^{-6}$", + 'exoticHiggs_scalar_ms60GeV_sine-7': "$m_S$ = 60 GeV, sin $\theta = 1 * 10^{-7}$", +} + +#Link to the dictonary that contains all the cross section information etc... +procDict = "FCCee_procDict_spring2021_IDEA.json" + +#Add MySample_p8_ee_ZH_ecm240 as it is not an offical process +procDictAdd={ + 'exoticHiggs_scalar_ms20GeV_sine-5': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 4.434e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms20GeV_sine-6': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 4.434e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms20GeV_sine-7': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 4.434e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms60GeV_sine-5': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1.311e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms60GeV_sine-6': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1.311e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms60GeV_sine-7': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1.311e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, +} + +#Number of CPUs to use +nCPUS = 2 + +#produces ROOT TTrees, default is False +doTree = False + +###Dictionnay of the list of cuts. The key is the name of the selection that will be added to the output file +cutList = { + "selNone": "n_GenZ > -1", + +} + +###Dictionary for prettier names of cuts (optional) +cutLabels = { + "selNone": "Before selection", +} + +###Dictionary for the ouput variable/hitograms. The key is the name of the variable in the output files. "name" is the name of the variable in the input file, "title" is the x-axis label of the histogram, "bin" the number of bins of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum x-axis value. +histoList = { + + #gen variables + 'n_GenElectrons': {"name":"n_GenElectrons", "title":"Number of generated electrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + 'n_GenMuons': {"name":"n_GenMuons", "title":"Number of generated muons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + 'n_GenZ': {"name":"n_GenZ", "title":"Number of generated Z bosons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + 'n_GenHiggs': {"name":"n_GenHiggs", "title":"Number of generated Higgs bosons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + 'n_Genb': {"name":"n_Genb", "title":"Number of generated b quarks", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + 'n_GenHS': {"name":"n_GenHS", "title":"Number of generated dark scalars", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + + 'AllGenHS_mass': {"name":'AllGenHS_mass', "title":"Generated dark scalars mass [GeV]", "bin":50,"xmin":-0.5 ,"xmax":49.5}, + 'AllGenHS_e': {"name":'AllGenHS_e', "title":"Generated dark scalars energy [GeV]", "bin":100,"xmin":-0.5 ,"xmax":99.5}, + + 'LxyHS': {"name":'LxyHS', "title":"Genenrated transverse decay length [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + 'decayLengthsHS': {"name":'decayLengthsHS', "title":"Generated decay length [mm]", "bin":100,"xmin":0 ,"xmax":10000}, + 'lifetimeHS': {"name":'lifetimeHS', "title":"Generated time distribution t [ns]", "bin":100,"xmin":0 ,"xmax":20}, + 'lifetimeHSLAB': {"name":'lifetimeHSLAB', "title":"Generated time distribution in LAB frame [ns]", "bin":100,"xmin":0 ,"xmax":20}, + +} diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_plots.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_plots.py new file mode 100644 index 0000000000..3bb4f8e983 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_plots.py @@ -0,0 +1,79 @@ +import ROOT + +# global parameters +intLumi = 5.0e+06 #in pb-1 + +###If scaleSig=0 or scaleBack=0, we don't apply any additional scaling, on top of the normalization to cross section and integrated luminosity, as defined in finalSel.py +###If scaleSig or scaleBack is not defined, plots will be normalized to 1 +#scaleSig = 0. +#scaleBack = 0. +ana_tex = 'e^{+}e^{-} #rightarrow Z h, Z #rightarrow l^{+}l^{-}, h #rightarrow ss #rightarrow b #bar{b} b #bar{b}' +delphesVersion = '3.4.2' +energy = 240 +collider = 'FCC-ee' +inputDir = 'MC_output_finalSel/' +#formats = ['png','pdf'] +formats = ['pdf'] +yaxis = ['lin','log'] +stacksig = ['nostack'] +outdir = 'MC_plots/' +splitLeg = True + +variables = [ + + #gen variables + 'n_GenElectrons', + 'n_GenMuons', + 'n_GenZ', + 'n_GenHiggs', + 'n_Genb', + 'n_GenHS', + 'AllGenHS_mass', + 'AllGenHS_e', + 'decayLengthsHS', + 'LxyHS', + 'lifetimeHS', + 'lifetimeHSLAB', + + ] + + +###Dictionary with the analysis name as a key, and the list of selections to be plotted for this analysis. The name of the selections should be the same than in the final selection +selections = {} +selections['ExoticHiggs'] = [ + "selNone", +] + +extralabel = {} +extralabel['selNone'] = "Before selection" + +colors = {} +colors['exoticHiggs_scalar_ms20GeV_sine-5'] = ROOT.kOrange+1 +colors['exoticHiggs_scalar_ms20GeV_sine-6'] = ROOT.kRed +colors['exoticHiggs_scalar_ms20GeV_sine-7'] = ROOT.kBlue +colors['exoticHiggs_scalar_ms60GeV_sine-5'] = ROOT.kGreen+1 +colors['exoticHiggs_scalar_ms60GeV_sine-6'] = ROOT.kCyan-9 +colors['exoticHiggs_scalar_ms60GeV_sine-7'] = ROOT.kViolet-4 + +plots = {} +plots['ExoticHiggs'] = {'signal':{ + 'exoticHiggs_scalar_ms20GeV_sine-5':['exoticHiggs_scalar_ms20GeV_sine-5'], + 'exoticHiggs_scalar_ms20GeV_sine-6':['exoticHiggs_scalar_ms20GeV_sine-6'], + 'exoticHiggs_scalar_ms20GeV_sine-7':['exoticHiggs_scalar_ms20GeV_sine-7'], + 'exoticHiggs_scalar_ms60GeV_sine-5':['exoticHiggs_scalar_ms60GeV_sine-5'], + 'exoticHiggs_scalar_ms60GeV_sine-6':['exoticHiggs_scalar_ms60GeV_sine-6'], + 'exoticHiggs_scalar_ms60GeV_sine-7':['exoticHiggs_scalar_ms60GeV_sine-7'], +}, +'backgrounds':{ + # + } + } + + +legend = {} +legend['exoticHiggs_scalar_ms20GeV_sine-5'] = 'm_{S} = 20 GeV, sin #theta = 1e-5' +legend['exoticHiggs_scalar_ms20GeV_sine-6'] = 'm_{S} = 20 GeV, sin #theta = 1e-6' +legend['exoticHiggs_scalar_ms20GeV_sine-7'] = 'm_{S} = 20 GeV, sin #theta = 1e-7' +legend['exoticHiggs_scalar_ms60GeV_sine-5'] = 'm_{S} = 60 GeV, sin #theta = 1e-5' +legend['exoticHiggs_scalar_ms60GeV_sine-6'] = 'm_{S} = 60 GeV, sin #theta = 1e-6' +legend['exoticHiggs_scalar_ms60GeV_sine-7'] = 'm_{S} = 60 GeV, sin #theta = 1e-7' diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py new file mode 100644 index 0000000000..f0e0d779a5 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py @@ -0,0 +1,181 @@ +import ROOT + +analysesList = ['ExoticHiggsDecays_analysis_code'] + +testfile="/afs/cern.ch/work/u/uvandevo/exoticHiggs_scalar_ms20GeV_sine-5.root" + +#Mandatory: List of processes +processList = { + + #privately-produced signals + 'exoticHiggs_scalar_ms20GeV_sine-5':{}, + # 'exoticHiggs_scalar_ms20GeV_sine-6':{}, + # 'exoticHiggs_scalar_ms20GeV_sine-7':{}, + # 'exoticHiggs_scalar_ms60GeV_sine-5':{}, + # 'exoticHiggs_scalar_ms60GeV_sine-6':{}, + # 'exoticHiggs_scalar_ms60GeV_sine-7':{}, +} + +#Production tag. This points to the yaml files for getting sample statistics +#Mandatory when running over EDM4Hep centrally produced events +#Comment out when running over privately produced events +#prodTag = "FCCee/spring2021/IDEA/" + +#Input directory +#Comment out when running over centrally produced events +#Mandatory when running over privately produced events +inputDir = "/afs/cern.ch/work/u/uvandevo" +#inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/output_MadgraphPythiaDelphes/" + + +#Optional: output directory, default is local dir +#outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/MC_output_stage1/" +#outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/MC_output_stage1/" +outputDir = "MC_output_stage1/" + +#Optional: ncpus, default is 4 +nCPUS = 4 + +#Optional running on HTCondor, default is False +runBatch = False +#runBatch = True + +#Optional batch queue name when running on HTCondor, default is workday +#batchQueue = "longlunch" + +#Optional computing account when running on HTCondor, default is group_u_FCC.local_gen +#compGroup = "group_u_FCC.local_gen" + + +#Mandatory: RDFanalysis class where the use defines the operations on the TTree +class RDFanalysis(): + + #__________________________________________________________ + #Mandatory: analysers funtion to define the analysers to process, please make sure you return the last dataframe, in this example it is df2 + def analysers(df): + df2 = ( + df + .Alias("Particle1", "Particle#1.index") + # MC-particles/truth particles + + # select the generated electrons and positrons + .Define('GenElectrons_PID', 'MCParticle::sel_pdgID(11, true)(Particle)') + # get the number of generated electrons and positrons + .Define('n_GenElectrons', 'MCParticle::get_n(GenElectrons_PID)') + + # select the generated muons + .Define('GenMuons_PID', 'MCParticle::sel_pdgID(13, true)(Particle)') + # get the number of generated muons + .Define('n_GenMuons', 'MCParticle::get_n(GenMuons_PID)') + + # select generated Z boson + .Define('GenZ_PID', 'MCParticle::sel_pdgID(23, false)(Particle)') + # get the number of Z bosons + .Define('n_GenZ', 'MCParticle::get_n(GenZ_PID)') + + # select generated Higgs boson + .Define('GenHiggs_PID', 'MCParticle::sel_pdgID(25, false)(Particle)') + # get the number of Higgs bosons + .Define('n_GenHiggs', 'MCParticle::get_n(GenHiggs_PID)') + + # select the generated b b~ quarks + .Define('Genb_PID', 'MCParticle::sel_pdgID(5, true)(Particle)') # true means charge conjugation = true, i.e pick out both b and b~ + # get the number of generated b b~ quarks + .Define('n_Genb', 'MCParticle::get_n(Genb_PID)') + + # select generated scalar HS + .Define('GenHS_PID', 'MCParticle::sel_pdgID(35, false)(Particle)') + # get the number of scalars + .Define('n_GenHS', 'MCParticle::get_n(GenHS_PID)') + .Define("AllGenHS_mass", "MCParticle::get_mass(GenHS_PID)") + .Define("AllGenHS_e", "MCParticle::get_e(GenHS_PID)") + .Define("AllGenHS_p", "MCParticle::get_p(GenHS_PID)") + .Define("AllGenHS_pt", "MCParticle::get_pt(GenHS_PID)") + .Define("AllGenHS_px", "MCParticle::get_px(GenHS_PID)") + .Define("AllGenHS_py", "MCParticle::get_py(GenHS_PID)") + .Define("AllGenHS_pz", "MCParticle::get_pz(GenHS_PID)") + + .Define("GenHS1_e", "AllGenHS_e.at(0)") + .Define("GenHS2_e", "AllGenHS_e.at(1)") + + # get the production vertex for the 2 HS in x y z + .Define('HS_vertex_x', 'MCParticle::get_vertex_x(GenHS_PID)') + .Define('HS_vertex_y', 'MCParticle::get_vertex_y(GenHS_PID)') + .Define('HS_vertex_z', 'MCParticle::get_vertex_z(GenHS_PID)') + + # decay length of Higgs + .Define('decayLengthHiggs', 'return sqrt(HS_vertex_x.at(0)*HS_vertex_x.at(0) + HS_vertex_y.at(0)*HS_vertex_y.at(0) + HS_vertex_z.at(0)*HS_vertex_z.at(0))') + + # get the indices of the Higgs and the scalars, sorted in order h hs hs + .Define('H2HSHS_indices', 'MCParticle::get_indices_ExclusiveDecay(25, {35, 35}, false, false)(Particle, Particle1)') + + # get the indices of the b quarks from related scalar, 1 are from the "first" scalar and 2 from the second one + .Define('bquarks1_indices', 'MCParticle::get_indices_ExclusiveDecay_MotherByIndex(H2HSHS_indices[1], {5, -5}, false, Particle, Particle1)') + .Define('bquarks2_indices', 'MCParticle::get_indices_ExclusiveDecay_MotherByIndex(H2HSHS_indices[2], {5, -5}, false, Particle, Particle1)') + + # # get the b quarks, right now only picking the first daughter (hopefully b quark) from the list of decay particles from hs, should update this section maybe + .Define('bquarks1', 'ExoticHiggsDecays_analysis_code::selMC_leg(1) (bquarks1_indices, Particle)') + .Define('bquarks2', 'ExoticHiggsDecays_analysis_code::selMC_leg(1) (bquarks2_indices, Particle)') + + # # get the vertex position for the first group of b quarks + .Define('b1_vertex_x', 'MCParticle::get_vertex_x(bquarks1)') + .Define('b1_vertex_y', 'MCParticle::get_vertex_y(bquarks1)') + .Define('b1_vertex_z', 'MCParticle::get_vertex_z(bquarks1)') + + # # get the vertex position for the second group of b quarks + .Define('b2_vertex_x', 'MCParticle::get_vertex_x(bquarks2)') + .Define('b2_vertex_y', 'MCParticle::get_vertex_y(bquarks2)') + .Define('b2_vertex_z', 'MCParticle::get_vertex_z(bquarks2)') + + # get the decay length of HS 1 + .Define('decayLengthHS1', 'return sqrt((b1_vertex_x - HS_vertex_x.at(0))*(b1_vertex_x - HS_vertex_x.at(0)) + (b1_vertex_y - HS_vertex_y.at(0))*(b1_vertex_y - HS_vertex_y.at(0)) + (b1_vertex_z - HS_vertex_z.at(0))*(b1_vertex_z - HS_vertex_z.at(0)))') + + # get the decay length of HS 2 + .Define('decayLengthHS2', 'return sqrt((b2_vertex_x - HS_vertex_x.at(1))*(b2_vertex_x - HS_vertex_x.at(1)) + (b2_vertex_y - HS_vertex_y.at(1))*(b2_vertex_y - HS_vertex_y.at(1)) + (b2_vertex_z - HS_vertex_z.at(1))*(b2_vertex_z - HS_vertex_z.at(1)))') + + # get decay length of both scalars in a vector for each event + .Define('decayLengthsHS', 'ExoticHiggsDecays_analysis_code::get_both_scalars(decayLengthHS1, decayLengthHS2)') + + # get the transverse decay length of HS 1 + .Define('LxyHS1', 'return sqrt((b1_vertex_x - HS_vertex_x.at(0))*(b1_vertex_x - HS_vertex_x.at(0)) + (b1_vertex_y - HS_vertex_y.at(0))*(b1_vertex_y - HS_vertex_y.at(0)))') + + # get the transverse decay length of HS 2 + .Define('LxyHS2', 'return sqrt((b2_vertex_x - HS_vertex_x.at(1))*(b2_vertex_x - HS_vertex_x.at(1)) + (b2_vertex_y - HS_vertex_y.at(1))*(b2_vertex_y - HS_vertex_y.at(1)))') + + # get the transverse decay length of both scalars in a vector for each event + .Define('LxyHS', 'ExoticHiggsDecays_analysis_code::get_both_scalars(LxyHS1, LxyHS2)') + + # the proper lifetime of the scalars given in [ns] + .Define('lifetimeHS1', 'return (decayLengthHS1 * 1E-3 * AllGenHS_mass.at(0)/(3E8 * AllGenHS_e.at(0))*1E9)') + .Define('lifetimeHS2', 'return (decayLengthHS2 * 1E-3 * AllGenHS_mass.at(1)/(3E8 * AllGenHS_e.at(1))*1E9)') + + # get proper lifetime of both scalars in a vector for each event + .Define('lifetimeHS', 'ExoticHiggsDecays_analysis_code::get_both_scalars(lifetimeHS1, lifetimeHS2)') + + # the lifetime of the scalars in the LAB frame in [ns] + .Define('lifetimeHS1LAB', 'return (decayLengthHS1 * 1E-3 * 1E9/3E8)') + .Define('lifetimeHS2LAB', 'return (decayLengthHS2 * 1E-3 * 1E9/3E8)') + + # get lifetime in LAB of both scalars in a vector for each event + .Define('lifetimeHSLAB', 'ExoticHiggsDecays_analysis_code::get_both_scalars(lifetimeHS1LAB, lifetimeHS2LAB)') + ) + return df2 + + #__________________________________________________________ + #Mandatory: output function, please make sure you return the branchlist as a python list + def output(): + branchList = [ + 'n_GenElectrons', + 'n_GenMuons', + 'n_GenZ', + 'n_GenHiggs', + 'n_Genb', + 'n_GenHS', + 'AllGenHS_mass', + 'AllGenHS_e', + 'decayLengthsHS', + 'LxyHS', + 'lifetimeHS', + 'lifetimeHSLAB' + ] + return branchList \ No newline at end of file From e27e39015e5cce6a1e88ad5a2c6e5486cb9ff85c Mon Sep 17 00:00:00 2001 From: mvoorde <48947870+mvoorde@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:32:34 +0100 Subject: [PATCH 15/49] Create README.md --- .../H_ss_4b_SampleGeneration/README.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/README.md diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/README.md b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/README.md new file mode 100644 index 0000000000..cfd706fcef --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/README.md @@ -0,0 +1,128 @@ +Author: Giulia Ripellino and Magdalena Vande Voorde + +Contact: giulia.ripellino@cern.ch + +This folder will allow you to create your own madgraph sample for exotic Higgs decays using the HAHM model http://insti.physics.sunysb.edu/~curtin/hahm_mg.html. + +Setting up Madgraph and the HAHM model +----- + +First, set up the FCC analysis environment (necessary e.g to enable use of python 3.7 which is needed for MagGraph): + +``` +source /cvmfs/fcc.cern.ch/sw/latest/setup.sh +``` + +Now download the latest version of madgraph (http://madgraph.phys.ucl.ac.be/ or directly at https://launchpad.net/mg5amcnlo). Here we're using MadGraph5 v3.4.1. + +Copy the Madgraph tarball to your local area on lxplus: + +``` +scp MG5_aMC_v3.4.1.tar username@lxplus.cern.ch:/path/to/your/dir +``` + +Then ssh to lxplus and unzip the tarball +``` +tar -xf MG5_aMC_v3.4.1.tar +``` + +Then download the HAHM_MG5model_v3 model from http://insti.physics.sunysb.edu/~curtin/hahm_mg.html. Copy to lxplus and unzip with the same procedure. + +Move the HAHM_variableMW_UFO and HAHM_variablesw_UFO into the Madgraph5 models directory: `MG5_aMC_v3_4_1/models/`. + +For instructions on how to generate samples with a processcard instead, see further down. +Down below follows instructions how to generate samples for exotic Higgs decays by directly changing in the param_card. + +Generate samples directly in param_card +---- + +Run: +``` +cd MG5_aMC_v3_4_1 +./bin/mg5_aMC +``` + +Then enter (for Higgs to dark photons): +``` +set auto_convert_model T +import model --modelname HAHM_variableMW_UFO +generate h > zp zp +output PROC_HAHM_variableMW_UFO_DarkPhoton +``` + +or (for Higgs to scalars) +``` +generate h > hs hs +output PROC_HAHM_variableMW_UFO_DarkScalar +``` + +Now set parameters in `PROC_HAHM_variableMW_UFO_/Cards/param_card.dat`: + +For scalar case: Set epsilon=1.000000e-09 and mZD=1.000000e+03 + +For dark photon case: kap = 1.000000e-09 and MHS=1.000000e+03 + +Now run +``` +./bin/mg5_aMC proc_card_mg5.dat +``` +to create the LHE file, where `proc_card_mg5.dat` is the madgraph proc card you are interested in generating. + +The resulting events will be stored in `PROC_HAHM_variableMW_UFO_DarkScalar/Events/run_01/unweighted_events.lhe.gz` file. Unzip it (`gunzip unweighted_events.lhe.gz`) and give the *absolute* path to DarkScalar_pythia.cmnd file to generate the delphes root file. +Change the first line of header of your .lhe file + +LesHouchesEvents version=“3.0” —> LesHouchesEvents version=“2.0” + +(Otherwise it will crash due to some Pythia issue, see: https://answers.launchpad.net/mg5amcnlo/+question/263774) + +Creating samples using a processcard +------- +In this folder there are processcards named e.g "exoticHiggs_scalar_mS20GeV_WHSe-14_proc_card.dat" generating the process e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b at the center-of-mass energy 240 GeV. +The dark photon is decoupled by setting mZD = 1000 GeV and epsilon = 1e-10. The coupling constant between Higgs and the scalar is set to kappa = 1e-3. +The generated samples have different masses and lifetimes, defined by it's width, WHS. In this example the processcard generates a sample with the mass of the scalar mS = 20 GeV and the width WHS is set to be of order 10^(-14) GeV, which equals a lifetime, ctau, of order mm. +See the processcard for more details. + + +Put this processcard in your MG5_aMC_v3_4_1 directory and run: + +``` +# standing in directory MG5_aMC_v3_4_1 +./bin/mg5_aMC exoticHiggs_scalar_mS20GeV_WHSe-14_proc_card.dat +``` + +The resulting events will be stored in `h_2hs_4b_mhs20GeV_WHSe-14/Events/run_01/unweighted_events.lhe.gz` file. +Unzip it and give the *absolute* path to the exoticHiggs_scalar_pythia.cmnd file to generate the delphes root file. + +``` +# standing in directory MG5_aMC_v3_4_1/h_2hs_4b_mhs20GeV_WHSe-14/Events/run_01/ +gunzip -c unweighted_events.lhe.gz > your/path/to/h_2hs_4b_mhs20GeV_WHSe-14.lhe +``` + +Change the first line of header of your .lhe file + +LesHouchesEvents version=“3.0” —> LesHouchesEvents version=“2.0” + +(Otherwise it will crash due to some Pythia issue, see: https://answers.launchpad.net/mg5amcnlo/+question/263774) + +Creating the delphes root file and edm4hep sample +----- + +You need to grab the latest official Delphes card and edm4hep tcl file: +``` +#cd to one directory up from FCCAnalyses/ +git clone https://github.com/HEP-FCC/FCC-config.git +cd FCC-config/ +git checkout spring2021 +cd .. +``` + +To create delphes root file you need to do the following on your command line (make sure you have the .lhe file and the .cmnd file in the same directory as you are running in): + +``` +# standing one directory up from FCC-config +source /cvmfs/fcc.cern.ch/sw/latest/setup.sh +DelphesPythia8_EDM4HEP ./FCC-config/FCCee/Delphes/card_IDEA.tcl ./FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl exoticHiggs_scalar_pythia.cmnd exoticHiggs_scalar_ms20GeV_sine-5.root +``` + +The resulting exoticHiggs_scalar_ms20GeV_sine-5.root is your edm4hep sample! +When running the different processcards to create the different lhe files, don't forget to change the name of the lhe file in the pythia card, line 14. From fc3bf3982183392eb5c9a7795a8221824470d31c Mon Sep 17 00:00:00 2001 From: mvoorde <48947870+mvoorde@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:39:02 +0100 Subject: [PATCH 16/49] Add mg and pythia process cards Added the process cards run in madgraph to generate the different signal samples for h > ss > 4b, and a corresponding pythia card to generate the root files. --- ...Higgs_scalar_mS20GeV_WHSe-14_proc_card.dat | 86 +++++++++++++++++++ ...Higgs_scalar_mS20GeV_WHSe-16_proc_card.dat | 86 +++++++++++++++++++ ...Higgs_scalar_mS20GeV_WHSe-18_proc_card.dat | 86 +++++++++++++++++++ ...Higgs_scalar_mS60GeV_WHSe-13_proc_card.dat | 86 +++++++++++++++++++ ...Higgs_scalar_mS60GeV_WHSe-15_proc_card.dat | 86 +++++++++++++++++++ ...Higgs_scalar_mS60GeV_WHSe-17_proc_card.dat | 86 +++++++++++++++++++ .../exoticHiggs_scalar_pythia.cmnd | 20 +++++ 7 files changed, 536 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-14_proc_card.dat create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-16_proc_card.dat create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-18_proc_card.dat create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-13_proc_card.dat create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-15_proc_card.dat create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-17_proc_card.dat create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_pythia.cmnd diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-14_proc_card.dat b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-14_proc_card.dat new file mode 100644 index 0000000000..e451d9d3d9 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-14_proc_card.dat @@ -0,0 +1,86 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.4.1 2022-09-01 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +import model sm + +set auto_convert_model T +import model --modelname HAHM_variableMW_v3_UFO/ +define l+ = e+ m+ +define l- = e- m- +define f = u c d s u~ c~ d~ s~ b b~ e+ e- m+ m- tt+ tt- + +#*** generate the process: e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b +generate e+ e- > z > z h, z > l+ l-, (h > hs hs, hs > b b~) + +output h_2hs_4b_mhs20GeV_WHSe-14 + +# launch the event generation +launch + +#*** set electron beams and the center-of-mass energy to the ZH maximum production peak (240 GeV), i.e 120 GeV per electron beam + +# set beam type; 0 for electron, 1 for proton +set lpp1 0 +set lpp2 0 +# set total energy in GeV for each beam +set ebeam1 120 +set ebeam2 120 + +#*** set model parameters; couplings and masses + +# the model accounts both dark scalars and dark photons, hence set the kinetic mixing coupling epsilon to zero and mass of dark photon high (to only simulate SM + dark scalar singlet) +set epsilon 1.000000e-10 +set mZDinput 1.000000e+03 + +# set the mass of the dark scalar +set MHSinput 20.000000e+00 + +# set singlet-higgs coupling +set kap 1.000000e-03 + +# set the decay width to O(e-14) s.t sin^2 theta = O(e-10) and decay length O(mm) +set whs 5.7793e-14 + +# set the width of the higgs and the dark photon to auto +set wh Auto +set wzp Auto + +# needed to get llp +set time_of_flight 0 + +# set number of events +set nevents 10000 + +done \ No newline at end of file diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-16_proc_card.dat b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-16_proc_card.dat new file mode 100644 index 0000000000..b63d1a101b --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-16_proc_card.dat @@ -0,0 +1,86 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.4.1 2022-09-01 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +import model sm + +set auto_convert_model T +import model --modelname HAHM_variableMW_v3_UFO/ +define l+ = e+ m+ +define l- = e- m- +define f = u c d s u~ c~ d~ s~ b b~ e+ e- m+ m- tt+ tt- + +#*** generate the process: e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b +generate e+ e- > z > z h, z > l+ l-, (h > hs hs, hs > b b~) + +output h_2hs_4b_mhs20GeV_WHSe-16 + +# launch the event generation +launch + +#*** set electron beams and the center-of-mass energy to the ZH maximum production peak (240 GeV), i.e 120 GeV per electron beam + +# set beam type; 0 for electron, 1 for proton +set lpp1 0 +set lpp2 0 +# set total energy in GeV for each beam +set ebeam1 120 +set ebeam2 120 + +#*** set model parameters; couplings and masses + +# the model accounts both dark scalars and dark photons, hence set the kinetic mixing coupling epsilon to zero and mass of dark photon high (to only simulate SM + dark scalar singlet) +set epsilon 1.000000e-10 +set mZDinput 1.000000e+03 + +# set the mass of the dark scalar +set MHSinput 20.000000e+00 + +# set singlet-higgs coupling +set kap 1.000000e-03 + +# set the decay width to O(e-16) s.t sin^2 theta = O(e-12) and decay length O(100 mm) +set whs 5.7793e-16 + +# set the width of the higgs and the dark photon to auto +set wh Auto +set wzp Auto + +# needed to get llp +set time_of_flight 0 + +# set number of events +set nevents 10000 + +done \ No newline at end of file diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-18_proc_card.dat b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-18_proc_card.dat new file mode 100644 index 0000000000..59569db1c1 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS20GeV_WHSe-18_proc_card.dat @@ -0,0 +1,86 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.4.1 2022-09-01 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +import model sm + +set auto_convert_model T +import model --modelname HAHM_variableMW_v3_UFO/ +define l+ = e+ m+ +define l- = e- m- +define f = u c d s u~ c~ d~ s~ b b~ e+ e- m+ m- tt+ tt- + +#*** generate the process: e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b +generate e+ e- > z > z h, z > l+ l-, (h > hs hs, hs > b b~) + +output h_2hs_4b_mhs20GeV_WHSe-18 + +# launch the event generation +launch + +#*** set electron beams and the center-of-mass energy to the ZH maximum production peak (240 GeV), i.e 120 GeV per electron beam + +# set beam type; 0 for electron, 1 for proton +set lpp1 0 +set lpp2 0 +# set total energy in GeV for each beam +set ebeam1 120 +set ebeam2 120 + +#*** set model parameters; couplings and masses + +# the model accounts both dark scalars and dark photons, hence set the kinetic mixing coupling epsilon to zero and mass of dark photon high (to only simulate SM + dark scalar singlet) +set epsilon 1.000000e-10 +set mZDinput 1.000000e+03 + +# set the mass of the dark scalar +set MHSinput 20.000000e+00 + +# set singlet-higgs coupling +set kap 1.000000e-03 + +# set the decay width to O(e-18) s.t sin^2 theta = O(e-14) and decay length O(10 m) +set whs 5.7793e-18 + +# set the width of the higgs and the dark photon to auto +set wh Auto +set wzp Auto + +# needed to get llp +set time_of_flight 0 + +# set number of events +set nevents 10000 + +done \ No newline at end of file diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-13_proc_card.dat b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-13_proc_card.dat new file mode 100644 index 0000000000..79651c5526 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-13_proc_card.dat @@ -0,0 +1,86 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.4.1 2022-09-01 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +import model sm + +set auto_convert_model T +import model --modelname HAHM_variableMW_v3_UFO/ +define l+ = e+ m+ +define l- = e- m- +define f = u c d s u~ c~ d~ s~ b b~ e+ e- m+ m- tt+ tt- + +#*** generate the process: e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b +generate e+ e- > z > z h, z > l+ l-, (h > hs hs, hs > b b~) + +output h_2hs_4b_mhs60GeV_WHSe-13 + +# launch the event generation +launch + +#*** set electron beams and the center-of-mass energy to the ZH maximum production peak (240 GeV), i.e 120 GeV per electron beam + +# set beam type; 0 for electron, 1 for proton +set lpp1 0 +set lpp2 0 +# set total energy in GeV for each beam +set ebeam1 120 +set ebeam2 120 + +#*** set model parameters; couplings and masses + +# the model accounts both dark scalars and dark photons, hence set the kinetic mixing coupling epsilon to zero and mass of dark photon high (to only simulate SM + dark scalar singlet) +set epsilon 1.000000e-10 +set mZDinput 1.000000e+03 + +# set the mass of the dark scalar +set MHSinput 60.000000e+00 + +# set singlet-higgs coupling +set kap 1.000000e-03 + +# set the decay width to O(e-13) s.t sin^2 theta = O(e-10) and decay length O(mm) +set whs 2.251767e-13 + +# set the width of the higgs and the dark photon to auto +set wh Auto +set wzp Auto + +# needed to get llp +set time_of_flight 0 + +# set number of events +set nevents 10000 + +done \ No newline at end of file diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-15_proc_card.dat b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-15_proc_card.dat new file mode 100644 index 0000000000..a7340fcfdb --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-15_proc_card.dat @@ -0,0 +1,86 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.4.1 2022-09-01 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +import model sm + +set auto_convert_model T +import model --modelname HAHM_variableMW_v3_UFO/ +define l+ = e+ m+ +define l- = e- m- +define f = u c d s u~ c~ d~ s~ b b~ e+ e- m+ m- tt+ tt- + +#*** generate the process: e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b +generate e+ e- > z > z h, z > l+ l-, (h > hs hs, hs > b b~) + +output h_2hs_4b_mhs60GeV_WHSe-15 + +# launch the event generation +launch + +#*** set electron beams and the center-of-mass energy to the ZH maximum production peak (240 GeV), i.e 120 GeV per electron beam + +# set beam type; 0 for electron, 1 for proton +set lpp1 0 +set lpp2 0 +# set total energy in GeV for each beam +set ebeam1 120 +set ebeam2 120 + +#*** set model parameters; couplings and masses + +# the model accounts both dark scalars and dark photons, hence set the kinetic mixing coupling epsilon to zero and mass of dark photon high (to only simulate SM + dark scalar singlet) +set epsilon 1.000000e-10 +set mZDinput 1.000000e+03 + +# set the mass of the dark scalar +set MHSinput 60.000000e+00 + +# set singlet-higgs coupling +set kap 1.000000e-03 + +# set the decay width to O(e-15) s.t sin^2 theta = O(e-12) and decay length O(100 mm) +set whs 2.251767e-15 + +# set the width of the higgs and the dark photon to auto +set wh Auto +set wzp Auto + +# needed to get llp +set time_of_flight 0 + +# set number of events +set nevents 10000 + +done \ No newline at end of file diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-17_proc_card.dat b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-17_proc_card.dat new file mode 100644 index 0000000000..7e0507e78e --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_mS60GeV_WHSe-17_proc_card.dat @@ -0,0 +1,86 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 3.4.1 2022-09-01 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set low_mem_multicore_nlo_generation False +set complex_mass_scheme False +set include_lepton_initiated_processes False +set gauge unitary +set loop_optimized_output True +set loop_color_flows False +set max_npoint_for_channel 0 +set default_unset_couplings 99 +set max_t_for_channel 99 +set zerowidth_tchannel True +set nlo_mixed_expansion True +import model sm + +set auto_convert_model T +import model --modelname HAHM_variableMW_v3_UFO/ +define l+ = e+ m+ +define l- = e- m- +define f = u c d s u~ c~ d~ s~ b b~ e+ e- m+ m- tt+ tt- + +#*** generate the process: e+ e- -> Z -> Z h with Z -> e+ e-/mu+ mu- and h -> 2hs -> 4b +generate e+ e- > z > z h, z > l+ l-, (h > hs hs, hs > b b~) + +output h_2hs_4b_mhs60GeV_WHSe-17 + +# launch the event generation +launch + +#*** set electron beams and the center-of-mass energy to the ZH maximum production peak (240 GeV), i.e 120 GeV per electron beam + +# set beam type; 0 for electron, 1 for proton +set lpp1 0 +set lpp2 0 +# set total energy in GeV for each beam +set ebeam1 120 +set ebeam2 120 + +#*** set model parameters; couplings and masses + +# the model accounts both dark scalars and dark photons, hence set the kinetic mixing coupling epsilon to zero and mass of dark photon high (to only simulate SM + dark scalar singlet) +set epsilon 1.000000e-10 +set mZDinput 1.000000e+03 + +# set the mass of the dark scalar +set MHSinput 60.000000e+00 + +# set singlet-higgs coupling +set kap 1.000000e-03 + +# set the decay width to O(e-17) s.t sin^2 theta = O(e-14) and decay length O(10 m) +set whs 2.251767e-17 + +# set the width of the higgs and the dark photon to auto +set wh Auto +set wzp Auto + +# needed to get llp +set time_of_flight 0 + +# set number of events +set nevents 10000 + +done \ No newline at end of file diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_pythia.cmnd b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_pythia.cmnd new file mode 100644 index 0000000000..59cad22e93 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/H_ss_4b_SampleGeneration/exoticHiggs_scalar_pythia.cmnd @@ -0,0 +1,20 @@ +! File: DarkScalar_pythia.cmnd +Random:setSeed = on +Main:timesAllowErrors = 10 ! how many aborts before run stops +Main:numberOfEvents = 10000 ! number of events to generate + + +! 2) Settings related to output in init(), next() and stat(). +Next:numberCount = 100 ! print message every n events +!Beams:idA = 11 ! first beam, e+ = 11 +!Beams:idB = -11 ! second beam, e- = -11 + +Beams:frameType = 4 ! read info from a LHEF +! Change the LHE file here +Beams:LHEF = h_2hs_4b_mhs20GEV_WHSe-14.lhe + +! 3) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! initial-state radiation +PartonLevel:FSR = on ! final-state radiation + +LesHouches:setLifetime = 2 \ No newline at end of file From aa32a579d4755f4d3286ddaab5d525f85c4e6355 Mon Sep 17 00:00:00 2001 From: mvoorde Date: Fri, 2 Dec 2022 14:33:13 +0100 Subject: [PATCH 17/49] Code for the DV finder --- .../dataframe/FCCAnalyses/VertexingUtils.h | 18 ++++++++++++++++++ .../dataframe/src/VertexFinderLCFIPlus.cc | 3 +++ 2 files changed, 21 insertions(+) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index ce2807d3a1..962455f488 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -43,6 +43,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec< TVector3 > updated_track_momentum_at_vertex; ROOT::VecOps::RVec< TVectorD > updated_track_parameters; ROOT::VecOps::RVec final_track_phases; + ROOT::VecOps::RVec tracks; // added to keep track of the tracks that are associated to each vertex, used in SV finder from LCFI+ to merge vertices }; /// Structure to keep useful information that is related to the V0 @@ -83,6 +84,23 @@ namespace VertexingUtils{ /// Retrieve the number of reconstructed vertices from the collection of vertex object int get_Nvertex( ROOT::VecOps::RVec TheVertexColl ); + /// Merge vertices that are within 10*error of position or 1 mm, of each other + ROOT::VecOps::RVec mergeVertices ( ROOT::VecOps::RVec vertices_in ); + + /// selection of tracks based on the transverse momentum pT + struct sel_pt_tracks { + sel_pt_tracks(float arg_min_pt); + float m_min_pt = 0; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec in); + }; + + /// selection of tracks based on the impact paramter d0 + struct sel_d0_tracks { + sel_d0_tracks(float arg_min_d0); + float m_min_d0 = 0; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec in); + }; + /// Retrieve a single FCCAnalyses vertex from the collection of vertex object FCCAnalysesVertex get_FCCAnalysesVertex(ROOT::VecOps::RVec TheVertexColl, int index ); diff --git a/analyzers/dataframe/src/VertexFinderLCFIPlus.cc b/analyzers/dataframe/src/VertexFinderLCFIPlus.cc index d7ca7a2308..c1930d3ddf 100644 --- a/analyzers/dataframe/src/VertexFinderLCFIPlus.cc +++ b/analyzers/dataframe/src/VertexFinderLCFIPlus.cc @@ -306,6 +306,9 @@ ROOT::VecOps::RVec findSVfromTracks(ROOT::Vec } VertexingUtils::FCCAnalysesVertex sec_vtx = VertexFitterSimple::VertexFitter_Tk(2, tr_vtx_fin, alltracks); // flag 2 for SVs + // save the tracks that are used to fit the SV + sec_vtx.tracks = tr_vtx_fin; + // see if we can also get indices in the reco collection (for tracks forming an SV) //sec_vtx.reco_ind = VertexFitterSimple::get_reco_ind(recoparticles,thetracks); // incorrect From 422840bd79be2873d0c1c9e69edc190a0225df69 Mon Sep 17 00:00:00 2001 From: mvoorde Date: Thu, 15 Dec 2022 16:00:19 +0100 Subject: [PATCH 18/49] modified arragment of MC analysis code --- .../CMakeLists.txt | 48 ----------------- .../include/ExoticHiggsDecays_analysis_code.h | 36 ------------- .../scripts/analysis_cfg.py | 38 -------------- .../src/ExoticHiggsDecays_analysis_code.cc | 51 ------------------- ExoticHiggsDecays_analysis_code/src/classes.h | 3 -- .../src/classes_def.xml | 3 -- analyzers/dataframe/FCCAnalyses/myUtils.h | 9 ++++ analyzers/dataframe/src/myUtils.cc | 32 ++++++++++++ .../ExoticHiggsDecays/MC_analysis_stage1.py | 20 ++++---- 9 files changed, 51 insertions(+), 189 deletions(-) delete mode 100644 ExoticHiggsDecays_analysis_code/CMakeLists.txt delete mode 100644 ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h delete mode 100644 ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py delete mode 100644 ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc delete mode 100644 ExoticHiggsDecays_analysis_code/src/classes.h delete mode 100644 ExoticHiggsDecays_analysis_code/src/classes_def.xml diff --git a/ExoticHiggsDecays_analysis_code/CMakeLists.txt b/ExoticHiggsDecays_analysis_code/CMakeLists.txt deleted file mode 100644 index 7e41c5209f..0000000000 --- a/ExoticHiggsDecays_analysis_code/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -cmake_minimum_required(VERSION 3.16.9) -project(ExoticHiggsDecays_analysis_code CXX) -set(lib_name "FCCAnalysis_ExoticHiggsDecays_analysis_code") -find_package(ROOT COMPONENTS ROOTVecOps ROOTDataFrame REQUIRED) -find_package(EDM4HEP REQUIRED) -#--- Set a better default for installation directory--------------------------- -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP/install" CACHE PATH "default install path" FORCE) -endif() -#--- Offer the user the choice of overriding the installation directories -set(FCCANALYSES_DIR "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP" CACHE PATH - "Installation directory for FCCAnalyses framework") -#--- Find all paths to 'ExoticHiggsDecays_analysis_code' library pieces -file(GLOB headers "include/*.h") -file(GLOB sources "src/*.cc") -file(GLOB classes "src/classes.h") -file(GLOB reflex_sel "src/classes_def.xml") -#--- generate the ROOT dictionary using a REFLEX selection -set(CMAKE_ROOTTEST_NOROOTMAP OFF) -reflex_generate_dictionary(lib${lib_name} ${headers} ${classes} - SELECTION ${reflex_sel}) -#--- build the analysis library (linked against FCCAnalyses) -add_library(${lib_name} SHARED ${sources} ${headers} lib${lib_name}.cxx) -target_include_directories(${lib_name} PUBLIC include - ${FCCANALYSES_DIR} - ${FCCANALYSES_DIR}/addons - ${FCCANALYSES_DIR}/analyzers/dataframe - $) -target_link_directories(${lib_name} PUBLIC ${FCCANALYSES_DIR} - ${FCCANALYSES_DIR}/install/lib) -target_link_libraries(${lib_name} PUBLIC FCCAnalyses - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - ROOT::ROOTVecOps) -set_target_properties(${lib_name} PROPERTIES PUBLIC_HEADER "${headers}") -install(TARGETS ${lib_name} - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT bin - LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" COMPONENT shlib - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/include/ExoticHiggsDecays_analysis_code" - COMPONENT analyses) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}.rootmap" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" - COMPONENT analyses) -if(${ROOT_VERSION} GREATER 6) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}_rdict.pcm" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" - COMPONENT analyses) -endif() -message(STATUS "Built standalone analyser package: ExoticHiggsDecays_analysis_code") diff --git a/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h b/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h deleted file mode 100644 index 47425ddbf5..0000000000 --- a/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -// -/** FCCAnalysis module: ExoticHiggsDecays_analysis_code - * - * \file ExoticHiggsDecays_analysis_code.h - * \author <> - * - * Description: - * [...] - */ - -#ifndef ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h -#define ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h - -#include "ROOT/RVec.hxx" -#include "edm4hep/ReconstructedParticle.h" -#include "edm4hep/MCParticle.h" -#include "FCCAnalyses/MCParticle.h" - -namespace ExoticHiggsDecays_analysis_code { - namespace rv = ROOT::VecOps; - - void dummy_analysis(); - rv::RVec dummy_collection(const rv::RVec&); - - ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); - - struct selMC_leg{ - selMC_leg( int arg_idx ); - int m_idx; - ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, - ROOT::VecOps::RVec in) ; - }; -} // end namespace ExoticHiggsDecays_analysis_code - -#endif diff --git a/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py b/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py deleted file mode 100644 index 8aae2c14dc..0000000000 --- a/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py +++ /dev/null @@ -1,38 +0,0 @@ -#Optional: List of analysis packages to load in runtime -analysesList = ['ExoticHiggsDecays_analysis_code'] - -#Mandatory: List of processes -processList = { - 'p8_noBES_ee_H_Hbb_ecm125':{'fraction': 0.01, 'chunks': 1, 'output': 'test_out'} -} - -#Mandatory: Production tag when running over EDM4Hep centrally produced events, this points to the yaml files for getting sample statistics -prodTag = "FCCee/spring2021/IDEA/" - -#Optional: output directory, default is local running directory -outputDir = "." - -#Optional -nCPUS = 8 -runBatch = False -#batchQueue = "longlunch" -#compGroup = "group_u_FCC.local_gen" - -#Optional test file -testFile = "root://eospublic.cern.ch//eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_ZH_ecm240/events_101027117.root" - -#Mandatory: RDFanalysis class where the use defines the operations on the TTree -class RDFanalysis(): - #__________________________________________________________ - #Mandatory: analysers function to define the analysers to process, please make sure you return the last dataframe, in this example it is df2 - def analysers(df): - df2 = (df - .Define("dummy_collection", "ExoticHiggsDecays_analysis_code::dummy_collection(ReconstructedParticles)") - ) - return df2 - - #__________________________________________________________ - #Mandatory: output function, please make sure you return the branchlist as a python list - def output(): - branchList = ['dummy_collection'] - return branchList diff --git a/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc b/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc deleted file mode 100644 index 99bda51f9a..0000000000 --- a/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc +++ /dev/null @@ -1,51 +0,0 @@ -// -*- C++ -*- -// -/** FCCAnalysis module: ExoticHiggsDecays_analysis_code - * - * \file ExoticHiggsDecays_analysis_code.cc - * \author <> - */ - -#include "ExoticHiggsDecays_analysis_code.h" -#include - -using namespace std; - -namespace ExoticHiggsDecays_analysis_code { - void dummy_analysis() { cout << "Dummy analysis initialised." << endl; } - - rv::RVec dummy_collection(const rv::RVec& parts) { - rv::RVec output; - for (size_t i = 0; i < parts.size(); ++i) - output.emplace_back(parts.at(i).momentum.x); - return output; - } - - ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value) { - ROOT::VecOps::RVec sum; - for (auto i: scalar1_value) { - sum.push_back(i); - } - for (auto j: scalar2_value) { - sum.push_back(j); - } - return sum; -} - -// following code is copied from https://github.com/HEP-FCC/FCCAnalyses/blob/09c52e107e308cf57d59ca840d4bba60e25d94c2/examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py -// used to find the b quarks from respective hs. Can't directly apply sel_byIndex since this function returns a 'edm4hep::MCParticleData' object and we need 'ROOT::VecOps::RVec' - -selMC_leg::selMC_leg( int arg_idx ) : m_idx(arg_idx) { }; -ROOT::VecOps::RVec selMC_leg::operator() ( ROOT::VecOps::RVec list_of_indices, ROOT::VecOps::RVec in) { - ROOT::VecOps::RVec res; - if ( list_of_indices.size() == 0) return res; - if ( m_idx < list_of_indices.size() ) { - res.push_back( FCCAnalyses::MCParticle::sel_byIndex( list_of_indices[m_idx], in ) ); - return res; - } - else { - std::cout << " !!! in selMC_leg: idx = " << m_idx << " but size of list_of_indices = " << list_of_indices.size() << std::endl; - } - return res; -} -} // end namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes.h b/ExoticHiggsDecays_analysis_code/src/classes.h deleted file mode 100644 index e1f92d4d77..0000000000 --- a/ExoticHiggsDecays_analysis_code/src/classes.h +++ /dev/null @@ -1,3 +0,0 @@ -namespace ExoticHiggsDecays_analysis_code { - struct dictionary {}; -} // namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes_def.xml b/ExoticHiggsDecays_analysis_code/src/classes_def.xml deleted file mode 100644 index 33446d12b0..0000000000 --- a/ExoticHiggsDecays_analysis_code/src/classes_def.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/analyzers/dataframe/FCCAnalyses/myUtils.h b/analyzers/dataframe/FCCAnalyses/myUtils.h index 2b8f3a6ded..274ed0b69b 100644 --- a/analyzers/dataframe/FCCAnalyses/myUtils.h +++ b/analyzers/dataframe/FCCAnalyses/myUtils.h @@ -5,6 +5,7 @@ #include "edm4hep/MCParticleData.h" #include "edm4hep/TrackState.h" #include "edm4hep/VertexData.h" +#include "FCCAnalyses/MCParticle.h" #include "TLorentzVector.h" #include "VertexingUtils.h" @@ -77,6 +78,14 @@ namespace myUtils{ ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec recop); }; +struct selMC_leg{ + selMC_leg( int arg_idx ); + int m_idx; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, + ROOT::VecOps::RVec in) ; +}; + +ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); ROOT::VecOps::RVec get_pseudotrack(ROOT::VecOps::RVec vertex, ROOT::VecOps::RVec recop); diff --git a/analyzers/dataframe/src/myUtils.cc b/analyzers/dataframe/src/myUtils.cc index 983adb61a2..1499d79648 100644 --- a/analyzers/dataframe/src/myUtils.cc +++ b/analyzers/dataframe/src/myUtils.cc @@ -13,6 +13,38 @@ namespace FCCAnalyses{ namespace myUtils{ +// following code is added for the Exotic Higgs to LLPs analysis + +ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value) { + ROOT::VecOps::RVec sum; + for (auto i: scalar1_value) { + sum.push_back(i); + } + for (auto j: scalar2_value) { + sum.push_back(j); + } + return sum; +} + +// following code is copied from https://github.com/HEP-FCC/FCCAnalyses/blob/09c52e107e308cf57d59ca840d4bba60e25d94c2/examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py +// used to find the b quarks from respective hs. Can't directly apply sel_byIndex since this function returns a 'edm4hep::MCParticleData' object and we need 'ROOT::VecOps::RVec' + +selMC_leg::selMC_leg( int arg_idx ) : m_idx(arg_idx) { }; +ROOT::VecOps::RVec selMC_leg::operator() ( ROOT::VecOps::RVec list_of_indices, ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec res; + if ( list_of_indices.size() == 0) return res; + if ( m_idx < list_of_indices.size() ) { + res.push_back( FCCAnalyses::MCParticle::sel_byIndex( list_of_indices[m_idx], in ) ); + return res; + } + else { + std::cout << " !!! in selMC_leg: idx = " << m_idx << " but size of list_of_indices = " << list_of_indices.size() << std::endl; + } + return res; +} + +// end of added code for Exotic Higgs to LLPs analysis + float get_d0(TVector3 x, TVector3 p){ float D = x[1]*p[0]/sqrt(p[0]*p[0]+p[1]*p[1])-x[0]*p[1]/sqrt(p[0]*p[0]+p[1]*p[1]); return D; diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py index f0e0d779a5..e5d9c5b28d 100644 --- a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py @@ -9,11 +9,11 @@ #privately-produced signals 'exoticHiggs_scalar_ms20GeV_sine-5':{}, - # 'exoticHiggs_scalar_ms20GeV_sine-6':{}, - # 'exoticHiggs_scalar_ms20GeV_sine-7':{}, - # 'exoticHiggs_scalar_ms60GeV_sine-5':{}, - # 'exoticHiggs_scalar_ms60GeV_sine-6':{}, - # 'exoticHiggs_scalar_ms60GeV_sine-7':{}, + 'exoticHiggs_scalar_ms20GeV_sine-6':{}, + 'exoticHiggs_scalar_ms20GeV_sine-7':{}, + 'exoticHiggs_scalar_ms60GeV_sine-5':{}, + 'exoticHiggs_scalar_ms60GeV_sine-6':{}, + 'exoticHiggs_scalar_ms60GeV_sine-7':{}, } #Production tag. This points to the yaml files for getting sample statistics @@ -114,8 +114,8 @@ def analysers(df): .Define('bquarks2_indices', 'MCParticle::get_indices_ExclusiveDecay_MotherByIndex(H2HSHS_indices[2], {5, -5}, false, Particle, Particle1)') # # get the b quarks, right now only picking the first daughter (hopefully b quark) from the list of decay particles from hs, should update this section maybe - .Define('bquarks1', 'ExoticHiggsDecays_analysis_code::selMC_leg(1) (bquarks1_indices, Particle)') - .Define('bquarks2', 'ExoticHiggsDecays_analysis_code::selMC_leg(1) (bquarks2_indices, Particle)') + .Define('bquarks1', 'myUtils::selMC_leg(1) (bquarks1_indices, Particle)') + .Define('bquarks2', 'myUtils::selMC_leg(1) (bquarks2_indices, Particle)') # # get the vertex position for the first group of b quarks .Define('b1_vertex_x', 'MCParticle::get_vertex_x(bquarks1)') @@ -134,7 +134,7 @@ def analysers(df): .Define('decayLengthHS2', 'return sqrt((b2_vertex_x - HS_vertex_x.at(1))*(b2_vertex_x - HS_vertex_x.at(1)) + (b2_vertex_y - HS_vertex_y.at(1))*(b2_vertex_y - HS_vertex_y.at(1)) + (b2_vertex_z - HS_vertex_z.at(1))*(b2_vertex_z - HS_vertex_z.at(1)))') # get decay length of both scalars in a vector for each event - .Define('decayLengthsHS', 'ExoticHiggsDecays_analysis_code::get_both_scalars(decayLengthHS1, decayLengthHS2)') + .Define('decayLengthsHS', 'myUtils::get_both_scalars(decayLengthHS1, decayLengthHS2)') # get the transverse decay length of HS 1 .Define('LxyHS1', 'return sqrt((b1_vertex_x - HS_vertex_x.at(0))*(b1_vertex_x - HS_vertex_x.at(0)) + (b1_vertex_y - HS_vertex_y.at(0))*(b1_vertex_y - HS_vertex_y.at(0)))') @@ -150,14 +150,14 @@ def analysers(df): .Define('lifetimeHS2', 'return (decayLengthHS2 * 1E-3 * AllGenHS_mass.at(1)/(3E8 * AllGenHS_e.at(1))*1E9)') # get proper lifetime of both scalars in a vector for each event - .Define('lifetimeHS', 'ExoticHiggsDecays_analysis_code::get_both_scalars(lifetimeHS1, lifetimeHS2)') + .Define('lifetimeHS', 'myUtils::get_both_scalars(lifetimeHS1, lifetimeHS2)') # the lifetime of the scalars in the LAB frame in [ns] .Define('lifetimeHS1LAB', 'return (decayLengthHS1 * 1E-3 * 1E9/3E8)') .Define('lifetimeHS2LAB', 'return (decayLengthHS2 * 1E-3 * 1E9/3E8)') # get lifetime in LAB of both scalars in a vector for each event - .Define('lifetimeHSLAB', 'ExoticHiggsDecays_analysis_code::get_both_scalars(lifetimeHS1LAB, lifetimeHS2LAB)') + .Define('lifetimeHSLAB', 'myUtils::get_both_scalars(lifetimeHS1LAB, lifetimeHS2LAB)') ) return df2 From 1ddbc339166167633f789bae07164de113820291 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Mon, 19 Dec 2022 15:44:31 +0100 Subject: [PATCH 19/49] update ALP madgraph/pythia/delphes creation --- .../FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd | 4 ++-- .../bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDelphes.sh | 6 ++++++ .../bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh | 6 ------ 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDelphes.sh delete mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd index 878b55b426..b9ed83503f 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/ALP_pythia.cmnd @@ -1,7 +1,7 @@ ! File: ALP_pythia.cmd Random:setSeed = on Main:timesAllowErrors = 10 ! how many aborts before run stops -Main:numberOfEvents = 10000 ! number of events to generate +Main:numberOfEvents = 100000 ! number of events to generate ! 2) Settings related to output in init(), next() and stat(). @@ -11,7 +11,7 @@ Next:numberCount = 100 ! print message every n events Beams:frameType = 4 ! read info from a LHEF ! Change the LHE file here -Beams:LHEF = ALP_test.lhe +Beams:LHEF = ALP_Z_aa_1GeV_cYY_0p5.lhe ! 3) Settings for the event generation process in the Pythia8 library. PartonLevel:ISR = on ! initial-state radiation diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDelphes.sh b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDelphes.sh new file mode 100644 index 0000000000..7c2c875e32 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDelphes.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# quick command to run DelphesPythia8_EDM4HEP +# needs one input for the name of the output root-file + +DelphesPythia8_EDM4HEP ../../../../../../../FCC-config/FCCee/Delphes/card_IDEA.tcl ../../../../../../../FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl ALP_pythia.cmnd $1 diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh deleted file mode 100644 index 476df1f598..0000000000 --- a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# quick command to run DelphesPythia8_EDM4HEP -# needs one input for the name of the output root-file - -DelphesPythia8_EDM4HEP ../../../../../../FCC-config/FCCee/Delphes/card_IDEA.tcl ../../../../../../FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl ALP_pythia.cmnd $1 \ No newline at end of file From 55ea1e07a9ceddc7bec55c769fb0fd22911a3aff Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Mon, 19 Dec 2022 15:48:05 +0100 Subject: [PATCH 20/49] add selectors to choose reco particle decay legs to myUtils --- analyzers/dataframe/FCCAnalyses/myUtils.h | 30 ++++++--- analyzers/dataframe/src/myUtils.cc | 75 +++++++++++++++++++++++ 2 files changed, 97 insertions(+), 8 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/myUtils.h b/analyzers/dataframe/FCCAnalyses/myUtils.h index 274ed0b69b..5dc5fedeeb 100644 --- a/analyzers/dataframe/FCCAnalyses/myUtils.h +++ b/analyzers/dataframe/FCCAnalyses/myUtils.h @@ -78,14 +78,28 @@ namespace myUtils{ ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec recop); }; -struct selMC_leg{ - selMC_leg( int arg_idx ); - int m_idx; - ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, - ROOT::VecOps::RVec in) ; -}; - -ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); + struct selMC_leg{ + selMC_leg( int arg_idx ); + int m_idx; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, + ROOT::VecOps::RVec in) ; + }; + + struct selRP_leg{ + selRP_leg( int idx ); + int m_idx; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec BsRecoParticles); + }; + + struct selRP_leg_atVertex{ + selRP_leg_atVertex( int idx ); + int m_idx; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec BsRecoParticles, + VertexingUtils::FCCAnalysesVertex BsDecayVertex, + ROOT::VecOps::RVec tracks) ; + }; + + ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); ROOT::VecOps::RVec get_pseudotrack(ROOT::VecOps::RVec vertex, ROOT::VecOps::RVec recop); diff --git a/analyzers/dataframe/src/myUtils.cc b/analyzers/dataframe/src/myUtils.cc index 1499d79648..eb1b6025d0 100644 --- a/analyzers/dataframe/src/myUtils.cc +++ b/analyzers/dataframe/src/myUtils.cc @@ -45,6 +45,81 @@ ROOT::VecOps::RVec selMC_leg::operator() ( ROOT::VecOps // end of added code for Exotic Higgs to LLPs analysis +selRP_leg::selRP_leg(int idx) { + m_idx = idx; +}; + +// Below, RecoParticles is always of size 4 by construction +// but the RecoParticles maybe dummy ( energy set to -9999 ) +ROOT::VecOps::RVec selRP_leg::operator() ( ROOT::VecOps::RVec RecoParticles ) { + ROOT::VecOps::RVec res; + if ( RecoParticles.size() == 0) return res; + if ( m_idx < RecoParticles.size() ) { + res.push_back( RecoParticles[m_idx] ) ; + return res; + } + else { + std::cout << " !!! in selRP_leg: idx = " << m_idx << " but size of RecoParticles = " << RecoParticles.size() << std::endl; + } + return res; +} + + +// Retrieve the Reco'ed legs, but now with their momentum corrected to the decay vertex + +selRP_leg_atVertex::selRP_leg_atVertex(int idx) { + m_idx = idx; +}; + +ROOT::VecOps::RVec selRP_leg_atVertex::operator() ( ROOT::VecOps::RVec RecoParticles, + VertexingUtils::FCCAnalysesVertex DecayVertex, + ROOT::VecOps::RVec tracks) { + + ROOT::VecOps::RVec res; + + if ( RecoParticles.size() == 0 || m_idx > RecoParticles.size() ) { + return res; + } + + if ( DecayVertex.ntracks <= 1 ) return res; // no genuine vertex could be reco'ed + + // the updated momenta of the tracks used in the verte fit : + ROOT::VecOps::RVec< TVector3 > updated_track_momentum_at_vertex = DecayVertex.updated_track_momentum_at_vertex ; + + // m_idx : 1,2,3,4 = mu+, mu-, K+, K- + // but the index in the list of tracks can be different, in case a track was not found + std::vector track_indices; + int count = -1; + for (auto & p: RecoParticles) { + if ( p.tracks_begin>= 0 && p.tracks_begin < tracks.size() ) { // this particle is matched to a track + count ++; + track_indices.push_back( count ); + } + else {// insert -1 + track_indices.push_back( -1 ); + } + } + + int idx_track = track_indices[ m_idx ]; + + if ( idx_track < 0 ) { // no track associated to this particle, return the original particle + res.push_back( RecoParticles.at( m_idx ) ); + return res; + } + else {// idx_track is the track index of this particle, in the internal track array of DecayVertex + TVector3 track_momentum = updated_track_momentum_at_vertex[idx_track]; + edm4hep::ReconstructedParticleData particle = RecoParticles[m_idx]; + particle.momentum.x = track_momentum.Px(); + particle.momentum.y = track_momentum.Py(); + particle.momentum.z = track_momentum.Pz(); + particle.referencePoint = DecayVertex.vertex.position ; + res.push_back( particle ); + return res; + } + + return res; +} + float get_d0(TVector3 x, TVector3 p){ float D = x[1]*p[0]/sqrt(p[0]*p[0]+p[1]*p[1])-x[0]*p[1]/sqrt(p[0]*p[0]+p[1]*p[1]); return D; From 4c03c6f506aec49104bf792e12ad2e66ed3185bc Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Mon, 19 Dec 2022 15:48:45 +0100 Subject: [PATCH 21/49] first commit of ALP analysis code in FCCAnalyses --- .../FCCee/bsm/LLPs/ALPs/analysis_final.py | 287 +++++++ .../FCCee/bsm/LLPs/ALPs/analysis_plots.py | 246 ++++++ .../FCCee/bsm/LLPs/ALPs/analysis_stage1.py | 704 ++++++++++++++++++ 3 files changed, 1237 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ALPs/analysis_final.py create mode 100644 examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py create mode 100644 examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py new file mode 100644 index 0000000000..8434701e62 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py @@ -0,0 +1,287 @@ +#Input directory where the files produced at the stage1 level are +inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +#inputDir = "/eos/user/j/jalimena/FCCeeLLP/" +#inputDir = "output_stage1/" + +#Output directory where the files produced at the final-selection level are +outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_finalSel/" +#outputDir = "output_finalSel/" + +#Integrated luminosity for scaling number of events (required only if setting doScale to true) +#intLumi = 150e6 #pb^-1 + +#Scale event yields by intLumi and cross section (optional) +#doScale = True + +#Save event yields in a table (optional) +saveTabular = True + +processList = { + #run over the full statistics from stage1 + + #backgrounds + #'p8_ee_Zee_ecm91':{}, + + #signals + 'ALP_Z_aa_1GeV_cYY_0p5':{}, +} + +###Dictionary for prettier names of processes (optional) +processLabels = { + #backgrounds + #'p8_ee_Zee_ecm91':"Z $\rightarrow$ ee", + + #signals + 'ALP_Z_aa_1GeV_cYY_0p5': "$m_ALP =$ 1 GeV, $c_{YY} = 0.5$", +} + +#Link to the dictonary that contains all the cross section information etc... +procDict = "FCCee_procDict_spring2021_IDEA.json" + +#Add MySample_p8_ee_ZH_ecm240 as it is not an offical process +procDictAdd={ + "ALP_Z_aa_1GeV_cYY_0p5": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, +} + +#Number of CPUs to use +nCPUS = 2 + +#produces ROOT TTrees, default is False +doTree = False + +###Dictionnay of the list of cuts. The key is the name of the selection that will be added to the output file +cutList = { + "selNone": "n_RecoTracks > -1", + "sel0": "GenALP_mass.size() > 0", + "sel1": "GenALP_mass.size() > 0 && n_RecoElectrons > 1", +} + +###Dictionary for prettier names of cuts (optional) +cutLabels = { + "selNone": "Before selection", + "sel0": "Good GEN ALP mass", + "sel1": "Good GEN ALP mass and 2 reco electrons", +} + +###Dictionary for the ouput variable/hitograms. The key is the name of the variable in the output files. "name" is the name of the variable in the input file, "title" is the x-axis label of the histogram, "bin" the number of bins of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum x-axis value. +histoList = { + #gen variables + "All_n_GenALP": {"name":"All_n_GenALP", "title":"Total number of gen ALPs", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "AllGenALP_mass": {"name":"AllGenALP_mass", "title":"All gen ALP mass [GeV]", "bin":100,"xmin":0 ,"xmax":10}, + "AllGenALP_e": {"name":"AllGenALP_e", "title":"All gen ALP energy [GeV]", "bin":100,"xmin":0 ,"xmax":100}, + "AllGenALP_p": {"name":"AllGenALP_p", "title":"All gen ALP p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "AllGenALP_pt": {"name":"AllGenALP_pt", "title":"All gen ALP p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "AllGenALP_pz": {"name":"AllGenALP_pz", "title":"All gen ALP p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "AllGenALP_eta": {"name":"AllGenALP_eta", "title":"All gen ALP #eta", "bin":60, "xmin":-3,"xmax":3}, + "AllGenALP_theta": {"name":"AllGenALP_theta", "title":"All gen ALP #theta", "bin":64, "xmin":0,"xmax":3.2}, + "AllGenALP_phi": {"name":"AllGenALP_phi", "title":"All gen ALP #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + "n_FSGenElectron": {"name":"n_FSGenElectron", "title":"Number of final state gen electrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_FSGenPositron": {"name":"n_FSGenPositron", "title":"Number of final state gen positrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_FSGenNeutrino": {"name":"n_FSGenNeutrino", "title":"Number of final state gen neutrinos", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_FSGenAntiNeutrino": {"name":"n_FSGenAntiNeutrino", "title":"Number of final state gen anti-neutrinos", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_FSGenPhoton": {"name":"n_FSGenPhoton", "title":"Number of final state gen photons", "bin":8,"xmin":-0.5 ,"xmax":7.5}, + + # "n_FSGenElectron_forFS2GenPhotons": {"name":"n_FSGenElectron_forFS2GenPhotons", "title":"Number of final state gen electrons for events with 2 FS photons", "bin":7,"xmin":-2.5 ,"xmax":4.5}, + # "n_FSGenPositron_forFS2GenPhotons": {"name":"n_FSGenPositron_forFS2GenPhotons", "title":"Number of final state gen positrons for events with 2 FS photons", "bin":7,"xmin":-2.5 ,"xmax":4.5}, + + "FSGenElectron_e": {"name":"FSGenElectron_e", "title":"Final state gen electrons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenElectron_p": {"name":"FSGenElectron_p", "title":"Final state gen electrons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenElectron_pt": {"name":"FSGenElectron_pt", "title":"Final state gen electrons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenElectron_pz": {"name":"FSGenElectron_pz", "title":"Final state gen electrons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenElectron_eta": {"name":"FSGenElectron_eta", "title":"Final state gen electrons #eta", "bin":60, "xmin":-3,"xmax":3}, + "FSGenElectron_theta": {"name":"FSGenElectron_theta", "title":"Final state gen electrons #theta", "bin":64, "xmin":0,"xmax":3.2}, + "FSGenElectron_phi": {"name":"FSGenElectron_phi", "title":"Final state gen electrons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + "FSGenPositron_e": {"name":"FSGenPositron_e", "title":"Final state gen positrons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPositron_p": {"name":"FSGenPositron_p", "title":"Final state gen positrons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPositron_pt": {"name":"FSGenPositron_pt", "title":"Final state gen positrons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPositron_pz": {"name":"FSGenPositron_pz", "title":"Final state gen positrons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPositron_eta": {"name":"FSGenPositron_eta", "title":"Final state gen positrons #eta", "bin":60, "xmin":-3,"xmax":3}, + "FSGenPositron_theta": {"name":"FSGenPositron_theta", "title":"Final state gen positrons #theta", "bin":64, "xmin":0,"xmax":3.2}, + "FSGenPositron_phi": {"name":"FSGenPositron_phi", "title":"Final state gen positrons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + "FSGenNeutrino_e": {"name":"FSGenNeutrino_e", "title":"Final state gen neutrino energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenNeutrino_p": {"name":"FSGenNeutrino_p", "title":"Final state gen neutrino p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenNeutrino_pt": {"name":"FSGenNeutrino_pt", "title":"Final state gen neutrino p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenNeutrino_pz": {"name":"FSGenNeutrino_pz", "title":"Final state gen neutrino p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenNeutrino_eta": {"name":"FSGenNeutrino_eta", "title":"Final state gen neutrinos #eta", "bin":60, "xmin":-3,"xmax":3}, + "FSGenNeutrino_theta": {"name":"FSGenNeutrino_theta", "title":"Final state gen neutrinos #theta", "bin":64, "xmin":0,"xmax":3.2}, + "FSGenNeutrino_phi": {"name":"FSGenNeutrino_phi", "title":"Final state gen neutrinos #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + "FSGenAntiNeutrino_e": {"name":"FSGenAntiNeutrino_e", "title":"Final state gen anti-neutrino energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenAntiNeutrino_p": {"name":"FSGenAntiNeutrino_p", "title":"Final state gen anti-neutrino p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenAntiNeutrino_pt": {"name":"FSGenAntiNeutrino_pt", "title":"Final state gen anti-neutrino p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenAntiNeutrino_pz": {"name":"FSGenAntiNeutrino_pz", "title":"Final state gen anti-neutrino p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenAntiNeutrino_eta": {"name":"FSGenAntiNeutrino_eta", "title":"Final state gen anti-neutrinos #eta", "bin":60, "xmin":-3,"xmax":3}, + "FSGenAntiNeutrino_theta": {"name":"FSGenAntiNeutrino_theta", "title":"Final state gen anti-neutrinos #theta", "bin":64, "xmin":0,"xmax":3.2}, + "FSGenAntiNeutrino_phi": {"name":"FSGenAntiNeutrino_phi", "title":"Final state gen anti-neutrinos #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + "FSGenPhoton_e": {"name":"FSGenPhoton_e", "title":"Final state gen photons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPhoton_p": {"name":"FSGenPhoton_p", "title":"Final state gen photons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPhoton_pt": {"name":"FSGenPhoton_pt", "title":"Final state gen photons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPhoton_pz": {"name":"FSGenPhoton_pz", "title":"Final state gen photons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPhoton_eta": {"name":"FSGenPhoton_eta", "title":"Final state gen photons #eta", "bin":60, "xmin":-3,"xmax":3}, + "FSGenPhoton_theta": {"name":"FSGenPhoton_theta", "title":"Final state gen photons #theta", "bin":64, "xmin":0,"xmax":3.2}, + "FSGenPhoton_phi": {"name":"FSGenPhoton_phi", "title":"Final state gen photons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + # "FSGenPhoton0_e": {"name":"FSGenPhoton0_e", "title":"Final state gen photon_{0} energy [GeV]", "bin":64, "xmin":-3.2,"xmax":3.2}, + # "FSGenPhoton1_e": {"name":"FSGenPhoton1_e", "title":"Final state gen photon_{1} energy [GeV]", "bin":64, "xmin":-3.2,"xmax":3.2}, + # "FSGenPhoton2_e": {"name":"FSGenPhoton2_e", "title":"Final state gen photon_{2} energy [GeV]", "bin":64, "xmin":-3.2,"xmax":3.2}, + # "FSGenPhoton0_p": {"name":"FSGenPhoton0_p", "title":"Final state gen photon_{0} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPhoton1_p": {"name":"FSGenPhoton1_p", "title":"Final state gen photon_{1} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPhoton2_p": {"name":"FSGenPhoton2_p", "title":"Final state gen photon_{2} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPhoton0_pt": {"name":"FSGenPhoton0_pt", "title":"Final state gen photon_{0} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPhoton1_pt": {"name":"FSGenPhoton1_pt", "title":"Final state gen photon_{1} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPhoton2_pt": {"name":"FSGenPhoton2_pt", "title":"Final state gen photon_{2} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + + "FSGenPhoton_vertex_x": {"name":"FSGenPhoton_vertex_x", "title":"Final state gen photon production vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "FSGenPhoton_vertex_y": {"name":"FSGenPhoton_vertex_y", "title":"Final state gen photon production vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "FSGenPhoton_vertex_z": {"name":"FSGenPhoton_vertex_z", "title":"Final state gen photon production vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + + "FSGen_lifetime_xy": {"name":"FSGen_lifetime_xy", "title":"Gen ALP (FS eles) #tau_{xy} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, + "FSGen_lifetime_xyz": {"name":"FSGen_lifetime_xyz", "title":"Gen ALP (FS eles) #tau_{xyz} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, + "FSGen_Lxy": {"name":"FSGen_Lxy", "title":"Gen ALP (FS eles) L_{xy} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + "FSGen_Lxyz": {"name":"FSGen_Lxyz", "title":"Gen ALP (FS eles) L_{xyz} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + + # "FSGen_a0a1_invMass": {"name":"FSGen_a0a1_invMass", "title":"Gen FS photons m_{01} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # "FSGen_a0a2_invMass": {"name":"FSGen_a0a2_invMass", "title":"Gen FS photons m_{02} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # "FSGen_a1a2_invMass": {"name":"FSGen_a1a2_invMass", "title":"Gen FS photons m_{12} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # "FSGen_aaa_invMass": {"name":"FSGen_aaa_invMass", "title":"Gen FS m_{#gamma #gamma #gamma} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + + "GenALP_mass": {"name":"GenALP_mass", "title":"Gen ALP mass [GeV]", "bin":100,"xmin":0 ,"xmax":10}, + "GenALP_p": {"name":"GenALP_p", "title":"Gen ALP p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALP_pt": {"name":"GenALP_pt", "title":"Gen ALP p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALP_pz": {"name":"GenALP_pz", "title":"Gen ALP p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALP_eta": {"name":"GenALP_eta", "title":"Gen ALP #eta", "bin":60, "xmin":-3,"xmax":3}, + "GenALP_theta": {"name":"GenALP_theta", "title":"Gen ALP #theta", "bin":64, "xmin":0,"xmax":3.2}, + "GenALP_phi": {"name":"GenALP_phi", "title":"Gen ALP #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "GenALP_lifetime_xy": {"name":"GenALP_lifetime_xy", "title":"Gen ALP #tau_{xy} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, + "GenALP_lifetime_xyz": {"name":"GenALP_lifetime_xyz", "title":"Gen ALP #tau_{xyz} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, + "GenALP_Lxy": {"name":"GenALP_Lxy", "title":"Gen ALP L_{xy} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + "GenALP_Lxyz": {"name":"GenALP_Lxyz", "title":"Gen ALP L_{xyz} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + "GenALP_vertex_x": {"name":"GenALP_vertex_x", "title":"Gen ALP production vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenALP_vertex_y": {"name":"GenALP_vertex_y", "title":"Gen ALP production vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenALP_vertex_z": {"name":"GenALP_vertex_z", "title":"Gen ALP production vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + + "GenALPPhoton1_e": {"name":"GenALPPhoton1_e", "title":"Gen photon_{1} energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton2_e": {"name":"GenALPPhoton2_e", "title":"Gen photon_{2} energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton1_p": {"name":"GenALPPhoton1_p", "title":"Gen photon_{1} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton2_p": {"name":"GenALPPhoton2_p", "title":"Gen photon_{2} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton1_pt": {"name":"GenALPPhoton1_pt", "title":"Gen photon_{1} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton2_pt": {"name":"GenALPPhoton2_pt", "title":"Gen photon_{2} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton1_pz": {"name":"GenALPPhoton1_pz", "title":"Gen photon_{1} p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton2_pz": {"name":"GenALPPhoton2_pz", "title":"Gen photon_{2} p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "GenALPPhoton1_eta": {"name":"GenALPPhoton1_eta", "title":"Gen photon_{1} #eta", "bin":60, "xmin":-3,"xmax":3}, + "GenALPPhoton2_eta": {"name":"GenALPPhoton2_eta", "title":"Gen photon_{2} #eta", "bin":60, "xmin":-3,"xmax":3}, + "GenALPPhoton1_theta": {"name":"GenALPPhoton1_theta", "title":"Gen photon_{1} #theta", "bin":64, "xmin":0,"xmax":3.2}, + "GenALPPhoton2_theta": {"name":"GenALPPhoton2_theta", "title":"Gen photon_{2} #theta", "bin":64, "xmin":0,"xmax":3.2}, + "GenALPPhoton1_phi": {"name":"GenALPPhoton1_phi", "title":"Gen photon_{1} #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "GenALPPhoton2_phi": {"name":"GenALPPhoton2_phi", "title":"Gen photon_{2} #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + "GenALPPhoton1_vertex_x": {"name":"GenALPPhoton1_vertex_x", "title":"Gen photon_{1} production vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenALPPhoton1_vertex_y": {"name":"GenALPPhoton1_vertex_y", "title":"Gen photon_{1} production vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenALPPhoton1_vertex_z": {"name":"GenALPPhoton1_vertex_z", "title":"Gen photon_{1} production vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + + "GenALP_aa_invMass": {"name":"GenALP_aa_invMass", "title":"Gen m_{#gamma #gamma} (from ALP) [GeV]", "bin":100,"xmin":0, "xmax":10}, + + #reco variables + "n_RecoTracks": {"name":"n_RecoTracks", "title":"Total number of reco tracks", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_RecoALPTracks": {"name":"n_RecoALPTracks", "title":"Number of reco ALP tracks", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "RecoALP_DecayVertex_x": {"name":"RecoALPDecayVertex.position.x", "title":"Reco ALP decay vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "RecoALP_DecayVertex_y": {"name":"RecoALPDecayVertex.position.y", "title":"Reco ALP decay vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "RecoALP_DecayVertex_z": {"name":"RecoALPDecayVertex.position.z", "title":"Reco ALP decay vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "RecoALP_DecayVertex_chi2": {"name":"RecoALPDecayVertex.chi2", "title":"Reco ALP decay vertex #chi^{2}", "bin":100,"xmin":0 ,"xmax":3}, + "RecoALP_DecayVertex_probability": {"name":"RecoALPDecayVertex.probability", "title":"Reco ALP decay vertex probability", "bin":100,"xmin":0 ,"xmax":10}, + + "RecoALPPhoton1_e": {"name":"RecoALPPhoton1_e", "title":"Reco photon_{1} (from ALP) energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton2_e": {"name":"RecoALPPhoton2_e", "title":"Reco photon_{2} (from ALP) energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton1_p": {"name":"RecoALPPhoton1_p", "title":"Reco photon_{1} (from ALP) p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton2_p": {"name":"RecoALPPhoton2_p", "title":"Reco photon_{2} (from ALP) p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton1_pt": {"name":"RecoALPPhoton1_pt", "title":"Reco photon_{1} (from ALP) p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton2_pt": {"name":"RecoALPPhoton2_pt", "title":"Reco photon_{2} (from ALP) p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton1_pz": {"name":"RecoALPPhoton1_pz", "title":"Reco photon_{1} (from ALP) p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton2_pz": {"name":"RecoALPPhoton2_pz", "title":"Reco photon_{2} (from ALP) p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoALPPhoton1_eta": {"name":"RecoALPPhoton1_eta", "title":"Reco photon_{1} (from ALP) #eta", "bin":60, "xmin":-3,"xmax":3}, + "RecoALPPhoton2_eta": {"name":"RecoALPPhoton2_eta", "title":"Reco photon_{2} (from ALP) #eta", "bin":60, "xmin":-3,"xmax":3}, + "RecoALPPhoton1_theta": {"name":"RecoALPPhoton1_theta", "title":"Reco photon_{1} (from ALP) #theta", "bin":64, "xmin":0,"xmax":3.2}, + "RecoALPPhoton2_theta": {"name":"RecoALPPhoton2_theta", "title":"Reco photon_{2} (from ALP) #theta", "bin":64, "xmin":0,"xmax":3.2}, + "RecoALPPhoton1_phi": {"name":"RecoALPPhoton1_phi", "title":"Reco photon_{1} (from ALP) #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "RecoALPPhoton2_phi": {"name":"RecoALPPhoton2_phi", "title":"Reco photon_{2} (from ALP) #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "RecoALPPhoton1_charge": {"name":"RecoALPPhoton1_charge", "title":"Reco photon_{1} (from ALP) charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + "RecoALPPhoton2_charge": {"name":"RecoALPPhoton2_charge", "title":"Reco photon_{2} (from ALP) charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + "RecoALP_aa_invMass": {"name":"RecoALP_aa_invMass", "title":"Reco m_{#gamma #gamma} (from ALP) [GeV]", "bin":100,"xmin":0, "xmax":100}, + + "n_RecoJets": {"name":"n_RecoJets", "title":"Total number of reco jets", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_RecoPhotons": {"name":"n_RecoPhotons", "title":"Total number of reco photons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_RecoElectrons": {"name":"n_RecoElectrons", "title":"Total number of reco electrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_RecoMuons": {"name":"n_RecoMuons", "title":"Total number of reco muons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + + "RecoJet_e": {"name":"RecoJet_e", "title":"Reco jet energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoJet_p": {"name":"RecoJet_p", "title":"Reco jet p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoJet_pt": {"name":"RecoJet_pt", "title":"Reco jet p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoJet_pz": {"name":"RecoJet_pz", "title":"Reco jet p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoJet_eta": {"name":"RecoJet_eta", "title":"Reco jet #eta", "bin":60, "xmin":-3,"xmax":3}, + "RecoJet_theta": {"name":"RecoJet_theta", "title":"Reco jet #theta", "bin":64, "xmin":0,"xmax":3.2}, + "RecoJet_phi": {"name":"RecoJet_phi", "title":"Reco jet #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "RecoJet_charge": {"name":"RecoJet_charge", "title":"Reco jet charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + "RecoElectron_e": {"name":"RecoElectron_e", "title":"Reco electron energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoElectron_p": {"name":"RecoElectron_p", "title":"Reco electron p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoElectron_pt": {"name":"RecoElectron_pt", "title":"Reco electron p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoElectron_pz": {"name":"RecoElectron_pz", "title":"Reco electron p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoElectron_eta": {"name":"RecoElectron_eta", "title":"Reco electron #eta", "bin":60, "xmin":-3,"xmax":3}, + "RecoElectron_theta": {"name":"RecoElectron_theta", "title":"Reco electron #theta", "bin":64, "xmin":0,"xmax":3.2}, + "RecoElectron_phi": {"name":"RecoElectron_phi", "title":"Reco electron #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "RecoElectron_charge": {"name":"RecoElectron_charge", "title":"Reco electron charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + "RecoPhoton_e": {"name":"RecoPhoton_e", "title":"Reco photon energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoPhoton_p": {"name":"RecoPhoton_p", "title":"Reco photon p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoPhoton_pt": {"name":"RecoPhoton_pt", "title":"Reco photon p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoPhoton_pz": {"name":"RecoPhoton_pz", "title":"Reco photon p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoPhoton_eta": {"name":"RecoPhoton_eta", "title":"Reco photon #eta", "bin":60, "xmin":-3,"xmax":3}, + "RecoPhoton_theta": {"name":"RecoPhoton_theta", "title":"Reco photon #theta", "bin":64, "xmin":0,"xmax":3.2}, + "RecoPhoton_phi": {"name":"RecoPhoton_phi", "title":"Reco photon #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "RecoPhoton_charge": {"name":"RecoPhoton_charge", "title":"Reco photon charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + "RecoMuon_e": {"name":"RecoMuon_e", "title":"Reco muon energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMuon_p": {"name":"RecoMuon_p", "title":"Reco muon p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMuon_pt": {"name":"RecoMuon_pt", "title":"Reco muon p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMuon_pz": {"name":"RecoMuon_pz", "title":"Reco muon p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMuon_eta": {"name":"RecoMuon_eta", "title":"Reco muon #eta", "bin":60, "xmin":-3,"xmax":3}, + "RecoMuon_theta": {"name":"RecoMuon_theta", "title":"Reco muon #theta", "bin":64, "xmin":0,"xmax":3.2}, + "RecoMuon_phi": {"name":"RecoMuon_phi", "title":"Reco muon #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "RecoMuon_charge": {"name":"RecoMuon_charge", "title":"Reco muon charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + "RecoMissingEnergy_e": {"name":"RecoMissingEnergy_e", "title":"Reco Total Missing Energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMissingEnergy_p": {"name":"RecoMissingEnergy_p", "title":"Reco Total Missing p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMissingEnergy_pt": {"name":"RecoMissingEnergy_pt", "title":"Reco Missing p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMissingEnergy_px": {"name":"RecoMissingEnergy_px", "title":"Reco Missing p_{x} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMissingEnergy_py": {"name":"RecoMissingEnergy_py", "title":"Reco Missing p_{y} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMissingEnergy_pz": {"name":"RecoMissingEnergy_pz", "title":"Reco Missing p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "RecoMissingEnergy_eta": {"name":"RecoMissingEnergy_eta", "title":"Reco Missing Energy #eta", "bin":60,"xmin":-3 ,"xmax":3}, + "RecoMissingEnergy_theta": {"name":"RecoMissingEnergy_theta", "title":"Reco Missing Energy #theta", "bin":64,"xmin":0 , "xmax":3.2}, + "RecoMissingEnergy_phi": {"name":"RecoMissingEnergy_phi", "title":"Reco Missing Energy #phi", "bin":64,"xmin":-3.2 ,"xmax":3.2}, + + #gen-reco + "GenMinusRecoALPPhoton1_e": {"name":"GenMinusRecoALPPhoton1_e", "title":"Gen photon_{1} energy - Reco photon_{1} energy [GeV]","bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_e": {"name":"GenMinusRecoALPPhoton2_e", "title":"Gen photon_{2} energy - Reco photon_{2} energy [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton1_p": {"name":"GenMinusRecoALPPhoton1_p", "title":"Gen photon_{1} p - Reco photon_{1} p [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_p": {"name":"GenMinusRecoALPPhoton2_p", "title":"Gen photon_{2} p - Reco photon_{2} p [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton1_pt": {"name":"GenMinusRecoALPPhoton1_pt", "title":"Gen photon_{1} p_{T} - Reco photon_{1} p_{T} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_pt": {"name":"GenMinusRecoALPPhoton2_pt", "title":"Gen photon_{2} p_{T} - Reco photon_{2} p_{T} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton1_pz": {"name":"GenMinusRecoALPPhoton1_pz", "title":"Gen photon_{1} p_{z} - Reco photon_{1} p_{z} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_pz": {"name":"GenMinusRecoALPPhoton2_pz", "title":"Gen photon_{2} p_{z} - Reco photon_{2} p_{z} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton1_eta": {"name":"GenMinusRecoALPPhoton1_eta", "title":"Gen photon_{1} #eta - Reco photon_{1} #eta", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_eta": {"name":"GenMinusRecoALPPhoton2_eta", "title":"Gen photon_{2} #eta - Reco photon_{2} #eta", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton1_theta":{"name":"GenMinusRecoALPPhoton1_theta","title":"Gen photon_{1} #theta - Reco photon_{1} #theta", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_theta":{"name":"GenMinusRecoALPPhoton2_theta","title":"Gen photon_{2} #theta - Reco photon_{2} #theta", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton1_phi": {"name":"GenMinusRecoALPPhoton1_phi", "title":"Gen photon_{1} #phi - Reco photon_{1} #phi", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALPPhoton2_phi": {"name":"GenMinusRecoALPPhoton2_phi", "title":"Gen photon_{2} #phi - Reco photon_{2} #phi", "bin":100,"xmin":-5 ,"xmax":5}, + + "GenMinusRecoALP_DecayVertex_x": {"name":"GenMinusRecoALP_DecayVertex_x", "title":"Gen ALP decay vertex x - Reco ALP decay vertex x [mm]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALP_DecayVertex_y": {"name":"GenMinusRecoALP_DecayVertex_y", "title":"Gen ALP decay vertex y - Reco ALP decay vertex y [mm]", "bin":100,"xmin":-5 ,"xmax":5}, + "GenMinusRecoALP_DecayVertex_z": {"name":"GenMinusRecoALP_DecayVertex_z", "title":"Gen ALP decay vertex z - Reco ALP decay vertex z [mm]", "bin":100,"xmin":-5 ,"xmax":5}, + +} diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py new file mode 100644 index 0000000000..b1545588dd --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py @@ -0,0 +1,246 @@ +import ROOT + +# global parameters +intLumi = 150.0e+06 #in pb-1 + +###If scaleSig=0 or scaleBack=0, we don't apply any additional scaling, on top of the normalization to cross section and integrated luminosity, as defined in finalSel.py +###If scaleSig or scaleBack is not defined, plots will be normalized to 1 +#scaleSig = 0. +#scaleBack = 0. +ana_tex = 'e^{+}e^{-} #rightarrow Z #rightarrow #gamma ALP #rightarrow 3#gamma' +#ana_tex = '' +#delphesVersion = '3.4.2' +delphesVersion = '' +energy = 91 +collider = 'FCC-ee' +inputDir = '/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_finalSel/' +#formats = ['png','pdf'] +formats = ['pdf'] +yaxis = ['lin','log'] +stacksig = ['nostack'] +outdir = 'plots/' +splitLeg = True + +variables = [ + #gen variables + "All_n_GenALP", + "AllGenALP_mass", + "AllGenALP_e", + "AllGenALP_p", + "AllGenALP_pt", + "AllGenALP_pz", + "AllGenALP_eta", + "AllGenALP_theta", + "AllGenALP_phi", + + "n_FSGenElectron", + "n_FSGenPositron", + "n_FSGenNeutrino", + "n_FSGenAntiNeutrino", + "n_FSGenPhoton", + # "n_FSGenElectron_forFS2GenPhotons", + # "n_FSGenPositron_forFS2GenPhotons", + + "FSGenElectron_e", + "FSGenElectron_p", + "FSGenElectron_pt", + "FSGenElectron_pz", + "FSGenElectron_eta", + "FSGenElectron_theta", + "FSGenElectron_phi", + + "FSGenPositron_e", + "FSGenPositron_p", + "FSGenPositron_pt", + "FSGenPositron_pz", + "FSGenPositron_eta", + "FSGenPositron_theta", + "FSGenPositron_phi", + + "FSGenNeutrino_e", + "FSGenNeutrino_p", + "FSGenNeutrino_pt", + "FSGenNeutrino_pz", + "FSGenNeutrino_eta", + "FSGenNeutrino_theta", + "FSGenNeutrino_phi", + + "FSGenAntiNeutrino_e", + "FSGenAntiNeutrino_p", + "FSGenAntiNeutrino_pt", + "FSGenAntiNeutrino_pz", + "FSGenAntiNeutrino_eta", + "FSGenAntiNeutrino_theta", + "FSGenAntiNeutrino_phi", + + "FSGenPhoton_e", + "FSGenPhoton_p", + "FSGenPhoton_pt", + "FSGenPhoton_pz", + "FSGenPhoton_eta", + "FSGenPhoton_theta", + "FSGenPhoton_phi", + + "FSGenPhoton_vertex_x", + "FSGenPhoton_vertex_y", + "FSGenPhoton_vertex_z", + + "FSGen_Lxy", + "FSGen_Lxyz", + "FSGen_lifetime_xy", + "FSGen_lifetime_xyz", + + # "FSGenPhoton0_e", + # "FSGenPhoton1_e", + # "FSGenPhoton2_e", + # "FSGenPhoton0_p", + # "FSGenPhoton1_p", + # "FSGenPhoton2_p", + # "FSGenPhoton0_pt", + # "FSGenPhoton1_pt", + # "FSGenPhoton2_pt", + # "FSGen_a0a1_invMass", + # "FSGen_a0a2_invMass", + # "FSGen_a1a2_invMass", + # "FSGen_aaa_invMass", + + "GenALP_mass", + "GenALP_p", + "GenALP_pt", + "GenALP_pz", + "GenALP_eta", + "GenALP_theta", + "GenALP_phi", + "GenALP_lifetime_xy", + "GenALP_lifetime_xyz", + "GenALP_Lxy", + "GenALP_Lxyz", + "GenALP_vertex_x", + "GenALP_vertex_y", + "GenALP_vertex_z", + + "GenALPPhoton1_e", + "GenALPPhoton2_e", + "GenALPPhoton1_p", + "GenALPPhoton2_p", + "GenALPPhoton1_pt", + "GenALPPhoton2_pt", + "GenALPPhoton1_pz", + "GenALPPhoton2_pz", + "GenALPPhoton1_eta", + "GenALPPhoton2_eta", + "GenALPPhoton1_theta", + "GenALPPhoton2_theta", + "GenALPPhoton1_phi", + "GenALPPhoton2_phi", + "GenALPPhoton1_vertex_x", + "GenALPPhoton1_vertex_y", + "GenALPPhoton1_vertex_z", + + "GenALP_aa_invMass", + + #reco variables + "n_RecoTracks", + "n_RecoALPTracks", + "RecoALP_DecayVertex_x", + "RecoALP_DecayVertex_y", + "RecoALP_DecayVertex_z", + "RecoALP_DecayVertex_chi2", + "RecoALP_DecayVertex_probability", + + "RecoALPPhoton1_e", + "RecoALPPhoton2_e", + "RecoALPPhoton1_p", + "RecoALPPhoton2_p", + "RecoALPPhoton1_pt", + "RecoALPPhoton2_pt", + "RecoALPPhoton1_pz", + "RecoALPPhoton2_pz", + "RecoALPPhoton1_eta", + "RecoALPPhoton2_eta", + "RecoALPPhoton1_theta", + "RecoALPPhoton2_theta", + "RecoALPPhoton1_phi", + "RecoALPPhoton2_phi", + "RecoALPPhoton1_charge", + "RecoALPPhoton2_charge", + + "n_RecoJets", + "n_RecoPhotons", + "n_RecoElectrons", + "n_RecoMuons", + + "RecoJet_e", + "RecoJet_p", + "RecoJet_pt", + "RecoJet_pz", + "RecoJet_eta", + "RecoJet_theta", + "RecoJet_phi", + "RecoJet_charge", + + "RecoElectron_e", + "RecoElectron_p", + "RecoElectron_pt", + "RecoElectron_pz", + "RecoElectron_eta", + "RecoElectron_theta", + "RecoElectron_phi", + "RecoElectron_charge", + + "RecoPhoton_e", + "RecoPhoton_p", + "RecoPhoton_pt", + "RecoPhoton_pz", + "RecoPhoton_eta", + "RecoPhoton_theta", + "RecoPhoton_phi", + "RecoPhoton_charge", + + "RecoMuon_e", + "RecoMuon_p", + "RecoMuon_pt", + "RecoMuon_pz", + "RecoMuon_eta", + "RecoMuon_theta", + "RecoMuon_phi", + "RecoMuon_charge", + + "RecoMissingEnergy_e", + "RecoMissingEnergy_p", + "RecoMissingEnergy_pt", + "RecoMissingEnergy_px", + "RecoMissingEnergy_py", + "RecoMissingEnergy_pz", + "RecoMissingEnergy_eta", + "RecoMissingEnergy_theta", + "RecoMissingEnergy_phi", + +] + + +###Dictionary with the analysis name as a key, and the list of selections to be plotted for this analysis. The name of the selections should be the same than in the final selection +selections = {} +selections['ALP'] = ["selNone"]#,"sel0","sel1"] + +extralabel = {} +extralabel['selNone'] = "Before selection" +#extralabel['sel0'] = "Selection: At least 1 ALP" +#extralabel['sel1'] = "Selection: At least 1 ALP, at least 2 reco electrons" + +colors = {} +colors['ALP_Z_aa_1GeV_cYY_0p5'] = ROOT.kRed +#colors['Zee'] = ROOT.kGray+2 + +plots = {} +plots['ALP'] = {'signal':{ + 'ALP_Z_aa_1GeV_cYY_0p5':['ALP_Z_aa_1GeV_cYY_0p5'], +}, + 'backgrounds':{}, + #'Zee':['p8_ee_Zee_ecm91'], +} + + +legend = {} +legend['ALP_Z_aa_1GeV_cYY_0p5'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.5' +#legend['Zee'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py new file mode 100644 index 0000000000..611460383d --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py @@ -0,0 +1,704 @@ +#Mandatory: List of processes +processList = { + + #centrally-produced backgrounds + #'p8_ee_Zee_ecm91':{'chunks':100}, + + #privately-produced signals + 'ALP_Z_aa_1GeV_cYY_0p5':{}, + + #test + #'p8_ee_Zee_ecm91':{'fraction':0.000001}, +} + +#Production tag. This points to the yaml files for getting sample statistics +#Mandatory when running over EDM4Hep centrally produced events +#Comment out when running over privately produced events +#prodTag = "FCCee/winter2023/IDEA/" + +#Input directory +#Comment out when running over centrally produced events +#Mandatory when running over privately produced events +inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_MadgraphPythiaDelphes" + + +#Optional: output directory, default is local dir +outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +#outputDir = "/eos/user/j/jalimena/FCCeeLLP/" +#outputDir = "output_stage1/" + +#outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +#outputDirEos = "/eos/user/j/jalimena/FCCeeLLP/" +#eosType = "eosuser" + +#Optional: ncpus, default is 4 +nCPUS = 4 + +#Optional running on HTCondor, default is False +runBatch = False +#runBatch = True + +#Optional batch queue name when running on HTCondor, default is workday +batchQueue = "longlunch" + +#Optional computing account when running on HTCondor, default is group_u_FCC.local_gen +compGroup = "group_u_FCC.local_gen" + +#Mandatory: RDFanalysis class where the use defines the operations on the TTree +class RDFanalysis(): + def analysers(df): + + df2 = (df + + #Access the various objects and their properties with the following syntax: .Define("", "") + #This will create a column in the RDataFrame named and filled with the return value of the for the given collection/object + #Accessor functions are the functions found in the C++ analyzers code that return a certain variable, e.g. ::get_n(object) returns the number + #of these objects in the event and ::get_pt(object) returns the pt of the object. Here you can pick between two namespaces to access either + #reconstructed (namespace = ReconstructedParticle) or MC-level objects (namespace = MCParticle). + #For the name of the object, in principle the names of the EDM4HEP collections are used - photons, muons and electrons are an exception, see below + + #OVERVIEW: Accessing different objects and counting them + + # Following code is written specifically for the ALP study + #################################################################################################### + .Alias("Particle1", "Particle#1.index") + .Alias("MCRecoAssociations0", "MCRecoAssociations#0.index") + .Alias("MCRecoAssociations1", "MCRecoAssociations#1.index") + + ##### Added branch for MCParticle; finding PID of the MC particle for ALP + .Define("GenALP_PID", "MCParticle::sel_pdgID(9000005, false)(Particle)") + .Define("GenALP_decay", "MCParticle::get_list_of_particles_from_decay(0, GenALP_PID, Particle1)") + + .Define("All_n_GenALP", "MCParticle::get_n(GenALP_PID)") + .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch + .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") + .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") + .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch + .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") + .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") + .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") + .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") + .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") + .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") + .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") + + #all final state gen electrons + .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates + .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") + .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") + .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") + .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") + .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") + .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") + .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") + .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") + .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") + .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") + + #all final state gen positrons + .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") + .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") + .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") + .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") + .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") + .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") + .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") + .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") + .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") + .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") + .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") + + #all final state gen neutrinos + .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") + .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") + .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") + .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") + .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") + .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") + .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") + .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") + .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") + .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") + .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") + + #all final state gen anti-neutrinos + .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") + .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") + + #all final state gen photons + .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") + .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") + .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") + .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") + .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") + .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") + .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") + .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") + .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") + .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") + .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") + + # Number of final state electrons and positrons when the number of final state photons is only 2 + # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") + # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") + + .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") + .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") + .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") + + # Finding the Lxy of the ALP + # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") + .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") + + # Calculating the lifetime of the ALP + # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) + .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) + + # Separating the three first final state photons + # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") + # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") + # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") + # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") + # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") + # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") + # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") + + # aa invariant mass - for all three combinations of the three first FS photons + # returns -2 for events with only 1 number of photons + # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") + # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") + # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") + # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") + # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") + + # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") + # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") + # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") + # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") + # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") + + # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") + # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") + # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") + # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") + # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") + + # aaa invariant mass + # Returns -2 for events with only 1 or 2 number of photons + # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") + # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") + # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") + # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") + # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") + + # Defining a vector containing the ALP and its daughters in order written + # Name of vector is ALP_indices + .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") + + # Defining the individual particles from the vector + .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") + .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") + .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") + + # Kinematics of the mother particle ALP + .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") + .Define("GenALP_e", "MCParticle::get_e( GenALP )") + .Define("GenALP_p", "MCParticle::get_p( GenALP )") + .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") + .Define("GenALP_px", "MCParticle::get_px( GenALP )") + .Define("GenALP_py", "MCParticle::get_py( GenALP )") + .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") + .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") + .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") + .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") + .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") + + # Finding the kinematics of each of these daughters + .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") + .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") + .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") + .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") + .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") + .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") + .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") + .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") + .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") + .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") + .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") + .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") + .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") + .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") + .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") + .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") + .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") + .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") + .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") + .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") + + # Finding the production vertex of the daughters (checking GenALPPhoton1 here) + .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") + .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") + .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") + + # Finding the Lxy of the ALP + # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") + # Finding the Lxyz of the ALP + .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") + + # Calculating the lifetime of the ALP + # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) + .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) + + # Finding the production vertex of the ALP which should be at (0,0,0) + .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") + .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") + .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") + + # aa invariant mass + .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") + .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") + .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") + .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") + .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") + + # Vertexing studies + # Finding the vertex of the mother particle ALP using decicated Bs method + #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") + + # MC event primary vertex + .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) + .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") + + # Reconstructed particles + # Returns the RecoParticles associated with the ALP decay products + .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") + # Reconstructing the tracks from the ALP + .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") + + # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) + .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") + + # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks + # First the full object, of type Vertexing::FCCAnalysesVertex + .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) + + # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm + .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") + + # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, + # the first particle (vector[0]) is the e-, etc : + .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") + .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") + + # reconstruced electron, positron values + .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") + # add dxy, dz, dxyz, and uncertainties + + # aa invariant mass + .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") + .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") + .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") + .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") + .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") + + #gen-reco + .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") + .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") + .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") + .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") + .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") + .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") + .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") + .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") + .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") + .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") + .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") + .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") + .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") + .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") + .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") + .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") + .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") + .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") + + .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") + .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") + .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") + + + #################################################################################################### + # From here the general study begins + + #JETS + .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total + + #PHOTONS + .Alias("Photon0", "Photon#0.index") + .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") + .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total + + #ELECTRONS AND MUONS + #TODO: ADD EXPLANATION OF THE EXTRA STEPS + .Alias("Electron0", "Electron#0.index") + .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") + .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total + + .Alias("Muon0", "Muon#0.index") + .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") + .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total + + #OBJECT SELECTION: Consider only those objects that have pt > certain threshold + #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV + #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV + #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV + #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") + + #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") + #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") + #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") + #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") + + #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons + .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") + .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p + .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt + .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") + .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") + .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") + .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta + .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") + .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi + .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") + + .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") + .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") + .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") + .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") + .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") + .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") + .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta + .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") + .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi + .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") + + .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") + .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") + .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") + .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") + .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") + .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") + .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta + .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") + .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi + .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") + + .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") + .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") + .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") + .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") + .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") + .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") + .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta + .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") + .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi + .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") + + #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) + .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") + .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") + .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") + .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") + .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") + .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") + .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") + .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") + .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") + + + ) + return df2 + + def output(): + branchList = [ + ######## Monte-Carlo particles ####### + "All_n_GenALP", + "AllGenALP_mass", + "AllGenALP_e", + "AllGenALP_p", + "AllGenALP_pt", + "AllGenALP_px", + "AllGenALP_py", + "AllGenALP_pz", + "AllGenALP_eta", + "AllGenALP_theta", + "AllGenALP_phi", + "AllGenALP_genStatus", + "n_FSGenElectron", + "FSGenElectron_e", + "FSGenElectron_p", + "FSGenElectron_pt", + "FSGenElectron_px", + "FSGenElectron_py", + "FSGenElectron_pz", + "FSGenElectron_eta", + "FSGenElectron_theta", + "FSGenElectron_phi", + "FSGenPhoton_vertex_x", + "FSGenPhoton_vertex_y", + "FSGenPhoton_vertex_z", + # "n_FSGenElectron_forFS2GenPhotons", + # "n_FSGenPositron_forFS2GenPhotons", + "FSGen_Lxy", + "FSGen_Lxyz", + "FSGen_lifetime_xy", + "FSGen_lifetime_xyz", + "n_FSGenPositron", + "FSGenPositron_e", + "FSGenPositron_p", + "FSGenPositron_pt", + "FSGenPositron_px", + "FSGenPositron_py", + "FSGenPositron_pz", + "FSGenPositron_eta", + "FSGenPositron_theta", + "FSGenPositron_phi", + "n_FSGenNeutrino", + "FSGenNeutrino_e", + "FSGenNeutrino_p", + "FSGenNeutrino_pt", + "FSGenNeutrino_px", + "FSGenNeutrino_py", + "FSGenNeutrino_pz", + "FSGenNeutrino_eta", + "FSGenNeutrino_theta", + "FSGenNeutrino_phi", + "n_FSGenAntiNeutrino", + "FSGenAntiNeutrino_e", + "FSGenAntiNeutrino_p", + "FSGenAntiNeutrino_pt", + "FSGenAntiNeutrino_px", + "FSGenAntiNeutrino_py", + "FSGenAntiNeutrino_pz", + "FSGenAntiNeutrino_eta", + "FSGenAntiNeutrino_theta", + "FSGenAntiNeutrino_phi", + "n_FSGenPhoton", + "FSGenPhoton_e", + "FSGenPhoton_p", + "FSGenPhoton_pt", + "FSGenPhoton_px", + "FSGenPhoton_py", + "FSGenPhoton_pz", + "FSGenPhoton_eta", + "FSGenPhoton_theta", + "FSGenPhoton_phi", + # "FSGenPhoton0_e", + # "FSGenPhoton1_e", + # "FSGenPhoton2_e", + # "FSGenPhoton0_p", + # "FSGenPhoton1_p", + # "FSGenPhoton2_p", + # "FSGenPhoton0_pt", + # "FSGenPhoton1_pt", + # "FSGenPhoton2_pt", + # "FSGen_a0a1_invMass", + # "FSGen_a0a2_invMass", + # "FSGen_a1a2_invMass", + # "FSGen_aaa_invMass", + "GenALP_vertex_x", + "GenALP_vertex_y", + "GenALP_vertex_z", + "GenALP_aa_invMass", + "GenALP_mass", + "GenALP_p", + "GenALP_pt", + "GenALP_pz", + "GenALP_eta", + "GenALP_theta", + "GenALP_phi", + "GenALP_genStatus", + "GenALPPhoton1_e", + "GenALPPhoton2_e", + "GenALPPhoton1_p", + "GenALPPhoton2_p", + "GenALPPhoton1_pt", + "GenALPPhoton2_pt", + "GenALPPhoton1_px", + "GenALPPhoton2_px", + "GenALPPhoton1_py", + "GenALPPhoton2_py", + "GenALPPhoton1_pz", + "GenALPPhoton2_pz", + "GenALPPhoton1_eta", + "GenALPPhoton2_eta", + "GenALPPhoton1_theta", + "GenALPPhoton2_theta", + "GenALPPhoton1_phi", + "GenALPPhoton2_phi", + "GenALPPhoton1_genStatus", + "GenALPPhoton2_genStatus", + #"GenALP_decay", + "GenALPPhoton1_vertex_x", + "GenALPPhoton1_vertex_y", + "GenALPPhoton1_vertex_z", + "GenALP_Lxy", + "GenALP_Lxyz", + "GenALP_lifetime_xy", + "GenALP_lifetime_xyz", + #"GenALPMCDecayVertex", + "MC_PrimaryVertex", + "n_RecoTracks", + ######## Reconstructed particles ####### + "RecoALPParticles", + "RecoALPTracks", + "n_RecoALPTracks", + "RecoALPDecayVertexObject", + "RecoALPDecayVertex", + "RecoALPPhoton1_e", + "RecoALPPhoton2_e", + "RecoALPPhoton1_p", + "RecoALPPhoton2_p", + "RecoALPPhoton1_pt", + "RecoALPPhoton2_pt", + "RecoALPPhoton1_px", + "RecoALPPhoton2_px", + "RecoALPPhoton1_py", + "RecoALPPhoton2_py", + "RecoALPPhoton1_pz", + "RecoALPPhoton2_pz", + "RecoALPPhoton1_eta", + "RecoALPPhoton2_eta", + "RecoALPPhoton1_theta", + "RecoALPPhoton2_theta", + "RecoALPPhoton1_phi", + "RecoALPPhoton2_phi", + "RecoALPPhoton1_charge", + "RecoALPPhoton2_charge", + "RecoALP_aa_invMass", + "GenMinusRecoALPPhoton1_e", + "GenMinusRecoALPPhoton2_e", + "GenMinusRecoALPPhoton1_p", + "GenMinusRecoALPPhoton2_p", + "GenMinusRecoALPPhoton1_pt", + "GenMinusRecoALPPhoton2_pt", + "GenMinusRecoALPPhoton1_px", + "GenMinusRecoALPPhoton2_px", + "GenMinusRecoALPPhoton1_py", + "GenMinusRecoALPPhoton2_py", + "GenMinusRecoALPPhoton1_pz", + "GenMinusRecoALPPhoton2_pz", + "GenMinusRecoALPPhoton1_eta", + "GenMinusRecoALPPhoton2_eta", + "GenMinusRecoALPPhoton1_theta", + "GenMinusRecoALPPhoton2_theta", + "GenMinusRecoALPPhoton1_phi", + "GenMinusRecoALPPhoton2_phi", + "GenMinusRecoALP_DecayVertex_x", + "GenMinusRecoALP_DecayVertex_y", + "GenMinusRecoALP_DecayVertex_z", + "n_RecoJets", + "n_RecoPhotons", + "n_RecoElectrons", + "n_RecoMuons", + "RecoJet_e", + "RecoJet_p", + "RecoJet_pt", + "RecoJet_px", + "RecoJet_py", + "RecoJet_pz", + "RecoJet_eta", + "RecoJet_theta", + "RecoJet_phi", + "RecoJet_charge", + "RecoPhoton_e", + "RecoPhoton_p", + "RecoPhoton_pt", + "RecoPhoton_px", + "RecoPhoton_py", + "RecoPhoton_pz", + "RecoPhoton_eta", + "RecoPhoton_theta", + "RecoPhoton_phi", + "RecoPhoton_charge", + "RecoElectron_e", + "RecoElectron_p", + "RecoElectron_pt", + "RecoElectron_px", + "RecoElectron_py", + "RecoElectron_pz", + "RecoElectron_eta", + "RecoElectron_theta", + "RecoElectron_phi", + "RecoElectron_charge", + "RecoMuon_e", + "RecoMuon_p", + "RecoMuon_pt", + "RecoMuon_px", + "RecoMuon_py", + "RecoMuon_pz", + "RecoMuon_eta", + "RecoMuon_theta", + "RecoMuon_phi", + "RecoMuon_charge", + "RecoMissingEnergy_e", + "RecoMissingEnergy_p", + "RecoMissingEnergy_pt", + "RecoMissingEnergy_px", + "RecoMissingEnergy_py", + "RecoMissingEnergy_pz", + "RecoMissingEnergy_eta", + "RecoMissingEnergy_theta", + "RecoMissingEnergy_phi", + ] + + return branchList From 29aea3747443bff74a535d60c5f01ea62c618ec0 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Fri, 21 Oct 2022 18:13:27 +0200 Subject: [PATCH 22/49] minor updates for tutorial --- .../FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py index 4d0bd19f72..4f322ebdfd 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py @@ -191,9 +191,9 @@ colors['eenu_70GeV_1p41e-6Ve'] = ROOT.kBlue colors['eenu_90GeV_1p41e-6Ve'] = ROOT.kGreen+1 -colors['Zbb'] = ROOT.kAzure-4 -colors['Zcc'] = ROOT.kCyan-9 -colors['Zuds'] = ROOT.kViolet-4 +#colors['Zbb'] = ROOT.kAzure-4 +#colors['Zcc'] = ROOT.kCyan-9 +#colors['Zuds'] = ROOT.kViolet-4 colors['Ztautau'] = ROOT.kRed-3 colors['Zee'] = ROOT.kGray+2 @@ -226,9 +226,9 @@ legend['eenu_70GeV_1p41e-6Ve'] = 'm_{N} = 70 GeV, V_{e} = 1.41e-6' legend['eenu_90GeV_1p41e-6Ve'] = 'm_{N} = 90 GeV, V_{e} = 1.41e-6' -legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' -legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' -legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' +#legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' +#legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' +#legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' legend['Ztautau'] = 'e^{+}e^{-} #rightarrow Z #rightarrow #tau#tau' legend['Zee'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' #legend['Ztautau_spring2021'] = 'Z #rightarrow #tau#tau Spring2021' From 17c22ff6ca0e9c4e32e615336b9f567f576e07a9 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 11:30:48 +0200 Subject: [PATCH 23/49] add ALP sample creation files --- .../bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh new file mode 100644 index 0000000000..476df1f598 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# quick command to run DelphesPythia8_EDM4HEP +# needs one input for the name of the output root-file + +DelphesPythia8_EDM4HEP ../../../../../../FCC-config/FCCee/Delphes/card_IDEA.tcl ../../../../../../FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl ALP_pythia.cmnd $1 \ No newline at end of file From d7d36ed55c096bf333322f995bc76c0aa5888f06 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 11:43:14 +0200 Subject: [PATCH 24/49] add HNL sample creation files --- ...mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat new file mode 100644 index 0000000000..8f6c5a4b6f --- /dev/null +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat @@ -0,0 +1,67 @@ +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 2.7.3 2020-06-21 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +# card is made by suchita Kulkarni +#contact suchita.kulkarni@cern.ch +set default_unset_couplings 99 +set group_subprocesses Auto +set ignore_six_quark_processes False +set loop_optimized_output True +set loop_color_flows False +set gauge unitary +set complex_mass_scheme False +set max_npoint_for_channel 0 +set auto_convert_model T +import model sm +define p = g u c d s u~ c~ d~ s~ +define j = g u c d s u~ c~ d~ s~ +define l+ = e+ mu+ +define l- = e- mu- +define vl = ve vm vt +define vl~ = ve~ vm~ vt~ +import model SM_HeavyN_CKM_AllMasses_LO +define e = e+ e- +define nue = ve ve~ +generate e+ e- > nue n1, (n1 > e e nue) +output HNL_eenu_50GeV_1p41e-6Ve +launch HNL_eenu_50GeV_1p41e-6Ve +done +# set to electron beams (0 for ele, 1 for proton) +set lpp1 0 +set lpp2 0 +set ebeam1 45.594 +set ebeam2 45.594 +set no_parton_cut +# Here I set mass of the electron HNL +set mn1 50 +# set mass of muon HNL, made heavy here +set mn2 10000 +# set mass of tau HNL, made heavy here +set mn3 10000 +# set electron mixing angle +set ven1 1.41e-6 +# this is important, set the decay width of HNL flavour of interest to auto +# if this is not done, lifetime calculations won'e be right +set WN1 auto +set time_of_flight 0 +set nevents 50000 +done From 202f5959e37d13a5bfaec878f95fed5706f2cade Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Tue, 25 Oct 2022 13:38:17 +0200 Subject: [PATCH 25/49] rename mg5 proc card to be clearer --- ...mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat b/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat deleted file mode 100644 index 8f6c5a4b6f..0000000000 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/HNL_sample_creation/mg5_proc_card_HNL_eenu_50GeV_1p41e-6Ve.dat +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************ -#* MadGraph5_aMC@NLO * -#* * -#* * * * -#* * * * * * -#* * * * * 5 * * * * * -#* * * * * * -#* * * * -#* * -#* * -#* VERSION 2.7.3 2020-06-21 * -#* * -#* The MadGraph5_aMC@NLO Development Team - Find us at * -#* https://server06.fynu.ucl.ac.be/projects/madgraph * -#* * -#************************************************************ -#* * -#* Command File for MadGraph5_aMC@NLO * -#* * -#* run as ./bin/mg5_aMC filename * -#* * -#************************************************************ -# card is made by suchita Kulkarni -#contact suchita.kulkarni@cern.ch -set default_unset_couplings 99 -set group_subprocesses Auto -set ignore_six_quark_processes False -set loop_optimized_output True -set loop_color_flows False -set gauge unitary -set complex_mass_scheme False -set max_npoint_for_channel 0 -set auto_convert_model T -import model sm -define p = g u c d s u~ c~ d~ s~ -define j = g u c d s u~ c~ d~ s~ -define l+ = e+ mu+ -define l- = e- mu- -define vl = ve vm vt -define vl~ = ve~ vm~ vt~ -import model SM_HeavyN_CKM_AllMasses_LO -define e = e+ e- -define nue = ve ve~ -generate e+ e- > nue n1, (n1 > e e nue) -output HNL_eenu_50GeV_1p41e-6Ve -launch HNL_eenu_50GeV_1p41e-6Ve -done -# set to electron beams (0 for ele, 1 for proton) -set lpp1 0 -set lpp2 0 -set ebeam1 45.594 -set ebeam2 45.594 -set no_parton_cut -# Here I set mass of the electron HNL -set mn1 50 -# set mass of muon HNL, made heavy here -set mn2 10000 -# set mass of tau HNL, made heavy here -set mn3 10000 -# set electron mixing angle -set ven1 1.41e-6 -# this is important, set the decay width of HNL flavour of interest to auto -# if this is not done, lifetime calculations won'e be right -set WN1 auto -set time_of_flight 0 -set nevents 50000 -done From 5917a66e6817fe30adb8aea5669d7fdf6d9f4f14 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Wed, 23 Nov 2022 11:51:29 +0100 Subject: [PATCH 26/49] updates to run over winter 2023 test v2 samples --- .../FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py index 4f322ebdfd..4d0bd19f72 100644 --- a/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py +++ b/examples/FCCee/bsm/LLPs/DisplacedHNL/analysis_plots.py @@ -191,9 +191,9 @@ colors['eenu_70GeV_1p41e-6Ve'] = ROOT.kBlue colors['eenu_90GeV_1p41e-6Ve'] = ROOT.kGreen+1 -#colors['Zbb'] = ROOT.kAzure-4 -#colors['Zcc'] = ROOT.kCyan-9 -#colors['Zuds'] = ROOT.kViolet-4 +colors['Zbb'] = ROOT.kAzure-4 +colors['Zcc'] = ROOT.kCyan-9 +colors['Zuds'] = ROOT.kViolet-4 colors['Ztautau'] = ROOT.kRed-3 colors['Zee'] = ROOT.kGray+2 @@ -226,9 +226,9 @@ legend['eenu_70GeV_1p41e-6Ve'] = 'm_{N} = 70 GeV, V_{e} = 1.41e-6' legend['eenu_90GeV_1p41e-6Ve'] = 'm_{N} = 90 GeV, V_{e} = 1.41e-6' -#legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' -#legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' -#legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' +legend['Zbb'] = 'e^{+}e^{-} #rightarrow Z #rightarrow bb' +legend['Zcc'] = 'e^{+}e^{-} #rightarrow Z #rightarrow cc' +legend['Zuds'] = 'e^{+}e^{-} #rightarrow Z #rightarrow uds' legend['Ztautau'] = 'e^{+}e^{-} #rightarrow Z #rightarrow #tau#tau' legend['Zee'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' #legend['Ztautau_spring2021'] = 'Z #rightarrow #tau#tau Spring2021' From a4d5d0602dd1c76f8e436d23e0a27d5aa4bcd5dc Mon Sep 17 00:00:00 2001 From: mvoorde Date: Fri, 2 Dec 2022 12:49:17 +0100 Subject: [PATCH 27/49] Add analysis code --- .../CMakeLists.txt | 48 +++++++++++++++++ .../include/ExoticHiggsDecays_analysis_code.h | 36 +++++++++++++ .../scripts/analysis_cfg.py | 38 ++++++++++++++ .../src/ExoticHiggsDecays_analysis_code.cc | 51 +++++++++++++++++++ ExoticHiggsDecays_analysis_code/src/classes.h | 3 ++ .../src/classes_def.xml | 3 ++ 6 files changed, 179 insertions(+) create mode 100644 ExoticHiggsDecays_analysis_code/CMakeLists.txt create mode 100644 ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h create mode 100644 ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py create mode 100644 ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc create mode 100644 ExoticHiggsDecays_analysis_code/src/classes.h create mode 100644 ExoticHiggsDecays_analysis_code/src/classes_def.xml diff --git a/ExoticHiggsDecays_analysis_code/CMakeLists.txt b/ExoticHiggsDecays_analysis_code/CMakeLists.txt new file mode 100644 index 0000000000..7e41c5209f --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.16.9) +project(ExoticHiggsDecays_analysis_code CXX) +set(lib_name "FCCAnalysis_ExoticHiggsDecays_analysis_code") +find_package(ROOT COMPONENTS ROOTVecOps ROOTDataFrame REQUIRED) +find_package(EDM4HEP REQUIRED) +#--- Set a better default for installation directory--------------------------- +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP/install" CACHE PATH "default install path" FORCE) +endif() +#--- Offer the user the choice of overriding the installation directories +set(FCCANALYSES_DIR "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP" CACHE PATH + "Installation directory for FCCAnalyses framework") +#--- Find all paths to 'ExoticHiggsDecays_analysis_code' library pieces +file(GLOB headers "include/*.h") +file(GLOB sources "src/*.cc") +file(GLOB classes "src/classes.h") +file(GLOB reflex_sel "src/classes_def.xml") +#--- generate the ROOT dictionary using a REFLEX selection +set(CMAKE_ROOTTEST_NOROOTMAP OFF) +reflex_generate_dictionary(lib${lib_name} ${headers} ${classes} + SELECTION ${reflex_sel}) +#--- build the analysis library (linked against FCCAnalyses) +add_library(${lib_name} SHARED ${sources} ${headers} lib${lib_name}.cxx) +target_include_directories(${lib_name} PUBLIC include + ${FCCANALYSES_DIR} + ${FCCANALYSES_DIR}/addons + ${FCCANALYSES_DIR}/analyzers/dataframe + $) +target_link_directories(${lib_name} PUBLIC ${FCCANALYSES_DIR} + ${FCCANALYSES_DIR}/install/lib) +target_link_libraries(${lib_name} PUBLIC FCCAnalyses + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ROOT::ROOTVecOps) +set_target_properties(${lib_name} PROPERTIES PUBLIC_HEADER "${headers}") +install(TARGETS ${lib_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" COMPONENT shlib + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/include/ExoticHiggsDecays_analysis_code" + COMPONENT analyses) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}.rootmap" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" + COMPONENT analyses) +if(${ROOT_VERSION} GREATER 6) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}_rdict.pcm" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" + COMPONENT analyses) +endif() +message(STATUS "Built standalone analyser package: ExoticHiggsDecays_analysis_code") diff --git a/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h b/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h new file mode 100644 index 0000000000..47425ddbf5 --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h @@ -0,0 +1,36 @@ +// -*- C++ -*- +// +/** FCCAnalysis module: ExoticHiggsDecays_analysis_code + * + * \file ExoticHiggsDecays_analysis_code.h + * \author <> + * + * Description: + * [...] + */ + +#ifndef ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h +#define ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h + +#include "ROOT/RVec.hxx" +#include "edm4hep/ReconstructedParticle.h" +#include "edm4hep/MCParticle.h" +#include "FCCAnalyses/MCParticle.h" + +namespace ExoticHiggsDecays_analysis_code { + namespace rv = ROOT::VecOps; + + void dummy_analysis(); + rv::RVec dummy_collection(const rv::RVec&); + + ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); + + struct selMC_leg{ + selMC_leg( int arg_idx ); + int m_idx; + ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, + ROOT::VecOps::RVec in) ; + }; +} // end namespace ExoticHiggsDecays_analysis_code + +#endif diff --git a/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py b/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py new file mode 100644 index 0000000000..8aae2c14dc --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py @@ -0,0 +1,38 @@ +#Optional: List of analysis packages to load in runtime +analysesList = ['ExoticHiggsDecays_analysis_code'] + +#Mandatory: List of processes +processList = { + 'p8_noBES_ee_H_Hbb_ecm125':{'fraction': 0.01, 'chunks': 1, 'output': 'test_out'} +} + +#Mandatory: Production tag when running over EDM4Hep centrally produced events, this points to the yaml files for getting sample statistics +prodTag = "FCCee/spring2021/IDEA/" + +#Optional: output directory, default is local running directory +outputDir = "." + +#Optional +nCPUS = 8 +runBatch = False +#batchQueue = "longlunch" +#compGroup = "group_u_FCC.local_gen" + +#Optional test file +testFile = "root://eospublic.cern.ch//eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_ZH_ecm240/events_101027117.root" + +#Mandatory: RDFanalysis class where the use defines the operations on the TTree +class RDFanalysis(): + #__________________________________________________________ + #Mandatory: analysers function to define the analysers to process, please make sure you return the last dataframe, in this example it is df2 + def analysers(df): + df2 = (df + .Define("dummy_collection", "ExoticHiggsDecays_analysis_code::dummy_collection(ReconstructedParticles)") + ) + return df2 + + #__________________________________________________________ + #Mandatory: output function, please make sure you return the branchlist as a python list + def output(): + branchList = ['dummy_collection'] + return branchList diff --git a/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc b/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc new file mode 100644 index 0000000000..99bda51f9a --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc @@ -0,0 +1,51 @@ +// -*- C++ -*- +// +/** FCCAnalysis module: ExoticHiggsDecays_analysis_code + * + * \file ExoticHiggsDecays_analysis_code.cc + * \author <> + */ + +#include "ExoticHiggsDecays_analysis_code.h" +#include + +using namespace std; + +namespace ExoticHiggsDecays_analysis_code { + void dummy_analysis() { cout << "Dummy analysis initialised." << endl; } + + rv::RVec dummy_collection(const rv::RVec& parts) { + rv::RVec output; + for (size_t i = 0; i < parts.size(); ++i) + output.emplace_back(parts.at(i).momentum.x); + return output; + } + + ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value) { + ROOT::VecOps::RVec sum; + for (auto i: scalar1_value) { + sum.push_back(i); + } + for (auto j: scalar2_value) { + sum.push_back(j); + } + return sum; +} + +// following code is copied from https://github.com/HEP-FCC/FCCAnalyses/blob/09c52e107e308cf57d59ca840d4bba60e25d94c2/examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py +// used to find the b quarks from respective hs. Can't directly apply sel_byIndex since this function returns a 'edm4hep::MCParticleData' object and we need 'ROOT::VecOps::RVec' + +selMC_leg::selMC_leg( int arg_idx ) : m_idx(arg_idx) { }; +ROOT::VecOps::RVec selMC_leg::operator() ( ROOT::VecOps::RVec list_of_indices, ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec res; + if ( list_of_indices.size() == 0) return res; + if ( m_idx < list_of_indices.size() ) { + res.push_back( FCCAnalyses::MCParticle::sel_byIndex( list_of_indices[m_idx], in ) ); + return res; + } + else { + std::cout << " !!! in selMC_leg: idx = " << m_idx << " but size of list_of_indices = " << list_of_indices.size() << std::endl; + } + return res; +} +} // end namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes.h b/ExoticHiggsDecays_analysis_code/src/classes.h new file mode 100644 index 0000000000..e1f92d4d77 --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/src/classes.h @@ -0,0 +1,3 @@ +namespace ExoticHiggsDecays_analysis_code { + struct dictionary {}; +} // namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes_def.xml b/ExoticHiggsDecays_analysis_code/src/classes_def.xml new file mode 100644 index 0000000000..33446d12b0 --- /dev/null +++ b/ExoticHiggsDecays_analysis_code/src/classes_def.xml @@ -0,0 +1,3 @@ + + + From 19115021352d67180b528630dd6d1ee7da711258 Mon Sep 17 00:00:00 2001 From: mvoorde Date: Fri, 2 Dec 2022 13:30:07 +0100 Subject: [PATCH 28/49] Add analysis scripts --- examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py index e5d9c5b28d..6bc1760ab7 100644 --- a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/MC_analysis_stage1.py @@ -178,4 +178,4 @@ def output(): 'lifetimeHS', 'lifetimeHSLAB' ] - return branchList \ No newline at end of file + return branchList From 44aa17980c0fefaaf9b878eaf2a2c4489e4cd45d Mon Sep 17 00:00:00 2001 From: mvoorde Date: Fri, 2 Dec 2022 14:33:13 +0100 Subject: [PATCH 29/49] Code for the DV finder --- analyzers/dataframe/src/VertexFinderLCFIPlus.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/analyzers/dataframe/src/VertexFinderLCFIPlus.cc b/analyzers/dataframe/src/VertexFinderLCFIPlus.cc index c1930d3ddf..86f5bc5540 100644 --- a/analyzers/dataframe/src/VertexFinderLCFIPlus.cc +++ b/analyzers/dataframe/src/VertexFinderLCFIPlus.cc @@ -309,6 +309,9 @@ ROOT::VecOps::RVec findSVfromTracks(ROOT::Vec // save the tracks that are used to fit the SV sec_vtx.tracks = tr_vtx_fin; + // save the tracks that are used to fit the SV + sec_vtx.tracks = tr_vtx_fin; + // see if we can also get indices in the reco collection (for tracks forming an SV) //sec_vtx.reco_ind = VertexFitterSimple::get_reco_ind(recoparticles,thetracks); // incorrect From 9d4efec6eb10d87dc0171594a9149fb9882443f7 Mon Sep 17 00:00:00 2001 From: mvoorde Date: Thu, 15 Dec 2022 16:00:19 +0100 Subject: [PATCH 30/49] modified arragment of MC analysis code --- .../CMakeLists.txt | 48 ----------------- .../include/ExoticHiggsDecays_analysis_code.h | 36 ------------- .../scripts/analysis_cfg.py | 38 -------------- .../src/ExoticHiggsDecays_analysis_code.cc | 51 ------------------- ExoticHiggsDecays_analysis_code/src/classes.h | 3 -- .../src/classes_def.xml | 3 -- 6 files changed, 179 deletions(-) delete mode 100644 ExoticHiggsDecays_analysis_code/CMakeLists.txt delete mode 100644 ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h delete mode 100644 ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py delete mode 100644 ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc delete mode 100644 ExoticHiggsDecays_analysis_code/src/classes.h delete mode 100644 ExoticHiggsDecays_analysis_code/src/classes_def.xml diff --git a/ExoticHiggsDecays_analysis_code/CMakeLists.txt b/ExoticHiggsDecays_analysis_code/CMakeLists.txt deleted file mode 100644 index 7e41c5209f..0000000000 --- a/ExoticHiggsDecays_analysis_code/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -cmake_minimum_required(VERSION 3.16.9) -project(ExoticHiggsDecays_analysis_code CXX) -set(lib_name "FCCAnalysis_ExoticHiggsDecays_analysis_code") -find_package(ROOT COMPONENTS ROOTVecOps ROOTDataFrame REQUIRED) -find_package(EDM4HEP REQUIRED) -#--- Set a better default for installation directory--------------------------- -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP/install" CACHE PATH "default install path" FORCE) -endif() -#--- Offer the user the choice of overriding the installation directories -set(FCCANALYSES_DIR "/afs/cern.ch/work/u/uvandevo/myFCC-LLPgit/FCCAnalyses_LLP" CACHE PATH - "Installation directory for FCCAnalyses framework") -#--- Find all paths to 'ExoticHiggsDecays_analysis_code' library pieces -file(GLOB headers "include/*.h") -file(GLOB sources "src/*.cc") -file(GLOB classes "src/classes.h") -file(GLOB reflex_sel "src/classes_def.xml") -#--- generate the ROOT dictionary using a REFLEX selection -set(CMAKE_ROOTTEST_NOROOTMAP OFF) -reflex_generate_dictionary(lib${lib_name} ${headers} ${classes} - SELECTION ${reflex_sel}) -#--- build the analysis library (linked against FCCAnalyses) -add_library(${lib_name} SHARED ${sources} ${headers} lib${lib_name}.cxx) -target_include_directories(${lib_name} PUBLIC include - ${FCCANALYSES_DIR} - ${FCCANALYSES_DIR}/addons - ${FCCANALYSES_DIR}/analyzers/dataframe - $) -target_link_directories(${lib_name} PUBLIC ${FCCANALYSES_DIR} - ${FCCANALYSES_DIR}/install/lib) -target_link_libraries(${lib_name} PUBLIC FCCAnalyses - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - ROOT::ROOTVecOps) -set_target_properties(${lib_name} PROPERTIES PUBLIC_HEADER "${headers}") -install(TARGETS ${lib_name} - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" COMPONENT bin - LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" COMPONENT shlib - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/include/ExoticHiggsDecays_analysis_code" - COMPONENT analyses) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}.rootmap" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" - COMPONENT analyses) -if(${ROOT_VERSION} GREATER 6) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${lib_name}_rdict.pcm" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" - COMPONENT analyses) -endif() -message(STATUS "Built standalone analyser package: ExoticHiggsDecays_analysis_code") diff --git a/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h b/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h deleted file mode 100644 index 47425ddbf5..0000000000 --- a/ExoticHiggsDecays_analysis_code/include/ExoticHiggsDecays_analysis_code.h +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -// -/** FCCAnalysis module: ExoticHiggsDecays_analysis_code - * - * \file ExoticHiggsDecays_analysis_code.h - * \author <> - * - * Description: - * [...] - */ - -#ifndef ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h -#define ExoticHiggsDecays_analysis_code_ExoticHiggsDecays_analysis_code_h - -#include "ROOT/RVec.hxx" -#include "edm4hep/ReconstructedParticle.h" -#include "edm4hep/MCParticle.h" -#include "FCCAnalyses/MCParticle.h" - -namespace ExoticHiggsDecays_analysis_code { - namespace rv = ROOT::VecOps; - - void dummy_analysis(); - rv::RVec dummy_collection(const rv::RVec&); - - ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value); - - struct selMC_leg{ - selMC_leg( int arg_idx ); - int m_idx; - ROOT::VecOps::RVec operator() (ROOT::VecOps::RVec list_of_indices, - ROOT::VecOps::RVec in) ; - }; -} // end namespace ExoticHiggsDecays_analysis_code - -#endif diff --git a/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py b/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py deleted file mode 100644 index 8aae2c14dc..0000000000 --- a/ExoticHiggsDecays_analysis_code/scripts/analysis_cfg.py +++ /dev/null @@ -1,38 +0,0 @@ -#Optional: List of analysis packages to load in runtime -analysesList = ['ExoticHiggsDecays_analysis_code'] - -#Mandatory: List of processes -processList = { - 'p8_noBES_ee_H_Hbb_ecm125':{'fraction': 0.01, 'chunks': 1, 'output': 'test_out'} -} - -#Mandatory: Production tag when running over EDM4Hep centrally produced events, this points to the yaml files for getting sample statistics -prodTag = "FCCee/spring2021/IDEA/" - -#Optional: output directory, default is local running directory -outputDir = "." - -#Optional -nCPUS = 8 -runBatch = False -#batchQueue = "longlunch" -#compGroup = "group_u_FCC.local_gen" - -#Optional test file -testFile = "root://eospublic.cern.ch//eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_ZH_ecm240/events_101027117.root" - -#Mandatory: RDFanalysis class where the use defines the operations on the TTree -class RDFanalysis(): - #__________________________________________________________ - #Mandatory: analysers function to define the analysers to process, please make sure you return the last dataframe, in this example it is df2 - def analysers(df): - df2 = (df - .Define("dummy_collection", "ExoticHiggsDecays_analysis_code::dummy_collection(ReconstructedParticles)") - ) - return df2 - - #__________________________________________________________ - #Mandatory: output function, please make sure you return the branchlist as a python list - def output(): - branchList = ['dummy_collection'] - return branchList diff --git a/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc b/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc deleted file mode 100644 index 99bda51f9a..0000000000 --- a/ExoticHiggsDecays_analysis_code/src/ExoticHiggsDecays_analysis_code.cc +++ /dev/null @@ -1,51 +0,0 @@ -// -*- C++ -*- -// -/** FCCAnalysis module: ExoticHiggsDecays_analysis_code - * - * \file ExoticHiggsDecays_analysis_code.cc - * \author <> - */ - -#include "ExoticHiggsDecays_analysis_code.h" -#include - -using namespace std; - -namespace ExoticHiggsDecays_analysis_code { - void dummy_analysis() { cout << "Dummy analysis initialised." << endl; } - - rv::RVec dummy_collection(const rv::RVec& parts) { - rv::RVec output; - for (size_t i = 0; i < parts.size(); ++i) - output.emplace_back(parts.at(i).momentum.x); - return output; - } - - ROOT::VecOps::RVec get_both_scalars(ROOT::VecOps::RVec scalar1_value, ROOT::VecOps::RVec scalar2_value) { - ROOT::VecOps::RVec sum; - for (auto i: scalar1_value) { - sum.push_back(i); - } - for (auto j: scalar2_value) { - sum.push_back(j); - } - return sum; -} - -// following code is copied from https://github.com/HEP-FCC/FCCAnalyses/blob/09c52e107e308cf57d59ca840d4bba60e25d94c2/examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py -// used to find the b quarks from respective hs. Can't directly apply sel_byIndex since this function returns a 'edm4hep::MCParticleData' object and we need 'ROOT::VecOps::RVec' - -selMC_leg::selMC_leg( int arg_idx ) : m_idx(arg_idx) { }; -ROOT::VecOps::RVec selMC_leg::operator() ( ROOT::VecOps::RVec list_of_indices, ROOT::VecOps::RVec in) { - ROOT::VecOps::RVec res; - if ( list_of_indices.size() == 0) return res; - if ( m_idx < list_of_indices.size() ) { - res.push_back( FCCAnalyses::MCParticle::sel_byIndex( list_of_indices[m_idx], in ) ); - return res; - } - else { - std::cout << " !!! in selMC_leg: idx = " << m_idx << " but size of list_of_indices = " << list_of_indices.size() << std::endl; - } - return res; -} -} // end namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes.h b/ExoticHiggsDecays_analysis_code/src/classes.h deleted file mode 100644 index e1f92d4d77..0000000000 --- a/ExoticHiggsDecays_analysis_code/src/classes.h +++ /dev/null @@ -1,3 +0,0 @@ -namespace ExoticHiggsDecays_analysis_code { - struct dictionary {}; -} // namespace ExoticHiggsDecays_analysis_code diff --git a/ExoticHiggsDecays_analysis_code/src/classes_def.xml b/ExoticHiggsDecays_analysis_code/src/classes_def.xml deleted file mode 100644 index 33446d12b0..0000000000 --- a/ExoticHiggsDecays_analysis_code/src/classes_def.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - From d4e6876e8ded1f1f4d5e25cc145ee19c1ced0971 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Mon, 19 Dec 2022 15:44:31 +0100 Subject: [PATCH 31/49] update ALP madgraph/pythia/delphes creation --- .../bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh deleted file mode 100644 index 476df1f598..0000000000 --- a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/runPythiaDephies.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# quick command to run DelphesPythia8_EDM4HEP -# needs one input for the name of the output root-file - -DelphesPythia8_EDM4HEP ../../../../../../FCC-config/FCCee/Delphes/card_IDEA.tcl ../../../../../../FCC-config/FCCee/Delphes/edm4hep_IDEA.tcl ALP_pythia.cmnd $1 \ No newline at end of file From 2d55c9207a153832fea9437f7982cf42b1366d59 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Mon, 6 Feb 2023 17:49:19 +0100 Subject: [PATCH 32/49] fix: remove duplicate functions (mistake from previous merge) --- .../dataframe/FCCAnalyses/ReconstructedParticle2Track.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h index fead5f4f9e..7184ce969d 100644 --- a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h +++ b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle2Track.h @@ -29,14 +29,6 @@ namespace FCCAnalyses{ namespace ReconstructedParticle2Track{ - /// Return the momentum of a track to a reconstructed particle - ROOT::VecOps::RVec getRP2TRK_mom (ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks); - - /// Return the charge of a track to a reconstructed particle - ROOT::VecOps::RVec getRP2TRK_charge(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks); - //compute the magnetic field Bz ROOT::VecOps::RVec getRP2TRK_Bz(const ROOT::VecOps::RVec& rps, const ROOT::VecOps::RVec& tracks); //here computed for all particles passed From d29633866ecf93992fc3943823b1f767824cb82c Mon Sep 17 00:00:00 2001 From: mvoorde <48947870+mvoorde@users.noreply.github.com> Date: Fri, 31 Mar 2023 13:33:03 +0200 Subject: [PATCH 33/49] Add reconstructed analysis files --- .../ExoticHiggsDecays/Reco_analysis_final.py | 119 +++++++++ .../ExoticHiggsDecays/Reco_analysis_plots.py | 88 +++++++ .../ExoticHiggsDecays/Reco_analysis_stage1.py | 236 ++++++++++++++++++ 3 files changed, 443 insertions(+) create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_final.py create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_plots.py create mode 100644 examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_stage1.py diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_final.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_final.py new file mode 100644 index 0000000000..8de0aabb64 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_final.py @@ -0,0 +1,119 @@ +#Input directory where the files produced at the stage1 level are +inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/Reco_output_stage1/" + +#Output directory where the files produced at the final-selection level are +outputDir = "Reco_output_finalSel/" + + +# # #Integrated luminosity for scaling number of events (required only if setting doScale to true) +# intLumi = 5e6 #pb^-1 + +# # #Scale event yields by intLumi and cross section (optional) +# doScale = True + +# # #Save event yields in a table (optional) +# saveTabular = True + +#Mandatory: List of processes +processList = { + + #privately-produced signals + 'exoticHiggs_scalar_ms20GeV_sine-5':{}, + 'exoticHiggs_scalar_ms20GeV_sine-6':{}, + 'exoticHiggs_scalar_ms20GeV_sine-7':{}, + 'exoticHiggs_scalar_ms60GeV_sine-5':{}, + 'exoticHiggs_scalar_ms60GeV_sine-6':{}, + 'exoticHiggs_scalar_ms60GeV_sine-7':{}, + + #centrally produced backgrounds + 'p8_ee_ZZ_ecm240':{}, + 'p8_ee_WW_ecm240':{}, + 'p8_ee_ZH_ecm240':{}, +} + +###Dictionary for prettier names of processes (optional) +processLabels = { + #signals + 'exoticHiggs_scalar_ms20GeV_sine-5': "$m_S$ = 20 GeV, sin $\theta = 1 * 10^{-5}$", + 'exoticHiggs_scalar_ms20GeV_sine-6': "$m_S$ = 20 GeV, sin $\theta = 1 * 10^{-6}$", + 'exoticHiggs_scalar_ms20GeV_sine-7': "$m_S$ = 20 GeV, sin $\theta = 1 * 10^{-7}$", + 'exoticHiggs_scalar_ms60GeV_sine-5': "$m_S$ = 60 GeV, sin $\theta = 1 * 10^{-5}$", + 'exoticHiggs_scalar_ms60GeV_sine-6': "$m_S$ = 60 GeV, sin $\theta = 1 * 10^{-6}$", + 'exoticHiggs_scalar_ms60GeV_sine-7': "$m_S$ = 60 GeV, sin $\theta = 1 * 10^{-7}$", + + #backgrounds + 'p8_ee_WW_ecm240': "e^{-}e^{+} $\rightarrow$ WW", + 'p8_ee_ZZ_ecm240': "e^{-}e^{+} $\rightarrow$ ZZ", + 'p8_ee_ZH_ecm240': "e^{-}e^{+} $\rightarrow$ ZH", +} + +#Link to the dictonary that contains all the cross section information etc... +procDict = "FCCee_procDict_spring2021_IDEA.json" + +#Add MySample_p8_ee_ZH_ecm240 as it is not an offical process +procDictAdd={ + 'exoticHiggs_scalar_ms20GeV_sine-5': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 8.858e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms20GeV_sine-6': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 8.858e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms20GeV_sine-7': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 8.858e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms60GeV_sine-5': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 2.618e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms60GeV_sine-6': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 2.618e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, + 'exoticHiggs_scalar_ms60GeV_sine-7': {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 2.618e-6, "kfactor": 1.0, "matchingEfficiency": 1.0}, +} + +#Number of CPUs to use +nCPUS = 2 + +#produces ROOT TTrees, default is False +doTree = False + +###Dictionnay of the list of cuts. The key is the name of the selection that will be added to the output file +cutList = { + # For plotting + "selNone": "n_tracks > -1", + + # For event selection + "preSel": "((n_RecoElectrons>1) && (RecoElectron_charge.at(0) != RecoElectron_charge.at(1))) || ((n_RecoMuons>1) && (RecoMuon_charge.at(0) != RecoMuon_charge.at(1)))", + "selZ": "(Reco_ee_invMass > 70 && Reco_ee_invMass < 110) || (Reco_mumu_invMass > 70 && Reco_mumu_invMass < 110)", + "selZ+nDVs_seltracks": "((Reco_ee_invMass > 70 && Reco_ee_invMass < 110) || (Reco_mumu_invMass > 70 && Reco_mumu_invMass < 110)) && filter_n_DVs_seltracks > 1", + "selZ+nDVs_merge": "((Reco_ee_invMass > 70 && Reco_ee_invMass < 110) || (Reco_mumu_invMass > 70 && Reco_mumu_invMass < 110)) && filter_n_DVs_merge > 1", +} + +###Dictionary for prettier names of cuts (optional) +cutLabels = { + # For plotting + "selNone": "Before selection", + + # For event selection + "preSel": "At least 2 oppositely charged leptons", + "selZ": "70 < $m_{ll}$ < 110 GeV", + "selZ+nDVs_seltracks": "n DVs $\geq$ 2", + "selZ+nDVs_merge": "n DVs $\geq$ 2 (merged)", +} + +###Dictionary for the ouput variable/hitograms. The key is the name of the variable in the output files. "name" is the name of the variable in the input file, "title" is the x-axis label of the histogram, "bin" the number of bins of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum x-axis value. + +histoList = { + "n_tracks": {"name":"n_tracks", "title":"Number of reconstructed tracks", "bin":100, "xmin":-0.5,"xmax":99.5}, + "n_RecoedPrimaryTracks": {"name":"n_RecoedPrimaryTracks", "title": "Number of reconstructed primary tracks", "bin":10, "xmin":-0.5,"xmax":9.5}, + 'n_seltracks_DVs': {"name":"n_seltracks_DVs", "title":"Number of DVs", "bin":12, "xmin":-0.5, "xmax":11.5}, + 'n_trks_seltracks_DVs': {"name":'n_trks_seltracks_DVs', "title":"Number of tracks from the DVs", "bin":30, "xmin":1.5, "xmax":29.5}, + 'invMass_seltracks_DVs': {"name":'invMass_seltracks_DVs', "title":"Invariant mass at the DVs [GeV]", "bin":40, "xmin":-0.5, "xmax":39.5}, + "DV_evt_seltracks_chi2": {"name":"DV_evt_seltracks_chi2", "title":"The #chi^{2} distribution of the DVs", "bin":100, "xmin":-0.5, "xmax":11.5}, + "Reco_seltracks_DVs_Lxy": {"name":"Reco_seltracks_DVs_Lxy", "title":"Transverse distance between PV and DVs [mm]", "bin":100, "xmin":0, "xmax":300}, + "Reco_seltracks_DVs_Lxyz": {"name":"Reco_seltracks_DVs_Lxyz", "title":"Distance between PV and DVs [mm]", "bin":100, "xmin":0, "xmax":2000}, + "DV_evt_seltracks_normchi2": {"name":"DV_evt_seltracks_normchi2", "title":"The normalised #chi^{2} distribution of the DVs", "bin":40, "xmin":0, "xmax":10}, + "merged_DVs_n": {"name":"merged_DVs_n", "title":"Number of DVs", "bin":10, "xmin":-0.5, "xmax":9.5}, + 'n_trks_merged_DVs': {"name":'n_trks_merged_DVs', "title":"Number of tracks from the DVs from sel tracks + merge", "bin":30, "xmin":1.5, "xmax":29.5}, + 'invMass_merged_DVs': {"name":'invMass_merged_DVs', "title":"Invariant mass at the DVs [GeV]", "bin":40, "xmin":-0.5, "xmax":39.5}, + "merged_DVs_chi2": {"name":"merged_DVs_chi2", "title":"The #chi^{2} distribution of the merged DVs", "bin":100, "xmin":-0.5, "xmax":11.5}, + "merged_DVs_normchi2": {"name":"merged_DVs_normchi2", "title":"The normalised #chi^{2} distribution of the merged DVs", "bin":40, "xmin":0, "xmax":10}, + "Reco_DVs_merged_Lxy": {"name":"Reco_DVs_merged_Lxy", "title":"Transverse distance between PV and DVs [mm]", "bin":100, "xmin":0, "xmax":300}, + "Reco_DVs_merged_Lxyz": {"name":"Reco_DVs_merged_Lxyz", "title":"Distance between PV and DVs [mm]", "bin":100, "xmin":0, "xmax":2000}, + + 'n_RecoElectrons': {"name":'n_RecoElectrons', "title": "Number of reconstructed electrons", "bin":10,"xmin":-0.5,"xmax":9.5}, + "Reco_ee_invMass": {"name":"Reco_ee_invMass", "title": "Invariant mass of reconstructed e- e+ [GeV]", "bin":100,"xmin":50,"xmax":150}, + 'n_RecoMuons': {"name":'n_RecoMuons', "title": "Number of reconstructed muons", "bin":10,"xmin":-0.5,"xmax":9.5}, + "Reco_mumu_invMass": {"name":"Reco_mumu_invMass", "title": "Invariant mass of reconstructed #mu- #mu+ [GeV]", "bin":100,"xmin":50,"xmax":150}, + + +} diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_plots.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_plots.py new file mode 100644 index 0000000000..e6f13ed4dc --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_plots.py @@ -0,0 +1,88 @@ +import ROOT + +# global parameters +intLumi = 5.0e+06 #in pb-1 + +###If scaleSig=0 or scaleBack=0, we don't apply any additional scaling, on top of the normalization to cross section and integrated luminosity, as defined in finalSel.py +###If scaleSig or scaleBack is not defined, plots will be normalized to 1 +#scaleSig = 0. +#scaleBack = 0. +ana_tex = 'e^{+}e^{-} #rightarrow Z h, Z #rightarrow l^{+}l^{-}, h #rightarrow ss #rightarrow b #bar{b} b #bar{b}' +delphesVersion = '3.4.2' +energy = 240 +collider = 'FCC-ee' +inputDir = 'Reco_output_finalSelPlots/' +#formats = ['png','pdf'] +formats = ['pdf'] +# yaxis = ['lin','log'] +yaxis = ['log'] +stacksig = ['nostack'] +outdir = 'Reco_plots/' +splitLeg = True + +variables = [ + + #gen variables + "n_tracks", + "n_RecoedPrimaryTracks", + 'n_seltracks_DVs', + 'n_trks_seltracks_DVs', + 'invMass_seltracks_DVs', + "DV_evt_seltracks_chi2", + "Reco_seltracks_DVs_Lxy", + "Reco_seltracks_DVs_Lxyz", + "DV_evt_seltracks_normchi2", + "merged_DVs_n", + 'n_trks_merged_DVs', + 'invMass_merged_DVs', + "merged_DVs_chi2", + "merged_DVs_normchi2", + "Reco_DVs_merged_Lxy", + "Reco_DVs_merged_Lxyz", + + 'n_RecoElectrons', + "Reco_ee_invMass", + 'n_RecoMuons', + "Reco_mumu_invMass", + ] + + +###Dictionary with the analysis name as a key, and the list of selections to be plotted for this analysis. The name of the selections should be the same than in the final selection +selections = {} +selections['ExoticHiggs'] = [ + "selNone", +] + +extralabel = {} +extralabel['selNone'] = "Before selection" + +colors = {} +colors['exoticHiggs_scalar_ms20GeV_sine-5'] = ROOT.kRed +colors['exoticHiggs_scalar_ms20GeV_sine-6'] = ROOT.kBlue +colors['exoticHiggs_scalar_ms20GeV_sine-7'] = ROOT.kGreen +colors['exoticHiggs_scalar_ms60GeV_sine-5'] = ROOT.kBlack +colors['exoticHiggs_scalar_ms60GeV_sine-6'] = ROOT.kOrange+1 +colors['exoticHiggs_scalar_ms60GeV_sine-7'] = ROOT.kViolet-4 + +plots = {} +plots['ExoticHiggs'] = {'signal':{ + 'exoticHiggs_scalar_ms20GeV_sine-5':['exoticHiggs_scalar_ms20GeV_sine-5'], + 'exoticHiggs_scalar_ms20GeV_sine-6':['exoticHiggs_scalar_ms20GeV_sine-6'], + 'exoticHiggs_scalar_ms20GeV_sine-7':['exoticHiggs_scalar_ms20GeV_sine-7'], + 'exoticHiggs_scalar_ms60GeV_sine-5':['exoticHiggs_scalar_ms60GeV_sine-5'], + 'exoticHiggs_scalar_ms60GeV_sine-6':['exoticHiggs_scalar_ms60GeV_sine-6'], + 'exoticHiggs_scalar_ms60GeV_sine-7':['exoticHiggs_scalar_ms60GeV_sine-7'], +}, +'backgrounds':{ + # + } + } + + +legend = {} +legend['exoticHiggs_scalar_ms20GeV_sine-5'] = 'm_{S} = 20 GeV, sin #theta = 1e-5' +legend['exoticHiggs_scalar_ms20GeV_sine-6'] = 'm_{S} = 20 GeV, sin #theta = 1e-6' +legend['exoticHiggs_scalar_ms20GeV_sine-7'] = 'm_{S} = 20 GeV, sin #theta = 1e-7' +legend['exoticHiggs_scalar_ms60GeV_sine-5'] = 'm_{S} = 60 GeV, sin #theta = 1e-5' +legend['exoticHiggs_scalar_ms60GeV_sine-6'] = 'm_{S} = 60 GeV, sin #theta = 1e-6' +legend['exoticHiggs_scalar_ms60GeV_sine-7'] = 'm_{S} = 60 GeV, sin #theta = 1e-7' diff --git a/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_stage1.py b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_stage1.py new file mode 100644 index 0000000000..885e354016 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ExoticHiggsDecays/Reco_analysis_stage1.py @@ -0,0 +1,236 @@ +import ROOT + +#Mandatory: List of processes +processList = { + + #privately-produced signals + 'exoticHiggs_scalar_ms20GeV_sine-5':{}, + 'exoticHiggs_scalar_ms20GeV_sine-6':{}, + 'exoticHiggs_scalar_ms20GeV_sine-7':{}, + 'exoticHiggs_scalar_ms60GeV_sine-5':{}, + 'exoticHiggs_scalar_ms60GeV_sine-6':{}, + 'exoticHiggs_scalar_ms60GeV_sine-7':{}, + + # #centrally produced backgrounds + # 'p8_ee_ZH_ecm240':{'fraction':0.01}, + # 'p8_ee_ZZ_ecm240':{'fraction':0.01}, + # 'p8_ee_WW_ecm240':{'fraction':0.01}, +} + +#Production tag. This points to the yaml files for getting sample statistics +#Mandatory when running over EDM4Hep centrally produced events +#Comment out when running over privately produced events +#prodTag = "FCCee/spring2021/IDEA/" + + +#Input directory +#Comment out when running over centrally produced events +#Mandatory when running over privately produced events +inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/output_MadgraphPythiaDelphes/" + + +#Optional: output directory, default is local dir +#outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/Reco_output_stage1/" +#outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/H_SS_4b/Reco_output_stage1/" +outputDir = "Reco_output_stage1/" + +#Optional: ncpus, default is 4 +nCPUS = 8 + +#Optional running on HTCondor, default is False +runBatch = False +#runBatch = True + +#Optional batch queue name when running on HTCondor, default is workday +#batchQueue = "longlunch" + +#Optional computing account when running on HTCondor, default is group_u_FCC.local_gen +#compGroup = "group_u_FCC.local_gen" + +#USER DEFINED CODE +# For costum displaced vertex selection, apply selection on the DVs with invariant mass higher than 1 GeV and distance from PV to DV less than 2000 mm, but longer than 4 mm +# and count the number of DVs that fulfill this selection +ROOT.gInterpreter.Declare(""" +int filter_n_DVs(ROOT::VecOps::RVec distanceDV, ROOT::VecOps::RVec invMassDV) { + int result = 0; + for (size_t i = 0; i < invMassDV.size(); ++i) { + if (invMassDV.at(i) > 1 && distanceDV.at(i) > 4 && distanceDV.at(i) < 2000) + result += 1; + } + return result; +} +""") +#END USER DEFINED CODE + +#Mandatory: RDFanalysis class where the use defines the operations on the TTree +class RDFanalysis(): + + #__________________________________________________________ + #Mandatory: analysers funtion to define the analysers to process, please make sure you return the last dataframe, in this example it is df2 + def analysers(df): + df2 = ( + df + + .Alias("Particle1", "Particle#1.index") + .Alias("MCRecoAssociations0", "MCRecoAssociations#0.index") + .Alias("MCRecoAssociations1", "MCRecoAssociations#1.index") + + # MC event primary vertex + .Define("MC_PrimaryVertex", "FCCAnalyses::MCParticle::get_EventPrimaryVertex(21)( Particle )" ) + + # number of tracks + .Define("n_tracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") + + # Vertex fitting + + # First, reconstruct a vertex from all tracks + # Input parameters are 1 = primary vertex, EFlowTrack_1 contains all tracks, bool beamspotconstraint = true, bsc sigma x/y/z + .Define("VertexObject_allTracks", "VertexFitterSimple::VertexFitter_Tk ( 1, EFlowTrack_1, true, 4.5, 20e-3, 300)") + + # Select the tracks that are reconstructed as primaries + .Define("RecoedPrimaryTracks", "VertexFitterSimple::get_PrimaryTracks( VertexObject_allTracks, EFlowTrack_1, true, 4.5, 20e-3, 300, 0., 0., 0., 0)") + .Define("n_RecoedPrimaryTracks", "ReconstructedParticle2Track::getTK_n( RecoedPrimaryTracks )") + + # the final primary vertex : + .Define("PrimaryVertexObject", "VertexFitterSimple::VertexFitter_Tk ( 1, RecoedPrimaryTracks, true, 4.5, 20e-3, 300) ") + .Define("PrimaryVertex", "VertexingUtils::get_VertexData( PrimaryVertexObject )") + + # Displaced vertex reconstruction + + # select tracks with pT > 1 GeV + .Define('sel_tracks_pt', 'VertexingUtils::sel_pt_tracks(1)(EFlowTrack_1)') + # select tracks with |d0 |> 2 mm + .Define('sel_tracks', 'VertexingUtils::sel_d0_tracks(2)(sel_tracks_pt)') + # find the DVs + .Define("DV_evt_seltracks", "VertexFinderLCFIPlus::get_SV_event(sel_tracks, PrimaryVertexObject, true, 9., 40., 5.)") + # number of DVs + .Define('n_seltracks_DVs', 'VertexingUtils::get_n_SV(DV_evt_seltracks)') + # number of tracks from the DVs + .Define('n_trks_seltracks_DVs', 'VertexingUtils::get_VertexNtrk(DV_evt_seltracks)') + # invariant mass at the DVs (assuming the tracks to be pions) + .Define('invMass_seltracks_DVs', 'VertexingUtils::get_invM(DV_evt_seltracks)') + + # get the chi2 distributions of the DVs from selected tracks + .Define("DV_evt_seltracks_chi2", "VertexingUtils::get_chi2_SV(DV_evt_seltracks)") + .Define("DV_evt_seltracks_normchi2","VertexingUtils::get_norm_chi2_SV(DV_evt_seltracks)") # DV chi2 (normalised) + + # get the decay radius of all the DVs from selected tracks + .Define("Reco_seltracks_DVs_Lxy","VertexingUtils::get_dxy_SV(DV_evt_seltracks, PrimaryVertexObject)") + .Define("Reco_seltracks_DVs_Lxyz","VertexingUtils::get_d3d_SV(DV_evt_seltracks, PrimaryVertexObject)") + + # merge vertices with position within 10*error-of-position, get the tracks from the merged vertices and refit + .Define('merged_DVs', 'VertexingUtils::mergeVertices(DV_evt_seltracks)') + # number of merged DVs + .Define("merged_DVs_n", "VertexingUtils::get_n_SV(merged_DVs)") + # number of tracks from the merged DVs + .Define('n_trks_merged_DVs', 'VertexingUtils::get_VertexNtrk(merged_DVs)') + # invariant mass at the merged DVs + .Define('invMass_merged_DVs', 'VertexingUtils::get_invM(merged_DVs)') + + # get the chi2 distributions of the merged DVs + .Define("merged_DVs_chi2", "VertexingUtils::get_chi2_SV(merged_DVs)") + .Define("merged_DVs_normchi2","VertexingUtils::get_norm_chi2_SV(merged_DVs)") # DV chi2 (normalised) + + # get the decay radius of all the merged DVs + .Define("Reco_DVs_merged_Lxy","VertexingUtils::get_dxy_SV(merged_DVs, PrimaryVertexObject)") + .Define("Reco_DVs_merged_Lxyz","VertexingUtils::get_d3d_SV(merged_DVs, PrimaryVertexObject)") + + # Reconstructed electrons and muons + + # Electrons + .Alias('Electron0', 'Electron#0.index') + .Define('RecoElectrons', 'ReconstructedParticle::get(Electron0, ReconstructedParticles)') + .Define('n_RecoElectrons', 'ReconstructedParticle::get_n(RecoElectrons)') #count how many electrons are in the event in total + + # some kinematics of the reconstructed electrons and positrons + .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") + .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") + .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") + .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") + .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") + .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") + .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") + + # finding the invariant mass of the reconstructed electron and positron pair + .Define("Reco_ee_energy", "if ((n_RecoElectrons>1) && (RecoElectron_charge.at(0) != RecoElectron_charge.at(1))) return (RecoElectron_e.at(0) + RecoElectron_e.at(1)); else return float(-1.);") + .Define("Reco_ee_px", "if ((n_RecoElectrons>1) && (RecoElectron_charge.at(0) != RecoElectron_charge.at(1))) return (RecoElectron_px.at(0) + RecoElectron_px.at(1)); else return float(-1.);") + .Define("Reco_ee_py", "if ((n_RecoElectrons>1) && (RecoElectron_charge.at(0) != RecoElectron_charge.at(1))) return (RecoElectron_py.at(0) + RecoElectron_py.at(1)); else return float(-1.);") + .Define("Reco_ee_pz", "if ((n_RecoElectrons>1) && (RecoElectron_charge.at(0) != RecoElectron_charge.at(1))) return (RecoElectron_pz.at(0) + RecoElectron_pz.at(1)); else return float(-1.);") + .Define("Reco_ee_invMass", "if ((n_RecoElectrons>1) && (RecoElectron_charge.at(0) != RecoElectron_charge.at(1))) return sqrt(Reco_ee_energy*Reco_ee_energy - Reco_ee_px*Reco_ee_px - Reco_ee_py*Reco_ee_py - Reco_ee_pz*Reco_ee_pz ); else return float(-1.);") + + + # Muons + .Alias('Muon0', 'Muon#0.index') + .Define('RecoMuons', 'ReconstructedParticle::get(Muon0, ReconstructedParticles)') + .Define('n_RecoMuons', 'ReconstructedParticle::get_n(RecoMuons)') #count how many muons are in the event in total + + # some kinematics of the reconstructed muons + .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") + .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") + .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") + .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") + .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") + .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") + .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") + + # finding the invariant mass of the reconstructed muon pair + .Define("Reco_mumu_energy", "if ((n_RecoMuons>1) && (RecoMuon_charge.at(0) != RecoMuon_charge.at(1))) return (RecoMuon_e.at(0) + RecoMuon_e.at(1)); else return float(-1.);") + .Define("Reco_mumu_px", "if ((n_RecoMuons>1) && (RecoMuon_charge.at(0) != RecoMuon_charge.at(1))) return (RecoMuon_px.at(0) + RecoMuon_px.at(1)); else return float(-1.);") + .Define("Reco_mumu_py", "if ((n_RecoMuons>1) && (RecoMuon_charge.at(0) != RecoMuon_charge.at(1))) return (RecoMuon_py.at(0) + RecoMuon_py.at(1)); else return float(-1.);") + .Define("Reco_mumu_pz", "if ((n_RecoMuons>1) && (RecoMuon_charge.at(0) != RecoMuon_charge.at(1))) return (RecoMuon_pz.at(0) + RecoMuon_pz.at(1)); else return float(-1.);") + .Define("Reco_mumu_invMass", "if ((n_RecoMuons>1) && (RecoMuon_charge.at(0) != RecoMuon_charge.at(1))) return sqrt(Reco_mumu_energy*Reco_mumu_energy - Reco_mumu_px*Reco_mumu_px - Reco_mumu_py*Reco_mumu_py - Reco_mumu_pz*Reco_mumu_pz ); else return float(-1.);") + + # Number of DVs with distance and invariant mass selection applied + .Define("filter_n_DVs_seltracks", "filter_n_DVs(Reco_seltracks_DVs_Lxyz, invMass_seltracks_DVs)") + .Define("filter_n_DVs_merge", "filter_n_DVs(Reco_DVs_merged_Lxyz, invMass_merged_DVs)") + + ) + return df2 + + + #__________________________________________________________ + #Mandatory: output function, please make sure you return the branchlist as a python list + def output(): + branchList = [ + "n_tracks", + "n_RecoedPrimaryTracks", + + 'n_seltracks_DVs', + 'n_trks_seltracks_DVs', + 'invMass_seltracks_DVs', + "DV_evt_seltracks_chi2", + "DV_evt_seltracks_normchi2", + "Reco_seltracks_DVs_Lxy", + "Reco_seltracks_DVs_Lxyz", + + "merged_DVs_n", + 'n_trks_merged_DVs', + 'invMass_merged_DVs', + "merged_DVs_chi2", + "merged_DVs_normchi2", + "Reco_DVs_merged_Lxy", + "Reco_DVs_merged_Lxyz", + + 'n_RecoElectrons', + "RecoElectron_e", + "RecoElectron_p", + "RecoElectron_pt", + "RecoElectron_px", + "RecoElectron_py", + "RecoElectron_pz", + "RecoElectron_charge", + "Reco_ee_invMass", + 'n_RecoMuons', + "RecoMuon_e", + "RecoMuon_p", + "RecoMuon_pt", + "RecoMuon_px", + "RecoMuon_py", + "RecoMuon_pz", + "RecoMuon_charge", + "Reco_mumu_invMass", + + "filter_n_DVs_seltracks", + "filter_n_DVs_merge", + ] + return branchList \ No newline at end of file From 832cb8b3f6c495ae9e89c4c710a9188362e744a0 Mon Sep 17 00:00:00 2001 From: Juliette Alimena Date: Mon, 17 Jun 2024 11:26:23 +0200 Subject: [PATCH 34/49] fix bug for falp, should be 1000/(16*pi**2) --- .../ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat index 8e9c041903..fcf2e9397f 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat +++ b/examples/FCCee/bsm/LLPs/ALPs/ALP_sample_creation/mg5_proc_card_ALP_aa_1GeV_0p5CYY.dat @@ -68,8 +68,8 @@ set cmumu = 0. set ctautau = 0. set cah = 0. set cZh5 = 0. -# set supression scale in the effective operators coupling the ALP to SM particles -set falp = 1000 +# set supression scale in the effective operators coupling the ALP to SM particles: 1000/(16*pi**2) +set falp = 6.33 # set the decay width of the ALP to auto set WALP auto From d4822fa896b317896e80798c93d15969ceb3e73a Mon Sep 17 00:00:00 2001 From: Merlin Gogolin Date: Mon, 17 Jun 2024 16:57:41 +0200 Subject: [PATCH 35/49] first commit --- .../FCCee/bsm/LLPs/ALPs/analysis_stage1.py | 798 +++++++++--------- 1 file changed, 399 insertions(+), 399 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py index 611460383d..da3646c114 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py @@ -23,7 +23,7 @@ #Optional: output directory, default is local dir -outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +outputDir = "./output_stage1/" #outputDir = "/eos/user/j/jalimena/FCCeeLLP/" #outputDir = "output_stage1/" @@ -51,418 +51,418 @@ def analysers(df): df2 = (df #Access the various objects and their properties with the following syntax: .Define("", "") - #This will create a column in the RDataFrame named and filled with the return value of the for the given collection/object - #Accessor functions are the functions found in the C++ analyzers code that return a certain variable, e.g. ::get_n(object) returns the number + #This will create a column in the RDataFrame named and filled with the return value of the for the given collection/object + #Accessor functions are the functions found in the C++ analyzers code that return a certain variable, e.g. ::get_n(object) returns the number #of these objects in the event and ::get_pt(object) returns the pt of the object. Here you can pick between two namespaces to access either - #reconstructed (namespace = ReconstructedParticle) or MC-level objects (namespace = MCParticle). + #reconstructed (namespace = ReconstructedParticle) or MC-level objects (namespace = MCParticle). #For the name of the object, in principle the names of the EDM4HEP collections are used - photons, muons and electrons are an exception, see below #OVERVIEW: Accessing different objects and counting them - + # Following code is written specifically for the ALP study #################################################################################################### .Alias("Particle1", "Particle#1.index") .Alias("MCRecoAssociations0", "MCRecoAssociations#0.index") .Alias("MCRecoAssociations1", "MCRecoAssociations#1.index") - + ##### Added branch for MCParticle; finding PID of the MC particle for ALP .Define("GenALP_PID", "MCParticle::sel_pdgID(9000005, false)(Particle)") .Define("GenALP_decay", "MCParticle::get_list_of_particles_from_decay(0, GenALP_PID, Particle1)") .Define("All_n_GenALP", "MCParticle::get_n(GenALP_PID)") - .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch - .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") - .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") - .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch - .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") - .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") - .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") - .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") - .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") - .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") - .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") - - #all final state gen electrons - .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates - .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") - .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") - .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") - .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") - .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") - .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") - .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") - .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") - .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") - .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") - - #all final state gen positrons - .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") - .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") - .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") - .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") - .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") - .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") - .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") - .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") - .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") - .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") - .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") - - #all final state gen neutrinos - .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") - .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") - .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") - .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") - .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") - .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") - .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") - .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") - .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") - .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") - .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") - - #all final state gen anti-neutrinos - .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") - .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") - - #all final state gen photons - .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") - .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") - .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") - .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") - .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") - .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") - .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") - .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") - .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") - .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") - .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") - - # Number of final state electrons and positrons when the number of final state photons is only 2 - # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") - # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") - - .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") - .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") - .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") - - # Finding the Lxy of the ALP - # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) - .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") - .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") - - # Calculating the lifetime of the ALP - # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) - .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) - .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) - - # Separating the three first final state photons - # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") - # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") - # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") - # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") - # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") - # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") - # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") - - # aa invariant mass - for all three combinations of the three first FS photons - # returns -2 for events with only 1 number of photons - # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") - # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") - # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") - # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") - # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") - - # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") - # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") - # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") - # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") - # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") - - # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") - # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") - # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") - # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") - # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") - - # aaa invariant mass - # Returns -2 for events with only 1 or 2 number of photons - # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") - # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") - # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") - # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") - # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") - - # Defining a vector containing the ALP and its daughters in order written - # Name of vector is ALP_indices - .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") - - # Defining the individual particles from the vector - .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") - .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") - .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") - - # Kinematics of the mother particle ALP - .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") - .Define("GenALP_e", "MCParticle::get_e( GenALP )") - .Define("GenALP_p", "MCParticle::get_p( GenALP )") - .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") - .Define("GenALP_px", "MCParticle::get_px( GenALP )") - .Define("GenALP_py", "MCParticle::get_py( GenALP )") - .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") - .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") - .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") - .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") - .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") - - # Finding the kinematics of each of these daughters - .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") - .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") - .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") - .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") - .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") - .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") - .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") - .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") - .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") - .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") - .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") - .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") - .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") - .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") - .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") - .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") - .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") - .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") - .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") - .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") - - # Finding the production vertex of the daughters (checking GenALPPhoton1 here) - .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") - .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") - .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") - - # Finding the Lxy of the ALP - # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) - .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") - # Finding the Lxyz of the ALP - .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") - - # Calculating the lifetime of the ALP - # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) - .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) - .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) - - # Finding the production vertex of the ALP which should be at (0,0,0) - .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") - .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") - .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") - - # aa invariant mass - .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") - .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") - .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") - .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") - .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") - - # Vertexing studies - # Finding the vertex of the mother particle ALP using decicated Bs method - #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") - - # MC event primary vertex - .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) - .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") - - # Reconstructed particles - # Returns the RecoParticles associated with the ALP decay products - .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") - # Reconstructing the tracks from the ALP - .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") - - # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) - .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") - - # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks - # First the full object, of type Vertexing::FCCAnalysesVertex - .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) - - # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm - .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") - - # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, - # the first particle (vector[0]) is the e-, etc : - .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") - .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") - - # reconstruced electron, positron values - .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") - # add dxy, dz, dxyz, and uncertainties - - # aa invariant mass - .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") - .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") - .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") - .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") - .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") - - #gen-reco - .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") - .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") - .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") - .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") - .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") - .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") - .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") - .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") - .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") - .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") - .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") - .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") - .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") - .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") - .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") - .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") - .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") - .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") - - .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") - .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") - .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") - - - #################################################################################################### - # From here the general study begins - - #JETS - .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total - - #PHOTONS - .Alias("Photon0", "Photon#0.index") - .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") - .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total - - #ELECTRONS AND MUONS - #TODO: ADD EXPLANATION OF THE EXTRA STEPS - .Alias("Electron0", "Electron#0.index") - .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") - .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total - - .Alias("Muon0", "Muon#0.index") - .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") - .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total - - #OBJECT SELECTION: Consider only those objects that have pt > certain threshold - #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV - #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV - #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV - #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") - - #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") - #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") - #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") - #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") - - #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons - .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") - .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p - .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt - .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") - .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") - .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") - .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta - .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") - .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi - .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") - - .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") - .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") - .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") - .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") - .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") - .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") - .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta - .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") - .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi - .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") - - .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") - .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") - .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") - .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") - .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") - .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") - .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta - .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") - .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi - .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") - - .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") - .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") - .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") - .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") - .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") - .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") - .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta - .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") - .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi - .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") - - #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) - .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") - .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") - .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") - .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") - .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") - .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") - .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") - .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") - .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") + # .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch + # .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") + # .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") + # .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch + # .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") + # .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") + # .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") + # .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") + # .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") + # .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") + # .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") + + # #all final state gen electrons + # .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates + # .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") + # .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") + # .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") + # .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") + # .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") + # .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") + # .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") + # .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") + # .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") + # .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") + + # #all final state gen positrons + # .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") + # .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") + # .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") + # .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") + # .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") + # .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") + # .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") + # .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") + # .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") + # .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") + # .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") + + # #all final state gen neutrinos + # .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") + # .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") + # .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") + # .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") + # .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") + # .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") + # .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") + # .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") + # .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") + # .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") + # .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") + + # #all final state gen anti-neutrinos + # .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") + # .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") + + # #all final state gen photons + # .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") + # .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") + # .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") + # .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") + # .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") + # .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") + # .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") + # .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") + # .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") + # .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") + # .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") + + # # Number of final state electrons and positrons when the number of final state photons is only 2 + # # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") + # # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") + + # .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") + # .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") + # .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") + + # # Finding the Lxy of the ALP + # # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + # .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") + # .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") + + # # Calculating the lifetime of the ALP + # # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + # .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) + # .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) + + # # Separating the three first final state photons + # # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") + # # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") + # # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") + # # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") + # # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") + # # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") + # # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") + + # # aa invariant mass - for all three combinations of the three first FS photons + # # returns -2 for events with only 1 number of photons + # # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") + # # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") + # # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") + # # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") + # # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") + + # # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") + # # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") + # # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") + # # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") + # # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") + + # # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") + # # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") + # # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") + # # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") + # # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") + + # # aaa invariant mass + # # Returns -2 for events with only 1 or 2 number of photons + # # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") + # # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") + # # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") + # # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") + # # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") + + # # Defining a vector containing the ALP and its daughters in order written + # # Name of vector is ALP_indices + # .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") + + # # Defining the individual particles from the vector + # .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") + # .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") + # .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") + + # # Kinematics of the mother particle ALP + # .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") + # .Define("GenALP_e", "MCParticle::get_e( GenALP )") + # .Define("GenALP_p", "MCParticle::get_p( GenALP )") + # .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") + # .Define("GenALP_px", "MCParticle::get_px( GenALP )") + # .Define("GenALP_py", "MCParticle::get_py( GenALP )") + # .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") + # .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") + # .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") + # .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") + # .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") + + # # Finding the kinematics of each of these daughters + # .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") + # .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") + # .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") + # .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") + # .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") + # .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") + # .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") + # .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") + # .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") + # .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") + # .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") + # .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") + # .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") + # .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") + # .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") + # .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") + # .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") + # .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") + # .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") + # .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") + + # # Finding the production vertex of the daughters (checking GenALPPhoton1 here) + # .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") + # .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") + # .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") + + # # Finding the Lxy of the ALP + # # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + # .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") + # # Finding the Lxyz of the ALP + # .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") + + # # Calculating the lifetime of the ALP + # # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + # .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) + # .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) + + # # Finding the production vertex of the ALP which should be at (0,0,0) + # .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") + # .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") + # .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") + + # # aa invariant mass + # .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") + # .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") + # .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") + # .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") + # .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") + + # # Vertexing studies + # # Finding the vertex of the mother particle ALP using decicated Bs method + # #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") + + # # MC event primary vertex + # .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) + # .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") + + # # Reconstructed particles + # # Returns the RecoParticles associated with the ALP decay products + # .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") + # # Reconstructing the tracks from the ALP + # .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") + + # # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) + # .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") + + # # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks + # # First the full object, of type Vertexing::FCCAnalysesVertex + # .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) + + # # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm + # .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") + + # # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, + # # the first particle (vector[0]) is the e-, etc : + # .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") + # .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") + + # # reconstruced electron, positron values + # .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") + # # add dxy, dz, dxyz, and uncertainties + + # # aa invariant mass + # .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") + # .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") + # .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") + # .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") + # .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") + + # #gen-reco + # .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") + # .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") + # .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") + # .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") + # .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") + # .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") + # .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") + # .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") + # .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") + # .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") + # .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") + # .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") + # .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") + # .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") + # .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") + # .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") + # .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") + # .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") + + # .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") + # .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") + # .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") + + + # #################################################################################################### + # # From here the general study begins + + # #JETS + # .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total + + # #PHOTONS + # .Alias("Photon0", "Photon#0.index") + # .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") + # .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total + + # #ELECTRONS AND MUONS + # #TODO: ADD EXPLANATION OF THE EXTRA STEPS + # .Alias("Electron0", "Electron#0.index") + # .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") + # .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total + + # .Alias("Muon0", "Muon#0.index") + # .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") + # .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total + + # #OBJECT SELECTION: Consider only those objects that have pt > certain threshold + # #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV + # #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV + # #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV + # #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") + + # #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") + # #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") + # #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") + # #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") + + # #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons + # .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") + # .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p + # .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt + # .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") + # .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") + # .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") + # .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta + # .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") + # .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi + # .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") + + # .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") + # .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") + # .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") + # .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") + # .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") + # .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") + # .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta + # .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") + # .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi + # .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") + + # .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") + # .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") + # .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") + # .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") + # .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") + # .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") + # .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta + # .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") + # .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi + # .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") + + # .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") + # .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") + # .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") + # .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") + # .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") + # .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") + # .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta + # .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") + # .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi + # .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") + + # #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) + # .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") + # .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") + # .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") + # .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") + # .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") + # .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") + # .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") + # .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") + # .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") ) From 36ac86df9dbbcd92adb821bb97d67590a5c571bb Mon Sep 17 00:00:00 2001 From: Kunal Gautam Date: Mon, 3 Oct 2022 14:37:48 +0200 Subject: [PATCH 36/49] adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils --- .../dataframe/FCCAnalyses/VertexingUtils.h | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index 4c4241518f..ae7609569d 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -129,6 +129,7 @@ namespace VertexingUtils{ /// Return the number of tracks in a given track collection int get_nTracks(ROOT::VecOps::RVec tracks); +<<<<<<< HEAD /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; @@ -330,10 +331,198 @@ namespace VertexingUtils{ std::array Delphes2Edm4hep_TrackCovMatrix( const TMatrixDSym& cov, bool Units_mm ) ; +<<<<<<< HEAD /// --- Internal methods needed by the code of Franco B: TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; +======= + /////////////////////////////////////////////////// + /// functions used for SV reconstruction + + /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV + * first entry: PV, all subsequent entries: SVs + */ + ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, + ROOT::VecOps::RVec SV ); + + ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, + ROOT::VecOps::RVec> SV ); + + /** returns the invariant mass of a two-track vertex + * CAUTION: m1 -> mass of first track, m2 -> mass of second track + * by default both pions + */ + double get_invM_pairs( FCCAnalysesVertex vertex, + double m1 = 0.13957039, + double m2 = 0.13957039) ; + + ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, + double m1 = 0.13957039, + double m2 = 0.13957039 ) ; + + /** returns the invariant mass of a vertex + * assuming all tracks to be pions + */ + double get_invM( FCCAnalysesVertex vertex ) ; + + /** returns the invariant mass of a vector of vertices + * assuming all tracks to be pions + */ + ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; + + /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ + double get_PV2V0angle( FCCAnalysesVertex V0, + FCCAnalysesVertex PV) ; + + /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ + double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, + FCCAnalysesVertex vtx, + FCCAnalysesVertex PV ) ; + + /** returns a track's energy + * assuming the track to be a pion + */ + double get_trackE( edm4hep::TrackState track ) ; + + /////////////////////////////////////////////////// + /// V0 Reconstruction + /// Return the number of reconstructed V0s + int get_n_SV( FCCAnalysesV0 SV ); + + /// Return the vertex position of all reconstructed V0s (in mm) + ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); + + /// Return the PDG IDs of all reconstructed V0s + ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); + + /// Return the invariant masses of all reconstructed V0s + ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); + + /// Return the momentum of all reconstructed V0s + ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); + + /// Return chi2 of all reconstructed V0s + ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); + + /////////////////////////////////////////////////// + + /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 + /// Return the number of reconstructed SVs + int get_n_SV( ROOT::VecOps::RVec vertices ); + + /// Return the momentum of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); + + /// Return the vertex position of all reconstructed SVs (in mm) + ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); + + /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); + + /// Return chi2 of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); + + /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); + + /// Return no of DOF of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); + + /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); + + /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); + + /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) + ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet, + ROOT::VecOps::RVec jets ); + + /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) + ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet, + ROOT::VecOps::RVec jets ); + + /// Return the pointing angle of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); + + /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); + + /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); + + /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, + TVector3 location ); + + /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, + edm4hep::Vector3d location ); + + /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, + TVector3 location ); + + /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, + edm4hep::Vector3d location ); + + /////////////////////////////////////////////////// + + /// For get_SV_jets /// + + /// Return the number of reconstructed SVs + ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); + + /// Return the total number of reconstructed SVs + int get_n_SV( ROOT::VecOps::RVec> vertices ); + + /// Return the number of reconstructed SVs per jet + ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); + + /// Return the tracks separated by jets + std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, + ROOT::VecOps::RVec thetracks, + ROOT::VecOps::RVec jets, + std::vector> jet_consti ); + + /// Return V0s separated by jets + ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet ); + + // --- for get_SV_jets --- // + ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); + ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); + ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); + ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); + ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); + ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); + ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); + /// Return the vertex position of all reconstructed SVs (in mm) + ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); + // --- for get_SV_jets --- // + + // --- Internal methods needed by the code of Franco B : + float get_trackMom( edm4hep::TrackState & atrack ); + TVectorD get_trackParam( edm4hep::TrackState & atrack) ; + TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; + +>>>>>>> c5a4bb427 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) TVectorD ParToACTS(TVectorD Par); TMatrixDSym CovToACTS(TMatrixDSym Cov,TVectorD Par); From d51a248c743631e6c6a0d6f85253b982116028b8 Mon Sep 17 00:00:00 2001 From: Merlin Gogolin Date: Mon, 17 Jun 2024 16:57:41 +0200 Subject: [PATCH 37/49] first commit --- .../FCCee/bsm/LLPs/ALPs/analysis_stage1.py | 798 +++++++++--------- 1 file changed, 399 insertions(+), 399 deletions(-) diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py index 611460383d..da3646c114 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py @@ -23,7 +23,7 @@ #Optional: output directory, default is local dir -outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +outputDir = "./output_stage1/" #outputDir = "/eos/user/j/jalimena/FCCeeLLP/" #outputDir = "output_stage1/" @@ -51,418 +51,418 @@ def analysers(df): df2 = (df #Access the various objects and their properties with the following syntax: .Define("", "") - #This will create a column in the RDataFrame named and filled with the return value of the for the given collection/object - #Accessor functions are the functions found in the C++ analyzers code that return a certain variable, e.g. ::get_n(object) returns the number + #This will create a column in the RDataFrame named and filled with the return value of the for the given collection/object + #Accessor functions are the functions found in the C++ analyzers code that return a certain variable, e.g. ::get_n(object) returns the number #of these objects in the event and ::get_pt(object) returns the pt of the object. Here you can pick between two namespaces to access either - #reconstructed (namespace = ReconstructedParticle) or MC-level objects (namespace = MCParticle). + #reconstructed (namespace = ReconstructedParticle) or MC-level objects (namespace = MCParticle). #For the name of the object, in principle the names of the EDM4HEP collections are used - photons, muons and electrons are an exception, see below #OVERVIEW: Accessing different objects and counting them - + # Following code is written specifically for the ALP study #################################################################################################### .Alias("Particle1", "Particle#1.index") .Alias("MCRecoAssociations0", "MCRecoAssociations#0.index") .Alias("MCRecoAssociations1", "MCRecoAssociations#1.index") - + ##### Added branch for MCParticle; finding PID of the MC particle for ALP .Define("GenALP_PID", "MCParticle::sel_pdgID(9000005, false)(Particle)") .Define("GenALP_decay", "MCParticle::get_list_of_particles_from_decay(0, GenALP_PID, Particle1)") .Define("All_n_GenALP", "MCParticle::get_n(GenALP_PID)") - .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch - .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") - .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") - .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch - .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") - .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") - .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") - .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") - .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") - .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") - .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") - - #all final state gen electrons - .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates - .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") - .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") - .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") - .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") - .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") - .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") - .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") - .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") - .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") - .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") - - #all final state gen positrons - .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") - .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") - .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") - .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") - .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") - .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") - .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") - .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") - .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") - .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") - .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") - - #all final state gen neutrinos - .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") - .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") - .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") - .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") - .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") - .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") - .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") - .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") - .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") - .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") - .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") - - #all final state gen anti-neutrinos - .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") - .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") - .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") - - #all final state gen photons - .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") - .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) - .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") - .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") - .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") - .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") - .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") - .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") - .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") - .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") - .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") - .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") - - # Number of final state electrons and positrons when the number of final state photons is only 2 - # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") - # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") - - .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") - .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") - .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") - - # Finding the Lxy of the ALP - # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) - .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") - .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") - - # Calculating the lifetime of the ALP - # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) - .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) - .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) - - # Separating the three first final state photons - # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") - # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") - # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") - # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") - # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") - # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") - # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") - - # aa invariant mass - for all three combinations of the three first FS photons - # returns -2 for events with only 1 number of photons - # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") - # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") - # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") - # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") - # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") - - # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") - # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") - # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") - # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") - # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") - - # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") - # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") - # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") - # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") - # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") - - # aaa invariant mass - # Returns -2 for events with only 1 or 2 number of photons - # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") - # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") - # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") - # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") - # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") - - # Defining a vector containing the ALP and its daughters in order written - # Name of vector is ALP_indices - .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") - - # Defining the individual particles from the vector - .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") - .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") - .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") - - # Kinematics of the mother particle ALP - .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") - .Define("GenALP_e", "MCParticle::get_e( GenALP )") - .Define("GenALP_p", "MCParticle::get_p( GenALP )") - .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") - .Define("GenALP_px", "MCParticle::get_px( GenALP )") - .Define("GenALP_py", "MCParticle::get_py( GenALP )") - .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") - .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") - .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") - .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") - .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") - - # Finding the kinematics of each of these daughters - .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") - .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") - .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") - .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") - .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") - .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") - .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") - .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") - .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") - .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") - .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") - .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") - .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") - .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") - .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") - .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") - .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") - .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") - .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") - .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") - - # Finding the production vertex of the daughters (checking GenALPPhoton1 here) - .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") - .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") - .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") - - # Finding the Lxy of the ALP - # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) - .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") - # Finding the Lxyz of the ALP - .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") - - # Calculating the lifetime of the ALP - # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) - .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) - .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) - - # Finding the production vertex of the ALP which should be at (0,0,0) - .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") - .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") - .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") - - # aa invariant mass - .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") - .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") - .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") - .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") - .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") - - # Vertexing studies - # Finding the vertex of the mother particle ALP using decicated Bs method - #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") - - # MC event primary vertex - .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) - .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") - - # Reconstructed particles - # Returns the RecoParticles associated with the ALP decay products - .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") - # Reconstructing the tracks from the ALP - .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") - - # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) - .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") - - # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks - # First the full object, of type Vertexing::FCCAnalysesVertex - .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) - - # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm - .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") - - # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, - # the first particle (vector[0]) is the e-, etc : - .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") - .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") - - # reconstruced electron, positron values - .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") - .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") - .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") - # add dxy, dz, dxyz, and uncertainties - - # aa invariant mass - .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") - .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") - .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") - .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") - .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") - - #gen-reco - .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") - .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") - .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") - .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") - .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") - .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") - .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") - .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") - .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") - .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") - .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") - .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") - .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") - .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") - .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") - .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") - .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") - .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") - - .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") - .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") - .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") - - - #################################################################################################### - # From here the general study begins - - #JETS - .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total - - #PHOTONS - .Alias("Photon0", "Photon#0.index") - .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") - .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total - - #ELECTRONS AND MUONS - #TODO: ADD EXPLANATION OF THE EXTRA STEPS - .Alias("Electron0", "Electron#0.index") - .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") - .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total - - .Alias("Muon0", "Muon#0.index") - .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") - .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total - - #OBJECT SELECTION: Consider only those objects that have pt > certain threshold - #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV - #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV - #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV - #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") - - #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") - #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") - #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") - #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") - - #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons - .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") - .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p - .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt - .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") - .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") - .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") - .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta - .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") - .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi - .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") - - .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") - .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") - .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") - .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") - .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") - .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") - .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta - .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") - .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi - .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") - - .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") - .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") - .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") - .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") - .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") - .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") - .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta - .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") - .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi - .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") - - .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") - .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") - .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") - .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") - .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") - .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") - .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta - .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") - .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi - .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") - - #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) - .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") - .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") - .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") - .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") - .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") - .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") - .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") - .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") - .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") + # .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch + # .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") + # .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") + # .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch + # .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") + # .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") + # .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") + # .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") + # .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") + # .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") + # .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") + + # #all final state gen electrons + # .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates + # .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") + # .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") + # .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") + # .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") + # .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") + # .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") + # .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") + # .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") + # .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") + # .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") + + # #all final state gen positrons + # .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") + # .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") + # .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") + # .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") + # .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") + # .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") + # .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") + # .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") + # .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") + # .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") + # .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") + + # #all final state gen neutrinos + # .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") + # .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") + # .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") + # .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") + # .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") + # .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") + # .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") + # .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") + # .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") + # .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") + # .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") + + # #all final state gen anti-neutrinos + # .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") + # .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") + # .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") + + # #all final state gen photons + # .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") + # .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) + # .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") + # .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") + # .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") + # .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") + # .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") + # .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") + # .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") + # .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") + # .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") + # .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") + + # # Number of final state electrons and positrons when the number of final state photons is only 2 + # # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") + # # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") + + # .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") + # .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") + # .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") + + # # Finding the Lxy of the ALP + # # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + # .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") + # .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") + + # # Calculating the lifetime of the ALP + # # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + # .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) + # .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) + + # # Separating the three first final state photons + # # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") + # # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") + # # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") + # # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") + # # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") + # # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") + # # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") + # # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") + # # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") + + # # aa invariant mass - for all three combinations of the three first FS photons + # # returns -2 for events with only 1 number of photons + # # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") + # # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") + # # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") + # # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") + # # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") + + # # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") + # # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") + # # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") + # # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") + # # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") + + # # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") + # # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") + # # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") + # # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") + # # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") + + # # aaa invariant mass + # # Returns -2 for events with only 1 or 2 number of photons + # # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") + # # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") + # # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") + # # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") + # # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") + + # # Defining a vector containing the ALP and its daughters in order written + # # Name of vector is ALP_indices + # .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") + + # # Defining the individual particles from the vector + # .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") + # .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") + # .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") + + # # Kinematics of the mother particle ALP + # .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") + # .Define("GenALP_e", "MCParticle::get_e( GenALP )") + # .Define("GenALP_p", "MCParticle::get_p( GenALP )") + # .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") + # .Define("GenALP_px", "MCParticle::get_px( GenALP )") + # .Define("GenALP_py", "MCParticle::get_py( GenALP )") + # .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") + # .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") + # .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") + # .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") + # .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") + + # # Finding the kinematics of each of these daughters + # .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") + # .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") + # .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") + # .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") + # .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") + # .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") + # .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") + # .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") + # .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") + # .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") + # .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") + # .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") + # .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") + # .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") + # .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") + # .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") + # .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") + # .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") + # .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") + # .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") + + # # Finding the production vertex of the daughters (checking GenALPPhoton1 here) + # .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") + # .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") + # .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") + + # # Finding the Lxy of the ALP + # # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + # .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") + # # Finding the Lxyz of the ALP + # .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") + + # # Calculating the lifetime of the ALP + # # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + # .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) + # .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) + + # # Finding the production vertex of the ALP which should be at (0,0,0) + # .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") + # .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") + # .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") + + # # aa invariant mass + # .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") + # .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") + # .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") + # .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") + # .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") + + # # Vertexing studies + # # Finding the vertex of the mother particle ALP using decicated Bs method + # #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") + + # # MC event primary vertex + # .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) + # .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") + + # # Reconstructed particles + # # Returns the RecoParticles associated with the ALP decay products + # .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") + # # Reconstructing the tracks from the ALP + # .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") + + # # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) + # .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") + + # # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks + # # First the full object, of type Vertexing::FCCAnalysesVertex + # .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) + + # # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm + # .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") + + # # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, + # # the first particle (vector[0]) is the e-, etc : + # .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") + # .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") + + # # reconstruced electron, positron values + # .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") + # # add dxy, dz, dxyz, and uncertainties + + # # aa invariant mass + # .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") + # .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") + # .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") + # .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") + # .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") + + # #gen-reco + # .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") + # .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") + # .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") + # .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") + # .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") + # .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") + # .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") + # .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") + # .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") + # .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") + # .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") + # .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") + # .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") + # .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") + # .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") + # .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") + # .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") + # .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") + + # .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") + # .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") + # .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") + + + # #################################################################################################### + # # From here the general study begins + + # #JETS + # .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total + + # #PHOTONS + # .Alias("Photon0", "Photon#0.index") + # .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") + # .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total + + # #ELECTRONS AND MUONS + # #TODO: ADD EXPLANATION OF THE EXTRA STEPS + # .Alias("Electron0", "Electron#0.index") + # .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") + # .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total + + # .Alias("Muon0", "Muon#0.index") + # .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") + # .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total + + # #OBJECT SELECTION: Consider only those objects that have pt > certain threshold + # #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV + # #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV + # #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV + # #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") + + # #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") + # #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") + # #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") + # #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") + + # #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons + # .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") + # .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p + # .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt + # .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") + # .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") + # .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") + # .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta + # .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") + # .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi + # .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") + + # .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") + # .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") + # .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") + # .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") + # .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") + # .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") + # .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta + # .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") + # .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi + # .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") + + # .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") + # .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") + # .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") + # .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") + # .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") + # .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") + # .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta + # .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") + # .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi + # .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") + + # .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") + # .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") + # .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") + # .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") + # .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") + # .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") + # .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta + # .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") + # .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi + # .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") + + # #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) + # .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") + # .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") + # .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") + # .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") + # .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") + # .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") + # .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") + # .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") + # .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") ) From f77e10ec2f394150ba9773f6ebee5c12c3c5cfa0 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Tue, 18 Jun 2024 09:46:50 +0200 Subject: [PATCH 38/49] commenting out duplicate code in FCCAnalyses/analyzers/dataframe/FCCAnalyses/VertexingUtils.h and FCCAnalyses/analyzers/dataframe/src/ReconstructedParticle2Track.cc --- .../dataframe/FCCAnalyses/VertexingUtils.h | 320 +++++++++--------- .../src/ReconstructedParticle2Track.cc | 66 ++-- 2 files changed, 193 insertions(+), 193 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index ae7609569d..a8147e1136 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -54,7 +54,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec invM; // invariant mass ROOT::VecOps::RVec nSV_jet; // no of V0s per jet }; - + /// Structure to keep useful track information that is related to the vertex struct FCCAnalysesVertexMC{ TVector3 vertex; @@ -118,207 +118,207 @@ namespace VertexingUtils{ int get_VertexNtrk( FCCAnalysesVertex TheVertex ) ; ROOT::VecOps::RVec get_VertexNtrk( ROOT::VecOps::RVec vertices ) ; - + /// Retrieve the tracks indices from FCCAnalysesVertex ROOT::VecOps::RVec get_VertexRecoInd( FCCAnalysesVertex TheVertex ) ; /// Retrieve the indices of the tracks fitted to that vertex, but now in the collection of RecoParticles - ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, + ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, const ROOT::VecOps::RVec& reco ); - + /// Return the number of tracks in a given track collection int get_nTracks(ROOT::VecOps::RVec tracks); -<<<<<<< HEAD +// <<<<<<< HEAD /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; - /////////////////////////////////////////////////// - /// functions used for SV reconstruction +// /////////////////////////////////////////////////// +// /// functions used for SV reconstruction - /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV - * first entry: PV, all subsequent entries: SVs - */ - ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); +// /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV +// * first entry: PV, all subsequent entries: SVs +// */ +// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, +// ROOT::VecOps::RVec SV ); - ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); +// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, +// ROOT::VecOps::RVec> SV ); - /** returns the invariant mass of a two-track vertex - * CAUTION: m1 -> mass of first track, m2 -> mass of second track - * by default both pions - */ - double get_invM_pairs( FCCAnalysesVertex vertex, - double m1 = 0.13957039, - double m2 = 0.13957039) ; +// /** returns the invariant mass of a two-track vertex +// * CAUTION: m1 -> mass of first track, m2 -> mass of second track +// * by default both pions +// */ +// double get_invM_pairs( FCCAnalysesVertex vertex, +// double m1 = 0.13957039, +// double m2 = 0.13957039) ; - ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, - double m1 = 0.13957039, - double m2 = 0.13957039 ) ; +// ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, +// double m1 = 0.13957039, +// double m2 = 0.13957039 ) ; - /** returns the invariant mass of a vertex - * assuming all tracks to be pions - */ - double get_invM( FCCAnalysesVertex vertex ) ; +// /** returns the invariant mass of a vertex +// * assuming all tracks to be pions +// */ +// double get_invM( FCCAnalysesVertex vertex ) ; - /** returns the invariant mass of a vector of vertices - * assuming all tracks to be pions - */ - ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; +// /** returns the invariant mass of a vector of vertices +// * assuming all tracks to be pions +// */ +// ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; - /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ - double get_PV2V0angle( FCCAnalysesVertex V0, - FCCAnalysesVertex PV) ; +// /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ +// double get_PV2V0angle( FCCAnalysesVertex V0, +// FCCAnalysesVertex PV) ; - /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ - double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, - FCCAnalysesVertex vtx, - FCCAnalysesVertex PV ) ; +// /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ +// double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, +// FCCAnalysesVertex vtx, +// FCCAnalysesVertex PV ) ; - /** returns a track's energy - * assuming the track to be a pion - */ - double get_trackE( edm4hep::TrackState track ) ; +// /** returns a track's energy +// * assuming the track to be a pion +// */ +// double get_trackE( edm4hep::TrackState track ) ; - /////////////////////////////////////////////////// - /// V0 Reconstruction - /// Return the number of reconstructed V0s - int get_n_SV( FCCAnalysesV0 SV ); +// /////////////////////////////////////////////////// +// /// V0 Reconstruction +// /// Return the number of reconstructed V0s +// int get_n_SV( FCCAnalysesV0 SV ); - /// Return the vertex position of all reconstructed V0s (in mm) - ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); +// /// Return the vertex position of all reconstructed V0s (in mm) +// ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); - /// Return the PDG IDs of all reconstructed V0s - ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); +// /// Return the PDG IDs of all reconstructed V0s +// ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); - /// Return the invariant masses of all reconstructed V0s - ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); +// /// Return the invariant masses of all reconstructed V0s +// ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); - /// Return the momentum of all reconstructed V0s - ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); +// /// Return the momentum of all reconstructed V0s +// ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); - /// Return chi2 of all reconstructed V0s - ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); +// /// Return chi2 of all reconstructed V0s +// ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); - /////////////////////////////////////////////////// +// /////////////////////////////////////////////////// - /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 - /// Return the number of reconstructed SVs - int get_n_SV( ROOT::VecOps::RVec vertices ); +// /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 +// /// Return the number of reconstructed SVs +// int get_n_SV( ROOT::VecOps::RVec vertices ); - /// Return the momentum of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); +// /// Return the momentum of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); + +// /// Return the vertex position of all reconstructed SVs (in mm) +// ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); + +// /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); - /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); +// /// Return chi2 of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); - /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); +// /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); - /// Return chi2 of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); +// /// Return no of DOF of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); - /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); +// /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); - /// Return no of DOF of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); +// /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); - /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); +// /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) +// ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet, +// ROOT::VecOps::RVec jets ); - /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); +// /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) +// ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet, +// ROOT::VecOps::RVec jets ); - /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) - ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet, - ROOT::VecOps::RVec jets ); +// /// Return the pointing angle of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) - ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet, - ROOT::VecOps::RVec jets ); - - /// Return the pointing angle of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, +// TVector3 location ); - /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, - TVector3 location ); +// /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, +// edm4hep::Vector3d location ); - /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, - edm4hep::Vector3d location ); +// /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, +// TVector3 location ); - /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, - TVector3 location ); +// /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, +// edm4hep::Vector3d location ); - /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, - edm4hep::Vector3d location ); +// /////////////////////////////////////////////////// - /////////////////////////////////////////////////// +// /// For get_SV_jets /// - /// For get_SV_jets /// - - /// Return the number of reconstructed SVs - ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); +// /// Return the number of reconstructed SVs +// ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); - /// Return the total number of reconstructed SVs - int get_n_SV( ROOT::VecOps::RVec> vertices ); +// /// Return the total number of reconstructed SVs +// int get_n_SV( ROOT::VecOps::RVec> vertices ); - /// Return the number of reconstructed SVs per jet - ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); +// /// Return the number of reconstructed SVs per jet +// ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); - /// Return the tracks separated by jets - std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, - ROOT::VecOps::RVec thetracks, - ROOT::VecOps::RVec jets, - std::vector> jet_consti ); +// /// Return the tracks separated by jets +// std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, +// ROOT::VecOps::RVec thetracks, +// ROOT::VecOps::RVec jets, +// std::vector> jet_consti ); - /// Return V0s separated by jets - ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet ); +// /// Return V0s separated by jets +// ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet ); - // --- for get_SV_jets --- // - ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); - ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); - ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); - ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); - /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); - // --- for get_SV_jets --- // +// // --- for get_SV_jets --- // +// ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); +// ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); +// ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); +// ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); +// /// Return the vertex position of all reconstructed SVs (in mm) +// ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); +// // --- for get_SV_jets --- // - float get_trackMom( edm4hep::TrackState & atrack ); +// float get_trackMom( edm4hep::TrackState & atrack ); -// --- Conversion methods between the Delphes and edm4hep conventions +// // --- Conversion methods between the Delphes and edm4hep conventions -/// convert track parameters, from edm4hep to delphes conventions +/// convert track parameters, from edm4hep to delphes conventions TVectorD Edm4hep2Delphes_TrackParam( const TVectorD& param, bool Units_mm ); /// convert track parameters, from delphes to edm4hep conventions TVectorD Delphes2Edm4hep_TrackParam( const TVectorD& param, bool Units_mm ); @@ -331,12 +331,12 @@ namespace VertexingUtils{ std::array Delphes2Edm4hep_TrackCovMatrix( const TMatrixDSym& cov, bool Units_mm ) ; -<<<<<<< HEAD - /// --- Internal methods needed by the code of Franco B: +// <<<<<<< HEAD +// /// --- Internal methods needed by the code of Franco B: TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; - -======= + +// ======= /////////////////////////////////////////////////// /// functions used for SV reconstruction @@ -344,10 +344,10 @@ namespace VertexingUtils{ * first entry: PV, all subsequent entries: SVs */ ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); + ROOT::VecOps::RVec SV ); ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); + ROOT::VecOps::RVec> SV ); /** returns the invariant mass of a two-track vertex * CAUTION: m1 -> mass of first track, m2 -> mass of second track @@ -359,7 +359,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, double m1 = 0.13957039, - double m2 = 0.13957039 ) ; + double m2 = 0.13957039 ) ; /** returns the invariant mass of a vertex * assuming all tracks to be pions @@ -444,7 +444,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, ROOT::VecOps::RVec nSV_jet, ROOT::VecOps::RVec jets ); - + /// Return the pointing angle of all reconstructed vertices (or V0.vtx) ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, FCCAnalysesVertex PV ); @@ -476,7 +476,7 @@ namespace VertexingUtils{ /////////////////////////////////////////////////// /// For get_SV_jets /// - + /// Return the number of reconstructed SVs ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); @@ -514,15 +514,15 @@ namespace VertexingUtils{ ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); // --- for get_SV_jets --- // // --- Internal methods needed by the code of Franco B : float get_trackMom( edm4hep::TrackState & atrack ); - TVectorD get_trackParam( edm4hep::TrackState & atrack) ; - TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; + // TVectorD get_trackParam( edm4hep::TrackState & atrack) ; + // TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; ->>>>>>> c5a4bb427 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) +// >>>>>>> c5a4bb427 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) TVectorD ParToACTS(TVectorD Par); TMatrixDSym CovToACTS(TMatrixDSym Cov,TVectorD Par); diff --git a/analyzers/dataframe/src/ReconstructedParticle2Track.cc b/analyzers/dataframe/src/ReconstructedParticle2Track.cc index 385dab19bb..ebd7407736 100644 --- a/analyzers/dataframe/src/ReconstructedParticle2Track.cc +++ b/analyzers/dataframe/src/ReconstructedParticle2Track.cc @@ -5,29 +5,29 @@ namespace FCCAnalyses{ namespace ReconstructedParticle2Track{ - ROOT::VecOps::RVec - getRP2TRK_mom(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks) { - ROOT::VecOps::RVec result; - for (auto & p: in) { - if (p.tracks_begin - getRP2TRK_charge(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks) { - ROOT::VecOps::RVec result; - for (auto & p: in) { - if (p.tracks_begin + // getRP2TRK_mom(ROOT::VecOps::RVec in, + // ROOT::VecOps::RVec tracks) { + // ROOT::VecOps::RVec result; + // for (auto & p: in) { + // if (p.tracks_begin + // getRP2TRK_charge(ROOT::VecOps::RVec in, + // ROOT::VecOps::RVec tracks) { + // ROOT::VecOps::RVec result; + // for (auto & p: in) { + // if (p.tracks_begin getRP2TRK_Bz(const ROOT::VecOps::RVec& rps, const ROOT::VecOps::RVec& tracks) { const double c_light = 2.99792458e8; @@ -247,8 +247,8 @@ namespace ReconstructedParticle2Track{ -ROOT::VecOps::RVec -getRP2TRK_mom(ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +getRP2TRK_mom(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -259,8 +259,8 @@ getRP2TRK_mom(ROOT::VecOps::RVec in, return result; } -ROOT::VecOps::RVec -getRP2TRK_charge(ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +getRP2TRK_charge(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -271,7 +271,7 @@ getRP2TRK_charge(ROOT::VecOps::RVec in, return result; } ->>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) +// >>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) ROOT::VecOps::RVec getRP2TRK_D0(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { @@ -554,13 +554,13 @@ getRP2TRK( ROOT::VecOps::RVec in, } // returns reco indices of tracks -ROOT::VecOps::RVec -get_recoindTRK( ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +get_recoindTRK( ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks ) { ROOT::VecOps::RVec result ; - + for (unsigned int ctr=0; ctr= 0 && p.tracks_begin x) { } /// -ROOT::VecOps::RVec +ROOT::VecOps::RVec hasTRK( ROOT::VecOps::RVec in ) { ROOT::VecOps::RVec result ; result.reserve( in.size() ); - + for (auto & p: in) { if (p.tracks_begin >= 0 && p.tracks_begin != p.tracks_end) result.push_back(true) ; else result.push_back(false); From 4e6ad114b5f44e8825dcab23600df318fafc9b16 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Tue, 18 Jun 2024 10:06:36 +0200 Subject: [PATCH 39/49] commenting out duplicate code from FCCAnalyses/analyzers/dataframe/FCCAnalyses/VertexingUtils.h and FCCAnalyses/analyzers/dataframe/srs/ReconstructedParticle2Track.cc --- .../dataframe/FCCAnalyses/VertexingUtils.h | 325 +++++++++--------- .../src/ReconstructedParticle2Track.cc | 66 ++-- 2 files changed, 201 insertions(+), 190 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index 962455f488..a8147e1136 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -20,10 +20,11 @@ #include "fastjet/JetDefinition.hh" -/** Vertexing utilities -*/ namespace FCCAnalyses{ +/** + * Vertexing utilities. + */ namespace VertexingUtils{ /// from delphes: returns track state parameters (delphes convention) for a given vertex (x), momentum (p) and charge @@ -53,7 +54,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec invM; // invariant mass ROOT::VecOps::RVec nSV_jet; // no of V0s per jet }; - + /// Structure to keep useful track information that is related to the vertex struct FCCAnalysesVertexMC{ TVector3 vertex; @@ -117,216 +118,225 @@ namespace VertexingUtils{ int get_VertexNtrk( FCCAnalysesVertex TheVertex ) ; ROOT::VecOps::RVec get_VertexNtrk( ROOT::VecOps::RVec vertices ) ; - + /// Retrieve the tracks indices from FCCAnalysesVertex ROOT::VecOps::RVec get_VertexRecoInd( FCCAnalysesVertex TheVertex ) ; /// Retrieve the indices of the tracks fitted to that vertex, but now in the collection of RecoParticles - ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, + ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, const ROOT::VecOps::RVec& reco ); - + /// Return the number of tracks in a given track collection int get_nTracks(ROOT::VecOps::RVec tracks); -<<<<<<< HEAD +// <<<<<<< HEAD /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; - /////////////////////////////////////////////////// - /// functions used for SV reconstruction +// /////////////////////////////////////////////////// +// /// functions used for SV reconstruction - /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV - * first entry: PV, all subsequent entries: SVs - */ - ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); +// /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV +// * first entry: PV, all subsequent entries: SVs +// */ +// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, +// ROOT::VecOps::RVec SV ); - ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); +// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, +// ROOT::VecOps::RVec> SV ); - /** returns the invariant mass of a two-track vertex - * CAUTION: m1 -> mass of first track, m2 -> mass of second track - * by default both pions - */ - double get_invM_pairs( FCCAnalysesVertex vertex, - double m1 = 0.13957039, - double m2 = 0.13957039) ; +// /** returns the invariant mass of a two-track vertex +// * CAUTION: m1 -> mass of first track, m2 -> mass of second track +// * by default both pions +// */ +// double get_invM_pairs( FCCAnalysesVertex vertex, +// double m1 = 0.13957039, +// double m2 = 0.13957039) ; - ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, - double m1 = 0.13957039, - double m2 = 0.13957039 ) ; +// ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, +// double m1 = 0.13957039, +// double m2 = 0.13957039 ) ; - /** returns the invariant mass of a vertex - * assuming all tracks to be pions - */ - double get_invM( FCCAnalysesVertex vertex ) ; +// /** returns the invariant mass of a vertex +// * assuming all tracks to be pions +// */ +// double get_invM( FCCAnalysesVertex vertex ) ; - /** returns the invariant mass of a vector of vertices - * assuming all tracks to be pions - */ - ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; +// /** returns the invariant mass of a vector of vertices +// * assuming all tracks to be pions +// */ +// ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; - /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ - double get_PV2V0angle( FCCAnalysesVertex V0, - FCCAnalysesVertex PV) ; +// /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ +// double get_PV2V0angle( FCCAnalysesVertex V0, +// FCCAnalysesVertex PV) ; - /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ - double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, - FCCAnalysesVertex vtx, - FCCAnalysesVertex PV ) ; +// /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ +// double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, +// FCCAnalysesVertex vtx, +// FCCAnalysesVertex PV ) ; - /** returns a track's energy - * assuming the track to be a pion - */ - double get_trackE( edm4hep::TrackState track ) ; +// /** returns a track's energy +// * assuming the track to be a pion +// */ +// double get_trackE( edm4hep::TrackState track ) ; - /////////////////////////////////////////////////// - /// V0 Reconstruction - /// Return the number of reconstructed V0s - int get_n_SV( FCCAnalysesV0 SV ); +// /////////////////////////////////////////////////// +// /// V0 Reconstruction +// /// Return the number of reconstructed V0s +// int get_n_SV( FCCAnalysesV0 SV ); - /// Return the vertex position of all reconstructed V0s (in mm) - ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); +// /// Return the vertex position of all reconstructed V0s (in mm) +// ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); - /// Return the PDG IDs of all reconstructed V0s - ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); +// /// Return the PDG IDs of all reconstructed V0s +// ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); - /// Return the invariant masses of all reconstructed V0s - ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); +// /// Return the invariant masses of all reconstructed V0s +// ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); - /// Return the momentum of all reconstructed V0s - ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); +// /// Return the momentum of all reconstructed V0s +// ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); - /// Return chi2 of all reconstructed V0s - ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); +// /// Return chi2 of all reconstructed V0s +// ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); - /////////////////////////////////////////////////// +// /////////////////////////////////////////////////// - /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 - /// Return the number of reconstructed SVs - int get_n_SV( ROOT::VecOps::RVec vertices ); +// /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 +// /// Return the number of reconstructed SVs +// int get_n_SV( ROOT::VecOps::RVec vertices ); - /// Return the momentum of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); +// /// Return the momentum of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); + +// /// Return the vertex position of all reconstructed SVs (in mm) +// ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); + +// /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); - /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); +// /// Return chi2 of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); - /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); +// /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); - /// Return chi2 of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); +// /// Return no of DOF of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); - /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); +// /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); - /// Return no of DOF of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); +// /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); - /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); +// /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) +// ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet, +// ROOT::VecOps::RVec jets ); - /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); +// /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) +// ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet, +// ROOT::VecOps::RVec jets ); - /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) - ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet, - ROOT::VecOps::RVec jets ); +// /// Return the pointing angle of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) - ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet, - ROOT::VecOps::RVec jets ); - - /// Return the pointing angle of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, +// TVector3 location ); - /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, - TVector3 location ); +// /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, +// edm4hep::Vector3d location ); - /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, - edm4hep::Vector3d location ); +// /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, +// TVector3 location ); - /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, - TVector3 location ); +// /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, +// edm4hep::Vector3d location ); - /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, - edm4hep::Vector3d location ); +// /////////////////////////////////////////////////// - /////////////////////////////////////////////////// +// /// For get_SV_jets /// - /// For get_SV_jets /// - - /// Return the number of reconstructed SVs - ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); +// /// Return the number of reconstructed SVs +// ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); - /// Return the total number of reconstructed SVs - int get_n_SV( ROOT::VecOps::RVec> vertices ); +// /// Return the total number of reconstructed SVs +// int get_n_SV( ROOT::VecOps::RVec> vertices ); - /// Return the number of reconstructed SVs per jet - ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); +// /// Return the number of reconstructed SVs per jet +// ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); - /// Return the tracks separated by jets - std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, - ROOT::VecOps::RVec thetracks, - ROOT::VecOps::RVec jets, - std::vector> jet_consti ); +// /// Return the tracks separated by jets +// std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, +// ROOT::VecOps::RVec thetracks, +// ROOT::VecOps::RVec jets, +// std::vector> jet_consti ); - /// Return V0s separated by jets - ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet ); +// /// Return V0s separated by jets +// ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet ); - // --- for get_SV_jets --- // - ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); - ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); - ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); - ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); - /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); - // --- for get_SV_jets --- // +// // --- for get_SV_jets --- // +// ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); +// ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); +// ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); +// ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); +// /// Return the vertex position of all reconstructed SVs (in mm) +// ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); +// // --- for get_SV_jets --- // - float get_trackMom( edm4hep::TrackState & atrack ); +// float get_trackMom( edm4hep::TrackState & atrack ); -// --- Conversion methods between the Delphes and edm4hep conventions +// // --- Conversion methods between the Delphes and edm4hep conventions -/// convert track parameters, from edm4hep to delphes conventions +/// convert track parameters, from edm4hep to delphes conventions TVectorD Edm4hep2Delphes_TrackParam( const TVectorD& param, bool Units_mm ); /// convert track parameters, from delphes to edm4hep conventions TVectorD Delphes2Edm4hep_TrackParam( const TVectorD& param, bool Units_mm ); /// convert track covariance matrix, from edm4hep to delphes conventions TMatrixDSym Edm4hep2Delphes_TrackCovMatrix( const std::array& covMatrix, bool Units_mm ); +#if __has_include("edm4hep/CovMatrix6f.h") + TMatrixDSym Edm4hep2Delphes_TrackCovMatrix( const edm4hep::CovMatrix6f& covMatrix, bool Units_mm ); +#endif /// convert track covariance matrix, from delphes to edm4hep conventions std::array Delphes2Edm4hep_TrackCovMatrix( const TMatrixDSym& cov, bool Units_mm ) ; +// <<<<<<< HEAD +// /// --- Internal methods needed by the code of Franco B: + TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; + TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; + +// ======= /////////////////////////////////////////////////// /// functions used for SV reconstruction @@ -334,10 +344,10 @@ namespace VertexingUtils{ * first entry: PV, all subsequent entries: SVs */ ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); + ROOT::VecOps::RVec SV ); ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); + ROOT::VecOps::RVec> SV ); /** returns the invariant mass of a two-track vertex * CAUTION: m1 -> mass of first track, m2 -> mass of second track @@ -349,7 +359,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, double m1 = 0.13957039, - double m2 = 0.13957039 ) ; + double m2 = 0.13957039 ) ; /** returns the invariant mass of a vertex * assuming all tracks to be pions @@ -434,7 +444,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, ROOT::VecOps::RVec nSV_jet, ROOT::VecOps::RVec jets ); - + /// Return the pointing angle of all reconstructed vertices (or V0.vtx) ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, FCCAnalysesVertex PV ); @@ -466,7 +476,7 @@ namespace VertexingUtils{ /////////////////////////////////////////////////// /// For get_SV_jets /// - + /// Return the number of reconstructed SVs ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); @@ -504,14 +514,15 @@ namespace VertexingUtils{ ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); // --- for get_SV_jets --- // // --- Internal methods needed by the code of Franco B : float get_trackMom( edm4hep::TrackState & atrack ); - TVectorD get_trackParam( edm4hep::TrackState & atrack) ; - TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; + // TVectorD get_trackParam( edm4hep::TrackState & atrack) ; + // TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; +// >>>>>>> c5a4bb427 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) TVectorD ParToACTS(TVectorD Par); TMatrixDSym CovToACTS(TMatrixDSym Cov,TVectorD Par); diff --git a/analyzers/dataframe/src/ReconstructedParticle2Track.cc b/analyzers/dataframe/src/ReconstructedParticle2Track.cc index 385dab19bb..ebd7407736 100644 --- a/analyzers/dataframe/src/ReconstructedParticle2Track.cc +++ b/analyzers/dataframe/src/ReconstructedParticle2Track.cc @@ -5,29 +5,29 @@ namespace FCCAnalyses{ namespace ReconstructedParticle2Track{ - ROOT::VecOps::RVec - getRP2TRK_mom(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks) { - ROOT::VecOps::RVec result; - for (auto & p: in) { - if (p.tracks_begin - getRP2TRK_charge(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks) { - ROOT::VecOps::RVec result; - for (auto & p: in) { - if (p.tracks_begin + // getRP2TRK_mom(ROOT::VecOps::RVec in, + // ROOT::VecOps::RVec tracks) { + // ROOT::VecOps::RVec result; + // for (auto & p: in) { + // if (p.tracks_begin + // getRP2TRK_charge(ROOT::VecOps::RVec in, + // ROOT::VecOps::RVec tracks) { + // ROOT::VecOps::RVec result; + // for (auto & p: in) { + // if (p.tracks_begin getRP2TRK_Bz(const ROOT::VecOps::RVec& rps, const ROOT::VecOps::RVec& tracks) { const double c_light = 2.99792458e8; @@ -247,8 +247,8 @@ namespace ReconstructedParticle2Track{ -ROOT::VecOps::RVec -getRP2TRK_mom(ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +getRP2TRK_mom(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -259,8 +259,8 @@ getRP2TRK_mom(ROOT::VecOps::RVec in, return result; } -ROOT::VecOps::RVec -getRP2TRK_charge(ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +getRP2TRK_charge(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -271,7 +271,7 @@ getRP2TRK_charge(ROOT::VecOps::RVec in, return result; } ->>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) +// >>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) ROOT::VecOps::RVec getRP2TRK_D0(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { @@ -554,13 +554,13 @@ getRP2TRK( ROOT::VecOps::RVec in, } // returns reco indices of tracks -ROOT::VecOps::RVec -get_recoindTRK( ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +get_recoindTRK( ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks ) { ROOT::VecOps::RVec result ; - + for (unsigned int ctr=0; ctr= 0 && p.tracks_begin x) { } /// -ROOT::VecOps::RVec +ROOT::VecOps::RVec hasTRK( ROOT::VecOps::RVec in ) { ROOT::VecOps::RVec result ; result.reserve( in.size() ); - + for (auto & p: in) { if (p.tracks_begin >= 0 && p.tracks_begin != p.tracks_end) result.push_back(true) ; else result.push_back(false); From b90d46ee0398d1d2a9e8d17325cd5e618085ab9b Mon Sep 17 00:00:00 2001 From: merlinothefirst <34113706+merlinothefirst@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:38:23 +0200 Subject: [PATCH 40/49] commenting out duplicate code in VertexingUtils.h --- .../dataframe/FCCAnalyses/VertexingUtils.h | 326 +++++++++--------- 1 file changed, 169 insertions(+), 157 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index 962455f488..076285b11c 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -20,10 +20,11 @@ #include "fastjet/JetDefinition.hh" -/** Vertexing utilities -*/ namespace FCCAnalyses{ +/** + * Vertexing utilities. + */ namespace VertexingUtils{ /// from delphes: returns track state parameters (delphes convention) for a given vertex (x), momentum (p) and charge @@ -53,7 +54,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec invM; // invariant mass ROOT::VecOps::RVec nSV_jet; // no of V0s per jet }; - + /// Structure to keep useful track information that is related to the vertex struct FCCAnalysesVertexMC{ TVector3 vertex; @@ -117,216 +118,225 @@ namespace VertexingUtils{ int get_VertexNtrk( FCCAnalysesVertex TheVertex ) ; ROOT::VecOps::RVec get_VertexNtrk( ROOT::VecOps::RVec vertices ) ; - + /// Retrieve the tracks indices from FCCAnalysesVertex ROOT::VecOps::RVec get_VertexRecoInd( FCCAnalysesVertex TheVertex ) ; /// Retrieve the indices of the tracks fitted to that vertex, but now in the collection of RecoParticles - ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, + ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, const ROOT::VecOps::RVec& reco ); - + /// Return the number of tracks in a given track collection int get_nTracks(ROOT::VecOps::RVec tracks); -<<<<<<< HEAD +// <<<<<<< HEAD /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; - /////////////////////////////////////////////////// - /// functions used for SV reconstruction +// /////////////////////////////////////////////////// +// /// functions used for SV reconstruction - /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV - * first entry: PV, all subsequent entries: SVs - */ - ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); +// /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV +// * first entry: PV, all subsequent entries: SVs +// */ +// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, +// ROOT::VecOps::RVec SV ); - ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); +// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, +// ROOT::VecOps::RVec> SV ); - /** returns the invariant mass of a two-track vertex - * CAUTION: m1 -> mass of first track, m2 -> mass of second track - * by default both pions - */ - double get_invM_pairs( FCCAnalysesVertex vertex, - double m1 = 0.13957039, - double m2 = 0.13957039) ; +// /** returns the invariant mass of a two-track vertex +// * CAUTION: m1 -> mass of first track, m2 -> mass of second track +// * by default both pions +// */ +// double get_invM_pairs( FCCAnalysesVertex vertex, +// double m1 = 0.13957039, +// double m2 = 0.13957039) ; - ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, - double m1 = 0.13957039, - double m2 = 0.13957039 ) ; +// ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, +// double m1 = 0.13957039, +// double m2 = 0.13957039 ) ; - /** returns the invariant mass of a vertex - * assuming all tracks to be pions - */ - double get_invM( FCCAnalysesVertex vertex ) ; +// /** returns the invariant mass of a vertex +// * assuming all tracks to be pions +// */ +// double get_invM( FCCAnalysesVertex vertex ) ; - /** returns the invariant mass of a vector of vertices - * assuming all tracks to be pions - */ - ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; +// /** returns the invariant mass of a vector of vertices +// * assuming all tracks to be pions +// */ +// ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; - /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ - double get_PV2V0angle( FCCAnalysesVertex V0, - FCCAnalysesVertex PV) ; +// /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ +// double get_PV2V0angle( FCCAnalysesVertex V0, +// FCCAnalysesVertex PV) ; - /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ - double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, - FCCAnalysesVertex vtx, - FCCAnalysesVertex PV ) ; +// /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ +// double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, +// FCCAnalysesVertex vtx, +// FCCAnalysesVertex PV ) ; - /** returns a track's energy - * assuming the track to be a pion - */ - double get_trackE( edm4hep::TrackState track ) ; +// /** returns a track's energy +// * assuming the track to be a pion +// */ +// double get_trackE( edm4hep::TrackState track ) ; - /////////////////////////////////////////////////// - /// V0 Reconstruction - /// Return the number of reconstructed V0s - int get_n_SV( FCCAnalysesV0 SV ); +// /////////////////////////////////////////////////// +// /// V0 Reconstruction +// /// Return the number of reconstructed V0s +// int get_n_SV( FCCAnalysesV0 SV ); - /// Return the vertex position of all reconstructed V0s (in mm) - ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); +// /// Return the vertex position of all reconstructed V0s (in mm) +// ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); - /// Return the PDG IDs of all reconstructed V0s - ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); +// /// Return the PDG IDs of all reconstructed V0s +// ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); - /// Return the invariant masses of all reconstructed V0s - ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); +// /// Return the invariant masses of all reconstructed V0s +// ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); - /// Return the momentum of all reconstructed V0s - ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); +// /// Return the momentum of all reconstructed V0s +// ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); - /// Return chi2 of all reconstructed V0s - ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); +// /// Return chi2 of all reconstructed V0s +// ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); - /////////////////////////////////////////////////// +// /////////////////////////////////////////////////// - /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 - /// Return the number of reconstructed SVs - int get_n_SV( ROOT::VecOps::RVec vertices ); +// /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 +// /// Return the number of reconstructed SVs +// int get_n_SV( ROOT::VecOps::RVec vertices ); - /// Return the momentum of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); +// /// Return the momentum of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); + +// /// Return the vertex position of all reconstructed SVs (in mm) +// ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); + +// /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); - /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); +// /// Return chi2 of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); - /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); +// /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); - /// Return chi2 of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); +// /// Return no of DOF of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); - /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); +// /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); - /// Return no of DOF of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); +// /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); - /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); +// /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) +// ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet, +// ROOT::VecOps::RVec jets ); - /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); +// /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) +// ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet, +// ROOT::VecOps::RVec jets ); - /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) - ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet, - ROOT::VecOps::RVec jets ); +// /// Return the pointing angle of all reconstructed vertices (or V0.vtx) +// ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) - ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet, - ROOT::VecOps::RVec jets ); - - /// Return the pointing angle of all reconstructed vertices (or V0.vtx) - ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, +// FCCAnalysesVertex PV ); - /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, - FCCAnalysesVertex PV ); +// /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, +// TVector3 location ); - /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, - TVector3 location ); +// /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, +// edm4hep::Vector3d location ); - /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, - edm4hep::Vector3d location ); +// /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, +// TVector3 location ); - /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, - TVector3 location ); +// /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) +// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, +// edm4hep::Vector3d location ); - /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) - ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, - edm4hep::Vector3d location ); +// /////////////////////////////////////////////////// - /////////////////////////////////////////////////// +// /// For get_SV_jets /// - /// For get_SV_jets /// - - /// Return the number of reconstructed SVs - ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); +// /// Return the number of reconstructed SVs +// ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); - /// Return the total number of reconstructed SVs - int get_n_SV( ROOT::VecOps::RVec> vertices ); +// /// Return the total number of reconstructed SVs +// int get_n_SV( ROOT::VecOps::RVec> vertices ); - /// Return the number of reconstructed SVs per jet - ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); +// /// Return the number of reconstructed SVs per jet +// ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); - /// Return the tracks separated by jets - std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, - ROOT::VecOps::RVec thetracks, - ROOT::VecOps::RVec jets, - std::vector> jet_consti ); +// /// Return the tracks separated by jets +// std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, +// ROOT::VecOps::RVec thetracks, +// ROOT::VecOps::RVec jets, +// std::vector> jet_consti ); - /// Return V0s separated by jets - ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, - ROOT::VecOps::RVec nSV_jet ); +// /// Return V0s separated by jets +// ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, +// ROOT::VecOps::RVec nSV_jet ); - // --- for get_SV_jets --- // - ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); - ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); - ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); - ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); - ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); - ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); - /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); - // --- for get_SV_jets --- // +// // --- for get_SV_jets --- // +// ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); +// ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); +// ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); +// ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); +// ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); +// ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); +// /// Return the vertex position of all reconstructed SVs (in mm) +// ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); +// // --- for get_SV_jets --- // - float get_trackMom( edm4hep::TrackState & atrack ); +// float get_trackMom( edm4hep::TrackState & atrack ); -// --- Conversion methods between the Delphes and edm4hep conventions +// // --- Conversion methods between the Delphes and edm4hep conventions -/// convert track parameters, from edm4hep to delphes conventions +/// convert track parameters, from edm4hep to delphes conventions TVectorD Edm4hep2Delphes_TrackParam( const TVectorD& param, bool Units_mm ); /// convert track parameters, from delphes to edm4hep conventions TVectorD Delphes2Edm4hep_TrackParam( const TVectorD& param, bool Units_mm ); /// convert track covariance matrix, from edm4hep to delphes conventions TMatrixDSym Edm4hep2Delphes_TrackCovMatrix( const std::array& covMatrix, bool Units_mm ); +#if __has_include("edm4hep/CovMatrix6f.h") + TMatrixDSym Edm4hep2Delphes_TrackCovMatrix( const edm4hep::CovMatrix6f& covMatrix, bool Units_mm ); +#endif /// convert track covariance matrix, from delphes to edm4hep conventions std::array Delphes2Edm4hep_TrackCovMatrix( const TMatrixDSym& cov, bool Units_mm ) ; +// <<<<<<< HEAD +// /// --- Internal methods needed by the code of Franco B: + TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; + TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; + +// ======= /////////////////////////////////////////////////// /// functions used for SV reconstruction @@ -334,10 +344,10 @@ namespace VertexingUtils{ * first entry: PV, all subsequent entries: SVs */ ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); + ROOT::VecOps::RVec SV ); ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); + ROOT::VecOps::RVec> SV ); /** returns the invariant mass of a two-track vertex * CAUTION: m1 -> mass of first track, m2 -> mass of second track @@ -349,7 +359,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, double m1 = 0.13957039, - double m2 = 0.13957039 ) ; + double m2 = 0.13957039 ) ; /** returns the invariant mass of a vertex * assuming all tracks to be pions @@ -434,7 +444,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, ROOT::VecOps::RVec nSV_jet, ROOT::VecOps::RVec jets ); - + /// Return the pointing angle of all reconstructed vertices (or V0.vtx) ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, FCCAnalysesVertex PV ); @@ -466,7 +476,7 @@ namespace VertexingUtils{ /////////////////////////////////////////////////// /// For get_SV_jets /// - + /// Return the number of reconstructed SVs ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); @@ -504,14 +514,15 @@ namespace VertexingUtils{ ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); // --- for get_SV_jets --- // // --- Internal methods needed by the code of Franco B : float get_trackMom( edm4hep::TrackState & atrack ); - TVectorD get_trackParam( edm4hep::TrackState & atrack) ; - TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; + // TVectorD get_trackParam( edm4hep::TrackState & atrack) ; + // TMatrixDSym get_trackCov( edm4hep::TrackState & atrack) ; +// >>>>>>> c5a4bb427 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) TVectorD ParToACTS(TVectorD Par); TMatrixDSym CovToACTS(TMatrixDSym Cov,TVectorD Par); @@ -521,3 +532,4 @@ namespace VertexingUtils{ }//end NS FCCAnalyses #endif + From b13e49d4e34908908d2e3a5a83fb564675257970 Mon Sep 17 00:00:00 2001 From: merlinothefirst <34113706+merlinothefirst@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:39:09 +0200 Subject: [PATCH 41/49] commenting out duplicate code in ReconstructedParticle2Track.cc --- .../src/ReconstructedParticle2Track.cc | 67 ++++++++++--------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/analyzers/dataframe/src/ReconstructedParticle2Track.cc b/analyzers/dataframe/src/ReconstructedParticle2Track.cc index 385dab19bb..a56cebfeaf 100644 --- a/analyzers/dataframe/src/ReconstructedParticle2Track.cc +++ b/analyzers/dataframe/src/ReconstructedParticle2Track.cc @@ -5,29 +5,29 @@ namespace FCCAnalyses{ namespace ReconstructedParticle2Track{ - ROOT::VecOps::RVec - getRP2TRK_mom(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks) { - ROOT::VecOps::RVec result; - for (auto & p: in) { - if (p.tracks_begin - getRP2TRK_charge(ROOT::VecOps::RVec in, - ROOT::VecOps::RVec tracks) { - ROOT::VecOps::RVec result; - for (auto & p: in) { - if (p.tracks_begin + // getRP2TRK_mom(ROOT::VecOps::RVec in, + // ROOT::VecOps::RVec tracks) { + // ROOT::VecOps::RVec result; + // for (auto & p: in) { + // if (p.tracks_begin + // getRP2TRK_charge(ROOT::VecOps::RVec in, + // ROOT::VecOps::RVec tracks) { + // ROOT::VecOps::RVec result; + // for (auto & p: in) { + // if (p.tracks_begin getRP2TRK_Bz(const ROOT::VecOps::RVec& rps, const ROOT::VecOps::RVec& tracks) { const double c_light = 2.99792458e8; @@ -247,8 +247,8 @@ namespace ReconstructedParticle2Track{ -ROOT::VecOps::RVec -getRP2TRK_mom(ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +getRP2TRK_mom(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -259,8 +259,8 @@ getRP2TRK_mom(ROOT::VecOps::RVec in, return result; } -ROOT::VecOps::RVec -getRP2TRK_charge(ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +getRP2TRK_charge(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -271,7 +271,7 @@ getRP2TRK_charge(ROOT::VecOps::RVec in, return result; } ->>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) +// >>>>>>> c34b863c3 (adding the implementation of LCFIPlus vertexing module and the necessary funtions to exploit vertex properties in VertexingUtils) ROOT::VecOps::RVec getRP2TRK_D0(ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks) { @@ -554,13 +554,13 @@ getRP2TRK( ROOT::VecOps::RVec in, } // returns reco indices of tracks -ROOT::VecOps::RVec -get_recoindTRK( ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +get_recoindTRK( ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks ) { ROOT::VecOps::RVec result ; - + for (unsigned int ctr=0; ctr= 0 && p.tracks_begin x) { } /// -ROOT::VecOps::RVec +ROOT::VecOps::RVec hasTRK( ROOT::VecOps::RVec in ) { ROOT::VecOps::RVec result ; result.reserve( in.size() ); - + for (auto & p: in) { if (p.tracks_begin >= 0 && p.tracks_begin != p.tracks_end) result.push_back(true) ; else result.push_back(false); @@ -590,3 +590,4 @@ hasTRK( ROOT::VecOps::RVec in ) { }//end NS ReconstructedParticle2Track }//end NS FCCAnalyses + From 17a5e4293197cc713b1571cacc52d928bf0db43d Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Tue, 18 Jun 2024 11:08:43 +0200 Subject: [PATCH 42/49] commiting my own files --- .gitignore | 3 + .../FCCee/bsm/LLPs/ALPs/analysis_final.py | 4 +- .../FCCee/bsm/LLPs/ALPs/analysis_stage1.py | 793 +++++++++--------- .../ALPs/output_finalSel/outputTabular.txt | 29 + .../bsm/LLPs/ALPs/output_finalSel/test1.py | 28 + examples/FCCee/bsm/LLPs/ALPs/plots_flavor.py | 68 ++ 6 files changed, 527 insertions(+), 398 deletions(-) create mode 100644 examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt create mode 100644 examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py create mode 100644 examples/FCCee/bsm/LLPs/ALPs/plots_flavor.py diff --git a/.gitignore b/.gitignore index c0d7979bf1..a37c2af267 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ __pycache__/ # ROOT files *.root +# PDF files +*.pdf + # Editors *~ .vimlocal diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py index 8434701e62..bc7fd4f558 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py @@ -1,10 +1,10 @@ #Input directory where the files produced at the stage1 level are -inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +inputDir = "./output_stage1/" #inputDir = "/eos/user/j/jalimena/FCCeeLLP/" #inputDir = "output_stage1/" #Output directory where the files produced at the final-selection level are -outputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_finalSel/" +outputDir = "./output_finalSel/" #outputDir = "output_finalSel/" #Integrated luminosity for scaling number of events (required only if setting doScale to true) diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py index da3646c114..aa1facab8f 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py @@ -5,7 +5,8 @@ #'p8_ee_Zee_ecm91':{'chunks':100}, #privately-produced signals - 'ALP_Z_aa_1GeV_cYY_0p5':{}, + # 'ALP_Z_aa_1GeV_cYY_0p5':{}, + 'ALP_Z_aa_1.GeV_cYY_0.1':{}, #test #'p8_ee_Zee_ecm91':{'fraction':0.000001}, @@ -19,11 +20,11 @@ #Input directory #Comment out when running over centrally produced events #Mandatory when running over privately produced events -inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_MadgraphPythiaDelphes" +inputDir = "./output_MadgraphPythiaDelphes" #Optional: output directory, default is local dir -outputDir = "./output_stage1/" +outputDir = "./output_stage1" #outputDir = "/eos/user/j/jalimena/FCCeeLLP/" #outputDir = "output_stage1/" @@ -70,399 +71,399 @@ def analysers(df): .Define("GenALP_decay", "MCParticle::get_list_of_particles_from_decay(0, GenALP_PID, Particle1)") .Define("All_n_GenALP", "MCParticle::get_n(GenALP_PID)") - # .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch - # .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") - # .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") - # .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch - # .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") - # .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") - # .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") - # .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") - # .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") - # .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") - # .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") - - # #all final state gen electrons - # .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates - # .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) - # .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") - # .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") - # .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") - # .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") - # .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") - # .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") - # .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") - # .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") - # .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") - # .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") - - # #all final state gen positrons - # .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") - # .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) - # .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") - # .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") - # .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") - # .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") - # .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") - # .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") - # .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") - # .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") - # .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") - # .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") - - # #all final state gen neutrinos - # .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") - # .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) - # .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") - # .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") - # .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") - # .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") - # .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") - # .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") - # .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") - # .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") - # .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") - # .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") - - # #all final state gen anti-neutrinos - # .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") - # .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) - # .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") - # .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") - - # #all final state gen photons - # .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") - # .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) - # .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") - # .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") - # .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") - # .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") - # .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") - # .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") - # .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") - # .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") - # .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") - # .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") - - # # Number of final state electrons and positrons when the number of final state photons is only 2 - # # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") - # # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") - - # .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") - # .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") - # .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") - - # # Finding the Lxy of the ALP - # # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) - # .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") - # .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") - - # # Calculating the lifetime of the ALP - # # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) - # .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) - # .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) - - # # Separating the three first final state photons - # # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") - # # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") - # # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") - # # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") - # # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") - # # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") - # # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") - # # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") - # # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") - # # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") - # # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") - # # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") - # # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") - # # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") - # # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") - # # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") - # # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") - # # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") - - # # aa invariant mass - for all three combinations of the three first FS photons - # # returns -2 for events with only 1 number of photons - # # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") - # # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") - # # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") - # # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") - # # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") - - # # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") - # # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") - # # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") - # # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") - # # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") - - # # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") - # # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") - # # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") - # # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") - # # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") - - # # aaa invariant mass - # # Returns -2 for events with only 1 or 2 number of photons - # # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") - # # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") - # # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") - # # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") - # # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") - - # # Defining a vector containing the ALP and its daughters in order written - # # Name of vector is ALP_indices - # .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") - - # # Defining the individual particles from the vector - # .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") - # .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") - # .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") - - # # Kinematics of the mother particle ALP - # .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") - # .Define("GenALP_e", "MCParticle::get_e( GenALP )") - # .Define("GenALP_p", "MCParticle::get_p( GenALP )") - # .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") - # .Define("GenALP_px", "MCParticle::get_px( GenALP )") - # .Define("GenALP_py", "MCParticle::get_py( GenALP )") - # .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") - # .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") - # .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") - # .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") - # .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") - - # # Finding the kinematics of each of these daughters - # .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") - # .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") - # .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") - # .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") - # .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") - # .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") - # .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") - # .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") - # .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") - # .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") - # .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") - # .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") - # .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") - # .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") - # .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") - # .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") - # .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") - # .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") - # .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") - # .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") - - # # Finding the production vertex of the daughters (checking GenALPPhoton1 here) - # .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") - # .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") - # .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") - - # # Finding the Lxy of the ALP - # # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) - # .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") - # # Finding the Lxyz of the ALP - # .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") - - # # Calculating the lifetime of the ALP - # # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) - # .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) - # .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) - - # # Finding the production vertex of the ALP which should be at (0,0,0) - # .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") - # .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") - # .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") - - # # aa invariant mass - # .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") - # .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") - # .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") - # .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") - # .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") - - # # Vertexing studies - # # Finding the vertex of the mother particle ALP using decicated Bs method - # #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") - - # # MC event primary vertex - # .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) - # .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") - - # # Reconstructed particles - # # Returns the RecoParticles associated with the ALP decay products - # .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") - # # Reconstructing the tracks from the ALP - # .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") - - # # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) - # .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") - - # # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks - # # First the full object, of type Vertexing::FCCAnalysesVertex - # .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) - - # # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm - # .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") - - # # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, - # # the first particle (vector[0]) is the e-, etc : - # .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") - # .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") - - # # reconstruced electron, positron values - # .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") - # .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") - # .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") - # # add dxy, dz, dxyz, and uncertainties - - # # aa invariant mass - # .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") - # .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") - # .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") - # .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") - # .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") - - # #gen-reco - # .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") - # .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") - # .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") - # .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") - # .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") - # .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") - # .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") - # .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") - # .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") - # .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") - # .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") - # .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") - # .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") - # .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") - # .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") - # .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") - # .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") - # .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") - - # .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") - # .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") - # .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") - - - # #################################################################################################### - # # From here the general study begins - - # #JETS - # .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total - - # #PHOTONS - # .Alias("Photon0", "Photon#0.index") - # .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") - # .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total - - # #ELECTRONS AND MUONS - # #TODO: ADD EXPLANATION OF THE EXTRA STEPS - # .Alias("Electron0", "Electron#0.index") - # .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") - # .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total - - # .Alias("Muon0", "Muon#0.index") - # .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") - # .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total - - # #OBJECT SELECTION: Consider only those objects that have pt > certain threshold - # #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV - # #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV - # #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV - # #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") - - # #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") - # #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") - # #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") - # #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") - - # #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons - # .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") - # .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p - # .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt - # .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") - # .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") - # .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") - # .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta - # .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") - # .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi - # .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") - - # .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") - # .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") - # .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") - # .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") - # .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") - # .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") - # .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta - # .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") - # .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi - # .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") - - # .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") - # .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") - # .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") - # .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") - # .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") - # .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") - # .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta - # .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") - # .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi - # .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") - - # .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") - # .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") - # .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") - # .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") - # .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") - # .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") - # .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta - # .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") - # .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi - # .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") - - # #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) - # .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") - # .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") - # .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") - # .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") - # .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") - # .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") - # .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") - # .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") - # .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") + .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch + .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") + .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") + .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch + .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") + .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") + .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") + .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") + .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") + .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") + .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") + + #all final state gen electrons + .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates + .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") + .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") + .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") + .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") + .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") + .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") + .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") + .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") + .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") + .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") + + #all final state gen positrons + .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") + .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") + .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") + .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") + .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") + .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") + .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") + .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") + .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") + .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") + .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") + + #all final state gen neutrinos + .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") + .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") + .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") + .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") + .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") + .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") + .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") + .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") + .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") + .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") + .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") + + #all final state gen anti-neutrinos + .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") + .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") + + #all final state gen photons + .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") + .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") + .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") + .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") + .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") + .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") + .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") + .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") + .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") + .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") + .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") + + # Number of final state electrons and positrons when the number of final state photons is only 2 + # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") + # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") + + .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") + .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") + .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") + + # Finding the Lxy of the ALP + # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") + .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") + + # Calculating the lifetime of the ALP + # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) + .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) + + # Separating the three first final state photons + # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") + # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") + # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") + # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") + # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") + # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") + # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") + # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") + # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") + + # aa invariant mass - for all three combinations of the three first FS photons + # returns -2 for events with only 1 number of photons + # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") + # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") + # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") + # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") + # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") + + # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") + # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") + # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") + # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") + # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") + + # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") + # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") + # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") + # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") + # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") + + # aaa invariant mass + # Returns -2 for events with only 1 or 2 number of photons + # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") + # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") + # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") + # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") + # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") + + # Defining a vector containing the ALP and its daughters in order written + # Name of vector is ALP_indices + .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") + + # Defining the individual particles from the vector + .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") + .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") + .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") + + # Kinematics of the mother particle ALP + .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") + .Define("GenALP_e", "MCParticle::get_e( GenALP )") + .Define("GenALP_p", "MCParticle::get_p( GenALP )") + .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") + .Define("GenALP_px", "MCParticle::get_px( GenALP )") + .Define("GenALP_py", "MCParticle::get_py( GenALP )") + .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") + .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") + .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") + .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") + .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") + + # Finding the kinematics of each of these daughters + .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") + .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") + .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") + .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") + .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") + .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") + .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") + .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") + .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") + .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") + .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") + .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") + .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") + .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") + .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") + .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") + .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") + .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") + .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") + .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") + + # Finding the production vertex of the daughters (checking GenALPPhoton1 here) + .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") + .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") + .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") + + # Finding the Lxy of the ALP + # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") + # Finding the Lxyz of the ALP + .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") + + # Calculating the lifetime of the ALP + # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) + .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) + + # Finding the production vertex of the ALP which should be at (0,0,0) + .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") + .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") + .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") + + # aa invariant mass + .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") + .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") + .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") + .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") + .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") + + # Vertexing studies + # Finding the vertex of the mother particle ALP using decicated Bs method + #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") + + # MC event primary vertex + .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) + .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(EFlowTrack_1)") + + # Reconstructed particles + # Returns the RecoParticles associated with the ALP decay products + .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") + # Reconstructing the tracks from the ALP + .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, EFlowTrack_1)") + + # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) + .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") + + # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks + # First the full object, of type Vertexing::FCCAnalysesVertex + .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) + + # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm + .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") + + # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, + # the first particle (vector[0]) is the e-, etc : + .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") + .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") + + # reconstruced electron, positron values + .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") + # add dxy, dz, dxyz, and uncertainties + + # aa invariant mass + .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") + .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") + .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") + .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") + .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") + + #gen-reco + .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") + .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") + .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") + .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") + .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") + .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") + .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") + .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") + .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") + .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") + .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") + .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") + .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") + .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") + .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") + .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") + .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") + .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") + + .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") + .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") + .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") + + + #################################################################################################### + # From here the general study begins + + #JETS + .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total + + #PHOTONS + .Alias("Photon0", "Photon#0.index") + .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") + .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total + + #ELECTRONS AND MUONS + #TODO: ADD EXPLANATION OF THE EXTRA STEPS + .Alias("Electron0", "Electron#0.index") + .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") + .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total + + .Alias("Muon0", "Muon#0.index") + .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") + .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total + + #OBJECT SELECTION: Consider only those objects that have pt > certain threshold + #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV + #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV + #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV + #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") + + #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") + #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") + #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") + #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") + + #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons + .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") + .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p + .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt + .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") + .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") + .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") + .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta + .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") + .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi + .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") + + .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") + .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") + .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") + .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") + .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") + .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") + .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta + .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") + .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi + .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") + + .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") + .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") + .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") + .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") + .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") + .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") + .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta + .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") + .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi + .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") + + .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") + .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") + .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") + .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") + .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") + .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") + .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta + .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") + .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi + .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") + + #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) + .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") + .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") + .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") + .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") + .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") + .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") + .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") + .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") + .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") ) diff --git a/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt b/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt new file mode 100644 index 0000000000..8d0eca75a8 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt @@ -0,0 +1,29 @@ +\begin{table}[H] + \centering + \resizebox{\textwidth}{!}{ + \begin{tabular}{|l||c|c|c|} \hline + & Before selection & Good GEN ALP mass & Good GEN ALP mass and 2 reco electrons \\ + \hline + $m_ALP =$ 1 GeV, $c_{YY} = 0.5$ & 1.00e+05 $\pm$ 3.16e+02 & 9.85e+04 $\pm$ 3.14e+02 & 1.45e+03 $\pm$ 3.80e+01 \\ + \hline + \end{tabular}} + \caption{Caption} + \label{tab:my_label} +\end{table} + + +Efficiency: +\begin{table}[H] + \centering + \resizebox{\textwidth}{!}{ + \begin{tabular}{|l||c|c|c|} \hline + & $m_ALP =$ 1 GeV, $c_{YY} = 0.5$ \\ + \hline + Before selection & 1.0 \\ + Good GEN ALP mass & 0.985 \\ + Good GEN ALP mass and 2 reco electrons & 0.014 \\ + \hline + \end{tabular}} + \caption{Caption} + \label{tab:my_label} +\end{table} diff --git a/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py b/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py new file mode 100644 index 0000000000..e1492bfb05 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py @@ -0,0 +1,28 @@ +from ROOT import TFile, gDirectory, TH1D, TCanvas, TMath + +myfile = TFile('ALP_Z_aa_1GeV_cYY_0p5_sel0_histo.root') + +mychain = gDirectory.Get('FSGenPhoton_eta') +entries = mychain.GetEntriesFast() + +# Setup: +eta_hist = TH1D("eta", "eta histogram", 100, -3, 3) +eta_hist.GetXaxis().SetTitle("Final state gen photons eta") +eta_hist.GetYaxis().SetTitle("events") + +for jentry in range(entries): + ientry = mychain.LoadTree(jentry) + if ientry < 0: + break + nb = mychain.GetEntry(jentry) + if nb <= 0: + continue + + # Loop: + eta = mychain.eta + eta_hist.Fill(eta) + +# Wrap-up: +eta_hist.Draw("e") + +kill = input("q to exit: ") diff --git a/examples/FCCee/bsm/LLPs/ALPs/plots_flavor.py b/examples/FCCee/bsm/LLPs/ALPs/plots_flavor.py new file mode 100644 index 0000000000..3002a597a4 --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/plots_flavor.py @@ -0,0 +1,68 @@ +import ROOT + +# global parameters +intLumi = 1 +intLumiLabel = "L = 5 ab^{-1}" +ana_tex = "e^{+}e^{-} #rightarrow ZH #rightarrow #mu^{+}#mu^{-} b b" +delphesVersion = "3.4.2" +energy = 240.0 +collider = "FCC-ee" +formats = ["png", "pdf"] + +outdir = './outputs/' +inputDir = './output_finalSel/' + +plotStatUnc = True + +colors = {} +colors["ZH"] = ROOT.kRed +colors["ZZ"] = ROOT.kGreen + 2 + +procs = {} +procs["signal"] = {"ZH": ["ALP_Z_aa_1GeV_cYY_0p5_sel0_histo"]} +procs["backgrounds"] = {"ZZ": ["ALP_Z_aa_1GeV_cYY_0p5_selNone_histo"]} + +legend = {} +legend["ZH"] = "ZH" +legend["ZZ"] = "ZZ" + +hists = {} + +hists["zmumu_recoil_m"] = { + "output": "zmumu_recoil_m", + "logy": False, + "stack": True, + "rebin": 100, + "xmin": 120, + "xmax": 140, + "ymin": 0, + "ymax": 2000, + "xtitle": "Recoil (GeV)", + "ytitle": "Events / 100 MeV", +} + +hists["jj_m"] = { + "output": "jj_m", + "logy": False, + "stack": True, + "rebin": 2, + "xmin": 50, + "xmax": 150, + "ymin": 0, + "ymax": 4000, + "xtitle": "m_{jj} (GeV)", + "ytitle": "Events / 2 GeV", +} + +hists["scoresum_B"] = { + "output": "scoresum_B", + "logy": True, + "stack": True, + "rebin": 1, + "xmin": 0, + "xmax": 2.0, + "ymin": 1, + "ymax": 100000, + "xtitle": "p_{1}(B) + p_{2}(B)", + "ytitle": "Events", +} From ffe7862d961c861f029b8f451cca8ca6a146e0f9 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Wed, 7 Aug 2024 15:58:01 +0200 Subject: [PATCH 43/49] updating from Merlin's summer project --- analyzers/dataframe/FCCAnalyses/MCParticle.h | 6 + .../FCCAnalyses/ReconstructedParticle.h | 24 + .../dataframe/FCCAnalyses/VertexingUtils.h | 4 +- analyzers/dataframe/src/MCParticle.cc | 34 + .../dataframe/src/ReconstructedParticle.cc | 122 ++ .../FCCee/bsm/LLPs/ALPs/analysis_final.py | 850 +++++++++++-- .../FCCee/bsm/LLPs/ALPs/analysis_plots.py | 552 +++++++-- .../FCCee/bsm/LLPs/ALPs/analysis_stage1.py | 419 +++++-- .../bsm/LLPs/ALPs/analysis_stage1_new.py | 1087 +++++++++++++++++ .../sensitivity_analysis/plot_sensitivity.py | 808 ++++++++++++ 10 files changed, 3544 insertions(+), 362 deletions(-) create mode 100644 examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py create mode 100644 examples/FCCee/bsm/LLPs/ALPs/sensitivity_analysis/plot_sensitivity.py diff --git a/analyzers/dataframe/FCCAnalyses/MCParticle.h b/analyzers/dataframe/FCCAnalyses/MCParticle.h index 913b68e981..4912e51aaa 100644 --- a/analyzers/dataframe/FCCAnalyses/MCParticle.h +++ b/analyzers/dataframe/FCCAnalyses/MCParticle.h @@ -188,6 +188,12 @@ namespace MCParticle{ /// return the phi of the input MCParticles ROOT::VecOps::RVec get_phi(ROOT::VecOps::RVec in); + /// return the delta r of the input ReconstructedParticles + ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec in); + + /// return the delta r of the two reconstructed photons decaying from the ALP + ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); + /// return the energy of the input MCParticles ROOT::VecOps::RVec get_e(ROOT::VecOps::RVec in); diff --git a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h index 3321a2b680..e532e2976f 100644 --- a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h +++ b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h @@ -130,6 +130,30 @@ namespace ReconstructedParticle{ /// return the phi of the input ReconstructedParticles ROOT::VecOps::RVec get_phi(ROOT::VecOps::RVec in); + /// return the delta eta of the input ReconstructedParticles + ROOT::VecOps::RVec get_delta_eta(ROOT::VecOps::RVec in); + + /// return the delta phi of the input ReconstructedParticles + ROOT::VecOps::RVec get_delta_phi(ROOT::VecOps::RVec in); + + /// return the delta r of the input ReconstructedParticles + ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec in); + + /// return the minimum delta r of the input ReconstructedParticles + ROOT::VecOps::RVec get_min_delta_r(ROOT::VecOps::RVec in); + + /// return the delta r of the two reconstructed photons decaying from the ALP + ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); + + /// return the delta phi of the two reconstructed photons decaying from the ALP + ROOT::VecOps::RVec get_ALP_delta_phi(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); + + /// return the delta eta of the two reconstructed photons decaying from the ALP + ROOT::VecOps::RVec get_ALP_delta_eta(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); + + /// return the energy of the input ReconstructedParticles + ROOT::VecOps::RVec get_reference_point_x(ROOT::VecOps::RVec in); + /// return the energy of the input ReconstructedParticles ROOT::VecOps::RVec get_e(ROOT::VecOps::RVec in); diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index 38a2d29f4c..8b2ca26714 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -333,8 +333,8 @@ namespace VertexingUtils{ // <<<<<<< HEAD // /// --- Internal methods needed by the code of Franco B: - TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; - TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; + // TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; + // TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; // ======= /////////////////////////////////////////////////// diff --git a/analyzers/dataframe/src/MCParticle.cc b/analyzers/dataframe/src/MCParticle.cc index 009d0d4c25..35286c1c3d 100644 --- a/analyzers/dataframe/src/MCParticle.cc +++ b/analyzers/dataframe/src/MCParticle.cc @@ -337,6 +337,40 @@ ROOT::VecOps::RVec get_phi(ROOT::VecOps::RVec in return result; } +ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec result; + for (int i = 0; i < in.size(); i++) { + TLorentzVector tlv1; + tlv1.SetXYZM(in[i].momentum.x, in[i].momentum.y, in[i].momentum.z, in[i].mass); + for (auto j = i + 1; j < in.size(); j++) { + TLorentzVector tlv2; + tlv2.SetXYZM(in[j].momentum.x, in[j].momentum.y, in[j].momentum.z, in[j].mass); + // float delta_eta = abs(tlv1.Eta() - tlv2.Eta()); + // float delta_phi = abs(tlv1.Phi() - tlv2.Phi()); + // float delta_r = sqrt(delta_eta*delta_eta + delta_phi*delta_phi); + // std::cout << "****************" + std::to_string(delta_r); + float delta_r = tlv1.DeltaR(tlv2); + result.push_back(delta_r); + } + } + return result; +} + +ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { + ROOT::VecOps::RVec result; + TLorentzVector tlv1; + TLorentzVector tlv2; + for (auto & p: in1) { + tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + for (auto & p: in2) { + tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + float ALP_delta_r = tlv1.DeltaR(tlv2); + result.push_back(ALP_delta_r); + return result; +} + ROOT::VecOps::RVec get_e(ROOT::VecOps::RVec in) { ROOT::VecOps::RVec result; for (auto & p: in) { diff --git a/analyzers/dataframe/src/ReconstructedParticle.cc b/analyzers/dataframe/src/ReconstructedParticle.cc index 65dd9cdd3a..b8d61ea3ed 100644 --- a/analyzers/dataframe/src/ReconstructedParticle.cc +++ b/analyzers/dataframe/src/ReconstructedParticle.cc @@ -340,6 +340,128 @@ ROOT::VecOps::RVec get_phi(ROOT::VecOps::RVec get_delta_eta(ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec result; + for (int i = 0; i < in.size(); i++) { + TLorentzVector tlv1; + tlv1.SetXYZM(in[i].momentum.x, in[i].momentum.y, in[i].momentum.z, in[i].mass); + for (auto j = i + 1; j < in.size(); j++) { + TLorentzVector tlv2; + tlv2.SetXYZM(in[j].momentum.x, in[j].momentum.y, in[j].momentum.z, in[j].mass); + float delta_eta = abs(tlv1.Eta() - tlv2.Eta()); + // std::cout << "****************" + std::to_string(delta_eta); + result.push_back(delta_eta); + } + } + return result; +} + +ROOT::VecOps::RVec get_delta_phi(ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec result; + for (int i = 0; i < in.size(); i++) { + TLorentzVector tlv1; + tlv1.SetXYZM(in[i].momentum.x, in[i].momentum.y, in[i].momentum.z, in[i].mass); + for (auto j = i + 1; j < in.size(); j++) { + TLorentzVector tlv2; + tlv2.SetXYZM(in[j].momentum.x, in[j].momentum.y, in[j].momentum.z, in[j].mass); + // float delta_phi = abs(tlv1.Phi() - tlv2.Phi()); + // std::cout << "****************" + std::to_string(delta_phi); + float delta_phi = tlv1.DeltaPhi(tlv2); + result.push_back(delta_phi); + } + } + return result; +} + +ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec result; + for (int i = 0; i < in.size(); i++) { + TLorentzVector tlv1; + tlv1.SetXYZM(in[i].momentum.x, in[i].momentum.y, in[i].momentum.z, in[i].mass); + for (auto j = i + 1; j < in.size(); j++) { + TLorentzVector tlv2; + tlv2.SetXYZM(in[j].momentum.x, in[j].momentum.y, in[j].momentum.z, in[j].mass); + float delta_r = tlv1.DeltaR(tlv2); + result.push_back(delta_r); + } + } + return result; +} + +ROOT::VecOps::RVec get_min_delta_r(ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec result; + float min_delta_r = 999; + for (int i = 0; i < in.size(); i++) { + TLorentzVector tlv1; + tlv1.SetXYZM(in[i].momentum.x, in[i].momentum.y, in[i].momentum.z, in[i].mass); + for (int j = i + 1; j < in.size(); j++) { + TLorentzVector tlv2; + tlv2.SetXYZM(in[j].momentum.x, in[j].momentum.y, in[j].momentum.z, in[j].mass); + float delta_r = tlv1.DeltaR(tlv2); + if (delta_r < min_delta_r) { + min_delta_r = delta_r; + } + } + // result.push_back(min_delta_r); + } + result.push_back(min_delta_r); + return result; +} + +ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { + ROOT::VecOps::RVec result; + TLorentzVector tlv1; + TLorentzVector tlv2; + for (auto & p: in1) { + tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + for (auto & p: in2) { + tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + float ALP_delta_r = tlv1.DeltaR(tlv2); + result.push_back(ALP_delta_r); + return result; +} + +ROOT::VecOps::RVec get_ALP_delta_phi(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { + ROOT::VecOps::RVec result; + TLorentzVector tlv1; + TLorentzVector tlv2; + for (auto & p: in1) { + tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + for (auto & p: in2) { + tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + float ALP_delta_phi = tlv1.DeltaPhi(tlv2); + // float ALP_delta_phi = abs(tlv1.Phi() - tlv2.Phi()); + result.push_back(ALP_delta_phi); + return result; +} + +ROOT::VecOps::RVec get_ALP_delta_eta(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { + ROOT::VecOps::RVec result; + TLorentzVector tlv1; + TLorentzVector tlv2; + for (auto & p: in1) { + tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + for (auto & p: in2) { + tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); + } + float ALP_delta_eta = abs(tlv1.Eta() - tlv2.Eta()); + result.push_back(ALP_delta_eta); + return result; +} + +ROOT::VecOps::RVec get_reference_point_x(ROOT::VecOps::RVec in) { + ROOT::VecOps::RVec result; + for (auto & p: in) { + result.push_back(p.referencePoint.x); + } + return result; +} + ROOT::VecOps::RVec get_e(ROOT::VecOps::RVec in) { ROOT::VecOps::RVec result; for (auto & p: in) { diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py index bc7fd4f558..5f02615121 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py @@ -1,10 +1,10 @@ #Input directory where the files produced at the stage1 level are -inputDir = "./output_stage1/" +# inputDir = "./output_stage1/" #inputDir = "/eos/user/j/jalimena/FCCeeLLP/" -#inputDir = "output_stage1/" +inputDir = "./stage1_sameMass/" #Output directory where the files produced at the final-selection level are -outputDir = "./output_finalSel/" +outputDir = "./final_sameMass/" #outputDir = "output_finalSel/" #Integrated luminosity for scaling number of events (required only if setting doScale to true) @@ -20,19 +20,338 @@ #run over the full statistics from stage1 #backgrounds - #'p8_ee_Zee_ecm91':{}, + # 'p8_ee_Zee_ecm91':{}, + # 'wzp6_gaga_ee_60_ecm240':{}, + # 'ee_gaga_1million':{}, + # 'test1':{}, + # 'test2':{}, + # 'test4':{}, + # 'ee_gammagamma':{}, + # 'ee_gaga_test':{}, + # 'ee_aa':{}, + # 'ee_aaa':{}, + # 'ee_aaaa':{}, #signals - 'ALP_Z_aa_1GeV_cYY_0p5':{}, + + # 'ALP_Z_aa_0.01.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.0000019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.000006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0000006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0000019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.000006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0000006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0000019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.000006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.6':{}, + + # 'ee_Z_ALPga_gagaga':{}, + + # 'ALP_Z_aa_1GeV_cYY_0p5':{}, + + # 'ALP_Z_aa_0.1GeV_cYY_0.1':{}, + # 'ALP_Z_aa_0.2GeV_cYY_0.1':{}, + # 'ALP_Z_aa_0.135GeV_cYY_0.1':{}, + # 'ALP_Z_aa_0.3GeV_cYY_0.1':{}, + + # 'ALP_Z_aa_1.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_0.5.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.5.GeV_cYY_1.2':{}, + + 'ALP_Z_aa_1.GeV_cYY_0.6':{}, + 'ALP_Z_aa_1.GeV_cYY_0.8':{}, + 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + 'ALP_Z_aa_1.GeV_cYY_1.2':{}, + 'ALP_Z_aa_1.GeV_cYY_1.4':{}, + + # 'ALP_Z_aa_0.5.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.5.GeV_cYY_1.0':{}, + # # 'ALP_Z_aa_2.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_3.GeV_cYY_1.0':{}, + # # 'ALP_Z_aa_4.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_5.GeV_cYY_1.0':{}, + # # 'ALP_Z_aa_8.GeV_cYY_1.0':{}, + + # 'ALP_Z_aa_0.6.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_0.8.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.2.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.4.GeV_cYY_1.0':{}, + + # 'ALP_Z_aa_3.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_5.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_0.5GeV_cYY_0.5':{}, + # 'ALP_Z_aa_0.7GeV_cYY_0.5':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_7.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_15.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_20.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_25.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_30.GeV_cYY_0.5':{}, } ###Dictionary for prettier names of processes (optional) processLabels = { #backgrounds - #'p8_ee_Zee_ecm91':"Z $\rightarrow$ ee", + # 'p8_ee_Zee_ecm91':"Z $\rightarrow$ ee", + # 'wzp6_gaga_ee_60_ecm240':"YY $\rightarrow$ ee", + # 'ee_gaga_1million':"$\rightarrow$ #gamma#gamma (mine)", + # 'test1':"$\rightarrow$ YY", + # 'test2':"$\rightarrow$ Z $\rightarrow$ ee", + # 'test4':"$\rightarrow$ YYY", + # 'ee_gammagamma':"$\rightarrow$ #gamma#gamma (spring2021)", + # 'ee_gaga_test':"$\rightarrow$ YY", + # 'ee_aa':"$\rightarrow$ #gamma#gamma", + # 'ee_aaa':"$\rightarrow$ #gamma#gamma#gamma", + # 'ee_aaaa':"$\rightarrow$ #gamma#gamma#gamma#gamma", #signals - 'ALP_Z_aa_1GeV_cYY_0p5': "$m_ALP =$ 1 GeV, $c_{YY} = 0.5$", + + # 'ALP_Z_aa_0.01.GeV_cYY_0.00006':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.0006':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.0019':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.006':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.019':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.06':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.19':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_0.01.GeV_cYY_0.6':"$m_ALP =$ 0.01 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.000019':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.00006':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.00019':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.0006':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.0019':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.006':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.019':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.06':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.19':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_0.0316.GeV_cYY_0.6':"$m_ALP =$ 0.0316 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.000019':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.00006':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.00019':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.0006':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.0019':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.006':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.019':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.06':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.19':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_0.1.GeV_cYY_0.6':"$m_ALP =$ 0.1 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.000019':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.00006':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.00019':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.0006':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.0019':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.006':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.019':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.06':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.19':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_0.316.GeV_cYY_0.6':"$m_ALP =$ 0.316 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.000019':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.00006':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.00019':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.0006':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.0019':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.006':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.019':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.06':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.19':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_1.0.GeV_cYY_0.6':"$m_ALP =$ 1.0 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.0000019':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.0000019$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.000006':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.000006$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.000019':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.00006':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.00019':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.0006':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.0019':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.006':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.019':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.06':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.19':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_3.16.GeV_cYY_0.6':"$m_ALP =$ 3.16 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_10.GeV_cYY_0.0000006':"$m_ALP =$ 10 GeV, $c_{YY} = 0.0000006$", + # 'ALP_Z_aa_10.GeV_cYY_0.0000019':"$m_ALP =$ 10 GeV, $c_{YY} = 0.0000019$", + # 'ALP_Z_aa_10.GeV_cYY_0.000006':"$m_ALP =$ 10 GeV, $c_{YY} = 0.000006$", + # 'ALP_Z_aa_10.GeV_cYY_0.000019':"$m_ALP =$ 10 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_10.GeV_cYY_0.00006':"$m_ALP =$ 10 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_10.GeV_cYY_0.00019':"$m_ALP =$ 10 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_10.GeV_cYY_0.0006':"$m_ALP =$ 10 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_10.GeV_cYY_0.0019':"$m_ALP =$ 10 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_10.GeV_cYY_0.006':"$m_ALP =$ 10 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_10.GeV_cYY_0.019':"$m_ALP =$ 10 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_10.GeV_cYY_0.06':"$m_ALP =$ 10 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_10.GeV_cYY_0.19':"$m_ALP =$ 10 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_10.GeV_cYY_0.6':"$m_ALP =$ 10 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.0000006':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.0000006$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.0000019':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.0000019$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.000006':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.000006$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.000019':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.000019$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.00006':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.00006$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.00019':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.00019$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.0006':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.0006$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.0019':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.0019$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.006':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.006$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.019':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.019$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.06':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.06$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.19':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.19$", + # 'ALP_Z_aa_31.6.GeV_cYY_0.6':"$m_ALP =$ 31.6 GeV, $c_{YY} = 0.6$", + + # 'ee_Z_ALPga_gagaga':"$m_ALP =$ 1 GeV, $c_{YY} = 0.5$ (mine)", + + # 'ALP_Z_aa_1GeV_cYY_0p5': "$m_ALP =$ 1 GeV, $c_{YY} = 0.5$", + + # 'ALP_Z_aa_0.1GeV_cYY_0.1': "$m_ALP =$ 0.1 GeV, $c_{YY} = 0.1$", + # 'ALP_Z_aa_0.2GeV_cYY_0.1': "$m_ALP =$ 0.2 GeV, $c_{YY} = 0.1$", + # 'ALP_Z_aa_0.135GeV_cYY_0.1': "$m_ALP =$ 0.135 GeV, $c_{YY} = 0.1$", + # 'ALP_Z_aa_0.3GeV_cYY_0.1': "$m_ALP =$ 0.3 GeV, $c_{YY} = 0.1$", + + # 'ALP_Z_aa_1.GeV_cYY_0.1': "$m_ALP =$ 1 GeV, $c_{YY} = 0.1$", + # 'ALP_Z_aa_1.GeV_cYY_0.3': "$m_ALP =$ 1 GeV, $c_{YY} = 0.3$", + # 'ALP_Z_aa_1.GeV_cYY_0.5': "$m_ALP =$ 1 GeV, $c_{YY} = 0.5$ (spring2021)", + # 'ALP_Z_aa_1.GeV_cYY_0.7': "$m_ALP =$ 1 GeV, $c_{YY} = 0.7$", + # 'ALP_Z_aa_1.GeV_cYY_0.9': "$m_ALP =$ 1 GeV, $c_{YY} = 0.9$", + + # 'ALP_Z_aa_0.5.GeV_cYY_0.6': "$m_ALP =$ 0.5 GeV, $c_{YY} = 0.6$", + # 'ALP_Z_aa_0.5.GeV_cYY_1.2': "$m_ALP =$ 0.5 GeV, $c_{YY} = 1.2$", + + 'ALP_Z_aa_1.GeV_cYY_0.6': "$m_ALP =$ 1 GeV, $c_{YY} = 0.6$", + 'ALP_Z_aa_1.GeV_cYY_0.8': "$m_ALP =$ 1 GeV, $c_{YY} = 0.8$", + 'ALP_Z_aa_1.GeV_cYY_1.0': "$m_ALP =$ 1 GeV, $c_{YY} = 1.0$", + 'ALP_Z_aa_1.GeV_cYY_1.2': "$m_ALP =$ 1 GeV, $c_{YY} = 1.2$", + 'ALP_Z_aa_1.GeV_cYY_1.4': "$m_ALP =$ 1 GeV, $c_{YY} = 1.4$", + + # 'ALP_Z_aa_0.5.GeV_cYY_1.0': "$m_ALP =$ 0.5 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_1.GeV_cYY_1.0': "$m_ALP =$ 1 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_1.5.GeV_cYY_1.0': "$m_ALP =$ 1.5 GeV, $c_{YY} = 1.0$", + # # 'ALP_Z_aa_2.GeV_cYY_1.0': "$m_ALP =$ 2 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_3.GeV_cYY_1.0': "$m_ALP =$ 3 GeV, $c_{YY} = 1.0$", + # # 'ALP_Z_aa_4.GeV_cYY_1.0': "$m_ALP =$ 4 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_5.GeV_cYY_1.0': "$m_ALP =$ 5 GeV, $c_{YY} = 1.0$", + # # 'ALP_Z_aa_8.GeV_cYY_1.0': "$m_ALP =$ 8 GeV, $c_{YY} = 1.0$", + + # 'ALP_Z_aa_0.6.GeV_cYY_1.0': "$m_ALP =$ 0.6 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_0.8.GeV_cYY_1.0': "$m_ALP =$ 0.8 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_1.GeV_cYY_1.0': "$m_ALP =$ 1 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_1.2.GeV_cYY_1.0': "$m_ALP =$ 1.2 GeV, $c_{YY} = 1.0$", + # 'ALP_Z_aa_1.4.GeV_cYY_1.0': "$m_ALP =$ 1.4 GeV, $c_{YY} = 1.0$", + + # 'ALP_Z_aa_3.GeV_cYY_0.1': "$m_ALP =$ 3 GeV, $c_{YY} = 0.1$", + # 'ALP_Z_aa_3.GeV_cYY_0.3': "$m_ALP =$ 3 GeV, $c_{YY} = 0.3$", + # 'ALP_Z_aa_3.GeV_cYY_0.5': "$m_ALP =$ 3 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_3.GeV_cYY_0.7': "$m_ALP =$ 3 GeV, $c_{YY} = 0.7$", + # 'ALP_Z_aa_3.GeV_cYY_0.9': "$m_ALP =$ 3 GeV, $c_{YY} = 0.9$", + + # 'ALP_Z_aa_5.GeV_cYY_0.1': "$m_ALP =$ 5 GeV, $c_{YY} = 0.1$", + # 'ALP_Z_aa_5.GeV_cYY_0.3': "$m_ALP =$ 5 GeV, $c_{YY} = 0.3$", + # 'ALP_Z_aa_5.GeV_cYY_0.5': "$m_ALP =$ 5 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_5.GeV_cYY_0.7': "$m_ALP =$ 5 GeV, $c_{YY} = 0.7$", + # 'ALP_Z_aa_5.GeV_cYY_0.9': "$m_ALP =$ 5 GeV, $c_{YY} = 0.9$", + + # 'ALP_Z_aa_0.5GeV_cYY_0.5': "$m_ALP =$ 0.5 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_0.7GeV_cYY_0.5': "$m_ALP =$ 0.7 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_1.GeV_cYY_0.5': "$m_ALP =$ 1 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_3.GeV_cYY_0.5': "$m_ALP =$ 3 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_5.GeV_cYY_0.5': "$m_ALP =$ 5 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_7.GeV_cYY_0.5': "$m_ALP =$ 7 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_10.GeV_cYY_0.5': "$m_ALP =$ 10 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_15.GeV_cYY_0.5': "$m_ALP =$ 15 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_20.GeV_cYY_0.5': "$m_ALP =$ 20 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_25.GeV_cYY_0.5': "$m_ALP =$ 25 GeV, $c_{YY} = 0.5$", + # 'ALP_Z_aa_30.GeV_cYY_0.5': "$m_ALP =$ 30 GeV, $c_{YY} = 0.5$", } #Link to the dictonary that contains all the cross section information etc... @@ -40,7 +359,166 @@ #Add MySample_p8_ee_ZH_ecm240 as it is not an offical process procDictAdd={ - "ALP_Z_aa_1GeV_cYY_0p5": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "p8_ee_Zee_ecm91": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_gaga_1million": {"numberOfEvents": 1000000, "sumOfWeights": 1000000, "crossSection": 57.319, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "test1": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 57.348, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "test2": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 2087.700, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "test4": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 0.461, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_gammagamma": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 45.454, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_gaga_test": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 4.563, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_aa": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 57.3, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_aaa": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.461, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_aa": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_aaa": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ee_aaaa": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.00111, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_0.01.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.01.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.01.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.01.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.01.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.0316.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.1.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.316.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.0.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.0000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.000006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.16.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.0000006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.0000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.000006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_10.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.0000006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.0000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.000006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.000019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.00006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.00019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.0006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.0019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.006": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.019": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.06": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.19": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_31.6.GeV_cYY_0.6": {"numberOfEvents": 10000, "sumOfWeights": 10000, "crossSection": 1, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ee_Z_ALPga_gagaga": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.6847, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_1GeV_cYY_0p5": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_0.1GeV_cYY_0.1": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.2GeV_cYY_0.1": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.135GeV_cYY_0.1": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.3GeV_cYY_0.1": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_1.GeV_cYY_0.1": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.GeV_cYY_0.3": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.GeV_cYY_0.5": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.GeV_cYY_0.7": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.GeV_cYY_0.9": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_0.5.GeV_cYY_0.6": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.986, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.5.GeV_cYY_1.2": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 3.94, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # for 0.6 below, cross section is actually 0.98597 + "ALP_Z_aa_1.GeV_cYY_0.6": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "ALP_Z_aa_1.GeV_cYY_0.8": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "ALP_Z_aa_1.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "ALP_Z_aa_1.GeV_cYY_1.2": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + "ALP_Z_aa_1.GeV_cYY_1.4": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_0.5.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.5.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # # "ALP_Z_aa_2.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_3.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # # "ALP_Z_aa_4.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_5.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # # "ALP_Z_aa_8.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # "ALP_Z_aa_0.6.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_0.8.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.2.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # "ALP_Z_aa_1.4.GeV_cYY_1.0": {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 0.027, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # 'ALP_Z_aa_3.GeV_cYY_0.1':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_3.GeV_cYY_0.3':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_3.GeV_cYY_0.7':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_3.GeV_cYY_0.9':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # 'ALP_Z_aa_5.GeV_cYY_0.1':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_5.GeV_cYY_0.3':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_5.GeV_cYY_0.7':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_5.GeV_cYY_0.9':{"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + + # 'ALP_Z_aa_0.5GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_0.7GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_1.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_3.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_5.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_7.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_10.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_15.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_20.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_25.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, + # 'ALP_Z_aa_30.GeV_cYY_0.5': {"numberOfEvents": 100000, "sumOfWeights": 100000, "crossSection": 2.744e-05, "kfactor": 1.0, "matchingEfficiency": 1.0}, } #Number of CPUs to use @@ -52,21 +530,41 @@ ###Dictionnay of the list of cuts. The key is the name of the selection that will be added to the output file cutList = { "selNone": "n_RecoTracks > -1", - "sel0": "GenALP_mass.size() > 0", - "sel1": "GenALP_mass.size() > 0 && n_RecoElectrons > 1", + # "sel1": "n_RecoPhotons == 3", + # "sel2": "RecoPhotons_delta_r[0] < 0.5 || RecoPhotons_delta_r[0] > 4.5", + # "sel1+2": "n_RecoPhotons == 3 && (RecoPhotons_delta_r[0] < 0.5 || RecoPhotons_delta_r[0] > 4.5)", + # "sel0": "RecoPhotons_min_delta_r[0] < 0.5 || RecoPhotons_min_delta_r[0] > 3 && RecoPhotons_min_delta_r[0] < 3.3", + # "sel0": "RecoPhotons_min_delta_r[0] < 0.2", + # "sel0": "RecoPhotons_min_delta_r[0] < 0.5 || RecoPhotons_min_delta_r[0] > 3 && RecoPhotons_min_delta_r[0] < 3.3", + # "sel1": "GenALP_mass.size() > 0 && n_RecoElectrons > 1", + # "seltest": "n_RecoPhotons == 3 && (RecoPhoton1_px > 0 && RecoPhoton2_px > 0 || RecoPhoton1_px < 0 && RecoPhoton2_px < 0) && RecoPhotons_min_delta_r[0] < 1.0", + # "seldeltaR": "n_RecoPhotons == 3 && RecoPhotons_min_delta_r[0] < 1.0", + # "selp": "n_RecoPhotons == 3 && RecoPhoton0_p > 44", + # "selall": "n_RecoPhotons == 3 && RecoPhotons_min_delta_r[0] < 1.0 && RecoPhoton0_p > 44", } ###Dictionary for prettier names of cuts (optional) cutLabels = { "selNone": "Before selection", - "sel0": "Good GEN ALP mass", - "sel1": "Good GEN ALP mass and 2 reco electrons", + # "sel1": "Exactly 3 Reconstructed Photons", + # "sel2": "Reco Photons #DeltaR < 0.5 or > 4.5", + # "sel1+2": "Exactly 3 Reconstruced Photons and Reco Photons #DeltaR < 0.5 or > 4.5", + # "sel0": "RecoPhotons_min_delta_r close to 0 and pi", + # "sel0": "Good GEN ALP mass", + # "sel1": "Good GEN ALP mass and 2 reco electrons", + # "seltest": "3 reco photons, second and third photons have the same direction px, and min #DeltaR < 1", + # "seldeltaR": "3 reco photons and reco photons min #DeltaR < 1", + # "selp": "3 reco photons and RecoPhoton0 momentum > 44", + # "selall": "all selections", } ###Dictionary for the ouput variable/hitograms. The key is the name of the variable in the output files. "name" is the name of the variable in the input file, "title" is the x-axis label of the histogram, "bin" the number of bins of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum x-axis value. histoList = { #gen variables "All_n_GenALP": {"name":"All_n_GenALP", "title":"Total number of gen ALPs", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + + "n_FSGenALP": {"name":"n_FSGenALP", "title":"Total number of FS gen ALPs", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "AllGenALP_mass": {"name":"AllGenALP_mass", "title":"All gen ALP mass [GeV]", "bin":100,"xmin":0 ,"xmax":10}, "AllGenALP_e": {"name":"AllGenALP_e", "title":"All gen ALP energy [GeV]", "bin":100,"xmin":0 ,"xmax":100}, "AllGenALP_p": {"name":"AllGenALP_p", "title":"All gen ALP p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, @@ -77,45 +575,45 @@ "AllGenALP_phi": {"name":"AllGenALP_phi", "title":"All gen ALP #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, "n_FSGenElectron": {"name":"n_FSGenElectron", "title":"Number of final state gen electrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, - "n_FSGenPositron": {"name":"n_FSGenPositron", "title":"Number of final state gen positrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, - "n_FSGenNeutrino": {"name":"n_FSGenNeutrino", "title":"Number of final state gen neutrinos", "bin":5,"xmin":-0.5 ,"xmax":4.5}, - "n_FSGenAntiNeutrino": {"name":"n_FSGenAntiNeutrino", "title":"Number of final state gen anti-neutrinos", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + # "n_FSGenPositron": {"name":"n_FSGenPositron", "title":"Number of final state gen positrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + # "n_FSGenNeutrino": {"name":"n_FSGenNeutrino", "title":"Number of final state gen neutrinos", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + # "n_FSGenAntiNeutrino": {"name":"n_FSGenAntiNeutrino", "title":"Number of final state gen anti-neutrinos", "bin":5,"xmin":-0.5 ,"xmax":4.5}, "n_FSGenPhoton": {"name":"n_FSGenPhoton", "title":"Number of final state gen photons", "bin":8,"xmin":-0.5 ,"xmax":7.5}, - # "n_FSGenElectron_forFS2GenPhotons": {"name":"n_FSGenElectron_forFS2GenPhotons", "title":"Number of final state gen electrons for events with 2 FS photons", "bin":7,"xmin":-2.5 ,"xmax":4.5}, - # "n_FSGenPositron_forFS2GenPhotons": {"name":"n_FSGenPositron_forFS2GenPhotons", "title":"Number of final state gen positrons for events with 2 FS photons", "bin":7,"xmin":-2.5 ,"xmax":4.5}, - - "FSGenElectron_e": {"name":"FSGenElectron_e", "title":"Final state gen electrons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenElectron_p": {"name":"FSGenElectron_p", "title":"Final state gen electrons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenElectron_pt": {"name":"FSGenElectron_pt", "title":"Final state gen electrons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenElectron_pz": {"name":"FSGenElectron_pz", "title":"Final state gen electrons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenElectron_eta": {"name":"FSGenElectron_eta", "title":"Final state gen electrons #eta", "bin":60, "xmin":-3,"xmax":3}, - "FSGenElectron_theta": {"name":"FSGenElectron_theta", "title":"Final state gen electrons #theta", "bin":64, "xmin":0,"xmax":3.2}, - "FSGenElectron_phi": {"name":"FSGenElectron_phi", "title":"Final state gen electrons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - - "FSGenPositron_e": {"name":"FSGenPositron_e", "title":"Final state gen positrons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenPositron_p": {"name":"FSGenPositron_p", "title":"Final state gen positrons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenPositron_pt": {"name":"FSGenPositron_pt", "title":"Final state gen positrons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenPositron_pz": {"name":"FSGenPositron_pz", "title":"Final state gen positrons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenPositron_eta": {"name":"FSGenPositron_eta", "title":"Final state gen positrons #eta", "bin":60, "xmin":-3,"xmax":3}, - "FSGenPositron_theta": {"name":"FSGenPositron_theta", "title":"Final state gen positrons #theta", "bin":64, "xmin":0,"xmax":3.2}, - "FSGenPositron_phi": {"name":"FSGenPositron_phi", "title":"Final state gen positrons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - - "FSGenNeutrino_e": {"name":"FSGenNeutrino_e", "title":"Final state gen neutrino energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenNeutrino_p": {"name":"FSGenNeutrino_p", "title":"Final state gen neutrino p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenNeutrino_pt": {"name":"FSGenNeutrino_pt", "title":"Final state gen neutrino p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenNeutrino_pz": {"name":"FSGenNeutrino_pz", "title":"Final state gen neutrino p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenNeutrino_eta": {"name":"FSGenNeutrino_eta", "title":"Final state gen neutrinos #eta", "bin":60, "xmin":-3,"xmax":3}, - "FSGenNeutrino_theta": {"name":"FSGenNeutrino_theta", "title":"Final state gen neutrinos #theta", "bin":64, "xmin":0,"xmax":3.2}, - "FSGenNeutrino_phi": {"name":"FSGenNeutrino_phi", "title":"Final state gen neutrinos #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - - "FSGenAntiNeutrino_e": {"name":"FSGenAntiNeutrino_e", "title":"Final state gen anti-neutrino energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenAntiNeutrino_p": {"name":"FSGenAntiNeutrino_p", "title":"Final state gen anti-neutrino p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenAntiNeutrino_pt": {"name":"FSGenAntiNeutrino_pt", "title":"Final state gen anti-neutrino p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenAntiNeutrino_pz": {"name":"FSGenAntiNeutrino_pz", "title":"Final state gen anti-neutrino p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "FSGenAntiNeutrino_eta": {"name":"FSGenAntiNeutrino_eta", "title":"Final state gen anti-neutrinos #eta", "bin":60, "xmin":-3,"xmax":3}, - "FSGenAntiNeutrino_theta": {"name":"FSGenAntiNeutrino_theta", "title":"Final state gen anti-neutrinos #theta", "bin":64, "xmin":0,"xmax":3.2}, - "FSGenAntiNeutrino_phi": {"name":"FSGenAntiNeutrino_phi", "title":"Final state gen anti-neutrinos #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + # # "n_FSGenElectron_forFS2GenPhotons": {"name":"n_FSGenElectron_forFS2GenPhotons", "title":"Number of final state gen electrons for events with 2 FS photons", "bin":7,"xmin":-2.5 ,"xmax":4.5}, + # # "n_FSGenPositron_forFS2GenPhotons": {"name":"n_FSGenPositron_forFS2GenPhotons", "title":"Number of final state gen positrons for events with 2 FS photons", "bin":7,"xmin":-2.5 ,"xmax":4.5}, + + # "FSGenElectron_e": {"name":"FSGenElectron_e", "title":"Final state gen electrons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenElectron_p": {"name":"FSGenElectron_p", "title":"Final state gen electrons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenElectron_pt": {"name":"FSGenElectron_pt", "title":"Final state gen electrons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenElectron_pz": {"name":"FSGenElectron_pz", "title":"Final state gen electrons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenElectron_eta": {"name":"FSGenElectron_eta", "title":"Final state gen electrons #eta", "bin":60, "xmin":-3,"xmax":3}, + # "FSGenElectron_theta": {"name":"FSGenElectron_theta", "title":"Final state gen electrons #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "FSGenElectron_phi": {"name":"FSGenElectron_phi", "title":"Final state gen electrons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + # "FSGenPositron_e": {"name":"FSGenPositron_e", "title":"Final state gen positrons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPositron_p": {"name":"FSGenPositron_p", "title":"Final state gen positrons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPositron_pt": {"name":"FSGenPositron_pt", "title":"Final state gen positrons p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPositron_pz": {"name":"FSGenPositron_pz", "title":"Final state gen positrons p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenPositron_eta": {"name":"FSGenPositron_eta", "title":"Final state gen positrons #eta", "bin":60, "xmin":-3,"xmax":3}, + # "FSGenPositron_theta": {"name":"FSGenPositron_theta", "title":"Final state gen positrons #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "FSGenPositron_phi": {"name":"FSGenPositron_phi", "title":"Final state gen positrons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + # "FSGenNeutrino_e": {"name":"FSGenNeutrino_e", "title":"Final state gen neutrino energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenNeutrino_p": {"name":"FSGenNeutrino_p", "title":"Final state gen neutrino p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenNeutrino_pt": {"name":"FSGenNeutrino_pt", "title":"Final state gen neutrino p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenNeutrino_pz": {"name":"FSGenNeutrino_pz", "title":"Final state gen neutrino p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenNeutrino_eta": {"name":"FSGenNeutrino_eta", "title":"Final state gen neutrinos #eta", "bin":60, "xmin":-3,"xmax":3}, + # "FSGenNeutrino_theta": {"name":"FSGenNeutrino_theta", "title":"Final state gen neutrinos #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "FSGenNeutrino_phi": {"name":"FSGenNeutrino_phi", "title":"Final state gen neutrinos #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + + # "FSGenAntiNeutrino_e": {"name":"FSGenAntiNeutrino_e", "title":"Final state gen anti-neutrino energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenAntiNeutrino_p": {"name":"FSGenAntiNeutrino_p", "title":"Final state gen anti-neutrino p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenAntiNeutrino_pt": {"name":"FSGenAntiNeutrino_pt", "title":"Final state gen anti-neutrino p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenAntiNeutrino_pz": {"name":"FSGenAntiNeutrino_pz", "title":"Final state gen anti-neutrino p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "FSGenAntiNeutrino_eta": {"name":"FSGenAntiNeutrino_eta", "title":"Final state gen anti-neutrinos #eta", "bin":60, "xmin":-3,"xmax":3}, + # "FSGenAntiNeutrino_theta": {"name":"FSGenAntiNeutrino_theta", "title":"Final state gen anti-neutrinos #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "FSGenAntiNeutrino_phi": {"name":"FSGenAntiNeutrino_phi", "title":"Final state gen anti-neutrinos #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, "FSGenPhoton_e": {"name":"FSGenPhoton_e", "title":"Final state gen photons energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "FSGenPhoton_p": {"name":"FSGenPhoton_p", "title":"Final state gen photons p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, @@ -125,45 +623,83 @@ "FSGenPhoton_theta": {"name":"FSGenPhoton_theta", "title":"Final state gen photons #theta", "bin":64, "xmin":0,"xmax":3.2}, "FSGenPhoton_phi": {"name":"FSGenPhoton_phi", "title":"Final state gen photons #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - # "FSGenPhoton0_e": {"name":"FSGenPhoton0_e", "title":"Final state gen photon_{0} energy [GeV]", "bin":64, "xmin":-3.2,"xmax":3.2}, - # "FSGenPhoton1_e": {"name":"FSGenPhoton1_e", "title":"Final state gen photon_{1} energy [GeV]", "bin":64, "xmin":-3.2,"xmax":3.2}, - # "FSGenPhoton2_e": {"name":"FSGenPhoton2_e", "title":"Final state gen photon_{2} energy [GeV]", "bin":64, "xmin":-3.2,"xmax":3.2}, - # "FSGenPhoton0_p": {"name":"FSGenPhoton0_p", "title":"Final state gen photon_{0} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - # "FSGenPhoton1_p": {"name":"FSGenPhoton1_p", "title":"Final state gen photon_{1} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - # "FSGenPhoton2_p": {"name":"FSGenPhoton2_p", "title":"Final state gen photon_{2} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - # "FSGenPhoton0_pt": {"name":"FSGenPhoton0_pt", "title":"Final state gen photon_{0} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - # "FSGenPhoton1_pt": {"name":"FSGenPhoton1_pt", "title":"Final state gen photon_{1} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - # "FSGenPhoton2_pt": {"name":"FSGenPhoton2_pt", "title":"Final state gen photon_{2} p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + "FSGenPhoton0_e": {"name":"FSGenPhoton0_e", "title":"Final state gen photon_{0} energy [GeV]", "bin":100, "xmin":-3.2,"xmax":50}, + "FSGenPhoton1_e": {"name":"FSGenPhoton1_e", "title":"Final state gen photon_{1} energy [GeV]", "bin":100, "xmin":-3.2,"xmax":50}, + "FSGenPhoton2_e": {"name":"FSGenPhoton2_e", "title":"Final state gen photon_{2} energy [GeV]", "bin":100, "xmin":-3.2,"xmax":50}, + "FSGenPhoton0_p": {"name":"FSGenPhoton0_p", "title":"Final state gen photon_{0} p [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton1_p": {"name":"FSGenPhoton1_p", "title":"Final state gen photon_{1} p [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton2_p": {"name":"FSGenPhoton2_p", "title":"Final state gen photon_{2} p [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton0_pt": {"name":"FSGenPhoton0_pt", "title":"Final state gen photon_{0} p_{T} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton1_pt": {"name":"FSGenPhoton1_pt", "title":"Final state gen photon_{1} p_{T} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton2_pt": {"name":"FSGenPhoton2_pt", "title":"Final state gen photon_{2} p_{T} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton0_px": {"name":"FSGenPhoton0_px", "title":"Final state gen photon_{0} p_{x} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton1_px": {"name":"FSGenPhoton1_px", "title":"Final state gen photon_{1} p_{x} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton2_px": {"name":"FSGenPhoton2_px", "title":"Final state gen photon_{2} p_{x} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton0_py": {"name":"FSGenPhoton0_py", "title":"Final state gen photon_{0} p_{y} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton1_py": {"name":"FSGenPhoton1_py", "title":"Final state gen photon_{1} p_{y} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton2_py": {"name":"FSGenPhoton2_py", "title":"Final state gen photon_{2} p_{y} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton0_pz": {"name":"FSGenPhoton0_pz", "title":"Final state gen photon_{0} p_{z} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton1_pz": {"name":"FSGenPhoton1_pz", "title":"Final state gen photon_{1} p_{z} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + "FSGenPhoton2_pz": {"name":"FSGenPhoton2_pz", "title":"Final state gen photon_{2} p_{z} [GeV]", "bin":100,"xmin":-3.2 ,"xmax":50}, + + "FSGenPhoton1_px_if_FSGenPhoton0_px_greaterthan_0": {"name": "FSGenPhoton1_px_if_FSGenPhoton0_px_greaterthan_0", "title": "FS gen photon_{1} p_{x} if FS gen photon_{0} p_{x} > 0", "bin":100, "xmin":-55, "xmax":50}, + "FSGenPhoton1_px_if_FSGenPhoton2_px_pos": {"name": "FSGenPhoton1_px_if_FSGenPhoton2_px_pos", "title": "FS gen photon_{1} p_{x} if FS gen photon_{2} p_{x} > 0", "bin":100, "xmin":-55, "xmax":50}, + "FSGenPhoton1_pz_if_FSGenPhoton2_pz_pos": {"name": "FSGenPhoton1_pz_if_FSGenPhoton2_pz_pos", "title": "FS gen photon_{1} p_{z} if FS gen photon_{2} p_{z} > 0", "bin":100, "xmin":-55, "xmax":50}, "FSGenPhoton_vertex_x": {"name":"FSGenPhoton_vertex_x", "title":"Final state gen photon production vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "FSGenPhoton_vertex_y": {"name":"FSGenPhoton_vertex_y", "title":"Final state gen photon production vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "FSGenPhoton_vertex_z": {"name":"FSGenPhoton_vertex_z", "title":"Final state gen photon production vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, - "FSGen_lifetime_xy": {"name":"FSGen_lifetime_xy", "title":"Gen ALP (FS eles) #tau_{xy} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, - "FSGen_lifetime_xyz": {"name":"FSGen_lifetime_xyz", "title":"Gen ALP (FS eles) #tau_{xyz} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, - "FSGen_Lxy": {"name":"FSGen_Lxy", "title":"Gen ALP (FS eles) L_{xy} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, - "FSGen_Lxyz": {"name":"FSGen_Lxyz", "title":"Gen ALP (FS eles) L_{xyz} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + # "FSGen_lifetime_xy": {"name":"FSGen_lifetime_xy", "title":"Gen ALP (FS eles) #tau_{xy} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, + # "FSGen_lifetime_xyz": {"name":"FSGen_lifetime_xyz", "title":"Gen ALP (FS eles) #tau_{xyz} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, + # "FSGen_Lxy": {"name":"FSGen_Lxy", "title":"Gen ALP (FS eles) L_{xy} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + # "FSGen_Lxyz": {"name":"FSGen_Lxyz", "title":"Gen ALP (FS eles) L_{xyz} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, - # "FSGen_a0a1_invMass": {"name":"FSGen_a0a1_invMass", "title":"Gen FS photons m_{01} [GeV]", "bin":105,"xmin":-5, "xmax":100}, - # "FSGen_a0a2_invMass": {"name":"FSGen_a0a2_invMass", "title":"Gen FS photons m_{02} [GeV]", "bin":105,"xmin":-5, "xmax":100}, - # "FSGen_a1a2_invMass": {"name":"FSGen_a1a2_invMass", "title":"Gen FS photons m_{12} [GeV]", "bin":105,"xmin":-5, "xmax":100}, - # "FSGen_aaa_invMass": {"name":"FSGen_aaa_invMass", "title":"Gen FS m_{#gamma #gamma #gamma} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # # "FSGen_a0a1_invMass": {"name":"FSGen_a0a1_invMass", "title":"Gen FS photons m_{01} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # # "FSGen_a0a2_invMass": {"name":"FSGen_a0a2_invMass", "title":"Gen FS photons m_{02} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # # "FSGen_a1a2_invMass": {"name":"FSGen_a1a2_invMass", "title":"Gen FS photons m_{12} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + # # "FSGen_aaa_invMass": {"name":"FSGen_aaa_invMass", "title":"Gen FS m_{#gamma #gamma #gamma} [GeV]", "bin":105,"xmin":-5, "xmax":100}, + + "FSGenALP_mass": {"name":"FSGenALP_mass", "title":"FS gen ALP mass [GeV]", "bin":100,"xmin":0 ,"xmax":10}, "GenALP_mass": {"name":"GenALP_mass", "title":"Gen ALP mass [GeV]", "bin":100,"xmin":0 ,"xmax":10}, + "GenALP_e": {"name":"GenALP_e", "title":"Gen ALP energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "GenALP_p": {"name":"GenALP_p", "title":"Gen ALP p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "GenALP_pt": {"name":"GenALP_pt", "title":"Gen ALP p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "GenALP_pz": {"name":"GenALP_pz", "title":"Gen ALP p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "GenALP_eta": {"name":"GenALP_eta", "title":"Gen ALP #eta", "bin":60, "xmin":-3,"xmax":3}, "GenALP_theta": {"name":"GenALP_theta", "title":"Gen ALP #theta", "bin":64, "xmin":0,"xmax":3.2}, "GenALP_phi": {"name":"GenALP_phi", "title":"Gen ALP #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - "GenALP_lifetime_xy": {"name":"GenALP_lifetime_xy", "title":"Gen ALP #tau_{xy} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, - "GenALP_lifetime_xyz": {"name":"GenALP_lifetime_xyz", "title":"Gen ALP #tau_{xyz} [s]", "bin":100,"xmin":0 ,"xmax":1E-10}, - "GenALP_Lxy": {"name":"GenALP_Lxy", "title":"Gen ALP L_{xy} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, - "GenALP_Lxyz": {"name":"GenALP_Lxyz", "title":"Gen ALP L_{xyz} [mm]", "bin":100,"xmin":0 ,"xmax":1000}, + "GenALP_lifetime_xy": {"name":"GenALP_lifetime_xy", "title":"Gen ALP #tau_{xy} [s]", "bin":100,"xmin":0 ,"xmax":10E-15}, + "GenALP_lifetime_xyz": {"name":"GenALP_lifetime_xyz", "title":"Gen ALP #tau_{xyz} [s]", "bin":100,"xmin":0 ,"xmax":50E-15}, + "GenALP_Lxy": {"name":"GenALP_Lxy", "title":"Gen ALP L_{xy} [mm]", "bin":100,"xmin":0 ,"xmax":10}, + "GenALP_Lxyz": {"name":"GenALP_Lxyz", "title":"Gen ALP L_{xyz} [mm]", "bin":100,"xmin":0 ,"xmax":5E5}, "GenALP_vertex_x": {"name":"GenALP_vertex_x", "title":"Gen ALP production vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "GenALP_vertex_y": {"name":"GenALP_vertex_y", "title":"Gen ALP production vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "GenALP_vertex_z": {"name":"GenALP_vertex_z", "title":"Gen ALP production vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenALP_px_if_FSGenPhoton0_px_greaterthan_0": {"name": "GenALP_px_if_FSGenPhoton0_px_greaterthan_0", "title": "Gen ALP p_{x} if FS gen photon_{0} p_{x} > 0", "bin":100, "xmin":-55, "xmax":50}, + "FSGenPhoton1_px_if_GenALP_px_neg": {"name": "FSGenPhoton1_px_if_GenALP_px_neg", "title": "FS gen photon_{1} p_{x} if gen ALP p_{x} < 0", "bin":100, "xmin":-55, "xmax":50}, + "FSGenPhoton2_px_if_GenALP_px_neg": {"name": "FSGenPhoton2_px_if_GenALP_px_neg", "title": "FS gen photon_{2} p_{x} if gen ALP p_{x} < 0", "bin":100, "xmin":-55, "xmax":50}, + + # "GenALP_deltaR": {"name":"GenALP_deltaR", "title":"Gen ALP #DeltaR", "bin":60,"xmin":0,"xmax":5}, + "n_GenALP": {"name":"n_GenALP", "title":"Number of gen ALPs", "bin":100,"xmin":-0.5,"xmax":4.5}, + "n_GenALPPhoton1": {"name":"n_GenALPPhoton1", "title":"Number of gen photon_{1}","bin":100,"xmin":-0.5,"xmax":4.5}, + "n_GenALPPhoton2": {"name":"n_GenALPPhoton2", "title":"Number of gen photon_{2}","bin":100,"xmin":-0.5,"xmax":4.5}, + "GenALP_time": {"name":"GenALP_time", "title":"Gen ALP time [s]", "bin":100,"xmin":0,"xmax":5E-24}, + "GenALP_pdg": {"name":"GenALP_pdg", "title":"Gen ALP pdg", "bin":100,"xmin":-10,"xmax":10}, + + # "GenALPPhoton1_time_minus_GenALP_time": {"name":"GenALPPhoton1_time_minus_GenALP_time", "title":"Gen ALP Photon_{1} time - Gen ALP time", "bin":100,"xmin":0,"xmax":1E-7}, + + # "GenALPPhoton1_deltaR": {"name":"GenALPPhoton1_deltaR", "title":"Gen photon_{1} #DeltaR", "bin":60,"xmin":0, "xmax":5}, + # "GenALPPhoton2_deltaR": {"name":"GenALPPhoton2_deltaR", "title":"Gen photon_{2} #DeltaR", "bin":60,"xmin":0, "xmax":5}, + "GenALPPhotons_deltaEta": {"name":"GenALPPhotons_deltaEta", "title":"Gen ALP photons #Delta#eta", "bin":100, "xmin":0, "xmax":8}, + "GenALPPhotons_deltaPhi": {"name":"GenALPPhotons_deltaPhi", "title":"Gen ALP photons #Delta#phi", "bin":100, "xmin":0, "xmax":8}, + "GenALPPhotons_deltaR": {"name":"GenALPPhotons_deltaR", "title":"Gen ALP photons #DeltaR", "bin":100, "xmin":0, "xmax":8}, + + # "GenALPPhotons_deltaR_2": {"name":"GenALPPhotons_deltaR_2", "title":"Gen ALP photons #DeltaR (from ROOT)", "bin":100, "xmin":0, "xmax":8}, + # "FSGenPhotons_delta_r": {"name":"FSGenPhotons_delta_r", "title":"Final state gen photons #DeltaR", "bin":100, "xmin":0, "xmax":20}, + "GenALPPhoton1_e": {"name":"GenALPPhoton1_e", "title":"Gen photon_{1} energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "GenALPPhoton2_e": {"name":"GenALPPhoton2_e", "title":"Gen photon_{2} energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "GenALPPhoton1_p": {"name":"GenALPPhoton1_p", "title":"Gen photon_{1} p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, @@ -179,20 +715,27 @@ "GenALPPhoton1_phi": {"name":"GenALPPhoton1_phi", "title":"Gen photon_{1} #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, "GenALPPhoton2_phi": {"name":"GenALPPhoton2_phi", "title":"Gen photon_{2} #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + "GenALPPhoton1_time": {"name":"GenALPPhoton1_time", "title":"Gen photon_{1} time [s]", "bin":100, "xmin":0, "xmax":0.1E-12}, + "GenALPPhoton2_time": {"name":"GenALPPhoton2_time", "title":"Gen photon_{2} time [s]", "bin":100, "xmin":0, "xmax":250E-14}, + + "GenALP_observed_lifetime_xyz": {"name":"GenALP_observed_lifetime_xyz", "title":"Gen ALP #tau_{xyz, lab}", "bin":100, "xmin":0, "xmax":1E-12}, + "GenALPPhoton1_vertex_x": {"name":"GenALPPhoton1_vertex_x", "title":"Gen photon_{1} production vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "GenALPPhoton1_vertex_y": {"name":"GenALPPhoton1_vertex_y", "title":"Gen photon_{1} production vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "GenALPPhoton1_vertex_z": {"name":"GenALPPhoton1_vertex_z", "title":"Gen photon_{1} production vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "GenALP_aa_invMass": {"name":"GenALP_aa_invMass", "title":"Gen m_{#gamma #gamma} (from ALP) [GeV]", "bin":100,"xmin":0, "xmax":10}, - #reco variables + # #reco variables "n_RecoTracks": {"name":"n_RecoTracks", "title":"Total number of reco tracks", "bin":5,"xmin":-0.5 ,"xmax":4.5}, "n_RecoALPTracks": {"name":"n_RecoALPTracks", "title":"Number of reco ALP tracks", "bin":5,"xmin":-0.5 ,"xmax":4.5}, "RecoALP_DecayVertex_x": {"name":"RecoALPDecayVertex.position.x", "title":"Reco ALP decay vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "RecoALP_DecayVertex_y": {"name":"RecoALPDecayVertex.position.y", "title":"Reco ALP decay vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, "RecoALP_DecayVertex_z": {"name":"RecoALPDecayVertex.position.z", "title":"Reco ALP decay vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, - "RecoALP_DecayVertex_chi2": {"name":"RecoALPDecayVertex.chi2", "title":"Reco ALP decay vertex #chi^{2}", "bin":100,"xmin":0 ,"xmax":3}, - "RecoALP_DecayVertex_probability": {"name":"RecoALPDecayVertex.probability", "title":"Reco ALP decay vertex probability", "bin":100,"xmin":0 ,"xmax":10}, + # "RecoALP_DecayVertex_chi2": {"name":"RecoALPDecayVertex.chi2", "title":"Reco ALP decay vertex #chi^{2}", "bin":100,"xmin":0 ,"xmax":3}, + # "RecoALP_DecayVertex_probability": {"name":"RecoALPDecayVertex.probability", "title":"Reco ALP decay vertex probability", "bin":100,"xmin":0 ,"xmax":10}, + + # "RecoALPL_xyz": {"name":"RecoALPL_xyz", "title":"Reco ALP L_{xyz}", "bin":100,"xmin":-1,"xmax":10}, "RecoALPPhoton1_e": {"name":"RecoALPPhoton1_e", "title":"Reco photon_{1} (from ALP) energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "RecoALPPhoton2_e": {"name":"RecoALPPhoton2_e", "title":"Reco photon_{2} (from ALP) energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, @@ -211,30 +754,40 @@ "RecoALPPhoton1_charge": {"name":"RecoALPPhoton1_charge", "title":"Reco photon_{1} (from ALP) charge", "bin":3, "xmin":-1.5,"xmax":1.5}, "RecoALPPhoton2_charge": {"name":"RecoALPPhoton2_charge", "title":"Reco photon_{2} (from ALP) charge", "bin":3, "xmin":-1.5,"xmax":1.5}, - "RecoALP_aa_invMass": {"name":"RecoALP_aa_invMass", "title":"Reco m_{#gamma #gamma} (from ALP) [GeV]", "bin":100,"xmin":0, "xmax":100}, + "RecoALPPhotons_deltaEta": {"name":"RecoALPPhotons_deltaEta", "title":"Reco ALP photons #Delta#eta", "bin":60, "xmin":-2, "xmax":8}, + "RecoALPPhotons_deltaPhi": {"name":"RecoALPPhotons_deltaPhi", "title":"Reco ALP photons #Delta#phi", "bin":60, "xmin":-2, "xmax":8}, + "RecoALPPhotons_deltaR": {"name":"RecoALPPhotons_deltaR", "title":"Reco ALP photons #DeltaR", "bin":60, "xmin":-3, "xmax":8}, + "RecoALPPhotons_deltaR2": {"name":"RecoALPPhotons_deltaR2", "title":"Reco ALP photons #DeltaR_{2}", "bin":60, "xmin":-3, "xmax":8}, + + "n_RecoALPPhoton1": {"name":"n_RecoALPPhoton1", "title":"Number of reco photon_{1} (from ALP)", "bin":5, "xmin":-0.5, "xmax":4.5}, + "n_RecoALPPhoton2": {"name":"n_RecoALPPhoton2", "title":"Number of reco photon_{2} (from ALP)", "bin":5, "xmin":-0.5, "xmax":4.5}, + # "RecoALPPhoton1_time": {"name":"RecoALPPhoton1_time", "title":"Reco photon_{1} (from ALP) time", "bin":100, "xmin":0, "xmax":2E-24}, + # "RecoALPPhoton2_time": {"name":"RecoALPPhoton2_time", "title":"Reco photon_{2} (from ALP) time", "bin":100, "xmin":0, "xmax":2E-24}, + + # "RecoALP_aa_invMass": {"name":"RecoALP_aa_invMass", "title":"Reco m_{#gamma #gamma} (from ALP) [GeV]", "bin":100,"xmin":0, "xmax":100}, "n_RecoJets": {"name":"n_RecoJets", "title":"Total number of reco jets", "bin":5,"xmin":-0.5 ,"xmax":4.5}, - "n_RecoPhotons": {"name":"n_RecoPhotons", "title":"Total number of reco photons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, + "n_RecoPhotons": {"name":"n_RecoPhotons", "title":"Total number of reco photons", "bin":9,"xmin":-0.5 ,"xmax":8.5}, "n_RecoElectrons": {"name":"n_RecoElectrons", "title":"Total number of reco electrons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, "n_RecoMuons": {"name":"n_RecoMuons", "title":"Total number of reco muons", "bin":5,"xmin":-0.5 ,"xmax":4.5}, - "RecoJet_e": {"name":"RecoJet_e", "title":"Reco jet energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoJet_p": {"name":"RecoJet_p", "title":"Reco jet p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoJet_pt": {"name":"RecoJet_pt", "title":"Reco jet p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoJet_pz": {"name":"RecoJet_pz", "title":"Reco jet p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoJet_eta": {"name":"RecoJet_eta", "title":"Reco jet #eta", "bin":60, "xmin":-3,"xmax":3}, - "RecoJet_theta": {"name":"RecoJet_theta", "title":"Reco jet #theta", "bin":64, "xmin":0,"xmax":3.2}, - "RecoJet_phi": {"name":"RecoJet_phi", "title":"Reco jet #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - "RecoJet_charge": {"name":"RecoJet_charge", "title":"Reco jet charge", "bin":3, "xmin":-1.5,"xmax":1.5}, - - "RecoElectron_e": {"name":"RecoElectron_e", "title":"Reco electron energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoElectron_p": {"name":"RecoElectron_p", "title":"Reco electron p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoElectron_pt": {"name":"RecoElectron_pt", "title":"Reco electron p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoElectron_pz": {"name":"RecoElectron_pz", "title":"Reco electron p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoElectron_eta": {"name":"RecoElectron_eta", "title":"Reco electron #eta", "bin":60, "xmin":-3,"xmax":3}, - "RecoElectron_theta": {"name":"RecoElectron_theta", "title":"Reco electron #theta", "bin":64, "xmin":0,"xmax":3.2}, - "RecoElectron_phi": {"name":"RecoElectron_phi", "title":"Reco electron #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - "RecoElectron_charge": {"name":"RecoElectron_charge", "title":"Reco electron charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + # "RecoJet_e": {"name":"RecoJet_e", "title":"Reco jet energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoJet_p": {"name":"RecoJet_p", "title":"Reco jet p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoJet_pt": {"name":"RecoJet_pt", "title":"Reco jet p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoJet_pz": {"name":"RecoJet_pz", "title":"Reco jet p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoJet_eta": {"name":"RecoJet_eta", "title":"Reco jet #eta", "bin":60, "xmin":-3,"xmax":3}, + # "RecoJet_theta": {"name":"RecoJet_theta", "title":"Reco jet #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "RecoJet_phi": {"name":"RecoJet_phi", "title":"Reco jet #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + # "RecoJet_charge": {"name":"RecoJet_charge", "title":"Reco jet charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + # "RecoElectron_e": {"name":"RecoElectron_e", "title":"Reco electron energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoElectron_p": {"name":"RecoElectron_p", "title":"Reco electron p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoElectron_pt": {"name":"RecoElectron_pt", "title":"Reco electron p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoElectron_pz": {"name":"RecoElectron_pz", "title":"Reco electron p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoElectron_eta": {"name":"RecoElectron_eta", "title":"Reco electron #eta", "bin":60, "xmin":-3,"xmax":3}, + # "RecoElectron_theta": {"name":"RecoElectron_theta", "title":"Reco electron #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "RecoElectron_phi": {"name":"RecoElectron_phi", "title":"Reco electron #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + # "RecoElectron_charge": {"name":"RecoElectron_charge", "title":"Reco electron charge", "bin":3, "xmin":-1.5,"xmax":1.5}, "RecoPhoton_e": {"name":"RecoPhoton_e", "title":"Reco photon energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, "RecoPhoton_p": {"name":"RecoPhoton_p", "title":"Reco photon p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, @@ -245,43 +798,82 @@ "RecoPhoton_phi": {"name":"RecoPhoton_phi", "title":"Reco photon #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, "RecoPhoton_charge": {"name":"RecoPhoton_charge", "title":"Reco photon charge", "bin":3, "xmin":-1.5,"xmax":1.5}, - "RecoMuon_e": {"name":"RecoMuon_e", "title":"Reco muon energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMuon_p": {"name":"RecoMuon_p", "title":"Reco muon p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMuon_pt": {"name":"RecoMuon_pt", "title":"Reco muon p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMuon_pz": {"name":"RecoMuon_pz", "title":"Reco muon p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMuon_eta": {"name":"RecoMuon_eta", "title":"Reco muon #eta", "bin":60, "xmin":-3,"xmax":3}, - "RecoMuon_theta": {"name":"RecoMuon_theta", "title":"Reco muon #theta", "bin":64, "xmin":0,"xmax":3.2}, - "RecoMuon_phi": {"name":"RecoMuon_phi", "title":"Reco muon #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, - "RecoMuon_charge": {"name":"RecoMuon_charge", "title":"Reco muon charge", "bin":3, "xmin":-1.5,"xmax":1.5}, - - "RecoMissingEnergy_e": {"name":"RecoMissingEnergy_e", "title":"Reco Total Missing Energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMissingEnergy_p": {"name":"RecoMissingEnergy_p", "title":"Reco Total Missing p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMissingEnergy_pt": {"name":"RecoMissingEnergy_pt", "title":"Reco Missing p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMissingEnergy_px": {"name":"RecoMissingEnergy_px", "title":"Reco Missing p_{x} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMissingEnergy_py": {"name":"RecoMissingEnergy_py", "title":"Reco Missing p_{y} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMissingEnergy_pz": {"name":"RecoMissingEnergy_pz", "title":"Reco Missing p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, - "RecoMissingEnergy_eta": {"name":"RecoMissingEnergy_eta", "title":"Reco Missing Energy #eta", "bin":60,"xmin":-3 ,"xmax":3}, - "RecoMissingEnergy_theta": {"name":"RecoMissingEnergy_theta", "title":"Reco Missing Energy #theta", "bin":64,"xmin":0 , "xmax":3.2}, - "RecoMissingEnergy_phi": {"name":"RecoMissingEnergy_phi", "title":"Reco Missing Energy #phi", "bin":64,"xmin":-3.2 ,"xmax":3.2}, - - #gen-reco + # "RecoPhoton_y": {"name":"RecoPhoton_y", "title":"Reco photon rapidity", "bin":100, "xmin":-5, "xmax":5}, + + "RecoPhotons_delta_eta":{"name": "RecoPhotons_delta_eta", "title": "Reco photons #Delta#eta", "bin":100, "xmin":0, "xmax":10}, + "RecoPhotons_delta_phi":{"name": "RecoPhotons_delta_phi", "title": "Reco photons #Delta#phi", "bin":100, "xmin":0, "xmax":10}, + "RecoPhotons_delta_r": {"name": "RecoPhotons_delta_r", "title": "Reco photons #DeltaR", "bin":100, "xmin":0, "xmax":7}, + + "RecoPhotons_min_delta_r": {"name": "RecoPhotons_min_delta_r", "title": "Reco photons minimum #DeltaR", "bin":100, "xmin":0, "xmax": 7}, + + "RecoPhotons_ALP_delta_r":{"name": "RecoPhotons_ALP_delta_r", "title": "Reco photons #DeltaR (from ALP)", "bin":100, "xmin": 0, "xmax": 0.2}, + "RecoPhotons_ALP_delta_phi":{"name": "RecoPhotons_ALP_delta_phi", "title": "Reco photons #Delta#phi (from ALP)", "bin":100, "xmin": -4, "xmax": 4}, + "RecoPhotons_ALP_delta_eta":{"name": "RecoPhotons_ALP_delta_eta", "title": "Reco photons #Delta#eta (from ALP)", "bin":100, "xmin": -4, "xmax": 4}, + + # "RecoPhoton_reference_point_x": {"name": "RecoPhoton_reference_point_x", "title": "Reco photons reference point x", "bin": 100, "xmin": -1, "xmax": 1}, + + "RecoPhoton0_e": {"name":"RecoPhoton0_e", "title":"Reco photon_{0} energy [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton1_e": {"name":"RecoPhoton1_e", "title":"Reco photon_{1} energy [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton2_e": {"name":"RecoPhoton2_e", "title":"Reco photon_{2} energy [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton0_p": {"name":"RecoPhoton0_p", "title":"Reco photon_{0} p [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton1_p": {"name":"RecoPhoton1_p", "title":"Reco photon_{1} p [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton2_p": {"name":"RecoPhoton2_p", "title":"Reco photon_{2} p [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton0_pt": {"name":"RecoPhoton0_pt", "title":"Reco photon_{0} p_{T} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton1_pt": {"name":"RecoPhoton1_pt", "title":"Reco photon_{1} p_{T} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton2_pt": {"name":"RecoPhoton2_pt", "title":"Reco photon_{2} p_{T} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton0_px": {"name":"RecoPhoton0_px", "title":"Reco photon_{0} p_{x} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton1_px": {"name":"RecoPhoton1_px", "title":"Reco photon_{1} p_{x} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton2_px": {"name":"RecoPhoton2_px", "title":"Reco photon_{2} p_{x} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton0_py": {"name":"RecoPhoton0_py", "title":"Reco photon_{0} p_{y} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton1_py": {"name":"RecoPhoton1_py", "title":"Reco photon_{1} p_{y} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton2_py": {"name":"RecoPhoton2_py", "title":"Reco photon_{2} p_{y} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton0_pz": {"name":"RecoPhoton0_pz", "title":"Reco photon_{0} p_{z} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton1_pz": {"name":"RecoPhoton1_pz", "title":"Reco photon_{1} p_{z} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + "RecoPhoton2_pz": {"name":"RecoPhoton2_pz", "title":"Reco photon_{2} p_{z} [GeV]", "bin":100, "xmin":-3.2, "xmax": 50}, + + "RecoPhoton1_px_if_RecoPhoton2_px_pos": {"name": "RecoPhoton1_px_if_RecoPhoton2_px_pos", "title": "Reco photon_{1} p_{x} if reco photon_{2} p_{x} > 0", "bin":100, "xmin":-55, "xmax":50}, + "RecoPhoton1_pz_if_RecoPhoton2_pz_pos": {"name": "RecoPhoton1_pz_if_RecoPhoton2_pz_pos", "title": "Reco photon_{1} p_{z} if reco photon_{2} p_{z} > 0", "bin":100, "xmin":-55, "xmax":50}, + + "RecoALPPhotons_delta_R3": {"name":"RecoALPPhotons_delta_R3", "title":"Reco ALP photons #DeltaR_{3}", "bin":60, "xmin":-3, "xmax":8}, + + # "RecoMuon_e": {"name":"RecoMuon_e", "title":"Reco muon energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMuon_p": {"name":"RecoMuon_p", "title":"Reco muon p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMuon_pt": {"name":"RecoMuon_pt", "title":"Reco muon p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMuon_pz": {"name":"RecoMuon_pz", "title":"Reco muon p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMuon_eta": {"name":"RecoMuon_eta", "title":"Reco muon #eta", "bin":60, "xmin":-3,"xmax":3}, + # "RecoMuon_theta": {"name":"RecoMuon_theta", "title":"Reco muon #theta", "bin":64, "xmin":0,"xmax":3.2}, + # "RecoMuon_phi": {"name":"RecoMuon_phi", "title":"Reco muon #phi", "bin":64, "xmin":-3.2,"xmax":3.2}, + # "RecoMuon_charge": {"name":"RecoMuon_charge", "title":"Reco muon charge", "bin":3, "xmin":-1.5,"xmax":1.5}, + + # "RecoMissingEnergy_e": {"name":"RecoMissingEnergy_e", "title":"Reco Total Missing Energy [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMissingEnergy_p": {"name":"RecoMissingEnergy_p", "title":"Reco Total Missing p [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMissingEnergy_pt": {"name":"RecoMissingEnergy_pt", "title":"Reco Missing p_{T} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMissingEnergy_px": {"name":"RecoMissingEnergy_px", "title":"Reco Missing p_{x} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMissingEnergy_py": {"name":"RecoMissingEnergy_py", "title":"Reco Missing p_{y} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMissingEnergy_pz": {"name":"RecoMissingEnergy_pz", "title":"Reco Missing p_{z} [GeV]", "bin":100,"xmin":0 ,"xmax":50}, + # "RecoMissingEnergy_eta": {"name":"RecoMissingEnergy_eta", "title":"Reco Missing Energy #eta", "bin":60,"xmin":-3 ,"xmax":3}, + # "RecoMissingEnergy_theta": {"name":"RecoMissingEnergy_theta", "title":"Reco Missing Energy #theta", "bin":64,"xmin":0 , "xmax":3.2}, + # "RecoMissingEnergy_phi": {"name":"RecoMissingEnergy_phi", "title":"Reco Missing Energy #phi", "bin":64,"xmin":-3.2 ,"xmax":3.2}, + + # #gen-reco "GenMinusRecoALPPhoton1_e": {"name":"GenMinusRecoALPPhoton1_e", "title":"Gen photon_{1} energy - Reco photon_{1} energy [GeV]","bin":100,"xmin":-5 ,"xmax":5}, "GenMinusRecoALPPhoton2_e": {"name":"GenMinusRecoALPPhoton2_e", "title":"Gen photon_{2} energy - Reco photon_{2} energy [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton1_p": {"name":"GenMinusRecoALPPhoton1_p", "title":"Gen photon_{1} p - Reco photon_{1} p [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton2_p": {"name":"GenMinusRecoALPPhoton2_p", "title":"Gen photon_{2} p - Reco photon_{2} p [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton1_pt": {"name":"GenMinusRecoALPPhoton1_pt", "title":"Gen photon_{1} p_{T} - Reco photon_{1} p_{T} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton2_pt": {"name":"GenMinusRecoALPPhoton2_pt", "title":"Gen photon_{2} p_{T} - Reco photon_{2} p_{T} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton1_pz": {"name":"GenMinusRecoALPPhoton1_pz", "title":"Gen photon_{1} p_{z} - Reco photon_{1} p_{z} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton2_pz": {"name":"GenMinusRecoALPPhoton2_pz", "title":"Gen photon_{2} p_{z} - Reco photon_{2} p_{z} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton1_eta": {"name":"GenMinusRecoALPPhoton1_eta", "title":"Gen photon_{1} #eta - Reco photon_{1} #eta", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton2_eta": {"name":"GenMinusRecoALPPhoton2_eta", "title":"Gen photon_{2} #eta - Reco photon_{2} #eta", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton1_theta":{"name":"GenMinusRecoALPPhoton1_theta","title":"Gen photon_{1} #theta - Reco photon_{1} #theta", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton2_theta":{"name":"GenMinusRecoALPPhoton2_theta","title":"Gen photon_{2} #theta - Reco photon_{2} #theta", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton1_phi": {"name":"GenMinusRecoALPPhoton1_phi", "title":"Gen photon_{1} #phi - Reco photon_{1} #phi", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALPPhoton2_phi": {"name":"GenMinusRecoALPPhoton2_phi", "title":"Gen photon_{2} #phi - Reco photon_{2} #phi", "bin":100,"xmin":-5 ,"xmax":5}, - - "GenMinusRecoALP_DecayVertex_x": {"name":"GenMinusRecoALP_DecayVertex_x", "title":"Gen ALP decay vertex x - Reco ALP decay vertex x [mm]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALP_DecayVertex_y": {"name":"GenMinusRecoALP_DecayVertex_y", "title":"Gen ALP decay vertex y - Reco ALP decay vertex y [mm]", "bin":100,"xmin":-5 ,"xmax":5}, - "GenMinusRecoALP_DecayVertex_z": {"name":"GenMinusRecoALP_DecayVertex_z", "title":"Gen ALP decay vertex z - Reco ALP decay vertex z [mm]", "bin":100,"xmin":-5 ,"xmax":5}, - + # "GenMinusRecoALPPhoton1_p": {"name":"GenMinusRecoALPPhoton1_p", "title":"Gen photon_{1} p - Reco photon_{1} p [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton2_p": {"name":"GenMinusRecoALPPhoton2_p", "title":"Gen photon_{2} p - Reco photon_{2} p [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton1_pt": {"name":"GenMinusRecoALPPhoton1_pt", "title":"Gen photon_{1} p_{T} - Reco photon_{1} p_{T} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton2_pt": {"name":"GenMinusRecoALPPhoton2_pt", "title":"Gen photon_{2} p_{T} - Reco photon_{2} p_{T} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton1_pz": {"name":"GenMinusRecoALPPhoton1_pz", "title":"Gen photon_{1} p_{z} - Reco photon_{1} p_{z} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton2_pz": {"name":"GenMinusRecoALPPhoton2_pz", "title":"Gen photon_{2} p_{z} - Reco photon_{2} p_{z} [GeV]", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton1_eta": {"name":"GenMinusRecoALPPhoton1_eta", "title":"Gen photon_{1} #eta - Reco photon_{1} #eta", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton2_eta": {"name":"GenMinusRecoALPPhoton2_eta", "title":"Gen photon_{2} #eta - Reco photon_{2} #eta", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton1_theta":{"name":"GenMinusRecoALPPhoton1_theta","title":"Gen photon_{1} #theta - Reco photon_{1} #theta", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton2_theta":{"name":"GenMinusRecoALPPhoton2_theta","title":"Gen photon_{2} #theta - Reco photon_{2} #theta", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton1_phi": {"name":"GenMinusRecoALPPhoton1_phi", "title":"Gen photon_{1} #phi - Reco photon_{1} #phi", "bin":100,"xmin":-5 ,"xmax":5}, + # "GenMinusRecoALPPhoton2_phi": {"name":"GenMinusRecoALPPhoton2_phi", "title":"Gen photon_{2} #phi - Reco photon_{2} #phi", "bin":100,"xmin":-5 ,"xmax":5}, + + "GenMinusRecoALP_DecayVertex_x": {"name":"GenMinusRecoALP_DecayVertex_x", "title":"Gen ALP decay vertex x - Reco ALP decay vertex x [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenMinusRecoALP_DecayVertex_y": {"name":"GenMinusRecoALP_DecayVertex_y", "title":"Gen ALP decay vertex y - Reco ALP decay vertex y [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + "GenMinusRecoALP_DecayVertex_z": {"name":"GenMinusRecoALP_DecayVertex_z", "title":"Gen ALP decay vertex z - Reco ALP decay vertex z [mm]", "bin":100,"xmin":-1000 ,"xmax":1000}, + + # "CalorimeterHitsTime": {"name":"CalorimeterHitsTime", "title":"Calorimeter hits time", "bin":100,"xmin":0,"xmax":2E-8} } diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py index b1545588dd..65d60cc139 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py @@ -5,20 +5,23 @@ ###If scaleSig=0 or scaleBack=0, we don't apply any additional scaling, on top of the normalization to cross section and integrated luminosity, as defined in finalSel.py ###If scaleSig or scaleBack is not defined, plots will be normalized to 1 -#scaleSig = 0. -#scaleBack = 0. +# scaleSig = 1. +# scaleBack = 1. ana_tex = 'e^{+}e^{-} #rightarrow Z #rightarrow #gamma ALP #rightarrow 3#gamma' #ana_tex = '' #delphesVersion = '3.4.2' delphesVersion = '' energy = 91 collider = 'FCC-ee' -inputDir = '/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_finalSel/' +inputDir = './final_samecYY/' #formats = ['png','pdf'] -formats = ['pdf'] -yaxis = ['lin','log'] +# formats = ['pdf'] +formats = ['png'] +# xaxis = ['log'] +yaxis = ['log'] +# yaxis = ['lin','log'] stacksig = ['nostack'] -outdir = 'plots/' +outdir = './plots_samecYY2/' splitLeg = True variables = [ @@ -34,44 +37,44 @@ "AllGenALP_phi", "n_FSGenElectron", - "n_FSGenPositron", - "n_FSGenNeutrino", - "n_FSGenAntiNeutrino", + # "n_FSGenPositron", + # "n_FSGenNeutrino", + # "n_FSGenAntiNeutrino", "n_FSGenPhoton", - # "n_FSGenElectron_forFS2GenPhotons", - # "n_FSGenPositron_forFS2GenPhotons", - - "FSGenElectron_e", - "FSGenElectron_p", - "FSGenElectron_pt", - "FSGenElectron_pz", - "FSGenElectron_eta", - "FSGenElectron_theta", - "FSGenElectron_phi", - - "FSGenPositron_e", - "FSGenPositron_p", - "FSGenPositron_pt", - "FSGenPositron_pz", - "FSGenPositron_eta", - "FSGenPositron_theta", - "FSGenPositron_phi", - - "FSGenNeutrino_e", - "FSGenNeutrino_p", - "FSGenNeutrino_pt", - "FSGenNeutrino_pz", - "FSGenNeutrino_eta", - "FSGenNeutrino_theta", - "FSGenNeutrino_phi", - - "FSGenAntiNeutrino_e", - "FSGenAntiNeutrino_p", - "FSGenAntiNeutrino_pt", - "FSGenAntiNeutrino_pz", - "FSGenAntiNeutrino_eta", - "FSGenAntiNeutrino_theta", - "FSGenAntiNeutrino_phi", + # # "n_FSGenElectron_forFS2GenPhotons", + # # "n_FSGenPositron_forFS2GenPhotons", + + # "FSGenElectron_e", + # "FSGenElectron_p", + # "FSGenElectron_pt", + # "FSGenElectron_pz", + # "FSGenElectron_eta", + # "FSGenElectron_theta", + # "FSGenElectron_phi", + + # "FSGenPositron_e", + # "FSGenPositron_p", + # "FSGenPositron_pt", + # "FSGenPositron_pz", + # "FSGenPositron_eta", + # "FSGenPositron_theta", + # "FSGenPositron_phi", + + # "FSGenNeutrino_e", + # "FSGenNeutrino_p", + # "FSGenNeutrino_pt", + # "FSGenNeutrino_pz", + # "FSGenNeutrino_eta", + # "FSGenNeutrino_theta", + # "FSGenNeutrino_phi", + + # "FSGenAntiNeutrino_e", + # "FSGenAntiNeutrino_p", + # "FSGenAntiNeutrino_pt", + # "FSGenAntiNeutrino_pz", + # "FSGenAntiNeutrino_eta", + # "FSGenAntiNeutrino_theta", + # "FSGenAntiNeutrino_phi", "FSGenPhoton_e", "FSGenPhoton_p", @@ -85,26 +88,41 @@ "FSGenPhoton_vertex_y", "FSGenPhoton_vertex_z", - "FSGen_Lxy", - "FSGen_Lxyz", - "FSGen_lifetime_xy", - "FSGen_lifetime_xyz", - - # "FSGenPhoton0_e", - # "FSGenPhoton1_e", - # "FSGenPhoton2_e", - # "FSGenPhoton0_p", - # "FSGenPhoton1_p", - # "FSGenPhoton2_p", - # "FSGenPhoton0_pt", - # "FSGenPhoton1_pt", - # "FSGenPhoton2_pt", + # "FSGen_Lxy", + # "FSGen_Lxyz", + # "FSGen_lifetime_xy", + # "FSGen_lifetime_xyz", + + "FSGenPhoton0_e", + "FSGenPhoton1_e", + "FSGenPhoton2_e", + "FSGenPhoton0_p", + "FSGenPhoton1_p", + "FSGenPhoton2_p", + "FSGenPhoton0_pt", + "FSGenPhoton1_pt", + "FSGenPhoton2_pt", + "FSGenPhoton0_px", + "FSGenPhoton1_px", + "FSGenPhoton2_px", + "FSGenPhoton0_py", + "FSGenPhoton1_py", + "FSGenPhoton2_py", + "FSGenPhoton0_pz", + "FSGenPhoton1_pz", + "FSGenPhoton2_pz", + + "FSGenPhoton1_px_if_FSGenPhoton0_px_greaterthan_0", + "FSGenPhoton1_px_if_FSGenPhoton2_px_pos", + "FSGenPhoton1_pz_if_FSGenPhoton2_pz_pos", + # "FSGen_a0a1_invMass", # "FSGen_a0a2_invMass", # "FSGen_a1a2_invMass", # "FSGen_aaa_invMass", "GenALP_mass", + "GenALP_e", "GenALP_p", "GenALP_pt", "GenALP_pz", @@ -119,6 +137,13 @@ "GenALP_vertex_y", "GenALP_vertex_z", + "GenALP_px_if_FSGenPhoton0_px_greaterthan_0", + "FSGenPhoton1_px_if_GenALP_px_neg", + "FSGenPhoton2_px_if_GenALP_px_neg", + + "GenALP_time", + # "GenALPPhoton1_time_minus_GenALP_time", + "GenALPPhoton1_e", "GenALPPhoton2_e", "GenALPPhoton1_p", @@ -137,16 +162,30 @@ "GenALPPhoton1_vertex_y", "GenALPPhoton1_vertex_z", - "GenALP_aa_invMass", + # "GenALP_aa_invMass", - #reco variables + # #reco variables "n_RecoTracks", "n_RecoALPTracks", "RecoALP_DecayVertex_x", "RecoALP_DecayVertex_y", "RecoALP_DecayVertex_z", - "RecoALP_DecayVertex_chi2", - "RecoALP_DecayVertex_probability", + # "RecoALP_DecayVertex_chi2", + # "RecoALP_DecayVertex_probability", + + "GenALPPhotons_deltaEta", + "GenALPPhotons_deltaPhi", + "GenALPPhotons_deltaR", + "n_GenALP", + "n_GenALPPhoton1", + "n_GenALPPhoton2", + "GenALPPhoton1_time", + "GenALPPhoton2_time", + + # "GenALPPhotons_deltaR_2", + # "FSGenPhotons_delta_r", + + "GenALP_observed_lifetime_xyz", "RecoALPPhoton1_e", "RecoALPPhoton2_e", @@ -165,28 +204,38 @@ "RecoALPPhoton1_charge", "RecoALPPhoton2_charge", + "RecoALPPhotons_deltaEta", + "RecoALPPhotons_deltaPhi", + "RecoALPPhotons_deltaR", + + "RecoALP_DecayVertex_x", + "RecoALP_DecayVertex_y", + "RecoALP_DecayVertex_z", + + # "RecoALPL_xyz", + "n_RecoJets", "n_RecoPhotons", "n_RecoElectrons", "n_RecoMuons", - "RecoJet_e", - "RecoJet_p", - "RecoJet_pt", - "RecoJet_pz", - "RecoJet_eta", - "RecoJet_theta", - "RecoJet_phi", - "RecoJet_charge", - - "RecoElectron_e", - "RecoElectron_p", - "RecoElectron_pt", - "RecoElectron_pz", - "RecoElectron_eta", - "RecoElectron_theta", - "RecoElectron_phi", - "RecoElectron_charge", + # "RecoJet_e", + # "RecoJet_p", + # "RecoJet_pt", + # "RecoJet_pz", + # "RecoJet_eta", + # "RecoJet_theta", + # "RecoJet_phi", + # "RecoJet_charge", + + # "RecoElectron_e", + # "RecoElectron_p", + # "RecoElectron_pt", + # "RecoElectron_pz", + # "RecoElectron_eta", + # "RecoElectron_theta", + # "RecoElectron_phi", + # "RecoElectron_charge", "RecoPhoton_e", "RecoPhoton_p", @@ -197,50 +246,339 @@ "RecoPhoton_phi", "RecoPhoton_charge", - "RecoMuon_e", - "RecoMuon_p", - "RecoMuon_pt", - "RecoMuon_pz", - "RecoMuon_eta", - "RecoMuon_theta", - "RecoMuon_phi", - "RecoMuon_charge", - - "RecoMissingEnergy_e", - "RecoMissingEnergy_p", - "RecoMissingEnergy_pt", - "RecoMissingEnergy_px", - "RecoMissingEnergy_py", - "RecoMissingEnergy_pz", - "RecoMissingEnergy_eta", - "RecoMissingEnergy_theta", - "RecoMissingEnergy_phi", - + "RecoPhotons_delta_eta", + "RecoPhotons_delta_phi", + "RecoPhotons_delta_r", + + "RecoPhotons_min_delta_r", + + "RecoPhotons_ALP_delta_r", + "RecoPhotons_ALP_delta_phi", + "RecoPhotons_ALP_delta_eta", + + # "RecoPhoton_reference_point_x", + + "RecoPhoton0_e", + "RecoPhoton1_e", + "RecoPhoton2_e", + "RecoPhoton0_p", + "RecoPhoton1_p", + "RecoPhoton2_p", + "RecoPhoton0_pt", + "RecoPhoton1_pt", + "RecoPhoton2_pt", + "RecoPhoton0_px", + "RecoPhoton1_px", + "RecoPhoton2_px", + "RecoPhoton0_py", + "RecoPhoton1_py", + "RecoPhoton2_py", + "RecoPhoton0_pz", + "RecoPhoton1_pz", + "RecoPhoton2_pz", + + "RecoPhoton1_px_if_RecoPhoton2_px_pos", + "RecoPhoton1_pz_if_RecoPhoton2_pz_pos", + + "RecoALPPhotons_delta_R3", + + # "RecoMuon_e", + # "RecoMuon_p", + # "RecoMuon_pt", + # "RecoMuon_pz", + # "RecoMuon_eta", + # "RecoMuon_theta", + # "RecoMuon_phi", + # "RecoMuon_charge", + + # "RecoMissingEnergy_e", + # "RecoMissingEnergy_p", + # "RecoMissingEnergy_pt", + # "RecoMissingEnergy_px", + # "RecoMissingEnergy_py", + # "RecoMissingEnergy_pz", + # "RecoMissingEnergy_eta", + # "RecoMissingEnergy_theta", + # "RecoMissingEnergy_phi", + + "GenMinusRecoALPPhoton1_e", + "GenMinusRecoALPPhoton2_e", + "GenMinusRecoALP_DecayVertex_x", + "GenMinusRecoALP_DecayVertex_y", + "GenMinusRecoALP_DecayVertex_z", + + # "CalorimeterHitsTime", ] - + ###Dictionary with the analysis name as a key, and the list of selections to be plotted for this analysis. The name of the selections should be the same than in the final selection selections = {} -selections['ALP'] = ["selNone"]#,"sel0","sel1"] +selections['ALP'] = [ + "selNone", + # "sel0", + # "sel1", + # "sel2", + # "sel1+2", + # "seltest", + # "seldeltaR", + # "selp", + # "selall", +] extralabel = {} extralabel['selNone'] = "Before selection" +# extralabel['sel1'] = "Exactly 3 Reconstructed Photons" +# extralabel['sel2'] = "Reco Photons #DeltaR < 0.5 or > 4.5" +# extralabel['sel1+2'] = "Exactly 3 Reconstructed Photons and Reco Photons #DeltaR < 0.5 or > 4.5" +# extralabel['sel0'] = "Selection: RecoPhotons_min_delta_r close to 0 and pi" #extralabel['sel0'] = "Selection: At least 1 ALP" #extralabel['sel1'] = "Selection: At least 1 ALP, at least 2 reco electrons" +# extralabel['seltest'] = "3 reco photons and second and third photons have the same direction px" +# extralabel['seldeltaR'] = "3 reco photons and reco photons min #DeltaR < 1" +# extralabel["selp"] = "3 reco photons and RecoPhoton0 momentum > 44" +# extralabel["selall"] = "all selections" colors = {} -colors['ALP_Z_aa_1GeV_cYY_0p5'] = ROOT.kRed -#colors['Zee'] = ROOT.kGray+2 +# colors['ALP_Z_aa_0.316.GeV_cYY_0.00006'] = ROOT.kRed +# colors['ALP_Z_aa_0.316.GeV_cYY_0.0006'] = ROOT.kGreen +# colors['ALP_Z_aa_0.316.GeV_cYY_0.006'] = ROOT.kBlue +# colors['ALP_Z_aa_0.316.GeV_cYY_0.06'] = ROOT.kViolet +# colors['ALP_Z_aa_0.316.GeV_cYY_0.6'] = ROOT.kCyan + +# colors['ALP_Z_aa_1GeV_cYY_0p5'] = ROOT.kRed + +# colors['ALP_Z_aa_0.1GeV_cYY_0.1'] = ROOT.kRed +# colors['ALP_Z_aa_0.2GeV_cYY_0.1'] = ROOT.kGreen +# colors['ALP_Z_aa_0.135GeV_cYY_0.1'] = ROOT.kCyan +# colors['ALP_Z_aa_0.3GeV_cYY_0.1'] = ROOT.kGray + +# colors['ALP_Z_aa_1.GeV_cYY_0.1'] = ROOT.kMagenta +# colors['ALP_Z_aa_1.GeV_cYY_0.3'] = ROOT.kViolet +# colors['ALP_Z_aa_1.GeV_cYY_0.5'] = ROOT.kCyan +# colors['ALP_Z_aa_1.GeV_cYY_0.7'] = ROOT.kAzure +# colors['ALP_Z_aa_1.GeV_cYY_0.9'] = ROOT.kCyan + +# colors['ALP_Z_aa_0.5.GeV_cYY_0.6'] = ROOT.kRed +# colors['ALP_Z_aa_0.5.GeV_cYY_1.2'] = ROOT.kBlue + +# colors['ALP_Z_aa_1.GeV_cYY_0.6'] = ROOT.kRed +# colors['ALP_Z_aa_1.GeV_cYY_0.8'] = ROOT.kGreen +# colors['ALP_Z_aa_1.GeV_cYY_1.0'] = ROOT.kBlue +# colors['ALP_Z_aa_1.GeV_cYY_1.2'] = ROOT.kViolet +# colors['ALP_Z_aa_1.GeV_cYY_1.4'] = ROOT.kCyan + +# colors['ALP_Z_aa_0.5.GeV_cYY_1.0'] = ROOT.kRed +# colors['ALP_Z_aa_1.GeV_cYY_1.0'] = ROOT.kGreen +# colors['ALP_Z_aa_1.5.GeV_cYY_1.0'] = ROOT.kBlue +# colors['ALP_Z_aa_2.GeV_cYY_1.0'] = ROOT.kBlue +# colors['ALP_Z_aa_3.GeV_cYY_1.0'] = ROOT.kViolet +# colors['ALP_Z_aa_4.GeV_cYY_1.0'] = ROOT.kViolet +# colors['ALP_Z_aa_5.GeV_cYY_1.0'] = ROOT.kCyan +# colors['ALP_Z_aa_8.GeV_cYY_1.0'] = ROOT.kCyan + +colors['ALP_Z_aa_0.6.GeV_cYY_1.0'] = ROOT.kOrange +colors['ALP_Z_aa_0.8.GeV_cYY_1.0'] = ROOT.kAzure +colors['ALP_Z_aa_1.GeV_cYY_1.0'] = ROOT.kCyan +colors['ALP_Z_aa_1.2.GeV_cYY_1.0'] = ROOT.kGreen +colors['ALP_Z_aa_1.4.GeV_cYY_1.0'] = ROOT.kMagenta + +# colors['ALP_Z_aa_3.GeV_cYY_0.1'] = ROOT.kRed +# colors['ALP_Z_aa_3.GeV_cYY_0.3'] = ROOT.kBlue +# colors['ALP_Z_aa_3.GeV_cYY_0.5'] = ROOT.kYellow +# colors['ALP_Z_aa_3.GeV_cYY_0.7'] = ROOT.kMagenta +# colors['ALP_Z_aa_3.GeV_cYY_0.9'] = ROOT.kRed + +# colors['ALP_Z_aa_5.GeV_cYY_0.1'] = ROOT.kGray +# colors['ALP_Z_aa_5.GeV_cYY_0.3'] = ROOT.kBlack +# colors['ALP_Z_aa_5.GeV_cYY_0.5'] = ROOT.kViolet +# colors['ALP_Z_aa_5.GeV_cYY_0.7'] = ROOT.kGreen +# colors['ALP_Z_aa_5.GeV_cYY_0.9'] = ROOT.kCyan + +# colors['ALP_Z_aa_0.5GeV_cYY_0.5'] = ROOT.kYellow +# colors['ALP_Z_aa_0.7GeV_cYY_0.5'] = ROOT.kOrange +# colors['ALP_Z_aa_1.GeV_cYY_0.5'] = ROOT.kRed +# colors['ALP_Z_aa_3.GeV_cYY_0.5'] = ROOT.kBlue +# colors['ALP_Z_aa_5.GeV_cYY_0.5'] = ROOT.kGreen +# colors['ALP_Z_aa_7.GeV_cYY_0.5'] = ROOT.kCyan +# colors['ALP_Z_aa_10.GeV_cYY_0.5'] = ROOT.kCyan +# colors['ALP_Z_aa_15.GeV_cYY_0.5'] = ROOT.kAzure +# colors['ALP_Z_aa_20.GeV_cYY_0.5'] = ROOT.kCyan +# colors['ALP_Z_aa_25.GeV_cYY_0.5'] = ROOT.kTeal +# colors['ALP_Z_aa_30.GeV_cYY_0.5'] = ROOT.kGreen + +# colors['ee_Z_ALPga_gagaga'] = ROOT.kRed + +# colors['p8_ee_Zee_ecm91'] = ROOT.kBlue +# colors['ee_gaga_1million'] = ROOT.kBlue +# colors['test1'] = ROOT.kBlue +# colors['test4'] = ROOT.kCyan +# colors['ee_gammagamma'] = ROOT.kGreen +# colors['ee_gaga_test'] = ROOT.kBlue +# colors['ee_aa'] = ROOT.kGreen +# colors['ee_aaa'] = ROOT.kYellow +# colors['ee_aaaa'] = ROOT.kCyan plots = {} plots['ALP'] = {'signal':{ - 'ALP_Z_aa_1GeV_cYY_0p5':['ALP_Z_aa_1GeV_cYY_0p5'], -}, - 'backgrounds':{}, - #'Zee':['p8_ee_Zee_ecm91'], + # 'ALP_Z_aa_0.316.GeV_cYY_0.00006':['ALP_Z_aa_0.316.GeV_cYY_0.00006'], + # 'ALP_Z_aa_0.316.GeV_cYY_0.0006':['ALP_Z_aa_0.316.GeV_cYY_0.0006'], + # 'ALP_Z_aa_0.316.GeV_cYY_0.006':['ALP_Z_aa_0.316.GeV_cYY_0.006'], + # 'ALP_Z_aa_0.316.GeV_cYY_0.06':['ALP_Z_aa_0.316.GeV_cYY_0.06'], + # 'ALP_Z_aa_0.316.GeV_cYY_0.6':['ALP_Z_aa_0.316.GeV_cYY_0.6'], + + # 'ALP_Z_aa_1GeV_cYY_0p5':['ALP_Z_aa_1GeV_cYY_0p5'], + + # 'ALP_Z_aa_0.1GeV_cYY_0.1':['ALP_Z_aa_0.1GeV_cYY_0.1'], + # 'ALP_Z_aa_0.2GeV_cYY_0.1':['ALP_Z_aa_0.2GeV_cYY_0.1'], + # 'ALP_Z_aa_0.135GeV_cYY_0.1':['ALP_Z_aa_0.135GeV_cYY_0.1'], + # 'ALP_Z_aa_0.3GeV_cYY_0.1':['ALP_Z_aa_0.3GeV_cYY_0.1'], + + # 'ALP_Z_aa_1.GeV_cYY_0.1':['ALP_Z_aa_1.GeV_cYY_0.1'], + # 'ALP_Z_aa_1.GeV_cYY_0.3':['ALP_Z_aa_1.GeV_cYY_0.3'], + # 'ALP_Z_aa_1.GeV_cYY_0.5':['ALP_Z_aa_1.GeV_cYY_0.5'], + # 'ALP_Z_aa_1.GeV_cYY_0.7':['ALP_Z_aa_1.GeV_cYY_0.7'], + # 'ALP_Z_aa_1.GeV_cYY_0.9':['ALP_Z_aa_1.GeV_cYY_0.9'], + + # 'ALP_Z_aa_0.5.GeV_cYY_0.6':['ALP_Z_aa_0.5.GeV_cYY_0.6'], + # 'ALP_Z_aa_0.5.GeV_cYY_1.2':['ALP_Z_aa_0.5.GeV_cYY_1.2'], + + # 'ALP_Z_aa_1.GeV_cYY_0.6':['ALP_Z_aa_1.GeV_cYY_0.6'], + # 'ALP_Z_aa_1.GeV_cYY_0.8':['ALP_Z_aa_1.GeV_cYY_0.8'], + # 'ALP_Z_aa_1.GeV_cYY_1.0':['ALP_Z_aa_1.GeV_cYY_1.0'], + # 'ALP_Z_aa_1.GeV_cYY_1.2':['ALP_Z_aa_1.GeV_cYY_1.2'], + # 'ALP_Z_aa_1.GeV_cYY_1.4':['ALP_Z_aa_1.GeV_cYY_1.4'], + + # 'ALP_Z_aa_0.5.GeV_cYY_1.0':['ALP_Z_aa_0.5.GeV_cYY_1.0'], + # 'ALP_Z_aa_1.GeV_cYY_1.0':['ALP_Z_aa_1.GeV_cYY_1.0'], + # 'ALP_Z_aa_1.5.GeV_cYY_1.0':['ALP_Z_aa_1.5.GeV_cYY_1.0'], + # 'ALP_Z_aa_2.GeV_cYY_1.0':['ALP_Z_aa_2.GeV_cYY_1.0'], + # 'ALP_Z_aa_3.GeV_cYY_1.0':['ALP_Z_aa_3.GeV_cYY_1.0'], + # 'ALP_Z_aa_4.GeV_cYY_1.0':['ALP_Z_aa_4.GeV_cYY_1.0'], + # 'ALP_Z_aa_5.GeV_cYY_1.0':['ALP_Z_aa_5.GeV_cYY_1.0'], + # 'ALP_Z_aa_8.GeV_cYY_1.0':['ALP_Z_aa_8.GeV_cYY_1.0'], + + 'ALP_Z_aa_0.6.GeV_cYY_1.0':['ALP_Z_aa_0.6.GeV_cYY_1.0'], + 'ALP_Z_aa_0.8.GeV_cYY_1.0':['ALP_Z_aa_0.8.GeV_cYY_1.0'], + 'ALP_Z_aa_1.GeV_cYY_1.0':['ALP_Z_aa_1.GeV_cYY_1.0'], + 'ALP_Z_aa_1.2.GeV_cYY_1.0':['ALP_Z_aa_1.2.GeV_cYY_1.0'], + 'ALP_Z_aa_1.4.GeV_cYY_1.0':['ALP_Z_aa_1.4.GeV_cYY_1.0'], + + # 'ALP_Z_aa_3.GeV_cYY_0.1':['ALP_Z_aa_3.GeV_cYY_0.1'], + # 'ALP_Z_aa_3.GeV_cYY_0.3':['ALP_Z_aa_3.GeV_cYY_0.3'], + # 'ALP_Z_aa_3.GeV_cYY_0.5':['ALP_Z_aa_3.GeV_cYY_0.5'], + # 'ALP_Z_aa_3.GeV_cYY_0.7':['ALP_Z_aa_3.GeV_cYY_0.7'], + # 'ALP_Z_aa_3.GeV_cYY_0.9':['ALP_Z_aa_3.GeV_cYY_0.9'], + + # 'ALP_Z_aa_5.GeV_cYY_0.1':['ALP_Z_aa_5.GeV_cYY_0.1'], + # 'ALP_Z_aa_5.GeV_cYY_0.3':['ALP_Z_aa_5.GeV_cYY_0.3'], + # 'ALP_Z_aa_5.GeV_cYY_0.5':['ALP_Z_aa_5.GeV_cYY_0.5'], + # 'ALP_Z_aa_5.GeV_cYY_0.7':['ALP_Z_aa_5.GeV_cYY_0.7'], + # 'ALP_Z_aa_5.GeV_cYY_0.9':['ALP_Z_aa_5.GeV_cYY_0.9'], + + # 'ALP_Z_aa_0.5GeV_cYY_0.5':['ALP_Z_aa_0.5GeV_cYY_0.5'], + # 'ALP_Z_aa_0.7GeV_cYY_0.5':['ALP_Z_aa_0.7GeV_cYY_0.5'], + # 'ALP_Z_aa_1.GeV_cYY_0.5':['ALP_Z_aa_1.GeV_cYY_0.5'], + # 'ALP_Z_aa_3.GeV_cYY_0.5':['ALP_Z_aa_3.GeV_cYY_0.5'], + # 'ALP_Z_aa_5.GeV_cYY_0.5':['ALP_Z_aa_5.GeV_cYY_0.5'], + # 'ALP_Z_aa_7.GeV_cYY_0.5':['ALP_Z_aa_7.GeV_cYY_0.5'], + # 'ALP_Z_aa_10.GeV_cYY_0.5':['ALP_Z_aa_10.GeV_cYY_0.5'], + # 'ALP_Z_aa_15.GeV_cYY_0.5':['ALP_Z_aa_15.GeV_cYY_0.5'], + # 'ALP_Z_aa_20.GeV_cYY_0.5':['ALP_Z_aa_20.GeV_cYY_0.5'], + # 'ALP_Z_aa_25.GeV_cYY_0.5':['ALP_Z_aa_25.GeV_cYY_0.5'], + # 'ALP_Z_aa_30.GeV_cYY_0.5':['ALP_Z_aa_30.GeV_cYY_0.5'], + + # 'ee_Z_ALPga_gagaga':['ee_Z_ALPga_gagaga'], + }, + 'backgrounds':{ + # 'p8_ee_Zee_ecm91':['p8_ee_Zee_ecm91'], + # 'ee_gaga_1million':['ee_gaga_1million'], + # 'test1':['test1'], + # 'test4':['test4'], + # 'ee_gammagamma':['ee_gammagamma'], + # 'ee_gaga_test':['ee_gaga_test'], + # 'ee_aa':['ee_aa'], + # 'ee_aaa':['ee_aaa'], + # 'ee_aaaa':['ee_aaaa'], + }, } legend = {} -legend['ALP_Z_aa_1GeV_cYY_0p5'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.5' -#legend['Zee'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' +# legend['ALP_Z_aa_0.316.GeV_cYY_0.00006'] = 'm_{ALP} = 0.316 GeV, c_{YY} = 0.00006' +# legend['ALP_Z_aa_0.316.GeV_cYY_0.0006'] = 'm_{ALP} = 0.316 GeV, c_{YY} = 0.0006' +# legend['ALP_Z_aa_0.316.GeV_cYY_0.006'] = 'm_{ALP} = 0.316 GeV, c_{YY} = 0.006' +# legend['ALP_Z_aa_0.316.GeV_cYY_0.06'] = 'm_{ALP} = 0.316 GeV, c_{YY} = 0.06' +# legend['ALP_Z_aa_0.316.GeV_cYY_0.6'] = 'm_{ALP} = 0.316 GeV, c_{YY} = 0.6' + +# legend['ALP_Z_aa_1GeV_cYY_0p5'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.5' + +# legend['ALP_Z_aa_0.1GeV_cYY_0.1'] = 'm_{ALP} = 0.1 GeV, c_{YY} = 0.1' +# legend['ALP_Z_aa_0.2GeV_cYY_0.1'] = 'm_{ALP} = 0.2 GeV, c_{YY} = 0.1' +# legend['ALP_Z_aa_0.135GeV_cYY_0.1'] = 'm_{ALP} = 0.135 GeV, c_{YY} = 0.1' +# legend['ALP_Z_aa_0.3GeV_cYY_0.1'] = 'm_{ALP} = 0.3 GeV, c_{YY} = 0.1' + +# legend['ALP_Z_aa_1.GeV_cYY_0.1'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.1' +# legend['ALP_Z_aa_1.GeV_cYY_0.3'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.3' +# legend['ALP_Z_aa_1.GeV_cYY_0.5'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_1.GeV_cYY_0.7'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.7' +# legend['ALP_Z_aa_1.GeV_cYY_0.9'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.9' + +# legend['ALP_Z_aa_0.5.GeV_cYY_0.6'] = 'm_{ALP} = 0.5 GeV, c_{#gamma#gamma} = 0.6' +# legend['ALP_Z_aa_0.5.GeV_cYY_1.2'] = 'm_{ALP} = 0.5 GeV, c_{#gamma#gamma} = 1.2' + +# legend['ALP_Z_aa_1.GeV_cYY_0.6'] = 'm_{ALP} = 1 GeV, c_{#gamma#gamma} = 0.6' +# legend['ALP_Z_aa_1.GeV_cYY_0.8'] = 'm_{ALP} = 1 GeV, c_{#gamma#gamma} = 0.8' +# legend['ALP_Z_aa_1.GeV_cYY_1.0'] = 'm_{ALP} = 1 GeV, c_{#gamma#gamma} = 1.0' +# legend['ALP_Z_aa_1.GeV_cYY_1.2'] = 'm_{ALP} = 1 GeV, c_{#gamma#gamma} = 1.2' +# legend['ALP_Z_aa_1.GeV_cYY_1.4'] = 'm_{ALP} = 1 GeV, c_{#gamma#gamma} = 1.4' + +# legend['ALP_Z_aa_0.5.GeV_cYY_1.0'] = 'm_{ALP} = 0.5 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_1.GeV_cYY_1.0'] = 'm_{ALP} = 1 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_1.5.GeV_cYY_1.0'] = 'm_{ALP} = 1.5 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_2.GeV_cYY_1.0'] = 'm_{ALP} = 2 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_3.GeV_cYY_1.0'] = 'm_{ALP} = 3 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_4.GeV_cYY_1.0'] = 'm_{ALP} = 4 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_5.GeV_cYY_1.0'] = 'm_{ALP} = 5 GeV, c_{YY} = 1.0' +# legend['ALP_Z_aa_8.GeV_cYY_1.0'] = 'm_{ALP} = 8 GeV, c_{YY} = 1.0' + +legend['ALP_Z_aa_0.6.GeV_cYY_1.0'] = 'm_{ALP} = 0.6 GeV, c_{#gamma#gamma} = 1.0' +legend['ALP_Z_aa_0.8.GeV_cYY_1.0'] = 'm_{ALP} = 0.8 GeV, c_{#gamma#gamma} = 1.0' +legend['ALP_Z_aa_1.GeV_cYY_1.0'] = 'm_{ALP} = 1 GeV, c_{#gamma#gamma} = 1.0' +legend['ALP_Z_aa_1.2.GeV_cYY_1.0'] = 'm_{ALP} = 1.2 GeV, c_{#gamma#gamma} = 1.0' +legend['ALP_Z_aa_1.4.GeV_cYY_1.0'] = 'm_{ALP} = 1.4 GeV, c_{#gamma#gamma} = 1.0' + +# legend['ALP_Z_aa_3.GeV_cYY_0.1'] = 'm_{ALP} = 3 GeV, c_{YY} = 0.1' +# legend['ALP_Z_aa_3.GeV_cYY_0.3'] = 'm_{ALP} = 3 GeV, c_{YY} = 0.3' +# legend['ALP_Z_aa_3.GeV_cYY_0.5'] = 'm_{ALP} = 3 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_3.GeV_cYY_0.7'] = 'm_{ALP} = 3 GeV, c_{YY} = 0.7' +# legend['ALP_Z_aa_3.GeV_cYY_0.9'] = 'm_{ALP} = 3 GeV, c_{YY} = 0.9' + +# legend['ALP_Z_aa_5.GeV_cYY_0.1'] = 'm_{ALP} = 5 GeV, c_{YY} = 0.1' +# legend['ALP_Z_aa_5.GeV_cYY_0.3'] = 'm_{ALP} = 5 GeV, c_{YY} = 0.3' +# legend['ALP_Z_aa_5.GeV_cYY_0.5'] = 'm_{ALP} = 5 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_5.GeV_cYY_0.7'] = 'm_{ALP} = 5 GeV, c_{YY} = 0.7' +# legend['ALP_Z_aa_5.GeV_cYY_0.9'] = 'm_{ALP} = 5 GeV, c_{YY} = 0.9' + +# legend['ALP_Z_aa_0.5GeV_cYY_0.5'] = 'm_{ALP} = 0.5 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_0.7GeV_cYY_0.5'] = 'm_{ALP} = 0.7 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_1.GeV_cYY_0.5'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_3.GeV_cYY_0.5'] = 'm_{ALP} = 3 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_5.GeV_cYY_0.5'] = 'm_{ALP} = 5 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_7.GeV_cYY_0.5'] = 'm_{ALP} = 7 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_10.GeV_cYY_0.5'] = 'm_{ALP} = 10 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_15.GeV_cYY_0.5'] = 'm_{ALP} = 15 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_20.GeV_cYY_0.5'] = 'm_{ALP} = 20 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_25.GeV_cYY_0.5'] = 'm_{ALP} = 25 GeV, c_{YY} = 0.5' +# legend['ALP_Z_aa_30.GeV_cYY_0.5'] = 'm_{ALP} = 30 GeV, c_{YY} = 0.5' + +# legend['ee_Z_ALPga_gagaga'] = 'm_{ALP} = 1 GeV, c_{YY} = 0.5' + +# legend['p8_ee_Zee_ecm91'] = 'e^{+}e^{-} #rightarrow Z #rightarrow ee' +# legend['ee_gaga_1million'] = 'e^{+}e^{-} #rightarrow YY' +# legend['test1'] = 'e^{+}e^{-} #rightarrow YY' +# legend['test4'] = 'e^{+}e^{-} #rightarrow YYY' +# legend['ee_gammagamma'] = 'e^{+}e^{-} #rightarrow YY (spring2021)' +# legend['ee_gaga_test'] = 'e^{+}e^{-} #rightarrow YY' +# legend['ee_aa'] = 'e^{+}e^{-} #rightarrow #gamma#gamma' +# legend['ee_aaa'] = 'e^{+}e^{-} #rightarrow #gamma#gamma#gamma' +# legend['ee_aaaa'] = 'e^{+}e^{-} #rightarrow #gamma#gamma#gamma#gamma' diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py index aa1facab8f..8a0af3bc97 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py @@ -2,11 +2,44 @@ processList = { #centrally-produced backgrounds - #'p8_ee_Zee_ecm91':{'chunks':100}, + # 'p8_ee_Zee_ecm91':{'chunks':100}, + 'ee_gammagamma':{}, + # 'wzp6_gaga_ee_60_ecm240':{'chunks':100}, #privately-produced signals # 'ALP_Z_aa_1GeV_cYY_0p5':{}, - 'ALP_Z_aa_1.GeV_cYY_0.1':{}, + + # 'testing1':{}, + + # 'ALP_Z_aa_1.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.3':{}, + 'ALP_Z_aa_1.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_3.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_5.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_0.5GeV_cYY_0.5':{}, + # 'ALP_Z_aa_0.7GeV_cYY_0.5':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_7.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_15.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_20.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_25.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_30.GeV_cYY_0.5':{}, #test #'p8_ee_Zee_ecm91':{'fraction':0.000001}, @@ -20,11 +53,15 @@ #Input directory #Comment out when running over centrally produced events #Mandatory when running over privately produced events -inputDir = "./output_MadgraphPythiaDelphes" - +# inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_MadgraphPythiaDelphes/" +# inputDir = "./root_files_for_input/" +# inputDir = "/eos/experiment/fcc/ee/generation/DelphesEvents/winter2023/IDEA/wzp6_gaga_ee_60_ecm240/" +# inputDir = "./ALP_sample_creation/" +inputDir = "/eos/experiment/fcc/ee/analyses_storage/BSM/LLPs/ALPs_3photons/ALP_sample_creation/" #Optional: output directory, default is local dir -outputDir = "./output_stage1" +outputDir = "./stage1_mine_vs_spring2021/" +# outputDir = "./stage1_FSGenALP/" #outputDir = "/eos/user/j/jalimena/FCCeeLLP/" #outputDir = "output_stage1/" @@ -71,6 +108,7 @@ def analysers(df): .Define("GenALP_decay", "MCParticle::get_list_of_particles_from_decay(0, GenALP_PID, Particle1)") .Define("All_n_GenALP", "MCParticle::get_n(GenALP_PID)") + .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") @@ -174,24 +212,24 @@ def analysers(df): # Separating the three first final state photons # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots - # .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") - # .Define("FSGenPhoton1_e", "if (n_FSGenPhoton > 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_e", "if (n_FSGenPhoton > 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") - # .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") - # .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") - # .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") - # .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") - # .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") - # .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") - # .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") + .Define("FSGenPhoton1_e", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_e", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") + .Define("FSGenPhoton1_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_p", "if (n_FSGenPhoton > 2) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") + .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") + .Define("FSGenPhoton1_px", "if (n_FSGenPhoton > 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_px", "if (n_FSGenPhoton > 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") + .Define("FSGenPhoton1_py", "if (n_FSGenPhoton > 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_py", "if (n_FSGenPhoton > 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") + .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton > 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton > 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") # aa invariant mass - for all three combinations of the three first FS photons # returns -2 for events with only 1 number of photons @@ -230,6 +268,24 @@ def analysers(df): .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") + # Defining final state ALPs to get rid of duplicates + .Define("FSGenALP", "MCParticle::sel_genStatus(1)(GenALP_PID)") + + .Define("n_FSGenALP", "MCParticle::get_n( FSGenALP )") + + # Kinematics of final state ALP (attempt Merlin) + .Define("FSGenALP_mass", "MCParticle::get_mass( FSGenALP )") + .Define("FSGenALP_e", "MCParticle::get_e( FSGenALP )") + .Define("FSGenALP_p", "MCParticle::get_p( FSGenALP )") + .Define("FSGenALP_pt", "MCParticle::get_pt( FSGenALP )") + .Define("FSGenALP_px", "MCParticle::get_px( FSGenALP )") + .Define("FSGenALP_py", "MCParticle::get_py( FSGenALP )") + .Define("FSGenALP_pz", "MCParticle::get_pz( FSGenALP )") + .Define("FSGenALP_eta", "MCParticle::get_eta( FSGenALP )") + .Define("FSGenALP_theta", "MCParticle::get_theta( FSGenALP )") + .Define("FSGenALP_phi", "MCParticle::get_phi( FSGenALP )") + .Define("FSGenALP_genStatus", "MCParticle::get_genStatus( FSGenALP )") + # Kinematics of the mother particle ALP .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") .Define("GenALP_e", "MCParticle::get_e( GenALP )") @@ -243,7 +299,17 @@ def analysers(df): .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") + .Define("n_GenALP", "MCParticle::get_n( GenALP )") + .Define("GenALP_time", "MCParticle::get_time( GenALP )") + .Define("GenALP_pdg", "MCParticle::get_pdg( GenALP )") + .Define("GenALP_endPoint_x", "MCParticle::get_endPoint_x") + + # .Define("GenALP_deltaR", "return sqrt(GenALP_eta*GenALP_eta + GenALP_phi*GenALP_phi)") + # Finding the kinematics of each of these daughters + .Define("n_GenALPPhoton1", "MCParticle::get_n( GenALPPhoton1 )") + .Define("n_GenALPPhoton2", "MCParticle::get_n( GenALPPhoton2 )") + .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") @@ -265,6 +331,20 @@ def analysers(df): .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") + .Define("GenALPPhotons_deltaEta", "return abs(GenALPPhoton1_eta - GenALPPhoton2_eta)") + .Define("GenALPPhotons_deltaPhi", "return abs(GenALPPhoton1_phi - GenALPPhoton2_phi)") + .Define("GenALPPhotons_deltaR", "return sqrt(GenALPPhotons_deltaEta*GenALPPhotons_deltaEta + GenALPPhotons_deltaPhi*GenALPPhotons_deltaPhi)") + + .Define("GenALPPhotons_deltaR_2", "MCParticle::get_ALP_delta_r(GenALPPhoton1, GenALPPhoton2)") + .Define("FSGenPhotons_delta_r", "MCParticle::get_delta_r(FSGenPhoton)") + + .Define("GenALPPhoton1_time", "MCParticle::get_time( GenALPPhoton1 )") + .Define("GenALPPhoton2_time", "MCParticle::get_time( GenALPPhoton2 )") + + # .Define("GenALPPhoton1_deltaR", "return sqrt(GenALPPhoton1_eta*GenALPPhoton1_eta + GenALPPhoton1_phi*GenALPPhoton1_phi)") + # .Define("GenALPPhoton2_deltaR", "return sqrt(GenALPPhoton2_eta*GenALPPhoton2_eta + GenALPPhoton2_phi*GenALPPhoton2_phi)") + + # Finding the production vertex of the daughters (checking GenALPPhoton1 here) .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") @@ -281,6 +361,10 @@ def analysers(df): .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) + .Define("GenALP_observed_lifetime_xyz", "return ((GenALP_p / GenALP_mass) * GenALP_lifetime_xyz)") + + .Define("GenALPPhoton1_time_minus_GenALP_time", "return (GenALPPhoton1_time - GenALP_time)") + # Finding the production vertex of the ALP which should be at (0,0,0) .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") @@ -343,6 +427,15 @@ def analysers(df): .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") + + .Define("RecoALPPhotons_deltaEta", "return abs(RecoALPPhoton1_eta - RecoALPPhoton2_eta)") + .Define("RecoALPPhotons_deltaPhi", "return abs(RecoALPPhoton1_phi - RecoALPPhoton2_phi)") + .Define("RecoALPPhotons_deltaR", "return sqrt(RecoALPPhotons_deltaEta*RecoALPPhotons_deltaEta + RecoALPPhotons_deltaPhi*RecoALPPhotons_deltaPhi)") + + .Define("n_RecoALPPhoton1", "ReconstructedParticle::get_n( RecoALPPhoton1 )") + .Define("n_RecoALPPhoton2", "ReconstructedParticle::get_n( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_time", "ReconstructedParticle::get_time( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_time", "ReconstructedParticle::get_time( RecoALPPhoton2 )") # add dxy, dz, dxyz, and uncertainties # aa invariant mass @@ -443,6 +536,17 @@ def analysers(df): .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") + .Define("RecoPhotons_delta_eta", "ReconstructedParticle::get_delta_eta(RecoPhotons)") + .Define("RecoPhotons_delta_phi", "ReconstructedParticle::get_delta_phi(RecoPhotons)") + .Define("RecoPhotons_delta_r", "ReconstructedParticle::get_delta_r(RecoPhotons)") + + .Define("RecoPhotons_ALP_delta_r", "ReconstructedParticle::get_ALP_delta_r(RecoALPPhoton1, RecoALPPhoton2)") + .Define("RecoPhotons_ALP_delta_phi", "ReconstructedParticle::get_ALP_delta_phi(RecoALPPhoton1, RecoALPPhoton2)") + .Define("RecoPhotons_ALP_delta_eta", "ReconstructedParticle::get_ALP_delta_eta(RecoALPPhoton1, RecoALPPhoton2)") + + .Define("RecoPhoton_y", "ReconstructedParticle::get_y(RecoPhotons)") + # .Define("RecoPhoton_time", "ReconstructedParticle::get_time(RecoPhotons)") + .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") @@ -485,54 +589,54 @@ def output(): "AllGenALP_phi", "AllGenALP_genStatus", "n_FSGenElectron", - "FSGenElectron_e", - "FSGenElectron_p", - "FSGenElectron_pt", - "FSGenElectron_px", - "FSGenElectron_py", - "FSGenElectron_pz", - "FSGenElectron_eta", - "FSGenElectron_theta", - "FSGenElectron_phi", + # "FSGenElectron_e", + # "FSGenElectron_p", + # "FSGenElectron_pt", + # "FSGenElectron_px", + # "FSGenElectron_py", + # "FSGenElectron_pz", + # "FSGenElectron_eta", + # "FSGenElectron_theta", + # "FSGenElectron_phi", "FSGenPhoton_vertex_x", "FSGenPhoton_vertex_y", "FSGenPhoton_vertex_z", - # "n_FSGenElectron_forFS2GenPhotons", - # "n_FSGenPositron_forFS2GenPhotons", - "FSGen_Lxy", - "FSGen_Lxyz", - "FSGen_lifetime_xy", - "FSGen_lifetime_xyz", - "n_FSGenPositron", - "FSGenPositron_e", - "FSGenPositron_p", - "FSGenPositron_pt", - "FSGenPositron_px", - "FSGenPositron_py", - "FSGenPositron_pz", - "FSGenPositron_eta", - "FSGenPositron_theta", - "FSGenPositron_phi", - "n_FSGenNeutrino", - "FSGenNeutrino_e", - "FSGenNeutrino_p", - "FSGenNeutrino_pt", - "FSGenNeutrino_px", - "FSGenNeutrino_py", - "FSGenNeutrino_pz", - "FSGenNeutrino_eta", - "FSGenNeutrino_theta", - "FSGenNeutrino_phi", - "n_FSGenAntiNeutrino", - "FSGenAntiNeutrino_e", - "FSGenAntiNeutrino_p", - "FSGenAntiNeutrino_pt", - "FSGenAntiNeutrino_px", - "FSGenAntiNeutrino_py", - "FSGenAntiNeutrino_pz", - "FSGenAntiNeutrino_eta", - "FSGenAntiNeutrino_theta", - "FSGenAntiNeutrino_phi", + # # "n_FSGenElectron_forFS2GenPhotons", + # # "n_FSGenPositron_forFS2GenPhotons", + # "FSGen_Lxy", + # "FSGen_Lxyz", + # "FSGen_lifetime_xy", + # "FSGen_lifetime_xyz", + # "n_FSGenPositron", + # "FSGenPositron_e", + # "FSGenPositron_p", + # "FSGenPositron_pt", + # "FSGenPositron_px", + # "FSGenPositron_py", + # "FSGenPositron_pz", + # "FSGenPositron_eta", + # "FSGenPositron_theta", + # "FSGenPositron_phi", + # "n_FSGenNeutrino", + # "FSGenNeutrino_e", + # "FSGenNeutrino_p", + # "FSGenNeutrino_pt", + # "FSGenNeutrino_px", + # "FSGenNeutrino_py", + # "FSGenNeutrino_pz", + # "FSGenNeutrino_eta", + # "FSGenNeutrino_theta", + # "FSGenNeutrino_phi", + # "n_FSGenAntiNeutrino", + # "FSGenAntiNeutrino_e", + # "FSGenAntiNeutrino_p", + # "FSGenAntiNeutrino_pt", + # "FSGenAntiNeutrino_px", + # "FSGenAntiNeutrino_py", + # "FSGenAntiNeutrino_pz", + # "FSGenAntiNeutrino_eta", + # "FSGenAntiNeutrino_theta", + # "FSGenAntiNeutrino_phi", "n_FSGenPhoton", "FSGenPhoton_e", "FSGenPhoton_p", @@ -543,15 +647,25 @@ def output(): "FSGenPhoton_eta", "FSGenPhoton_theta", "FSGenPhoton_phi", - # "FSGenPhoton0_e", - # "FSGenPhoton1_e", - # "FSGenPhoton2_e", - # "FSGenPhoton0_p", - # "FSGenPhoton1_p", - # "FSGenPhoton2_p", - # "FSGenPhoton0_pt", - # "FSGenPhoton1_pt", - # "FSGenPhoton2_pt", + "FSGenPhoton0_e", + "FSGenPhoton1_e", + "FSGenPhoton2_e", + "FSGenPhoton0_p", + "FSGenPhoton1_p", + "FSGenPhoton2_p", + "FSGenPhoton0_pt", + "FSGenPhoton1_pt", + "FSGenPhoton2_pt", + "FSGenPhoton0_px", + "FSGenPhoton1_px", + "FSGenPhoton2_px", + "FSGenPhoton0_py", + "FSGenPhoton1_py", + "FSGenPhoton2_py", + "FSGenPhoton0_pz", + "FSGenPhoton1_pz", + "FSGenPhoton2_pz", + # "FSGen_a0a1_invMass", # "FSGen_a0a2_invMass", # "FSGen_a1a2_invMass", @@ -561,6 +675,7 @@ def output(): "GenALP_vertex_z", "GenALP_aa_invMass", "GenALP_mass", + "GenALP_e", "GenALP_p", "GenALP_pt", "GenALP_pz", @@ -568,6 +683,42 @@ def output(): "GenALP_theta", "GenALP_phi", "GenALP_genStatus", + + # "GenALP_deltaR", + "GenALPPhotons_deltaEta", + "GenALPPhotons_deltaPhi", + "GenALPPhotons_deltaR", + + "GenALPPhotons_deltaR_2", + "FSGenPhotons_delta_r", + + "GenALPPhoton1_time", + "GenALPPhoton2_time", + + "GenALP_observed_lifetime_xyz", + + "GenALPPhoton1_time_minus_GenALP_time", + + "n_GenALP", + "GenALP_time", + "GenALP_pdg", + # "GenALP_endPoint_x", + + "n_FSGenALP", + "FSGenALP_mass", + "FSGenALP_p", + "FSGenALP_pt", + "FSGenALP_pz", + "FSGenALP_eta", + "FSGenALP_theta", + "FSGenALP_phi", + "FSGenALP_genStatus", + + "n_GenALPPhoton1", + "n_GenALPPhoton2", + # "GenALPPhoton1_deltaR", + # "GenALPPhoton2_deltaR", + "GenALPPhoton1_e", "GenALPPhoton2_e", "GenALPPhoton1_p", @@ -625,25 +776,34 @@ def output(): "RecoALPPhoton2_phi", "RecoALPPhoton1_charge", "RecoALPPhoton2_charge", - "RecoALP_aa_invMass", + + "n_RecoALPPhoton1", + "n_RecoALPPhoton2", + # "RecoALPPhoton1_time", + # "RecoALPPhoton2_time", + "RecoALPPhotons_deltaEta", + "RecoALPPhotons_deltaPhi", + "RecoALPPhotons_deltaR", + + # "RecoALP_aa_invMass", "GenMinusRecoALPPhoton1_e", "GenMinusRecoALPPhoton2_e", - "GenMinusRecoALPPhoton1_p", - "GenMinusRecoALPPhoton2_p", - "GenMinusRecoALPPhoton1_pt", - "GenMinusRecoALPPhoton2_pt", - "GenMinusRecoALPPhoton1_px", - "GenMinusRecoALPPhoton2_px", - "GenMinusRecoALPPhoton1_py", - "GenMinusRecoALPPhoton2_py", - "GenMinusRecoALPPhoton1_pz", - "GenMinusRecoALPPhoton2_pz", - "GenMinusRecoALPPhoton1_eta", - "GenMinusRecoALPPhoton2_eta", - "GenMinusRecoALPPhoton1_theta", - "GenMinusRecoALPPhoton2_theta", - "GenMinusRecoALPPhoton1_phi", - "GenMinusRecoALPPhoton2_phi", + # "GenMinusRecoALPPhoton1_p", + # "GenMinusRecoALPPhoton2_p", + # "GenMinusRecoALPPhoton1_pt", + # "GenMinusRecoALPPhoton2_pt", + # "GenMinusRecoALPPhoton1_px", + # "GenMinusRecoALPPhoton2_px", + # "GenMinusRecoALPPhoton1_py", + # "GenMinusRecoALPPhoton2_py", + # "GenMinusRecoALPPhoton1_pz", + # "GenMinusRecoALPPhoton2_pz", + # "GenMinusRecoALPPhoton1_eta", + # "GenMinusRecoALPPhoton2_eta", + # "GenMinusRecoALPPhoton1_theta", + # "GenMinusRecoALPPhoton2_theta", + # "GenMinusRecoALPPhoton1_phi", + # "GenMinusRecoALPPhoton2_phi", "GenMinusRecoALP_DecayVertex_x", "GenMinusRecoALP_DecayVertex_y", "GenMinusRecoALP_DecayVertex_z", @@ -651,16 +811,16 @@ def output(): "n_RecoPhotons", "n_RecoElectrons", "n_RecoMuons", - "RecoJet_e", - "RecoJet_p", - "RecoJet_pt", - "RecoJet_px", - "RecoJet_py", - "RecoJet_pz", - "RecoJet_eta", - "RecoJet_theta", - "RecoJet_phi", - "RecoJet_charge", + # "RecoJet_e", + # "RecoJet_p", + # "RecoJet_pt", + # "RecoJet_px", + # "RecoJet_py", + # "RecoJet_pz", + # "RecoJet_eta", + # "RecoJet_theta", + # "RecoJet_phi", + # "RecoJet_charge", "RecoPhoton_e", "RecoPhoton_p", "RecoPhoton_pt", @@ -671,26 +831,37 @@ def output(): "RecoPhoton_theta", "RecoPhoton_phi", "RecoPhoton_charge", - "RecoElectron_e", - "RecoElectron_p", - "RecoElectron_pt", - "RecoElectron_px", - "RecoElectron_py", - "RecoElectron_pz", - "RecoElectron_eta", - "RecoElectron_theta", - "RecoElectron_phi", - "RecoElectron_charge", - "RecoMuon_e", - "RecoMuon_p", - "RecoMuon_pt", - "RecoMuon_px", - "RecoMuon_py", - "RecoMuon_pz", - "RecoMuon_eta", - "RecoMuon_theta", - "RecoMuon_phi", - "RecoMuon_charge", + + "RecoPhotons_delta_eta", + "RecoPhotons_delta_phi", + "RecoPhotons_delta_r", + + "RecoPhotons_ALP_delta_r", + "RecoPhotons_ALP_delta_phi", + "RecoPhotons_ALP_delta_eta", + + "RecoPhoton_y", + # "RecoPhoton_time", + # "RecoElectron_e", + # "RecoElectron_p", + # "RecoElectron_pt", + # "RecoElectron_px", + # "RecoElectron_py", + # "RecoElectron_pz", + # "RecoElectron_eta", + # "RecoElectron_theta", + # "RecoElectron_phi", + # "RecoElectron_charge", + # "RecoMuon_e", + # "RecoMuon_p", + # "RecoMuon_pt", + # "RecoMuon_px", + # "RecoMuon_py", + # "RecoMuon_pz", + # "RecoMuon_eta", + # "RecoMuon_theta", + # "RecoMuon_phi", + # "RecoMuon_charge", "RecoMissingEnergy_e", "RecoMissingEnergy_p", "RecoMissingEnergy_pt", diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py new file mode 100644 index 0000000000..599218e79b --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py @@ -0,0 +1,1087 @@ +#Mandatory: List of processes +processList = { + + #centrally-produced backgrounds + # 'p8_ee_Zee_ecm91':{'chunks':100}, + # 'wzp6_gaga_ee_60_ecm240':{'chunks':100}, + # 'ee_gaga_1million':{}, + # 'test1':{}, + # 'test2':{}, + # 'test3':{}, + # 'test4':{}, + # 'ee_gaga_test':{}, + # 'ee_aa':{}, + # 'ee_aaa':{}, + # 'ee_aaaa':{}, + + #privately-produced signals + + # 'ALP_Z_aa_0.01.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.01.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.0316.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.1.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_0.316.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_1.0.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.0000019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.000006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_3.16.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0000006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0000019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.000006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0000006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0000019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.000006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.000019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.00006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.00019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.0019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.006':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.019':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.06':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.19':{}, + # 'ALP_Z_aa_31.6.GeV_cYY_0.6':{}, + + # 'ee_Z_ALPga_gagaga':{}, + + # 'ALP_Z_aa_1GeV_cYY_0p5':{}, + + # 'ALP_Z_aa_0.1GeV_cYY_0.1':{}, + # 'ALP_Z_aa_0.2GeV_cYY_0.1':{}, + # 'ALP_Z_aa_0.135GeV_cYY_0.1':{}, + # 'ALP_Z_aa_0.3GeV_cYY_0.1':{}, + + # 'ALP_Z_aa_1.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_0.5.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_0.5.GeV_cYY_1.2':{}, + + # 'ALP_Z_aa_1.GeV_cYY_0.6':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.8':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.2':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.4':{}, + + # 'ALP_Z_aa_0.5.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.5.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_2.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_2.1.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_3.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_4.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_5.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_8.GeV_cYY_1.0':{}, + + # 'ALP_Z_aa_0.6.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_0.8.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.2.GeV_cYY_1.0':{}, + # 'ALP_Z_aa_1.4.GeV_cYY_1.0':{}, + + # 'ALP_Z_aa_2.GeV_cYY_1.0_take3':{}, + + # 'ALP_Z_aa_3.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_5.GeV_cYY_0.1':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.3':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.7':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.9':{}, + + # 'ALP_Z_aa_0.5GeV_cYY_0.5':{}, + # 'ALP_Z_aa_0.7GeV_cYY_0.5':{}, + # 'ALP_Z_aa_1.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_3.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_5.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_7.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_10.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_15.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_20.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_25.GeV_cYY_0.5':{}, + # 'ALP_Z_aa_30.GeV_cYY_0.5':{}, + + #test + #'p8_ee_Zee_ecm91':{'fraction':0.000001}, +} + +#Production tag. This points to the yaml files for getting sample statistics +#Mandatory when running over EDM4Hep centrally produced events +#Comment out when running over privately produced events +#prodTag = "FCCee/winter2023/IDEA/" + +#Input directory +#Comment out when running over centrally produced events +#Mandatory when running over privately produced events +# inputDir = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_MadgraphPythiaDelphes/" +# inputDir = "./root_files_for_input/" +# inputDir = "./" +# inputDir = "/eos/experiment/fcc/ee/generation/DelphesEvents/winter2023/IDEA/wzp6_gaga_ee_60_ecm240/" +inputDir = "/eos/experiment/fcc/ee/analyses_storage/BSM/LLPs/ALPs_3photons/ALP_sample_creation/" + +#Optional: output directory, default is local dir +# outputDir = "./stage1_ee_gaga_1million/" +outputDir = "./stage1_sensitivity/" +# outputDir = "./stage1_FSGenALP/" +#outputDir = "/eos/user/j/jalimena/FCCeeLLP/" +#outputDir = "output_stage1/" + +#outputDirEos = "/eos/experiment/fcc/ee/analyses/case-studies/bsm/LLPs/ALPs_3photons/winter2023/output_stage1/" +#outputDirEos = "/eos/user/j/jalimena/FCCeeLLP/" +#eosType = "eosuser" + +#Optional: ncpus, default is 4 +nCPUS = 4 + +#Optional running on HTCondor, default is False +runBatch = False +#runBatch = True + +#Optional batch queue name when running on HTCondor, default is workday +batchQueue = "longlunch" + +#Optional computing account when running on HTCondor, default is group_u_FCC.local_gen +compGroup = "group_u_FCC.local_gen" + +#Mandatory: RDFanalysis class where the use defines the operations on the TTree +class RDFanalysis(): + def analysers(df): + + df2 = (df + + #Access the various objects and their properties with the following syntax: .Define("", "") + #This will create a column in the RDataFrame named and filled with the return value of the for the given collection/object + #Accessor functions are the functions found in the C++ analyzers code that return a certain variable, e.g. ::get_n(object) returns the number + #of these objects in the event and ::get_pt(object) returns the pt of the object. Here you can pick between two namespaces to access either + #reconstructed (namespace = ReconstructedParticle) or MC-level objects (namespace = MCParticle). + #For the name of the object, in principle the names of the EDM4HEP collections are used - photons, muons and electrons are an exception, see below + + #OVERVIEW: Accessing different objects and counting them + + # Following code is written specifically for the ALP study + #################################################################################################### + .Alias("Particle1", "_Particle_daughters.index") + .Alias("MCRecoAssociations0", "_MCRecoAssociations_rec.index") + .Alias("MCRecoAssociations1", "_MCRecoAssociations_sim.index") + + ##### Added branch for MCParticle; finding PID of the MC particle for ALP + .Define("GenALP_PID", "MCParticle::sel_pdgID(9000005, false)(Particle)") + .Define("GenALP_decay", "MCParticle::get_list_of_particles_from_decay(0, GenALP_PID, Particle1)") + + .Define("All_n_GenALP", "MCParticle::get_n(GenALP_PID)") + + .Define("AllGenALP_mass", "MCParticle::get_mass(GenALP_PID)") #finding the generator mass of the ALP through separate ALP branch + .Define("AllGenALP_e", "MCParticle::get_e(GenALP_PID)") + .Define("AllGenALP_p", "MCParticle::get_p(GenALP_PID)") + .Define("AllGenALP_pt", "MCParticle::get_pt(GenALP_PID)") #finding the pt of the ALP thorugh separate ALP branch + .Define("AllGenALP_px", "MCParticle::get_px(GenALP_PID)") + .Define("AllGenALP_py", "MCParticle::get_py(GenALP_PID)") + .Define("AllGenALP_pz", "MCParticle::get_pz(GenALP_PID)") + .Define("AllGenALP_eta", "MCParticle::get_eta(GenALP_PID)") + .Define("AllGenALP_theta", "MCParticle::get_theta(GenALP_PID)") + .Define("AllGenALP_phi", "MCParticle::get_phi(GenALP_PID)") + .Define("AllGenALP_genStatus", "MCParticle::get_genStatus(GenALP_PID)") + + #all final state gen electrons + .Define("GenElectron_PID", "MCParticle::sel_pdgID(11, false)(Particle)") #get MCParticle electrons, but not their charge conjugates + .Define("FSGenElectron", "MCParticle::sel_genStatus(1)(GenElectron_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenElectron", "MCParticle::get_n(FSGenElectron)") + .Define("FSGenElectron_e", "MCParticle::get_e(FSGenElectron)") + .Define("FSGenElectron_p", "MCParticle::get_p(FSGenElectron)") + .Define("FSGenElectron_pt", "MCParticle::get_pt(FSGenElectron)") + .Define("FSGenElectron_px", "MCParticle::get_px(FSGenElectron)") + .Define("FSGenElectron_py", "MCParticle::get_py(FSGenElectron)") + .Define("FSGenElectron_pz", "MCParticle::get_pz(FSGenElectron)") + .Define("FSGenElectron_eta", "MCParticle::get_eta(FSGenElectron)") + .Define("FSGenElectron_theta", "MCParticle::get_theta(FSGenElectron)") + .Define("FSGenElectron_phi", "MCParticle::get_phi(FSGenElectron)") + + #all final state gen positrons + .Define("GenPositron_PID", "MCParticle::sel_pdgID(-11, false)(Particle)") + .Define("FSGenPositron", "MCParticle::sel_genStatus(1)(GenPositron_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenPositron", "MCParticle::get_n(FSGenPositron)") + .Define("FSGenPositron_e", "MCParticle::get_e(FSGenPositron)") + .Define("FSGenPositron_p", "MCParticle::get_p(FSGenPositron)") + .Define("FSGenPositron_pt", "MCParticle::get_pt(FSGenPositron)") + .Define("FSGenPositron_px", "MCParticle::get_px(FSGenPositron)") + .Define("FSGenPositron_py", "MCParticle::get_py(FSGenPositron)") + .Define("FSGenPositron_pz", "MCParticle::get_pz(FSGenPositron)") + .Define("FSGenPositron_eta", "MCParticle::get_eta(FSGenPositron)") + .Define("FSGenPositron_theta", "MCParticle::get_theta(FSGenPositron)") + .Define("FSGenPositron_phi", "MCParticle::get_phi(FSGenPositron)") + + #all final state gen neutrinos + .Define("GenNeutrino_PID", "MCParticle::sel_pdgID(12, false)(Particle)") + .Define("FSGenNeutrino", "MCParticle::sel_genStatus(1)(GenNeutrino_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenNeutrino", "MCParticle::get_n(FSGenNeutrino)") + .Define("FSGenNeutrino_e", "MCParticle::get_e(FSGenNeutrino)") + .Define("FSGenNeutrino_p", "MCParticle::get_p(FSGenNeutrino)") + .Define("FSGenNeutrino_pt", "MCParticle::get_pt(FSGenNeutrino)") + .Define("FSGenNeutrino_px", "MCParticle::get_px(FSGenNeutrino)") + .Define("FSGenNeutrino_py", "MCParticle::get_py(FSGenNeutrino)") + .Define("FSGenNeutrino_pz", "MCParticle::get_pz(FSGenNeutrino)") + .Define("FSGenNeutrino_eta", "MCParticle::get_eta(FSGenNeutrino)") + .Define("FSGenNeutrino_theta", "MCParticle::get_theta(FSGenNeutrino)") + .Define("FSGenNeutrino_phi", "MCParticle::get_phi(FSGenNeutrino)") + + #all final state gen anti-neutrinos + .Define("GenAntiNeutrino_PID", "MCParticle::sel_pdgID(-12, false)(Particle)") + .Define("FSGenAntiNeutrino", "MCParticle::sel_genStatus(1)(GenAntiNeutrino_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenAntiNeutrino", "MCParticle::get_n(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_e", "MCParticle::get_e(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_p", "MCParticle::get_p(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_pt", "MCParticle::get_pt(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_px", "MCParticle::get_px(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_py", "MCParticle::get_py(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_pz", "MCParticle::get_pz(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_eta", "MCParticle::get_eta(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_theta", "MCParticle::get_theta(FSGenAntiNeutrino)") + .Define("FSGenAntiNeutrino_phi", "MCParticle::get_phi(FSGenAntiNeutrino)") + + #all final state gen photons + .Define("GenPhoton_PID", "MCParticle::sel_pdgID(22, false)(Particle)") + .Define("FSGenPhoton", "MCParticle::sel_genStatus(1)(GenPhoton_PID)") #gen status==1 means final state particle (FS) + .Define("n_FSGenPhoton", "MCParticle::get_n(FSGenPhoton)") + .Define("FSGenPhoton_e", "MCParticle::get_e(FSGenPhoton)") + .Define("FSGenPhoton_p", "MCParticle::get_p(FSGenPhoton)") + .Define("FSGenPhoton_pt", "MCParticle::get_pt(FSGenPhoton)") + .Define("FSGenPhoton_px", "MCParticle::get_px(FSGenPhoton)") + .Define("FSGenPhoton_py", "MCParticle::get_py(FSGenPhoton)") + .Define("FSGenPhoton_pz", "MCParticle::get_pz(FSGenPhoton)") + .Define("FSGenPhoton_eta", "MCParticle::get_eta(FSGenPhoton)") + .Define("FSGenPhoton_theta", "MCParticle::get_theta(FSGenPhoton)") + .Define("FSGenPhoton_phi", "MCParticle::get_phi(FSGenPhoton)") + + # Number of final state electrons and positrons when the number of final state photons is only 2 + # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + # .Define("n_FSGenElectron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenElectron); } else {return (-2); }") + # .Define("n_FSGenPositron_forFS2GenPhotons", "if (n_FSGenPhoton == 2) {return (n_FSGenPositron); } else {return (-2); }") + + .Define("FSGenPhoton_vertex_x", "MCParticle::get_vertex_x( FSGenPhoton )") + .Define("FSGenPhoton_vertex_y", "MCParticle::get_vertex_y( FSGenPhoton )") + .Define("FSGenPhoton_vertex_z", "MCParticle::get_vertex_z( FSGenPhoton )") + + # Finding the Lxy of the ALP + # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + .Define("FSGen_Lxy", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y)") + .Define("FSGen_Lxyz", "return sqrt(FSGenPhoton_vertex_x*FSGenPhoton_vertex_x + FSGenPhoton_vertex_y*FSGenPhoton_vertex_y + FSGenPhoton_vertex_z*FSGenPhoton_vertex_z)") + + # Calculating the lifetime of the ALP + # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + .Define("FSGen_lifetime_xy", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_pt * 3E8 * 1000))" ) + .Define("FSGen_lifetime_xyz", "return ( FSGen_Lxy.at(0) * AllGenALP_mass / (AllGenALP_p * 3E8 * 1000))" ) + + # Separating the three first final state photons + # Returns -2 if the number of final state photons != 2, and therefore will be shown as -2 in the plots + .Define("FSGenPhoton0_e", "return FSGenPhoton_e.at(0)") + .Define("FSGenPhoton1_e", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_e.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_e", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_e.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_p", "return FSGenPhoton_p.at(0)") + .Define("FSGenPhoton1_p", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_p.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_p", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_p.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_pt", "return FSGenPhoton_pt.at(0)") + .Define("FSGenPhoton1_pt", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_pt.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_pt", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_pt.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_px", "return FSGenPhoton_px.at(0)") + .Define("FSGenPhoton1_px", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_px.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_px", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_px.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_py", "return FSGenPhoton_py.at(0)") + .Define("FSGenPhoton1_py", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_py.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_py", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_py.at(2);} else {return (-2.0f); }") + .Define("FSGenPhoton0_pz", "return FSGenPhoton_pz.at(0)") + .Define("FSGenPhoton1_pz", "if (n_FSGenPhoton >= 2) {return FSGenPhoton_pz.at(1);} else {return (-2.0f); }") + .Define("FSGenPhoton2_pz", "if (n_FSGenPhoton >= 3) {return FSGenPhoton_pz.at(2);} else {return (-2.0f); }") + + .Define("FSGenPhoton1_px_if_FSGenPhoton0_px_greaterthan_0", "if (FSGenPhoton0_px > 0) {return FSGenPhoton1_px;} else {return -50.0f;}") + .Define("FSGenPhoton1_px_if_FSGenPhoton2_px_pos", "if (FSGenPhoton2_px > 0) {return FSGenPhoton1_px;} else {return -50.0f;}") + .Define("FSGenPhoton1_pz_if_FSGenPhoton2_pz_pos", "if (FSGenPhoton2_pz > 0) {return FSGenPhoton1_pz;} else {return -50.0f;}") + + # aa invariant mass - for all three combinations of the three first FS photons + # returns -2 for events with only 1 number of photons + # .Define("FSGen_a0a1_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e)") + # .Define("FSGen_a0a1_px", "return (FSGenPhoton0_px + FSGenPhoton1_px)") + # .Define("FSGen_a0a1_py", "return (FSGenPhoton0_py + FSGenPhoton1_py)") + # .Define("FSGen_a0a1_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz)") + # .Define("FSGen_a0a1_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a1_energy*FSGen_a0a1_energy - FSGen_a0a1_px*FSGen_a0a1_px - FSGen_a0a1_py*FSGen_a0a1_py - FSGen_a0a1_pz*FSGen_a0a1_pz ); } else {return -2.0f;}") + + # .Define("FSGen_a0a2_energy", "return (FSGenPhoton0_e + FSGenPhoton2_e)") + # .Define("FSGen_a0a2_px", "return (FSGenPhoton0_px + FSGenPhoton2_px)") + # .Define("FSGen_a0a2_py", "return (FSGenPhoton0_py + FSGenPhoton2_py)") + # .Define("FSGen_a0a2_pz", "return (FSGenPhoton0_pz + FSGenPhoton2_pz)") + # .Define("FSGen_a0a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a0a2_energy*FSGen_a0a2_energy - FSGen_a0a2_px*FSGen_a0a2_px - FSGen_a0a2_py*FSGen_a0a2_py - FSGen_a0a2_pz*FSGen_a0a2_pz ); } else {return -2.0f;}") + + # .Define("FSGen_a1a2_energy", "return (FSGenPhoton1_e + FSGenPhoton2_e)") + # .Define("FSGen_a1a2_px", "return (FSGenPhoton1_px + FSGenPhoton2_px)") + # .Define("FSGen_a1a2_py", "return (FSGenPhoton1_py + FSGenPhoton2_py)") + # .Define("FSGen_a1a2_pz", "return (FSGenPhoton1_pz + FSGenPhoton2_pz)") + # .Define("FSGen_a1a2_invMass", "if (n_FSGenPhoton > 1) { return sqrt(FSGen_a1a2_energy*FSGen_a1a2_energy - FSGen_a1a2_px*FSGen_a1a2_px - FSGen_a1a2_py*FSGen_a1a2_py - FSGen_a1a2_pz*FSGen_a1a2_pz ); } else {return -2.0f;}") + + # aaa invariant mass + # Returns -2 for events with only 1 or 2 number of photons + # .Define("FSGen_aaa_energy", "return (FSGenPhoton0_e + FSGenPhoton1_e + FSGenPhoton2_e)") + # .Define("FSGen_aaa_px", "return (FSGenPhoton0_px + FSGenPhoton1_px + FSGenPhoton2_px)") + # .Define("FSGen_aaa_py", "return (FSGenPhoton0_py + FSGenPhoton1_py + FSGenPhoton2_py)") + # .Define("FSGen_aaa_pz", "return (FSGenPhoton0_pz + FSGenPhoton1_pz + FSGenPhoton2_pz)") + # .Define("FSGen_aaa_invMass", "if (n_FSGenPhoton > 2) { return sqrt(FSGen_aaa_energy*FSGen_aaa_energy - FSGen_aaa_px*FSGen_aaa_px - FSGen_aaa_py*FSGen_aaa_py - FSGen_aaa_pz*FSGen_aaa_pz ); } else {return -2.0f;}") + + # Defining a vector containing the ALP and its daughters in order written + # Name of vector is ALP_indices + .Define("GenALP_indices", "MCParticle::get_indices(9000005, {22, 22}, true, false, false, true)(Particle, Particle1)") + + # Defining the individual particles from the vector + .Define("GenALP", "myUtils::selMC_leg(0)(GenALP_indices, Particle)") + .Define("GenALPPhoton1", "myUtils::selMC_leg(1)(GenALP_indices, Particle)") + .Define("GenALPPhoton2", "myUtils::selMC_leg(2)(GenALP_indices, Particle)") + + # Defining final state ALPs to get rid of duplicates + .Define("FSGenALP", "MCParticle::sel_genStatus(1)(GenALP_PID)") + + .Define("n_FSGenALP", "MCParticle::get_n( FSGenALP )") + + # Kinematics of final state ALP (attempt Merlin) + .Define("FSGenALP_mass", "MCParticle::get_mass( FSGenALP )") + .Define("FSGenALP_e", "MCParticle::get_e( FSGenALP )") + .Define("FSGenALP_p", "MCParticle::get_p( FSGenALP )") + .Define("FSGenALP_pt", "MCParticle::get_pt( FSGenALP )") + .Define("FSGenALP_px", "MCParticle::get_px( FSGenALP )") + .Define("FSGenALP_py", "MCParticle::get_py( FSGenALP )") + .Define("FSGenALP_pz", "MCParticle::get_pz( FSGenALP )") + .Define("FSGenALP_eta", "MCParticle::get_eta( FSGenALP )") + .Define("FSGenALP_theta", "MCParticle::get_theta( FSGenALP )") + .Define("FSGenALP_phi", "MCParticle::get_phi( FSGenALP )") + .Define("FSGenALP_genStatus", "MCParticle::get_genStatus( FSGenALP )") + + # Kinematics of the mother particle ALP + .Define("GenALP_mass", "MCParticle::get_mass( GenALP )") + .Define("GenALP_e", "MCParticle::get_e( GenALP )") + .Define("GenALP_p", "MCParticle::get_p( GenALP )") + .Define("GenALP_pt", "MCParticle::get_pt( GenALP )") + .Define("GenALP_px", "MCParticle::get_px( GenALP )") + .Define("GenALP_py", "MCParticle::get_py( GenALP )") + .Define("GenALP_pz", "MCParticle::get_pz( GenALP )") + .Define("GenALP_eta", "MCParticle::get_eta( GenALP )") + .Define("GenALP_theta", "MCParticle::get_theta( GenALP )") + .Define("GenALP_phi", "MCParticle::get_phi( GenALP )") + .Define("GenALP_genStatus", "MCParticle::get_genStatus( GenALP )") + + .Define("GenALP_px_if_FSGenPhoton0_px_greaterthan_0", "if (FSGenPhoton0_px > 0) {return GenALP_px[0];} else {return -50.0f;}") + .Define("FSGenPhoton1_px_if_GenALP_px_neg", "if (GenALP_px[0] < 0) {return FSGenPhoton1_px;} else {return -50.0f;}") + .Define("FSGenPhoton2_px_if_GenALP_px_neg", "if (GenALP_px[0] < 0) {return FSGenPhoton2_px;} else {return -50.0f;}") + + .Define("n_GenALP", "MCParticle::get_n( GenALP )") + .Define("GenALP_time", "MCParticle::get_time( GenALP )") + .Define("GenALP_pdg", "MCParticle::get_pdg( GenALP )") + .Define("GenALP_endPoint_x", "MCParticle::get_endPoint_x") + + # .Define("GenALP_deltaR", "return sqrt(GenALP_eta*GenALP_eta + GenALP_phi*GenALP_phi)") + + # Finding the kinematics of each of these daughters + .Define("n_GenALPPhoton1", "MCParticle::get_n( GenALPPhoton1 )") + .Define("n_GenALPPhoton2", "MCParticle::get_n( GenALPPhoton2 )") + + .Define("GenALPPhoton1_e", "MCParticle::get_e( GenALPPhoton1 )") + .Define("GenALPPhoton2_e", "MCParticle::get_e( GenALPPhoton2 )") + .Define("GenALPPhoton1_p", "MCParticle::get_p( GenALPPhoton1 )") + .Define("GenALPPhoton2_p", "MCParticle::get_p( GenALPPhoton2 )") + .Define("GenALPPhoton1_pt", "MCParticle::get_pt( GenALPPhoton1 )") + .Define("GenALPPhoton2_pt", "MCParticle::get_pt( GenALPPhoton2 )") + .Define("GenALPPhoton1_px", "MCParticle::get_px( GenALPPhoton1 )") + .Define("GenALPPhoton2_px", "MCParticle::get_px( GenALPPhoton2 )") + .Define("GenALPPhoton1_py", "MCParticle::get_py( GenALPPhoton1 )") + .Define("GenALPPhoton2_py", "MCParticle::get_py( GenALPPhoton2 )") + .Define("GenALPPhoton1_pz", "MCParticle::get_pz( GenALPPhoton1 )") + .Define("GenALPPhoton2_pz", "MCParticle::get_pz( GenALPPhoton2 )") + .Define("GenALPPhoton1_eta", "MCParticle::get_eta( GenALPPhoton1 )") + .Define("GenALPPhoton2_eta", "MCParticle::get_eta( GenALPPhoton2 )") + .Define("GenALPPhoton1_theta", "MCParticle::get_theta( GenALPPhoton1 )") + .Define("GenALPPhoton2_theta", "MCParticle::get_theta( GenALPPhoton2 )") + .Define("GenALPPhoton1_phi", "MCParticle::get_phi( GenALPPhoton1 )") + .Define("GenALPPhoton2_phi", "MCParticle::get_phi( GenALPPhoton2 )") + .Define("GenALPPhoton1_genStatus", "MCParticle::get_genStatus( GenALPPhoton1 )") + .Define("GenALPPhoton2_genStatus", "MCParticle::get_genStatus( GenALPPhoton2 )") + + .Define("GenALPPhotons_deltaEta", "return abs(GenALPPhoton1_eta - GenALPPhoton2_eta)") + .Define("GenALPPhotons_deltaPhi", "return abs(GenALPPhoton1_phi - GenALPPhoton2_phi)") + .Define("GenALPPhotons_deltaR", "return sqrt(GenALPPhotons_deltaEta*GenALPPhotons_deltaEta + GenALPPhotons_deltaPhi*GenALPPhotons_deltaPhi)") + + .Define("GenALPPhotons_deltaR_2", "MCParticle::get_ALP_delta_r(GenALPPhoton1, GenALPPhoton2)") + .Define("FSGenPhotons_delta_r", "MCParticle::get_delta_r(FSGenPhoton)") + + .Define("GenALPPhoton1_time", "MCParticle::get_time( GenALPPhoton1 )") + .Define("GenALPPhoton2_time", "MCParticle::get_time( GenALPPhoton2 )") + + # .Define("GenALPPhoton1_deltaR", "return sqrt(GenALPPhoton1_eta*GenALPPhoton1_eta + GenALPPhoton1_phi*GenALPPhoton1_phi)") + # .Define("GenALPPhoton2_deltaR", "return sqrt(GenALPPhoton2_eta*GenALPPhoton2_eta + GenALPPhoton2_phi*GenALPPhoton2_phi)") + + + # Finding the production vertex of the daughters (checking GenALPPhoton1 here) + .Define("GenALPPhoton1_vertex_x", "MCParticle::get_vertex_x( GenALPPhoton1 )") + .Define("GenALPPhoton1_vertex_y", "MCParticle::get_vertex_y( GenALPPhoton1 )") + .Define("GenALPPhoton1_vertex_z", "MCParticle::get_vertex_z( GenALPPhoton1 )") + + # Finding the Lxy of the ALP + # Definition: Lxy = math.sqrt( (branchGenPtcl.At(daut1).X)**2 + (branchGenPtcl.At(daut1).Y)**2 ) + .Define("GenALP_Lxy", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y)") + # Finding the Lxyz of the ALP + .Define("GenALP_Lxyz", "return sqrt(GenALPPhoton1_vertex_x*GenALPPhoton1_vertex_x + GenALPPhoton1_vertex_y*GenALPPhoton1_vertex_y + GenALPPhoton1_vertex_z*GenALPPhoton1_vertex_z)") + + # Calculating the lifetime of the ALP + # Definition: t = Lxy * branchGenPtcl.At(i).Mass / (branchGenPtcl.At(i).PT * 1000 * 3E8) + .Define("GenALP_lifetime_xy", "return ( GenALP_Lxy * GenALP_mass / (GenALP_pt * 3E8 * 1000))" ) + .Define("GenALP_lifetime_xyz", "return ( GenALP_Lxyz * GenALP_mass / (GenALP_p * 3E8 * 1000))" ) + + .Define("GenALP_observed_lifetime_xyz", "return ((GenALP_p / GenALP_mass) * GenALP_lifetime_xyz)") + + .Define("GenALPPhoton1_time_minus_GenALP_time", "return (GenALPPhoton1_time - GenALP_time)") + + # Finding the production vertex of the ALP which should be at (0,0,0) + .Define("GenALP_vertex_x", "MCParticle::get_vertex_x(GenALP_PID)") + .Define("GenALP_vertex_y", "MCParticle::get_vertex_y(GenALP_PID)") + .Define("GenALP_vertex_z", "MCParticle::get_vertex_z(GenALP_PID)") + + # aa invariant mass + .Define("GenALP_aa_energy", "return (GenALPPhoton1_e + GenALPPhoton2_e)") + .Define("GenALP_aa_px", "return (GenALPPhoton1_px + GenALPPhoton2_px)") + .Define("GenALP_aa_py", "return (GenALPPhoton1_py + GenALPPhoton2_py)") + .Define("GenALP_aa_pz", "return (GenALPPhoton1_pz + GenALPPhoton2_pz)") + .Define("GenALP_aa_invMass", "return sqrt(GenALP_aa_energy*GenALP_aa_energy - GenALP_aa_px*GenALP_aa_px - GenALP_aa_py*GenALP_aa_py - GenALP_aa_pz*GenALP_aa_pz )") + + # Vertexing studies + # Finding the vertex of the mother particle ALP using decicated Bs method + #.Define("GenALPMCDecayVertex", "BsMCDecayVertex( GenALP_indices, Particle )") + + # MC event primary vertex + .Define("MC_PrimaryVertex", "MCParticle::get_EventPrimaryVertex(21)( Particle )" ) + .Define("n_RecoTracks","ReconstructedParticle2Track::getTK_n(_EFlowTrack_trackStates)") + + # Reconstructed particles + # Returns the RecoParticles associated with the ALP decay products + .Define("RecoALPParticles", "ReconstructedParticle2MC::selRP_matched_to_list( GenALP_indices, MCRecoAssociations0,MCRecoAssociations1,ReconstructedParticles,Particle)") + # Reconstructing the tracks from the ALP + .Define("RecoALPTracks", "ReconstructedParticle2Track::getRP2TRK( RecoALPParticles, _EFlowTrack_trackStates)") + + # Number of tracks in this RecoALPTracks collection ( = the #tracks used to reconstruct the ALP reco decay vertex) + .Define("n_RecoALPTracks", "ReconstructedParticle2Track::getTK_n( RecoALPTracks )") + + # Now we reconstruct the ALP reco decay vertex using the reco'ed tracks + # First the full object, of type Vertexing::FCCAnalysesVertex + .Define("RecoALPDecayVertexObject", "VertexFitterSimple::VertexFitter_Tk( 2, RecoALPTracks)" ) + + # from which we extract the edm4hep::VertexData object, which contains the vertex position in mm + .Define("RecoALPDecayVertex", "VertexingUtils::get_VertexData( RecoALPDecayVertexObject )") + + .Define("RecoALPL_xyz", "return sqrt(RecoALPDecayVertex.position.x*RecoALPDecayVertex.position.x + RecoALPDecayVertex.position.y*RecoALPDecayVertex.position.y + RecoALPDecayVertex.position.z*RecoALPDecayVertex.position.z)") + + # We may want to look at the reco'ed ALPs legs: in the RecoALPParticles vector, + # the first particle (vector[0]) is the e-, etc : + .Define("RecoALPPhoton1", "myUtils::selRP_leg(0)( RecoALPParticles )") + .Define("RecoALPPhoton2", "myUtils::selRP_leg(1)( RecoALPParticles )") + + # reconstruced electron, positron values + .Define("RecoALPPhoton1_e", "ReconstructedParticle::get_e( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_e", "ReconstructedParticle::get_e( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_p", "ReconstructedParticle::get_p( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_p", "ReconstructedParticle::get_p( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_pt", "ReconstructedParticle::get_pt( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_pt", "ReconstructedParticle::get_pt( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_px", "ReconstructedParticle::get_px( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_px", "ReconstructedParticle::get_px( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_py", "ReconstructedParticle::get_py( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_py", "ReconstructedParticle::get_py( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_pz", "ReconstructedParticle::get_pz( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_pz", "ReconstructedParticle::get_pz( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_eta", "ReconstructedParticle::get_eta( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_eta", "ReconstructedParticle::get_eta( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_theta", "ReconstructedParticle::get_theta( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_theta", "ReconstructedParticle::get_theta( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_phi", "ReconstructedParticle::get_phi( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_phi", "ReconstructedParticle::get_phi( RecoALPPhoton2 )") + .Define("RecoALPPhoton1_charge", "ReconstructedParticle::get_charge( RecoALPPhoton1 )") + .Define("RecoALPPhoton2_charge", "ReconstructedParticle::get_charge( RecoALPPhoton2 )") + + .Define("RecoALPPhotons_deltaEta", "return abs(RecoALPPhoton1_eta - RecoALPPhoton2_eta)") + .Define("RecoALPPhotons_deltaPhi", "return RecoALPPhoton1_phi - RecoALPPhoton2_phi") + .Define("RecoALPPhotons_deltaR", "return sqrt(RecoALPPhotons_deltaEta*RecoALPPhotons_deltaEta + RecoALPPhotons_deltaPhi*RecoALPPhotons_deltaPhi)") + .Define("RecoALPPhotons_deltaR2", "ReconstructedParticle::get_delta_r(RecoALPPhoton1)") + + .Define("n_RecoALPPhoton1", "ReconstructedParticle::get_n( RecoALPPhoton1 )") + .Define("n_RecoALPPhoton2", "ReconstructedParticle::get_n( RecoALPPhoton2 )") + # .Define("RecoALPPhoton1_time", "ReconstructedParticle::get_time( RecoALPPhoton1 )") + # .Define("RecoALPPhoton2_time", "ReconstructedParticle::get_time( RecoALPPhoton2 )") + # add dxy, dz, dxyz, and uncertainties + + # aa invariant mass + .Define("RecoALP_aa_energy", "return (RecoALPPhoton1_e + RecoALPPhoton2_e)") + .Define("RecoALP_aa_px", "return (RecoALPPhoton1_px + RecoALPPhoton2_px)") + .Define("RecoALP_aa_py", "return (RecoALPPhoton1_py + RecoALPPhoton2_py)") + .Define("RecoALP_aa_pz", "return (RecoALPPhoton1_pz + RecoALPPhoton2_pz)") + .Define("RecoALP_aa_invMass", "return sqrt(RecoALP_aa_energy*RecoALP_aa_energy - RecoALP_aa_px*RecoALP_aa_px - RecoALP_aa_py*RecoALP_aa_py - RecoALP_aa_pz*RecoALP_aa_pz )") + + #gen-reco + .Define("GenMinusRecoALPPhoton1_e", "GenALPPhoton1_e-RecoALPPhoton1_e") + .Define("GenMinusRecoALPPhoton2_e", "GenALPPhoton2_e-RecoALPPhoton2_e") + .Define("GenMinusRecoALPPhoton1_p", "GenALPPhoton1_p-RecoALPPhoton1_p") + .Define("GenMinusRecoALPPhoton2_p", "GenALPPhoton2_p-RecoALPPhoton2_p") + .Define("GenMinusRecoALPPhoton1_pt", "GenALPPhoton1_pt-RecoALPPhoton1_pt") + .Define("GenMinusRecoALPPhoton2_pt", "GenALPPhoton2_pt-RecoALPPhoton2_pt") + .Define("GenMinusRecoALPPhoton1_px", "GenALPPhoton1_px-RecoALPPhoton1_px") + .Define("GenMinusRecoALPPhoton2_px", "GenALPPhoton2_px-RecoALPPhoton2_px") + .Define("GenMinusRecoALPPhoton1_py", "GenALPPhoton1_py-RecoALPPhoton1_py") + .Define("GenMinusRecoALPPhoton2_py", "GenALPPhoton2_py-RecoALPPhoton2_py") + .Define("GenMinusRecoALPPhoton1_pz", "GenALPPhoton1_pz-RecoALPPhoton1_pz") + .Define("GenMinusRecoALPPhoton2_pz", "GenALPPhoton2_pz-RecoALPPhoton2_pz") + .Define("GenMinusRecoALPPhoton1_eta", "GenALPPhoton1_eta-RecoALPPhoton1_eta") + .Define("GenMinusRecoALPPhoton2_eta", "GenALPPhoton2_eta-RecoALPPhoton2_eta") + .Define("GenMinusRecoALPPhoton1_theta", "GenALPPhoton1_theta-RecoALPPhoton1_theta") + .Define("GenMinusRecoALPPhoton2_theta", "GenALPPhoton2_theta-RecoALPPhoton2_theta") + .Define("GenMinusRecoALPPhoton1_phi", "GenALPPhoton1_phi-RecoALPPhoton1_phi") + .Define("GenMinusRecoALPPhoton2_phi", "GenALPPhoton2_phi-RecoALPPhoton2_phi") + + .Define("GenMinusRecoALP_DecayVertex_x", "GenALPPhoton1_vertex_x-RecoALPDecayVertex.position.x") + .Define("GenMinusRecoALP_DecayVertex_y", "GenALPPhoton1_vertex_y-RecoALPDecayVertex.position.y") + .Define("GenMinusRecoALP_DecayVertex_z", "GenALPPhoton1_vertex_z-RecoALPDecayVertex.position.z") + + + #################################################################################################### + # From here the general study begins + + #JETS + .Define("n_RecoJets", "ReconstructedParticle::get_n(Jet)") #count how many jets are in the event in total + + #PHOTONS + .Alias("Photon0", "Photon_objIdx.index") + .Define("RecoPhotons", "ReconstructedParticle::get(Photon0, ReconstructedParticles)") + .Define("n_RecoPhotons", "ReconstructedParticle::get_n(RecoPhotons)") #count how many photons are in the event in total + + #ELECTRONS AND MUONS + #TODO: ADD EXPLANATION OF THE EXTRA STEPS + .Alias("Electron0", "Electron_objIdx.index") + .Define("RecoElectrons", "ReconstructedParticle::get(Electron0, ReconstructedParticles)") + .Define("n_RecoElectrons", "ReconstructedParticle::get_n(RecoElectrons)") #count how many electrons are in the event in total + + .Alias("Muon0", "Muon_objIdx.index") + .Define("RecoMuons", "ReconstructedParticle::get(Muon0, ReconstructedParticles)") + .Define("n_RecoMuons", "ReconstructedParticle::get_n(RecoMuons)") #count how many muons are in the event in total + + #OBJECT SELECTION: Consider only those objects that have pt > certain threshold + #.Define("selected_jets", "ReconstructedParticle::sel_pt(0.)(Jet)") #select only jets with a pt > 50 GeV + #.Define("selected_electrons", "ReconstructedParticle::sel_pt(0.)(electrons)") #select only electrons with a pt > 20 GeV + #.Define("selected_photons", "ReconstructedParticle::sel_pt(0.)(photons)") #select only photons with a pt > 20 GeV + #.Define("selected_muons", "ReconstructedParticle::sel_pt(0.)(muons)") + + #.Define("n_selJets", "ReconstructedParticle::get_n(selected_jets)") + #.Define("n_selElectrons", "ReconstructedParticle::get_n(selected_electrons)") + #.Define("n_selPhotons", "ReconstructedParticle::get_n(selected_photons)") + #.Define("n_selMuons", "ReconstructedParticle::get_n(selected_muons)") + + #SIMPLE VARIABLES: Access the basic kinematic variables of the (selected) jets, works analogously for electrons, muons + .Define("RecoJet_e", "ReconstructedParticle::get_e(Jet)") + .Define("RecoJet_p", "ReconstructedParticle::get_p(Jet)") #momentum p + .Define("RecoJet_pt", "ReconstructedParticle::get_pt(Jet)") #transverse momentum pt + .Define("RecoJet_px", "ReconstructedParticle::get_px(Jet)") + .Define("RecoJet_py", "ReconstructedParticle::get_py(Jet)") + .Define("RecoJet_pz", "ReconstructedParticle::get_pz(Jet)") + .Define("RecoJet_eta", "ReconstructedParticle::get_eta(Jet)") #pseudorapidity eta + .Define("RecoJet_theta", "ReconstructedParticle::get_theta(Jet)") + .Define("RecoJet_phi", "ReconstructedParticle::get_phi(Jet)") #polar angle in the transverse plane phi + .Define("RecoJet_charge", "ReconstructedParticle::get_charge(Jet)") + + .Define("RecoElectron_e", "ReconstructedParticle::get_e(RecoElectrons)") + .Define("RecoElectron_p", "ReconstructedParticle::get_p(RecoElectrons)") + .Define("RecoElectron_pt", "ReconstructedParticle::get_pt(RecoElectrons)") + .Define("RecoElectron_px", "ReconstructedParticle::get_px(RecoElectrons)") + .Define("RecoElectron_py", "ReconstructedParticle::get_py(RecoElectrons)") + .Define("RecoElectron_pz", "ReconstructedParticle::get_pz(RecoElectrons)") + .Define("RecoElectron_eta", "ReconstructedParticle::get_eta(RecoElectrons)") #pseudorapidity eta + .Define("RecoElectron_theta", "ReconstructedParticle::get_theta(RecoElectrons)") + .Define("RecoElectron_phi", "ReconstructedParticle::get_phi(RecoElectrons)") #polar angle in the transverse plane phi + .Define("RecoElectron_charge", "ReconstructedParticle::get_charge(RecoElectrons)") + + .Define("RecoPhoton_e", "ReconstructedParticle::get_e(RecoPhotons)") + .Define("RecoPhoton_p", "ReconstructedParticle::get_p(RecoPhotons)") + .Define("RecoPhoton_pt", "ReconstructedParticle::get_pt(RecoPhotons)") + .Define("RecoPhoton_px", "ReconstructedParticle::get_px(RecoPhotons)") + .Define("RecoPhoton_py", "ReconstructedParticle::get_py(RecoPhotons)") + .Define("RecoPhoton_pz", "ReconstructedParticle::get_pz(RecoPhotons)") + .Define("RecoPhoton_eta", "ReconstructedParticle::get_eta(RecoPhotons)") #pseudorapidity eta + .Define("RecoPhoton_theta", "ReconstructedParticle::get_theta(RecoPhotons)") + .Define("RecoPhoton_phi", "ReconstructedParticle::get_phi(RecoPhotons)") #polar angle in the transverse plane phi + .Define("RecoPhoton_charge", "ReconstructedParticle::get_charge(RecoPhotons)") + + .Define("RecoPhotons_delta_eta", "ReconstructedParticle::get_delta_eta(RecoPhotons)") + .Define("RecoPhotons_delta_phi", "ReconstructedParticle::get_delta_phi(RecoPhotons)") + .Define("RecoPhotons_delta_r", "ReconstructedParticle::get_delta_r(RecoPhotons)") + + .Define("RecoPhotons_min_delta_r", "ReconstructedParticle::get_min_delta_r(RecoPhotons)") + + .Define("RecoPhotons_ALP_delta_r", "ReconstructedParticle::get_ALP_delta_r(RecoALPPhoton1, RecoALPPhoton2)") + .Define("RecoPhotons_ALP_delta_phi", "ReconstructedParticle::get_ALP_delta_phi(RecoALPPhoton1, RecoALPPhoton2)") + .Define("RecoPhotons_ALP_delta_eta", "ReconstructedParticle::get_ALP_delta_eta(RecoALPPhoton1, RecoALPPhoton2)") + + .Define("RecoPhoton_y", "ReconstructedParticle::get_y(RecoPhotons)") + # .Define("RecoPhoton_time", "ReconstructedParticle::get_time(RecoPhotons)") + + .Define("RecoPhoton_reference_point_x", "ReconstructedParticle::get_reference_point_x(RecoPhotons)") + + .Define("RecoPhoton0_e", "if (n_RecoPhotons ==3) {return RecoPhoton_e.at(0);} else {return (-2.0f); }") + .Define("RecoPhoton1_e", "if (n_RecoPhotons ==3) {return RecoPhoton_e.at(1);} else {return (-2.0f); }") + .Define("RecoPhoton2_e", "if (n_RecoPhotons ==3) {return RecoPhoton_e.at(2);} else {return (-2.0f); }") + .Define("RecoPhoton0_p", "if (n_RecoPhotons ==3) {return RecoPhoton_p.at(0);} else {return (-2.0f); }") + .Define("RecoPhoton1_p", "if (n_RecoPhotons ==3) {return RecoPhoton_p.at(1);} else {return (-2.0f); }") + .Define("RecoPhoton2_p", "if (n_RecoPhotons ==3) {return RecoPhoton_p.at(2);} else {return (-2.0f); }") + .Define("RecoPhoton0_pt", "if (n_RecoPhotons ==3) {return RecoPhoton_pt.at(0);} else {return (-2.0f); }") + .Define("RecoPhoton1_pt", "if (n_RecoPhotons ==3) {return RecoPhoton_pt.at(1);} else {return (-2.0f); }") + .Define("RecoPhoton2_pt", "if (n_RecoPhotons ==3) {return RecoPhoton_pt.at(2);} else {return (-2.0f); }") + .Define("RecoPhoton0_px", "if (n_RecoPhotons ==3) {return RecoPhoton_px.at(0);} else {return (-2.0f); }") + .Define("RecoPhoton1_px", "if (n_RecoPhotons ==3) {return RecoPhoton_px.at(1);} else {return (-2.0f); }") + .Define("RecoPhoton2_px", "if (n_RecoPhotons ==3) {return RecoPhoton_px.at(2);} else {return (-2.0f); }") + .Define("RecoPhoton0_py", "if (n_RecoPhotons ==3) {return RecoPhoton_py.at(0);} else {return (-2.0f); }") + .Define("RecoPhoton1_py", "if (n_RecoPhotons ==3) {return RecoPhoton_py.at(1);} else {return (-2.0f); }") + .Define("RecoPhoton2_py", "if (n_RecoPhotons ==3) {return RecoPhoton_py.at(2);} else {return (-2.0f); }") + .Define("RecoPhoton0_pz", "if (n_RecoPhotons ==3) {return RecoPhoton_pz.at(0);} else {return (-2.0f); }") + .Define("RecoPhoton1_pz", "if (n_RecoPhotons ==3) {return RecoPhoton_pz.at(1);} else {return (-2.0f); }") + .Define("RecoPhoton2_pz", "if (n_RecoPhotons ==3) {return RecoPhoton_pz.at(2);} else {return (-2.0f); }") + + .Define("RecoPhoton1_px_if_RecoPhoton2_px_pos", "if (RecoPhoton2_px > 0) {return RecoPhoton1_px;} else {return -50.0f;}") + .Define("RecoPhoton1_pz_if_RecoPhoton2_pz_pos", "if (RecoPhoton2_pz > 0) {return RecoPhoton1_pz;} else {return -50.0f;}") + + .Define("RecoALPPhotons_delta_R3", "if (n_RecoPhotons == 3) {return RecoPhotons_delta_r.at(2);} else {return (-2.0f); }") + + .Define("RecoMuon_e", "ReconstructedParticle::get_e(RecoMuons)") + .Define("RecoMuon_p", "ReconstructedParticle::get_p(RecoMuons)") + .Define("RecoMuon_pt", "ReconstructedParticle::get_pt(RecoMuons)") + .Define("RecoMuon_px", "ReconstructedParticle::get_px(RecoMuons)") + .Define("RecoMuon_py", "ReconstructedParticle::get_py(RecoMuons)") + .Define("RecoMuon_pz", "ReconstructedParticle::get_pz(RecoMuons)") + .Define("RecoMuon_eta", "ReconstructedParticle::get_eta(RecoMuons)") #pseudorapidity eta + .Define("RecoMuon_theta", "ReconstructedParticle::get_theta(RecoMuons)") + .Define("RecoMuon_phi", "ReconstructedParticle::get_phi(RecoMuons)") #polar angle in the transverse plane phi + .Define("RecoMuon_charge", "ReconstructedParticle::get_charge(RecoMuons)") + + #EVENTWIDE VARIABLES: Access quantities that exist only once per event, such as the missing energy (despite the name, the MissingET collection contains the total missing energy) + # .Define("RecoMissingEnergy_e", "ReconstructedParticle::get_e(MissingET)") + # .Define("RecoMissingEnergy_p", "ReconstructedParticle::get_p(MissingET)") + # .Define("RecoMissingEnergy_pt", "ReconstructedParticle::get_pt(MissingET)") + # .Define("RecoMissingEnergy_px", "ReconstructedParticle::get_px(MissingET)") + # .Define("RecoMissingEnergy_py", "ReconstructedParticle::get_py(MissingET)") + # .Define("RecoMissingEnergy_pz", "ReconstructedParticle::get_pz(MissingET)") + # .Define("RecoMissingEnergy_eta", "ReconstructedParticle::get_eta(MissingET)") + # .Define("RecoMissingEnergy_theta", "ReconstructedParticle::get_theta(MissingET)") + # .Define("RecoMissingEnergy_phi", "ReconstructedParticle::get_phi(MissingET)") + + # .Define("CalorimeterHitsTime", "CalorimeterHits.time") + ) + return df2 + + def output(): + branchList = [ + # "CalorimeterHitsTime", + ######## Monte-Carlo particles ####### + "All_n_GenALP", + "AllGenALP_mass", + "AllGenALP_e", + "AllGenALP_p", + "AllGenALP_pt", + "AllGenALP_px", + "AllGenALP_py", + "AllGenALP_pz", + "AllGenALP_eta", + "AllGenALP_theta", + "AllGenALP_phi", + "AllGenALP_genStatus", + "n_FSGenElectron", + # "FSGenElectron_e", + # "FSGenElectron_p", + # "FSGenElectron_pt", + # "FSGenElectron_px", + # "FSGenElectron_py", + # "FSGenElectron_pz", + # "FSGenElectron_eta", + # "FSGenElectron_theta", + # "FSGenElectron_phi", + "FSGenPhoton_vertex_x", + "FSGenPhoton_vertex_y", + "FSGenPhoton_vertex_z", + # # "n_FSGenElectron_forFS2GenPhotons", + # # "n_FSGenPositron_forFS2GenPhotons", + # "FSGen_Lxy", + # "FSGen_Lxyz", + # "FSGen_lifetime_xy", + # "FSGen_lifetime_xyz", + # "n_FSGenPositron", + # "FSGenPositron_e", + # "FSGenPositron_p", + # "FSGenPositron_pt", + # "FSGenPositron_px", + # "FSGenPositron_py", + # "FSGenPositron_pz", + # "FSGenPositron_eta", + # "FSGenPositron_theta", + # "FSGenPositron_phi", + # "n_FSGenNeutrino", + # "FSGenNeutrino_e", + # "FSGenNeutrino_p", + # "FSGenNeutrino_pt", + # "FSGenNeutrino_px", + # "FSGenNeutrino_py", + # "FSGenNeutrino_pz", + # "FSGenNeutrino_eta", + # "FSGenNeutrino_theta", + # "FSGenNeutrino_phi", + # "n_FSGenAntiNeutrino", + # "FSGenAntiNeutrino_e", + # "FSGenAntiNeutrino_p", + # "FSGenAntiNeutrino_pt", + # "FSGenAntiNeutrino_px", + # "FSGenAntiNeutrino_py", + # "FSGenAntiNeutrino_pz", + # "FSGenAntiNeutrino_eta", + # "FSGenAntiNeutrino_theta", + # "FSGenAntiNeutrino_phi", + "n_FSGenPhoton", + "FSGenPhoton_e", + "FSGenPhoton_p", + "FSGenPhoton_pt", + "FSGenPhoton_px", + "FSGenPhoton_py", + "FSGenPhoton_pz", + "FSGenPhoton_eta", + "FSGenPhoton_theta", + "FSGenPhoton_phi", + "FSGenPhoton0_e", + "FSGenPhoton1_e", + "FSGenPhoton2_e", + "FSGenPhoton0_p", + "FSGenPhoton1_p", + "FSGenPhoton2_p", + "FSGenPhoton0_pt", + "FSGenPhoton1_pt", + "FSGenPhoton2_pt", + "FSGenPhoton0_px", + "FSGenPhoton1_px", + "FSGenPhoton2_px", + "FSGenPhoton0_py", + "FSGenPhoton1_py", + "FSGenPhoton2_py", + "FSGenPhoton0_pz", + "FSGenPhoton1_pz", + "FSGenPhoton2_pz", + + "FSGenPhoton1_px_if_FSGenPhoton0_px_greaterthan_0", + "FSGenPhoton1_px_if_FSGenPhoton2_px_pos", + "FSGenPhoton1_pz_if_FSGenPhoton2_pz_pos", + + # "FSGen_a0a1_invMass", + # "FSGen_a0a2_invMass", + # "FSGen_a1a2_invMass", + # "FSGen_aaa_invMass", + "GenALP_vertex_x", + "GenALP_vertex_y", + "GenALP_vertex_z", + "GenALP_aa_invMass", + "GenALP_mass", + "GenALP_e", + "GenALP_p", + "GenALP_pt", + "GenALP_pz", + "GenALP_eta", + "GenALP_theta", + "GenALP_phi", + "GenALP_genStatus", + + "GenALP_px_if_FSGenPhoton0_px_greaterthan_0", + "FSGenPhoton1_px_if_GenALP_px_neg", + "FSGenPhoton2_px_if_GenALP_px_neg", + + # "GenALP_deltaR", + "GenALPPhotons_deltaEta", + "GenALPPhotons_deltaPhi", + "GenALPPhotons_deltaR", + + "GenALPPhotons_deltaR_2", + "FSGenPhotons_delta_r", + + "GenALPPhoton1_time", + "GenALPPhoton2_time", + + "GenALP_observed_lifetime_xyz", + + "GenALPPhoton1_time_minus_GenALP_time", + + "n_GenALP", + "GenALP_time", + "GenALP_pdg", + # "GenALP_endPoint_x", + + "n_FSGenALP", + "FSGenALP_mass", + "FSGenALP_p", + "FSGenALP_pt", + "FSGenALP_pz", + "FSGenALP_eta", + "FSGenALP_theta", + "FSGenALP_phi", + "FSGenALP_genStatus", + + "n_GenALPPhoton1", + "n_GenALPPhoton2", + # "GenALPPhoton1_deltaR", + # "GenALPPhoton2_deltaR", + + "GenALPPhoton1_e", + "GenALPPhoton2_e", + "GenALPPhoton1_p", + "GenALPPhoton2_p", + "GenALPPhoton1_pt", + "GenALPPhoton2_pt", + "GenALPPhoton1_px", + "GenALPPhoton2_px", + "GenALPPhoton1_py", + "GenALPPhoton2_py", + "GenALPPhoton1_pz", + "GenALPPhoton2_pz", + "GenALPPhoton1_eta", + "GenALPPhoton2_eta", + "GenALPPhoton1_theta", + "GenALPPhoton2_theta", + "GenALPPhoton1_phi", + "GenALPPhoton2_phi", + "GenALPPhoton1_genStatus", + "GenALPPhoton2_genStatus", + #"GenALP_decay", + "GenALPPhoton1_vertex_x", + "GenALPPhoton1_vertex_y", + "GenALPPhoton1_vertex_z", + "GenALP_Lxy", + "GenALP_Lxyz", + "GenALP_lifetime_xy", + "GenALP_lifetime_xyz", + #"GenALPMCDecayVertex", + "MC_PrimaryVertex", + "n_RecoTracks", + ######## Reconstructed particles ####### + "RecoALPParticles", + "RecoALPTracks", + "n_RecoALPTracks", + "RecoALPDecayVertexObject", + "RecoALPDecayVertex", + + "RecoALPL_xyz", + + "RecoALPPhoton1_e", + "RecoALPPhoton2_e", + "RecoALPPhoton1_p", + "RecoALPPhoton2_p", + "RecoALPPhoton1_pt", + "RecoALPPhoton2_pt", + "RecoALPPhoton1_px", + "RecoALPPhoton2_px", + "RecoALPPhoton1_py", + "RecoALPPhoton2_py", + "RecoALPPhoton1_pz", + "RecoALPPhoton2_pz", + "RecoALPPhoton1_eta", + "RecoALPPhoton2_eta", + "RecoALPPhoton1_theta", + "RecoALPPhoton2_theta", + "RecoALPPhoton1_phi", + "RecoALPPhoton2_phi", + "RecoALPPhoton1_charge", + "RecoALPPhoton2_charge", + + "n_RecoALPPhoton1", + "n_RecoALPPhoton2", + # "RecoALPPhoton1_time", + # "RecoALPPhoton2_time", + "RecoALPPhotons_deltaEta", + "RecoALPPhotons_deltaPhi", + "RecoALPPhotons_deltaR", + "RecoALPPhotons_deltaR2", + + # "RecoALP_aa_invMass", + "GenMinusRecoALPPhoton1_e", + "GenMinusRecoALPPhoton2_e", + # "GenMinusRecoALPPhoton1_p", + # "GenMinusRecoALPPhoton2_p", + # "GenMinusRecoALPPhoton1_pt", + # "GenMinusRecoALPPhoton2_pt", + # "GenMinusRecoALPPhoton1_px", + # "GenMinusRecoALPPhoton2_px", + # "GenMinusRecoALPPhoton1_py", + # "GenMinusRecoALPPhoton2_py", + # "GenMinusRecoALPPhoton1_pz", + # "GenMinusRecoALPPhoton2_pz", + # "GenMinusRecoALPPhoton1_eta", + # "GenMinusRecoALPPhoton2_eta", + # "GenMinusRecoALPPhoton1_theta", + # "GenMinusRecoALPPhoton2_theta", + # "GenMinusRecoALPPhoton1_phi", + # "GenMinusRecoALPPhoton2_phi", + "GenMinusRecoALP_DecayVertex_x", + "GenMinusRecoALP_DecayVertex_y", + "GenMinusRecoALP_DecayVertex_z", + "n_RecoJets", + "n_RecoPhotons", + "n_RecoElectrons", + "n_RecoMuons", + # "RecoJet_e", + # "RecoJet_p", + # "RecoJet_pt", + # "RecoJet_px", + # "RecoJet_py", + # "RecoJet_pz", + # "RecoJet_eta", + # "RecoJet_theta", + # "RecoJet_phi", + # "RecoJet_charge", + "RecoPhoton_e", + "RecoPhoton_p", + "RecoPhoton_pt", + "RecoPhoton_px", + "RecoPhoton_py", + "RecoPhoton_pz", + "RecoPhoton_eta", + "RecoPhoton_theta", + "RecoPhoton_phi", + "RecoPhoton_charge", + + "RecoPhotons_delta_eta", + "RecoPhotons_delta_phi", + "RecoPhotons_delta_r", + + "RecoPhotons_min_delta_r", + + "RecoPhotons_ALP_delta_r", + "RecoPhotons_ALP_delta_phi", + "RecoPhotons_ALP_delta_eta", + + "RecoPhoton_y", + # "RecoPhoton_time", + + "RecoPhoton_reference_point_x", + + "RecoPhoton0_e", + "RecoPhoton1_e", + "RecoPhoton2_e", + "RecoPhoton0_p", + "RecoPhoton1_p", + "RecoPhoton2_p", + "RecoPhoton0_pt", + "RecoPhoton1_pt", + "RecoPhoton2_pt", + "RecoPhoton0_px", + "RecoPhoton1_px", + "RecoPhoton2_px", + "RecoPhoton0_py", + "RecoPhoton1_py", + "RecoPhoton2_py", + "RecoPhoton0_pz", + "RecoPhoton1_pz", + "RecoPhoton2_pz", + + "RecoPhoton1_px_if_RecoPhoton2_px_pos", + "RecoPhoton1_pz_if_RecoPhoton2_pz_pos", + + "RecoALPPhotons_delta_R3", + + # "RecoElectron_e", + # "RecoElectron_p", + # "RecoElectron_pt", + # "RecoElectron_px", + # "RecoElectron_py", + # "RecoElectron_pz", + # "RecoElectron_eta", + # "RecoElectron_theta", + # "RecoElectron_phi", + # "RecoElectron_charge", + # "RecoMuon_e", + # "RecoMuon_p", + # "RecoMuon_pt", + # "RecoMuon_px", + # "RecoMuon_py", + # "RecoMuon_pz", + # "RecoMuon_eta", + # "RecoMuon_theta", + # "RecoMuon_phi", + # "RecoMuon_charge", + # "RecoMissingEnergy_e", + # "RecoMissingEnergy_p", + # "RecoMissingEnergy_pt", + # "RecoMissingEnergy_px", + # "RecoMissingEnergy_py", + # "RecoMissingEnergy_pz", + # "RecoMissingEnergy_eta", + # "RecoMissingEnergy_theta", + # "RecoMissingEnergy_phi", + ] + + return branchList diff --git a/examples/FCCee/bsm/LLPs/ALPs/sensitivity_analysis/plot_sensitivity.py b/examples/FCCee/bsm/LLPs/ALPs/sensitivity_analysis/plot_sensitivity.py new file mode 100644 index 0000000000..281ba0df0a --- /dev/null +++ b/examples/FCCee/bsm/LLPs/ALPs/sensitivity_analysis/plot_sensitivity.py @@ -0,0 +1,808 @@ +import ROOT +import numpy as np +import array +import os +import pandas as pd +import matplotlib.pyplot as plt + +class Plotting: + def __init__(self,ana_text,energy,intLumi,output_dir): + self.ana_tex = ana_tex + self.s_tex = "#bf{#it{"+"#sqrt{{s}} = {:.1f} GeV".format(energy)+"}}" + self.lumi_tex = "#bf{#it{" +"L = {:.0f} ab^{{-1}}".format(intLumi) + "}}" + self.col_tex = "FCC-ee Simulation (Delphes)" + + if not os.path.exists(output_dir): + os.mkdir(output_dir) + self.output_dir = output_dir + + ### Figure ### + def drawFigure(self,mN,Ve,Z,func_text,out_name,histo_name="histo",zrange=[],plot_pred=False): + + #Set bins for the plots + logBins = 14 + stopBin = 3.38 + # startBin = 0.0000107 + startBin = 0.000000338 + logWidth = [] + for i in range(0,logBins): + logWidth.append(ROOT.Math.pow(10,ROOT.TMath.Log10(startBin)+((ROOT.TMath.Log10(stopBin)-ROOT.TMath.Log10(startBin))/logBins)*i)) + logArray = array.array('d',logWidth) + print(logArray) + + # linBins = 10 + # linBins0 = 10 + # linWidth = [0,5,10,20,30,40,50,60,70,80] + # linWidth0 = np.linspace(0,90,linBins0) + # linArray = array.array('d', linWidth) + # linArray0 = array.array('d', linWidth0) + + logBinMass = 8 + stopBinMass = 178 + startBinMass = 0.0178 + logWidthMass = [] + for i in range(0,logBinMass): + logWidthMass.append(ROOT.Math.pow(10,ROOT.TMath.Log10(startBinMass)+((ROOT.TMath.Log10(stopBinMass)-ROOT.TMath.Log10(startBinMass))/logBinMass)*i)) + logMassArray = array.array('d',logWidthMass) + print(logMassArray) + + c = ROOT.TCanvas("c_"+histo_name,"canvas title") + c.cd() + ROOT.gPad.SetLogx(1) + ROOT.gPad.SetLogy(1) + ROOT.gPad.SetLogz(1) + ROOT.gPad.SetRightMargin(0.2) + ROOT.gStyle.SetOptStat(0) + + # A base histogram to correctly set the bins + # h0 = ROOT.TH2F("h0",r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins0-1, linArray0, logBins-1, logArray) + # h0.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + # h0.Draw() + + h = ROOT.TH2F(histo_name,r";m_{a} [GeV];c_{\gamma\gamma}", logBinMass-1, logMassArray, logBins-1, logArray) + h.GetZaxis().SetTitle(func_text) + h.GetZaxis().SetTitleOffset(1.5) + h.GetXaxis().SetTitleOffset(1.4) + h.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + for m,v,z in zip(mN,Ve,Z): + h.Fill(m,v,z) + if zrange: + h.SetMinimum(zrange[0]) + h.SetMaximum(zrange[1]) + h.Draw("same COLZ") + # h.GetXaxis().SetRangeUser(0,31.6) + + ## Print text in figure + Text = ROOT.TLatex() + Text.SetNDC() + Text.SetTextAlign(31) + Text.SetTextSize(0.04) + Text.SetTextAlign(12) + Text.DrawLatex(0.090, 0.92, self.col_tex) + Text.SetNDC(ROOT.kTRUE) + Text.SetTextSize(0.04) + # Text.DrawLatex(0.62, 0.83, func_text) + Text.DrawLatex(0.48, 0.83, self.s_tex) + Text.DrawLatex(0.48, 0.78, self.lumi_tex) + Text.DrawLatex(0.48, 0.73, self.ana_tex) + + # c.Modified() + # c.Update() + + if (plot_pred): + x4,y4,x1,y1 = self.get_pred() + # X = np.power(10,x) + # Y = np.power(10,y) + X4 = array.array('d',x4) + Y4 = array.array('d',y4) + X1 = array.array('d',x1) + Y1 = array.array('d',y1) + + c.cd() + gr4 = ROOT.TGraph(len(X4),X4,Y4) + gr4.SetLineColor(2) + gr4.SetLineWidth(2) + gr4.Draw("same L") + gr4.GetXaxis().SetRangeUser(0,90) + + gr1 = ROOT.TGraph(len(X1),X1,Y1) + gr1.SetLineColor(1) + gr1.SetLineWidth(2) + gr1.Draw("same L") + gr1.GetXaxis().SetRangeUser(0,90) + + c.Modified() + c.Update() + + leg = ROOT.TLegend(0.56,0.13,0.73,0.17) + leg.SetFillColor(0) + leg.SetFillStyle(0) + leg.SetLineColor(0) + leg.SetShadowColor(10) + leg.SetTextSize(0.035) + leg.SetTextFont(42) + leg.AddEntry(gr1, "Theoretical prediction") + leg.AddEntry(gr4, "Theoretical prediction") + leg.Draw() + + leg = ROOT.TLegend(0.14,0.23,0.34,0.37) + leg.SetFillColor(0) + leg.SetFillStyle(0) + leg.SetLineColor(1) + leg.SetShadowColor(0) + leg.SetTextSize(0.035) + leg.SetTextFont(42) + + c.Modified() + c.Update() + + x = array.array('d') + x.append(0.01) + # # 3 signal event contour + # if S: + # hS = ROOT.TH2F("hS",r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins-1, linArray, logBins-1, logArray) + # hS.GetZaxis().SetTitle(func_text) + # hS.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + # for m,v,s in zip(mN,Ve,S): + # hS.Fill(m,v**2,s) + # x[0] = 3 + # hS.SetContour(1,x) + # hS.SetLineColor(3) + # hS.SetLineWidth(2) + # hS.Draw("cont3 C") + # leg.AddEntry(hS,"3 signal event") + # Text.SetTextColor(3) + # Text.DrawLatex(0.67,0.41,"#bf{3 signal event}") + + x[0] = 0.0001 + h1 = h.Clone() + h1.SetContour(1,x) + h1.SetLineWidth(3) + h1.SetLineColor(5) + # Text.SetTextColor(2) + # Text.DrawLatex(0.3,0.6,"#bf{s = 0.01}") + h1.DrawCopy("cont3 C same") + leg.AddEntry(h1,"s = 0.0001","l") + + x[0] = 0.01 + h2 = h.Clone() + h2.SetContour(1,x) + h2.SetLineWidth(3) + h2.SetLineColor(3) + # Text.SetTextColor(2) + # Text.DrawLatex(0.3,0.6,"#bf{s = 0.01}") + h2.DrawCopy("cont3 C same") + leg.AddEntry(h2,"s = 0.01","l") + + h22 = h.Clone() + x[0] = 0.05 + h22.SetContour(1,x) + h22.SetLineWidth(3) + h22.SetLineColor(4) + # Text.SetTextColor(3) + # Text.DrawLatex(0.3,0.7,"#bf{s = 0.05}") + h22.DrawCopy("cont3 C same") + leg.AddEntry(h22,"s = 0.05","l") + + leg.Draw() + c.Modified() + c.Update() + + c.SaveAs(os.path.join(self.output_dir, out_name)) + + def drawFigureWithNumbers(self,mN,Ve,Z,func_text,out_name,histo_name="histo",zrange=[]): + + #Set bins for the plots + logBins = 15 + stopBin = 1e-5 + startBin = 1e-12 + logWidth = [] + for i in range(0,logBins): + logWidth.append(ROOT.Math.pow(10,ROOT.TMath.Log10(startBin)+((ROOT.TMath.Log10(stopBin)-ROOT.TMath.Log10(startBin))/logBins)*i)) + logArray = array.array('d',logWidth) + + linBins = 10 + linBins0 = 10 + linWidth = [0,5,10,20,30,40,50,60,70,80] + linWidth0 = np.linspace(0,90,linBins0) + linArray = array.array('d', linWidth) + linArray0 = array.array('d', linWidth0) + + c = ROOT.TCanvas("c_"+histo_name,"canvas title") + c.cd() + # ROOT.gPad.SetLogx(1) + ROOT.gPad.SetLogy(1) + ROOT.gPad.SetLogz(1) + ROOT.gPad.SetRightMargin(0.15) + ROOT.gStyle.SetOptStat(0) + + # A base histogram to correctly set the bins + h0 = ROOT.TH2F("h0",r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins0-1, linArray0, logBins-1, logArray) + h0.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + h0.Draw() + + h = ROOT.TH2F(histo_name,r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins-1, linArray, logBins-1, logArray) + h.GetZaxis().SetTitle(func_text) + h.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + for m,v,z in zip(mN,Ve,Z): + h.Fill(m,v**2,z) + h.Draw("same COLZ text") + h.GetXaxis().SetRangeUser(0,90) + + ## Print text in figure + Text = ROOT.TLatex() + Text.SetNDC() + Text.SetTextAlign(31) + Text.SetTextSize(0.04) + Text.SetTextAlign(12) + Text.DrawLatex(0.090, 0.92, self.col_tex) + Text.SetNDC(ROOT.kTRUE) + Text.SetTextSize(0.04) + # Text.DrawLatex(0.62, 0.83, func_text) + Text.DrawLatex(0.56, 0.83, self.s_tex) + Text.DrawLatex(0.56, 0.78, self.lumi_tex) + Text.DrawLatex(0.56, 0.73, self.ana_tex) + + c.Modified() + c.Update() + + c.SaveAs(os.path.join(self.output_dir, out_name)) + + def drawFigureWithLimit(self,mN,Ve,Z,func_text,out_name,S=[],histo_name="histo",zrange=[],plot_pred=False): + + #Set bins for the plots + logBins = 15 + stopBin = 1e-5 + startBin = 1e-12 + logWidth = [] + for i in range(0,logBins): + logWidth.append(ROOT.Math.pow(10,ROOT.TMath.Log10(startBin)+((ROOT.TMath.Log10(stopBin)-ROOT.TMath.Log10(startBin))/logBins)*i)) + logArray = array.array('d',logWidth) + + linBins = 11 + linBins0 = 10 + linWidth = [0,5,10,20,30,40,50,60,70,80,90] + linWidth0 = np.linspace(0,90,linBins0) + linArray = array.array('d', linWidth) + linArray0 = array.array('d', linWidth0) + + c = ROOT.TCanvas("c_"+histo_name,"canvas title") + c.cd() + # ROOT.gPad.SetLogx(1) + ROOT.gPad.SetLogy(1) + ROOT.gPad.SetLogz(1) + ROOT.gPad.SetRightMargin(0.15) + ROOT.gStyle.SetOptStat(0) + + # A base histogram to correctly set the bins + h0 = ROOT.TH2F("h0",r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins0-1, linArray0, logBins-1, logArray) + h0.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + h0.Draw() + + h = ROOT.TH2F(histo_name,r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins-1, linArray, logBins-1, logArray) + h.GetZaxis().SetTitle(func_text) + h.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + for m,v,z in zip(mN,Ve,Z): + h.Fill(m,v**2,z) + # h.Draw("same COLZ text") + # h.DrawCopy("same COLZ") + h.GetXaxis().SetRangeUser(0,90) + + ## Print text in figure + Text = ROOT.TLatex() + Text.SetNDC() + Text.SetTextAlign(31) + Text.SetTextSize(0.04) + Text.SetTextAlign(12) + Text.DrawLatex(0.090, 0.92, self.col_tex) + Text.SetNDC(ROOT.kTRUE) + Text.SetTextSize(0.04) + # Text.DrawLatex(0.62, 0.83, func_text) + # Text.DrawLatex(0.56, 0.83, self.s_tex) + # Text.DrawLatex(0.56, 0.78, self.lumi_tex) + # Text.DrawLatex(0.56, 0.73, self.ana_tex) + + leg = ROOT.TLegend(0.28,0.73,0.63,0.87) + leg.SetFillColor(0) + leg.SetFillStyle(0) + leg.SetLineColor(0) + leg.SetShadowColor(10) + leg.SetTextSize(0.035) + leg.SetTextFont(42) + + c.Modified() + c.Update() + + if (plot_pred): + x4,y4,x1,y1 = self.get_pred() + # X = np.power(10,x) + # Y = np.power(10,y) + X4 = array.array('d',x4) + Y4 = array.array('d',y4) + X1 = array.array('d',x1) + Y1 = array.array('d',y1) + + c.cd() + gr4 = ROOT.TGraph(len(X4),X4,Y4) + gr4.SetLineColor(3) + gr4.SetLineWidth(3) + gr4.Draw("same L") + gr4.GetXaxis().SetRangeUser(0,90) + + gr1 = ROOT.TGraph(len(X1),X1,Y1) + gr1.SetLineColor(3) + gr1.SetLineWidth(3) + gr1.SetLineStyle(7) + gr1.Draw("same L") + gr1.GetXaxis().SetRangeUser(0,90) + + c.Modified() + c.Update() + + leg.AddEntry(gr1, "Prediction","l") + leg.AddEntry(gr4, "Prediction","l") + # leg.Draw() + # Text.SetTextColor(2) + # Text.SetTextSize(0.04) + # Text.DrawLatex(0.67,0.32,"#bf{Prediction}") + + x = array.array('d') + x.append(0.01) + # # 3 signal event contour + # if S: + # hS = ROOT.TH2F("hS",r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins-1, linArray, logBins-1, logArray) + # hS.GetZaxis().SetTitle(func_text) + # hS.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + # for m,v,s in zip(mN,Ve,S): + # hS.Fill(m,v**2,s) + # x[0] = 3 + # hS.SetContour(1,x) + # hS.SetLineColor(3) + # hS.SetLineWidth(2) + # hS.Draw("cont3 C") + # leg.AddEntry(hS,"3 signal event") + # Text.SetTextColor(3) + # Text.DrawLatex(0.67,0.41,"#bf{3 signal event}") + + x[0] = 0.01 + h.SetContour(1,x) + h.SetLineWidth(3) + h.SetLineColor(5) + # Text.SetTextColor(2) + # Text.DrawLatex(0.3,0.6,"#bf{s = 0.01}") + # h.DrawCopy("cont3 C same") + leg.AddEntry(h,"s = 0.01","l") + h22 = h.Clone() + x[0] = 0.05 + h22.SetContour(1,x) + h.SetLineWidth(3) + h22.SetLineColor(4) + # Text.SetTextColor(3) + # Text.DrawLatex(0.3,0.7,"#bf{s = 0.05}") + # h22.DrawCopy("cont3 C same") + leg.AddEntry(h22,"s = 0.05","l") + + leg.Draw() + c.Modified() + c.Update() + + c.SaveAs(os.path.join(self.output_dir, out_name)) + + def drawFigureWithLimitZoom(self,mN,Ve,Z,func_text,out_name,S=[],histo_name="histo",zrange=[],plot_pred=False): + + #Set bins for the plots + logBins = 10 + stopBin = 2.9e-7 + startBin = 2e-12 + logWidth = [] + for i in range(0,logBins): + logWidth.append(ROOT.Math.pow(10,ROOT.TMath.Log10(startBin)+((ROOT.TMath.Log10(stopBin)-ROOT.TMath.Log10(startBin))/logBins)*i)) + logArray = array.array('d',logWidth) + + linBins = 9 + linBins0 = 10 + linWidth = [5,10,20,30,40,50,60,70,80] + linWidth0 = np.linspace(0,80,linBins0) + linArray = array.array('d', linWidth) + linArray0 = array.array('d', linWidth0) + + c = ROOT.TCanvas("c_"+histo_name,"canvas title",360,250) + c.cd() + # ROOT.gPad.SetLogx(1) + ROOT.gPad.SetLogy(1) + ROOT.gPad.SetLogz(1) + ROOT.gPad.SetRightMargin(0.3) + ROOT.gStyle.SetOptStat(0) + + # A base histogram to correctly set the bins + # h0 = ROOT.TH2F("h0",r";m_{N};\left|V_{eN}\right|^{2}", linBins0-1, linArray0, logBins-1, logArray) + # h0.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + # h0.Draw() + + h = ROOT.TH2F(histo_name,r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins-1, linArray, logBins-1, logArray) + h.GetZaxis().SetTitle(func_text) + h.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + for m,v,z in zip(mN,Ve,Z): + h.Fill(m,v**2,z) + h.DrawCopy("COLZ") + h.GetXaxis().SetRangeUser(0,90) + + ## Print text in figure + Text = ROOT.TLatex() + Text.SetNDC() + Text.SetTextAlign(31) + Text.SetTextSize(0.04) + Text.SetTextAlign(12) + Text.DrawLatex(0.090, 0.92, self.col_tex) + Text.SetNDC(ROOT.kTRUE) + Text.SetTextSize(0.04) + # Text.DrawLatex(0.62, 0.83, func_text) + # Text.DrawLatex(0.47, 0.86, self.s_tex) + # Text.DrawLatex(0.47, 0.81, self.lumi_tex) + # Text.DrawLatex(0.47, 0.76, self.ana_tex) + + x = array.array('d') + x.append(0.01) + + # 3 signal event contour + if S: + hS = ROOT.TH2F("hS",r";m_{N} [GeV];\left|V_{eN}\right|^{2}", linBins-1, linArray, logBins-1, logArray) + hS.GetZaxis().SetTitle(func_text) + hS.GetZaxis().SetRangeUser(zrange[0],zrange[1]) + for m,v,s in zip(mN,Ve,S): + hS.Fill(m,v**2,s) + x[0] = 1 + hS.SetContour(1,x) + hS.SetLineColor(2) + hS.SetLineWidth(2) + hS.Draw("cont3 same") + Text.SetTextColor(3) + # Text.DrawLatex(0.67,0.41,"#bf{3 signal event}") + + x[0] = 0.01 + h.SetContour(1,x) + h.SetLineWidth(2) + h.SetLineColor(5) + Text.SetTextColor(5) + # Text.DrawLatex(0.3,0.6,"#bf{s = 0.01}") + h.DrawCopy("cont3 same") + x[0] = 0.05 + h.SetContour(1,x) + h.SetLineColor(4) + Text.SetTextColor(4) + # Text.DrawLatex(0.3,0.7,"#bf{s = 0.05}") + h.DrawCopy("cont3 same") + x[0] = 0.5 + h.SetContour(1,x) + h.SetLineColor(4) + # Text.SetTextColor(4) + # Text.DrawLatex(0.3,0.6,"#bf{s = 0.5}") + h.DrawCopy("cont3 same") + + if (plot_pred): + x4,y4,x1,y1 = self.get_pred() + # X = np.power(10,x) + # Y = np.power(10,y) + X4 = array.array('d',x4) + Y4 = array.array('d',y4) + X1 = array.array('d',x1) + Y1 = array.array('d',y1) + + c.cd() + gr4 = ROOT.TGraph(len(X4),X4,Y4) + gr4.SetLineColor(3) + gr4.SetLineWidth(2) + gr4.Draw("same L") + gr4.GetXaxis().SetRangeUser(0,90) + + gr1 = ROOT.TGraph(len(X1),X1,Y1) + gr1.SetLineColor(3) + gr1.SetLineWidth(2) + gr1.SetLineStyle(7) + gr1.Draw("same L") + gr1.GetXaxis().SetRangeUser(0,90) + + c.Modified() + c.Update() + + # leg = ROOT.TLegend(0.56,0.13,0.73,0.17) + # leg.SetFillColor(0) + # leg.SetFillStyle(0) + # leg.SetLineColor(0) + # leg.SetShadowColor(10) + # leg.SetTextSize(0.035) + # leg.SetTextFont(42) + # leg.AddEntry(gr, "Theoretical prediction") + # leg.Draw() + Text.SetTextColor(2) + Text.SetTextSize(0.04) + # Text.DrawLatex(0.67,0.32,"#bf{Prediction}") + + c.Modified() + c.Update() + + c.SaveAs(os.path.join(self.output_dir, out_name)) + + + ### returns S/sqrt(S+B) ### + def func1(self,S,B): + ret = [] + for s in S: + if s == 0: + ret.append(0) + # print(0) + else: + ret.append(s/ROOT.Math.sqrt(s+B)) + # print(s/ROOT.Math.sqrt(s+B)) + return ret + + ### returns S/sqrt(S+B+DeltaB) ### + def func2(self,S,B,DeltaB): + ret = [] + for s in S: + if s == 0: + ret.append(0) + # print(0) + else: + ret.append(s/ROOT.Math.sqrt(s+B+DeltaB)) + # print(s/ROOT.Math.sqrt(s+B+DeltaB)) + return ret + + ### returns S/sqrt(B+DeltaB) ### + def func3(self,S,B,DeltaB): + ret = [] + for s in S: + ret.append(s/ROOT.Math.sqrt(B+DeltaB)) + return ret + + ### returns decay length approximation ### + def func_L(self,mN,Ve): + ret = [] + for m,v in zip(mN,Ve): + ret.append(25*((1e-6/v)**2)*(np.power((100/m),5))) + return ret + + + ## Print tabular with all values ### + def saveTab(self,mN,Ve,S,Z,name1,Z2,name2): + f = open("sensitivityTabular.txt","w") + print('\n\n\n\\begin{table}[H] \n \\centering \n \\begin{tabular}{|c|c|c|c|c|} \hline \n $m_N$ & $|V_{eN}|^2$ & S & $',name1,'$ & $',name2,'$ \\\\ \\hline',file=f) + for m,v,s,z,z2 in zip(mN,Ve,S,Z,Z2): + print(f' {m} & {v**2:.2e} & {s:.3f} & {z:.3f} & {z2:.2e}\\\\', file=f) + print(' \\hline \n \\end{tabular} \n \\caption{Caption} \n \\label{tab:my_label} \n\\end{table}', file=f) + f.close() + + def get_pred(self): + # X: log(mN/GeV) + # pred_data = pd.read_csv("/afs/cern.ch/user/l/lrygaard/public/FCC_ee_data.csv",header=None, sep=",", names = ["X", "Y"]) + pred_data4 = pd.read_csv("HNLe-FCC-ee-IDEA-4-events.csv",header=None, sep='\t', names = ["X", "Y"]) + pred_data1 = pd.read_csv("HNLe-FCC-ee-IDEA-1-event.csv",header=None, sep='\t', names = ["X", "Y"]) + x4, y4, x1, y1 = [], [], [], [] + for i in range(len(pred_data4.index)): + x4.append(pred_data4.iloc[i]['X']) + y4.append(pred_data4.iloc[i]['Y']) + + for i in range(len(pred_data1.index)): + x1.append(pred_data1.iloc[i]['X']) + y1.append(pred_data1.iloc[i]['Y']) + + return x4,y4,x1,y1 + + +if __name__=="__main__": + + ana_tex = 'e^{+}e^{-} #rightarrow Z #rightarrow #gamma ALP #rightarrow 3#gamma' + collider = 'FCC-ee' + energy = 91 + intLumi = 150 + + output_dir = "plots_sensitivity/" + plotting = Plotting(ana_tex,energy,intLumi,output_dir) + + ### Values ### + # B = 0 + # DeltaB = 3.88e+07 + 7.55e+07 + 6.83e+07 + 1.92e+07 + 2.79e+07 + + # Background # + # Ztautau + Zee + Zbb + Zcc + Zuds + # B = 6.64e+04 + 0 + 1.72e+03 + 0 + 0 + B = 0.00e+00 + 7.16e+06 + 1.39e+03 + DeltaB = 3.84e+04 + 3.94e+06 + 1.72e+03 + 1.23e+03 + 2.79e+03 + + B_d0cut = 7.47e+06 + 0 + 1.72e+03 + 0 + 0 + print("DeltaB: ", DeltaB) + + # Signal # + # mN = [5, 5, 5, 5, 5, 5, 5, 5, 5, + # 10, 10, 10, 10, 10, 10, 10, 10, 10, + # 20, 20, 20, 20, 20, 20, 20, 20, 20, + # 30, 30, 30, 30, 30, 30, 30, 30, 30, + # 40, 40, 40, 40, 40, 40, 40, 40, 40, + # 50, 50, 50, 50, 50, 50, 50, 50, 50, + # 60, 60, 60, 60, 60, 60, 60, 60, 60, + # 70, 70, 70, 70, 70, 70, 70, 70, 70] + mN = [0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, 0.0316, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, 0.316, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, 3.16, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6, 31.6] + # Ve = [2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6, + # 2e-4, 1e-4, 5e-5, 3e-5, 2e-5, 1e-5, 6e-6, 3e-6, 2e-6] + Ve = [0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6, + 0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6, + 0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6, + 0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6, + 0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6, + 0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6, + 0.0000006, 0.0000019, 0.000006, 0.000019, 0.00006, 0.00019, 0.0006, 0.0019, 0.006, 0.019, 0.06, 0.19, 0.6] + + # S = [2.19e+01, 2.36e+00, 1.04e-01, 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, + # 8.92e+02, 1.84e+02, 1.87e+01, 2.09e+00, 4.51e-01, 3.71e-02, 3.37e-03, 2.17e-04, 5.07e-05, + # 6.56e+02, 2.71e+02, 8.15e+01, 3.12e+01, 1.38e+01, 2.39e+00, 3.31e-01, 2.33e-02, 4.83e-03, + # 3.38e+01, 8.66e+01, 5.20e+01, 2.50e+01, 1.24e+01, 3.39e+00, 1.24e+00, 1.91e-01, 4.87e-02, + # 3.43e-02, 3.44e+00, 1.37e+01, 1.21e+01, 7.75e+00, 2.63e+00, 1.04e+00, 2.68e-01, 1.12e-01, + # 1.00e-06, 1.00e-06, 5.36e-01, 2.20e+00, 2.67e+00, 1.56e+00, 7.29e-01, 2.12e-01, 8.93e-02, + # 1.00e-06, 1.00e-06, 1.00e-06, 2.00e-02, 2.30e-01, 5.02e-01, 3.52e-01, 1.32e-01, 6.43e-02, + # 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, 4.75e-04, 5.80e-01, 7.03e-02, 5.23e-02, 3.12e-02] + # S = [0.00e+00, 5.45e-08, 9.27e+00, 6.90e+03, + # 3.07e-03, 4.61e+00, 4.26e+00, 1.08e+04, + # 3.30e-02, 3.30e+00, 3.12e+02, 9.03e+03] + +# Keeping the bottom left corner weirdness: + # S = [2.22e-02, 2.19e-01, 2.05e+00, 2.06e+01, 2.17e+02, 0.00e+00, 0.00e+00, 1.46e+00, 1.34e+04, 9.17e+05, + # 5.95e-02, 5.94e-01, 5.95e+00, 0.00e+00, 0.00e+00, 1.46e-04, 2.08e+02, 2.48e+04, 2.01e+06, 5.39e+07, + # 1.15e-01, 1.15e+00, 0.00e+00, 2.96e-02, 4.15e+00, 5.59e+02, 4.61e+04, 1.09e+06, 1.15e+07, 1.15e+08, + # 0.00e+00, 8.87e-04, 6.38e-02, 8.21e+00, 6.35e+02, 1.23e+04, 1.24e+05, 1.23e+06, 1.24e+07, 1.23e+08, + # 8.72e-04, 9.63e-02, 6.60e+00, 1.21e+02, 1.20e+03, 1.20e+04, 1.21e+05, 1.20e+06, 1.21e+07, 1.20e+08, + # 5.94e-02, 9.45e-01, 8.92e+00, 8.82e+01, 8.86e+02, 8.85e+03, 8.87e+04, 8.84e+05, 8.83e+06, 8.82e+07, + # 3.58e-03, 3.57e-02, 3.54e-01, 3.54e+00, 3.54e+01, 3.60e+02, 3.52e+03, 3.52e+04, 3.58e+05, 3.53e+06] + +# Removing the bottom left corner weirdness: + S = [0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 1.46e+00, 1.34e+04, 9.17e+05, + 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 1.46e-04, 2.08e+02, 2.48e+04, 2.01e+06, 5.39e+07, + 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 2.96e-02, 4.15e+00, 5.59e+02, 4.61e+04, 1.09e+06, 1.15e+07, 1.15e+08, + 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 8.87e-04, 6.38e-02, 8.21e+00, 6.35e+02, 1.23e+04, 1.24e+05, 1.23e+06, 1.24e+07, 1.23e+08, + 0.00e+00, 0.00e+00, 5.90e-06, 8.72e-04, 9.63e-02, 6.60e+00, 1.21e+02, 1.20e+03, 1.20e+04, 1.21e+05, 1.20e+06, 1.21e+07, 1.20e+08, + 8.56e-08, 1.10e-05, 8.89e-04, 5.94e-02, 9.45e-01, 8.92e+00, 8.82e+01, 8.86e+02, 8.85e+03, 8.87e+04, 8.84e+05, 8.83e+06, 8.82e+07, + 1.81e-07, 1.15e-05, 3.00e-04, 3.58e-03, 3.57e-02, 3.54e-01, 3.54e+00, 3.54e+01, 3.60e+02, 3.52e+03, 3.52e+04, 3.58e+05, 3.53e+06] + + S_d0cut = [2.19e+01, 2.36e+00, 1.04e-01, 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, + 8.92e+02, 1.84e+02, 1.87e+01, 2.09e+00, 4.51e-01, 3.71e-02, 3.37e-03, 2.17e-04, 5.07e-05, + 3.48e+00, 2.30e+02, 3.71e+01, 2.10e+01, 1.13e+01, 3.28e+00, 1.22e+00, 1.89e-01, 4.84e-02, + 3.38e+01, 8.66e+01, 5.20e+01, 2.50e+01, 1.24e+01, 3.39e+00, 1.24e+00, 1.91e-01, 4.87e-02, + 3.43e-02, 3.44e+00, 1.37e+01, 1.21e+01, 7.75e+00, 2.63e+00, 1.04e+00, 2.68e-01, 1.12e-01, + 1.00e-06, 1.00e-06, 5.36e-01, 2.20e+00, 2.67e+00, 1.56e+00, 7.29e-01, 2.12e-01, 8.93e-02, + 1.00e-06, 1.00e-06, 1.00e-06, 2.00e-02, 2.30e-01, 5.02e-01, 3.52e-01, 1.32e-01, 6.43e-02, + 1.00e-06, 1.00e-06, 1.00e-06, 1.00e-06, 4.75e-04, 5.80e-01, 7.03e-02, 5.23e-02, 3.12e-02] + + #No selection + S0 = [2.97e+03, 7.43e+02, 1.86e+02, 6.69e+01, 2.97e+01, 7.43e+00, 2.68e+00, 6.69e-01, 2.97e-01, + 2.53e+03, 6.33e+02, 1.58e+02, 5.70e+01, 2.53e+01, 6.33e+00, 2.28e+00, 5.70e-01, 2.53e-01, + 2.26e+03, 5.65e+02, 1.41e+02, 5.08e+01, 2.26e+01, 5.65e+00, 2.03e+00, 5.08e-01, 2.26e-01, + 2.00e+03, 5.01e+02, 1.25e+02, 4.51e+01, 2.00e+01, 5.01e+00, 1.80e+00, 4.51e-01, 2.00e-01, + 1.71e+03, 4.29e+02, 1.07e+02, 3.86e+01, 1.71e+01, 4.29e+00, 1.54e+00, 3.86e-01, 1.71e-01, + 1.37e+03, 3.42e+02, 8.55e+01, 3.08e+01, 1.37e+01, 3.42e+00, 1.23e+00, 3.08e-01, 1.37e-01, + 9.86e+02, 2.46e+02, 6.16e+01, 2.22e+01, 9.86e+00, 2.46e+00, 8.87e-01, 2.22e-01, 9.86e-02, + 5.94e+02, 1.48e+02, 3.71e+01, 1.34e+01, 5.94e+00, 1.48e+00, 5.35e-01, 1.34e-01, 5.94e-02] + + # 2 reco e + S1 = [2.42e+01, 2.51e+00, 1.04e-01, 2.67e-03, 1.19e-03, 7.94e-01, 2.82e-01, 7.31e-02, 3.24e-02, + 9.91e+02, 1.98e+02, 2.00e+01, 2.22e+00, 4.86e-01, 3.85e-02, 3.78e-03, 2.39e-04, 5.07e-05, + 1.54e+03, 3.85e+02, 9.63e+01, 3.47e+01, 1.51e+01, 2.58e+00, 3.57e-01, 2.50e-02, 5.23e-03, + 1.54e+03, 3.85e+02, 9.63e+01, 3.47e+01, 1.54e+01, 3.85e+00, 1.38e+00, 2.10e-01, 5.34e-02, + 1.36e+03, 3.39e+02, 8.49e+01, 3.07e+01, 1.36e+01, 3.39e+00, 1.22e+00, 3.00e-01, 1.24e-01, + 1.10e+03, 2.74e+02, 6.87e+01, 2.47e+01, 1.10e+01, 2.75e+00, 9.90e-01, 2.47e-01, 9.92e-02, + 7.88e+02, 1.97e+02, 4.92e+01, 1.78e+01, 7.88e+00, 1.97e+00, 7.11e-01, 1.77e-01, 7.14e-02, + 4.75e+02, 1.19e+02, 2.97e+01, 1.07e+01, 4.75e+00, 1.19e+00, 4.28e-01, 1.07e-01, 4.75e-02] + + # vetoes + S2 = [2.42e+01, 2.51e+00, 1.04e-01, 2.67e-03, 1.19e-03, 7.88e-01, 2.80e-01, 7.25e-02, 3.21e-02, + 9.81e+02, 1.97e+02, 1.98e+01, 2.20e+00, 4.81e-01, 3.80e-02, 3.78e-03, 2.39e-04, 5.07e-05, + 1.51e+03, 3.78e+02, 9.46e+01, 3.42e+01, 1.48e+01, 2.53e+00, 3.50e-01, 2.47e-02, 5.12e-03, + 1.50e+03, 3.77e+02, 9.42e+01, 3.39e+01, 1.50e+01, 3.76e+00, 1.34e+00, 2.03e-01, 5.18e-02, + 1.32e+03, 3.30e+02, 8.25e+01, 2.98e+01, 1.32e+01, 3.30e+00, 1.19e+00, 2.91e-01, 1.20e-01, + 1.06e+03, 2.66e+02, 6.64e+01, 2.39e+01, 1.06e+01, 2.67e+00, 9.57e-01, 2.39e-01, 9.57e-02, + 7.59e+02, 1.90e+02, 4.74e+01, 1.71e+01, 7.59e+00, 1.90e+00, 6.85e-01, 1.71e-01, 6.89e-02, + 4.56e+02, 1.14e+02, 2.84e+01, 1.02e+01, 4.56e+00, 1.14e+00, 4.11e-01, 1.02e-01, 4.55e-02] + + # missing energy gt 10 GeV + S3 = [2.23e+01, 2.39e+00, 1.04e-01, 1.34e-03, 5.94e-04, 7.25e-01, 2.59e-01, 6.74e-02, 2.95e-02, + 9.36e+02, 1.88e+02, 1.90e+01, 2.12e+00, 4.56e-01, 3.78e-02, 3.47e-03, 2.39e-04, 5.07e-05, + 1.44e+03, 3.61e+02, 9.02e+01, 3.26e+01, 1.41e+01, 2.41e+00, 3.35e-01, 2.35e-02, 4.89e-03, + 1.42e+03, 3.56e+02, 8.89e+01, 3.20e+01, 1.42e+01, 3.54e+00, 1.27e+00, 1.92e-01, 4.90e-02, + 1.25e+03, 3.12e+02, 7.80e+01, 2.81e+01, 1.25e+01, 3.12e+00, 1.12e+00, 2.75e-01, 1.13e-01, + 1.02e+03, 2.55e+02, 6.39e+01, 2.30e+01, 1.02e+01, 2.56e+00, 9.21e-01, 2.30e-01, 9.06e-02, + 7.40e+02, 1.85e+02, 4.62e+01, 1.67e+01, 7.40e+00, 1.85e+00, 6.68e-01, 1.67e-01, 6.52e-02, + 4.49e+02, 1.12e+02, 2.81e+01, 1.01e+01, 4.49e+00, 1.12e+00, 4.05e-01, 1.01e-01, 4.49e-02] + + # d0 gt 0.5 mm + S4 = [2.19e+01, 2.36e+00, 1.04e-01, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, + 8.92e+02, 1.84e+02, 1.87e+01, 2.09e+00, 4.51e-01, 3.71e-02, 3.37e-03, 2.17e-04, 5.07e-05, + 6.56e+02, 2.71e+02, 8.15e+01, 3.12e+01, 1.38e+01, 2.39e+00, 3.31e-01, 2.33e-02, 4.83e-03, + 3.38e+01, 8.66e+01, 5.20e+01, 2.50e+01, 1.24e+01, 3.39e+00, 1.24e+00, 1.91e-01, 4.87e-02, + 3.43e-02, 3.44e+00, 1.37e+01, 1.21e+01, 7.75e+00, 2.63e+00, 1.04e+00, 2.68e-01, 1.12e-01, + 0.00e+00, 0.00e+00, 5.36e-01, 2.20e+00, 2.67e+00, 1.56e+00, 7.29e-01, 2.12e-01, 8.93e-02, + 0.00e+00, 0.00e+00, 0.00e+00, 2.00e-02, 2.30e-01, 5.02e-01, 3.52e-01, 1.32e-01, 6.43e-02, + 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 4.75e-04, 5.80e-01, 7.03e-02, 5.23e-02, 3.12e-02] + + #Predictions + # pred_Ve = [5e-9,5e-10,8e-11,2.5e-11,1.5e-11,2e-11,3e-11,1e-10,6e-10,3e-9,2e-8,4e-7] + # pred_Ve_array = array.array('d',pred_Ve) + # pred_m = [1,10,20,30,40,50,60,60,50,40,30,20] + # pred_m2 = [m+5 for m in pred_m] + # pred_m_array = array.array('d',pred_m) + + # pred_mm = [0,5,5,15,15,25,25,35,35,45,45,55,55,65,65,55,55,45,45,35,35,25,25,15] + # pred_Vee = [5e-9,5e-9,5e-10,5e-10,8e-11,8e-11,2.5e-11,2.5e-11,1.5e-11,1.5e-11,2e-11,2e-11,3e-11,3e-11,1e-10,1e-10,6e-10,6e-10,3e-9,3e-9,2e-8,2e-8,4e-7,4e-7,4e-7] + # pred_mm_array = array.array('d',pred_mm) + # pred_Vee_array = array.array('d',pred_Vee) + + ## Figure + func_text1 = "s = #frac{n_{S}}{#sqrt{n_{S}+n_{B}}}" + out_name = "figureMerlin2.png" + plotting.drawFigure(mN,Ve,plotting.func1(S,B),func_text1,out_name,"histo1",zrange=[1e-10,1e+5],plot_pred=False) + + # out_name = "figure0lim.pdf" + # plotting.drawFigureWithLimit(mN,Ve,plotting.func1(S4,B),func_text1,out_name,histo_name="histo11",zrange=[1e-11,10],plot_pred=False) + + ## Figure + # func_text2 = "s = #frac{S}{#sqrt{S+B+#Delta B}}" + # out_name = "figure1.pdf" + # plotting.drawFigure(mN,Ve,plotting.func2(S,B,DeltaB),func_text2,out_name,"histo2",zrange=[1e-11,10],plot_pred=True) + + # out_name = "figure1limzoom.pdf" + # plotting.drawFigureWithLimitZoom(mN,Ve,plotting.func2(S4,B,DeltaB),func_text2,out_name,histo_name="histo21",zrange=[1e-8,10],plot_pred=True) + # # plotting.drawFigureWithLimitZoom(mN,Ve,plotting.func2(S4,B,DeltaB),func_text2,out_name,histo_name="histo21",zrange=[1e-8,10],plot_pred=True) + + # out_name = "figure1lim.pdf" + # plotting.drawFigureWithLimit(mN,Ve,plotting.func2(S4,B,DeltaB),func_text2,out_name,S1,histo_name="histo22",zrange=[1e-8,10],plot_pred=True) + + # out_name = "figure1num.pdf" + # plotting.drawFigureWithNumbers(mN,Ve,plotting.func2(S4,B,DeltaB),func_text2,out_name,"histo23",zrange=[1e-8,10]) + + + ## Figure + # func_text3 = "s = #frac{S}{#sqrt{B+#Delta B}}" + # out_name = "figureMerlin.pdf" + # plotting.drawFigure(mN,Ve,plotting.func3(S,B,DeltaB),func_text1,out_name,"histo3",zrange=[1e-10,0.1]) + + ## Figure Signal no cuts + # func_text4 = "S" + # out_name = "signal_nocut.pdf" + # plotting.drawFigureWithNumbers(mN,Ve,S0,func_text4,out_name,"histo4",zrange=[1e-5,1e4]) + + ## Figure Signal Exactly 2 reco e + # out_name = "signal_2RecoE.pdf" + # plotting.drawFigureWithNumbers(mN,Ve,S1,func_text4,out_name,"histo5",zrange=[1e-5,1e4]) + + ## Figure Signal Vetoes + # out_name = "signal_vetoes.pdf" + # plotting.drawFigureWithNumbers(mN,Ve,S2,func_text4,out_name,"histo6",zrange=[1e-5,1e4]) + + ## Figure Signal MissingEnergyGt10 + # out_name = "signal_MissingEnergyGt10.pdf" + # plotting.drawFigureWithNumbers(mN,Ve,S3,func_text4,out_name,"histo7",zrange=[1e-5,1e4]) + + ## Figure Signal absD0Gt0p5 + # out_name = "signal_absD0Gt0p5.pdf" + # plotting.drawFigureWithNumbers(mN,Ve,S4,func_text4,out_name,"histo8",zrange=[1e-5,1e4]) + + # out_name = "signal_absD0Gt0p5_lim.pdf" + # plotting.drawFigureWithLimit(mN,Ve,S4,func_text4,out_name,S,histo_name="histo81",zrange=[1e-5,1e4],plot_pred=False) + + # Figure decay length + # out_name = "signal_L.pdf" + # func_text8 = "L [mm]" + # plotting.drawFigureWithLimit(mN,Ve,plotting.func_L(mN,Ve),func_text4,out_name,S,histo_name="histo9",zrange=[1e-5,1e4],plot_pred=False) + + + ## Table + # plotting.saveTab(mN,Ve,S,plotting.func1(S,B),func_text1,plotting.func2(S,B,DeltaB),func_text2) From bf3591477f50fb6585aa50f900b26b77586abedc Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Thu, 8 Aug 2024 10:16:53 +0200 Subject: [PATCH 44/49] vertexing utils --- .../dataframe/FCCAnalyses/VertexingUtils.h | 203 ------------------ 1 file changed, 203 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index a36f30d1c5..4e6136935f 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -119,210 +119,7 @@ namespace VertexingUtils{ /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; -// /////////////////////////////////////////////////// -// /// functions used for SV reconstruction -// /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV -// * first entry: PV, all subsequent entries: SVs -// */ -// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, -// ROOT::VecOps::RVec SV ); - -// ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, -// ROOT::VecOps::RVec> SV ); - -// /** returns the invariant mass of a two-track vertex -// * CAUTION: m1 -> mass of first track, m2 -> mass of second track -// * by default both pions -// */ -// double get_invM_pairs( FCCAnalysesVertex vertex, -// double m1 = 0.13957039, -// double m2 = 0.13957039) ; - -// ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, -// double m1 = 0.13957039, -// double m2 = 0.13957039 ) ; - -// /** returns the invariant mass of a vertex -// * assuming all tracks to be pions -// */ -// double get_invM( FCCAnalysesVertex vertex ) ; - -// /** returns the invariant mass of a vector of vertices -// * assuming all tracks to be pions -// */ -// ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; - -// /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ -// double get_PV2V0angle( FCCAnalysesVertex V0, -// FCCAnalysesVertex PV) ; - -// /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ -// double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, -// FCCAnalysesVertex vtx, -// FCCAnalysesVertex PV ) ; - -// /** returns a track's energy -// * assuming the track to be a pion -// */ -// double get_trackE( edm4hep::TrackState track ) ; - -// /////////////////////////////////////////////////// -// /// V0 Reconstruction -// /// Return the number of reconstructed V0s -// int get_n_SV( FCCAnalysesV0 SV ); - -// /// Return the vertex position of all reconstructed V0s (in mm) -// ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); - -// /// Return the PDG IDs of all reconstructed V0s -// ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); - -// /// Return the invariant masses of all reconstructed V0s -// ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); - -// /// Return the momentum of all reconstructed V0s -// ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); - -// /// Return chi2 of all reconstructed V0s -// ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); - -// /////////////////////////////////////////////////// - -// /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 -// /// Return the number of reconstructed SVs -// int get_n_SV( ROOT::VecOps::RVec vertices ); - -// /// Return the momentum of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); - -// /// Return the vertex position of all reconstructed SVs (in mm) -// ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); - -// /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); - -// /// Return chi2 of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); - -// /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); - -// /// Return no of DOF of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); - -// /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); - -// /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); - -// /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) -// ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, -// ROOT::VecOps::RVec nSV_jet, -// ROOT::VecOps::RVec jets ); - -// /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) -// ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, -// ROOT::VecOps::RVec nSV_jet, -// ROOT::VecOps::RVec jets ); - -// /// Return the pointing angle of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, -// FCCAnalysesVertex PV ); - -// /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, -// FCCAnalysesVertex PV ); - -// /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, -// FCCAnalysesVertex PV ); - -// /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, -// TVector3 location ); - -// /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, -// edm4hep::Vector3d location ); - -// /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, -// TVector3 location ); - -// /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, -// edm4hep::Vector3d location ); - -// /////////////////////////////////////////////////// - -// /// For get_SV_jets /// - -// /// Return the number of reconstructed SVs -// ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); - -// /// Return the total number of reconstructed SVs -// int get_n_SV( ROOT::VecOps::RVec> vertices ); - -// /// Return the number of reconstructed SVs per jet -// ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); - -// /// Return the tracks separated by jets -// std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, -// ROOT::VecOps::RVec thetracks, -// ROOT::VecOps::RVec jets, -// std::vector> jet_consti ); - -// /// Return V0s separated by jets -// ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, -// ROOT::VecOps::RVec nSV_jet ); - -// // --- for get_SV_jets --- // -// ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); -// ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); -// ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); -// ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); -// ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); -// ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); -// ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); -// /// Return the vertex position of all reconstructed SVs (in mm) -// ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); -// // --- for get_SV_jets --- // - -// float get_trackMom( edm4hep::TrackState & atrack ); - - -// // --- Conversion methods between the Delphes and edm4hep conventions - -/// convert track parameters, from edm4hep to delphes conventions - TVectorD Edm4hep2Delphes_TrackParam( const TVectorD& param, bool Units_mm ); -/// convert track parameters, from delphes to edm4hep conventions - TVectorD Delphes2Edm4hep_TrackParam( const TVectorD& param, bool Units_mm ); -/// convert track covariance matrix, from edm4hep to delphes conventions - TMatrixDSym Edm4hep2Delphes_TrackCovMatrix( const std::array& covMatrix, bool Units_mm ); -#if __has_include("edm4hep/CovMatrix6f.h") - TMatrixDSym Edm4hep2Delphes_TrackCovMatrix( const edm4hep::CovMatrix6f& covMatrix, bool Units_mm ); -#endif -/// convert track covariance matrix, from delphes to edm4hep conventions - std::array Delphes2Edm4hep_TrackCovMatrix( const TMatrixDSym& cov, bool Units_mm ) ; - - -// <<<<<<< HEAD -// /// --- Internal methods needed by the code of Franco B: - TVectorD get_trackParam( edm4hep::TrackState & atrack, bool Units_mm = false) ; - TMatrixDSym get_trackCov( const edm4hep::TrackState & atrack, bool Units_mm = false) ; - -// ======= /////////////////////////////////////////////////// /// functions used for SV reconstruction From ef69cc2760d21033bdd88969c0e9b4a2cdd0801e Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Thu, 8 Aug 2024 10:20:38 +0200 Subject: [PATCH 45/49] vertexing --- analyzers/dataframe/FCCAnalyses/VertexingUtils.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index 4e6136935f..e1072c53f2 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -115,11 +115,9 @@ namespace VertexingUtils{ /// Return the number of tracks in a given track collection int get_nTracks(ROOT::VecOps::RVec tracks); -// <<<<<<< HEAD /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; - /////////////////////////////////////////////////// /// functions used for SV reconstruction @@ -300,7 +298,6 @@ namespace VertexingUtils{ ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); // --- for get_SV_jets --- // - // --- Internal methods needed by the code of Franco B : float get_trackMom( edm4hep::TrackState & atrack ); From 83717565a16b69fe2313757650032c2837698b60 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Thu, 8 Aug 2024 10:48:12 +0200 Subject: [PATCH 46/49] deleting --- .../ALPs/output_finalSel/outputTabular.txt | 29 ------------------- .../bsm/LLPs/ALPs/output_finalSel/test1.py | 28 ------------------ 2 files changed, 57 deletions(-) delete mode 100644 examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt delete mode 100644 examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py diff --git a/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt b/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt deleted file mode 100644 index 8d0eca75a8..0000000000 --- a/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/outputTabular.txt +++ /dev/null @@ -1,29 +0,0 @@ -\begin{table}[H] - \centering - \resizebox{\textwidth}{!}{ - \begin{tabular}{|l||c|c|c|} \hline - & Before selection & Good GEN ALP mass & Good GEN ALP mass and 2 reco electrons \\ - \hline - $m_ALP =$ 1 GeV, $c_{YY} = 0.5$ & 1.00e+05 $\pm$ 3.16e+02 & 9.85e+04 $\pm$ 3.14e+02 & 1.45e+03 $\pm$ 3.80e+01 \\ - \hline - \end{tabular}} - \caption{Caption} - \label{tab:my_label} -\end{table} - - -Efficiency: -\begin{table}[H] - \centering - \resizebox{\textwidth}{!}{ - \begin{tabular}{|l||c|c|c|} \hline - & $m_ALP =$ 1 GeV, $c_{YY} = 0.5$ \\ - \hline - Before selection & 1.0 \\ - Good GEN ALP mass & 0.985 \\ - Good GEN ALP mass and 2 reco electrons & 0.014 \\ - \hline - \end{tabular}} - \caption{Caption} - \label{tab:my_label} -\end{table} diff --git a/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py b/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py deleted file mode 100644 index e1492bfb05..0000000000 --- a/examples/FCCee/bsm/LLPs/ALPs/output_finalSel/test1.py +++ /dev/null @@ -1,28 +0,0 @@ -from ROOT import TFile, gDirectory, TH1D, TCanvas, TMath - -myfile = TFile('ALP_Z_aa_1GeV_cYY_0p5_sel0_histo.root') - -mychain = gDirectory.Get('FSGenPhoton_eta') -entries = mychain.GetEntriesFast() - -# Setup: -eta_hist = TH1D("eta", "eta histogram", 100, -3, 3) -eta_hist.GetXaxis().SetTitle("Final state gen photons eta") -eta_hist.GetYaxis().SetTitle("events") - -for jentry in range(entries): - ientry = mychain.LoadTree(jentry) - if ientry < 0: - break - nb = mychain.GetEntry(jentry) - if nb <= 0: - continue - - # Loop: - eta = mychain.eta - eta_hist.Fill(eta) - -# Wrap-up: -eta_hist.Draw("e") - -kill = input("q to exit: ") From a7b8ae57efa1184a35d9c9290430afd2fb2e61c1 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Thu, 8 Aug 2024 10:56:57 +0200 Subject: [PATCH 47/49] vertexing utils --- .../dataframe/FCCAnalyses/VertexingUtils.h | 248 ++++++++---------- 1 file changed, 113 insertions(+), 135 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h index d8086efc1d..5d51c14526 100644 --- a/analyzers/dataframe/FCCAnalyses/VertexingUtils.h +++ b/analyzers/dataframe/FCCAnalyses/VertexingUtils.h @@ -53,7 +53,7 @@ namespace VertexingUtils{ ROOT::VecOps::RVec invM; // invariant mass ROOT::VecOps::RVec nSV_jet; // no of V0s per jet }; - + /// Structure to keep useful track information that is related to the vertex struct FCCAnalysesVertexMC{ TVector3 vertex; @@ -100,16 +100,16 @@ namespace VertexingUtils{ int get_VertexNtrk( FCCAnalysesVertex TheVertex ) ; ROOT::VecOps::RVec get_VertexNtrk( ROOT::VecOps::RVec vertices ) ; - + /// Retrieve the tracks indices from FCCAnalysesVertex ROOT::VecOps::RVec get_VertexRecoInd( FCCAnalysesVertex TheVertex ) ; /// Retrieve the indices of the tracks fitted to that vertex, but now in the collection of RecoParticles - ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, + ROOT::VecOps::RVec get_VertexRecoParticlesInd( FCCAnalysesVertex TheVertex, const ROOT::VecOps::RVec& reco ); /// Retrieve the indices of the tracks fitted to a vector of vertices, but now in the collection of RecoParticles - ROOT::VecOps::RVec get_VerticesRecoParticlesInd( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec get_VerticesRecoParticlesInd( ROOT::VecOps::RVec vertices, const ROOT::VecOps::RVec& reco ); /// Return the number of tracks in a given track collection @@ -118,161 +118,164 @@ namespace VertexingUtils{ /// compare two track states bool compare_Tracks( const edm4hep::TrackState& tr1, const edm4hep::TrackState& tr2 ) ; -// /////////////////////////////////////////////////// -// /// functions used for SV reconstruction + /////////////////////////////////////////////////// + /// functions used for SV reconstruction /** returns a vector of all vertices (PV and SVs), e.g to use in myUtils::get_Vertex_d2PV * first entry: PV, all subsequent entries: SVs */ ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec SV ); + ROOT::VecOps::RVec SV ); ROOT::VecOps::RVec get_all_vertices( FCCAnalysesVertex PV, - ROOT::VecOps::RVec> SV ); + ROOT::VecOps::RVec> SV ); -// /** returns the invariant mass of a two-track vertex -// * CAUTION: m1 -> mass of first track, m2 -> mass of second track -// * by default both pions -// */ -// double get_invM_pairs( FCCAnalysesVertex vertex, -// double m1 = 0.13957039, -// double m2 = 0.13957039) ; + /** returns the invariant mass of a two-track vertex + * CAUTION: m1 -> mass of first track, m2 -> mass of second track + * by default both pions + */ + double get_invM_pairs( FCCAnalysesVertex vertex, + double m1 = 0.13957039, + double m2 = 0.13957039) ; ROOT::VecOps::RVec get_invM_pairs( ROOT::VecOps::RVec vertices, double m1 = 0.13957039, - double m2 = 0.13957039 ) ; + double m2 = 0.13957039 ) ; -// /** returns the invariant mass of a vertex -// * assuming all tracks to be pions -// */ -// double get_invM( FCCAnalysesVertex vertex ) ; + /** returns the invariant mass of a vertex + * assuming all tracks to be pions + */ + double get_invM( FCCAnalysesVertex vertex ) ; -// /** returns the invariant mass of a vector of vertices -// * assuming all tracks to be pions -// */ -// ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; + /** returns the invariant mass of a vector of vertices + * assuming all tracks to be pions + */ + ROOT::VecOps::RVec get_invM( ROOT::VecOps::RVec vertices ) ; -// /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ -// double get_PV2V0angle( FCCAnalysesVertex V0, -// FCCAnalysesVertex PV) ; + /** returns the cos of the angle b/n V0 candidate's (or any vtx's) momentum & PV to V0 (vtx) displacement vector */ + double get_PV2V0angle( FCCAnalysesVertex V0, + FCCAnalysesVertex PV) ; -// /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ -// double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, -// FCCAnalysesVertex vtx, -// FCCAnalysesVertex PV ) ; + /** returns cos of the angle b/n track (that form the vtx) momentum sum & PV to vtx displacement vector */ + double get_PV2vtx_angle( ROOT::VecOps::RVec tracks, + FCCAnalysesVertex vtx, + FCCAnalysesVertex PV ) ; -// /** returns a track's energy -// * assuming the track to be a pion -// */ -// double get_trackE( edm4hep::TrackState track ) ; + /** returns a track's energy + * assuming the track to be a pion + */ + double get_trackE( edm4hep::TrackState track ) ; -// /////////////////////////////////////////////////// -// /// V0 Reconstruction -// /// Return the number of reconstructed V0s -// int get_n_SV( FCCAnalysesV0 SV ); + /////////////////////////////////////////////////// + /// V0 Reconstruction + /// Return the number of reconstructed V0s + int get_n_SV( FCCAnalysesV0 SV ); -// /// Return the vertex position of all reconstructed V0s (in mm) -// ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); + /// Return the vertex position of all reconstructed V0s (in mm) + ROOT::VecOps::RVec get_position_SV( FCCAnalysesV0 SV ); -// /// Return the PDG IDs of all reconstructed V0s -// ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); + /// Return the PDG IDs of all reconstructed V0s + ROOT::VecOps::RVec get_pdg_V0( FCCAnalysesV0 V0 ); -// /// Return the invariant masses of all reconstructed V0s -// ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); + /// Return the invariant masses of all reconstructed V0s + ROOT::VecOps::RVec get_invM_V0( FCCAnalysesV0 V0 ); -// /// Return the momentum of all reconstructed V0s -// ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); + /// Return the momentum of all reconstructed V0s + ROOT::VecOps::RVec get_p_SV( FCCAnalysesV0 SV ); -// /// Return chi2 of all reconstructed V0s -// ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); + /// Return chi2 of all reconstructed V0s + ROOT::VecOps::RVec get_chi2_SV( FCCAnalysesV0 SV ); -// /////////////////////////////////////////////////// + /////////////////////////////////////////////////// -// /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 -// /// Return the number of reconstructed SVs -// int get_n_SV( ROOT::VecOps::RVec vertices ); + /// Passing a vector of FCCAnalysesVertex instead of FCCAnalysesV0 + /// Return the number of reconstructed SVs + int get_n_SV( ROOT::VecOps::RVec vertices ); -// /// Return the momentum of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); + /// Return the momentum of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_p_SV( ROOT::VecOps::RVec vertices ); -// /// Return the vertex position of all reconstructed SVs (in mm) -// ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); + /// Return the vertex position of all reconstructed SVs (in mm) + ROOT::VecOps::RVec get_position_SV( ROOT::VecOps::RVec vertices ); -// /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); + /// Return the momentum magnitude of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_pMag_SV( ROOT::VecOps::RVec vertices ); -// /// Return chi2 of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); + /// Return chi2 of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_chi2_SV( ROOT::VecOps::RVec vertices ); -// /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); + /// Return normalised chi2 of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_norm_chi2_SV( ROOT::VecOps::RVec vertices ); -// /// Return no of DOF of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); + /// Return no of DOF of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_nDOF_SV( ROOT::VecOps::RVec vertices ); -// /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); + /// Return polar angle (theta) of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_theta_SV( ROOT::VecOps::RVec vertices ); -// /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); + /// Return azimuthal angle (phi) of all reconstructed vertices (or V0.vtx) + ROOT::VecOps::RVec get_phi_SV( ROOT::VecOps::RVec vertices ); -// /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) -// ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, -// ROOT::VecOps::RVec nSV_jet, -// ROOT::VecOps::RVec jets ); + /// Return polar angle (theta) of all reconstructed vertices wrt jets (or V0.vtx) + ROOT::VecOps::RVec get_relTheta_SV( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet, + ROOT::VecOps::RVec jets ); /// Return azimuthal angle (phi) of all reconstructed vertices wrt jets (or V0.vtx) ROOT::VecOps::RVec get_relPhi_SV( ROOT::VecOps::RVec vertices, ROOT::VecOps::RVec nSV_jet, ROOT::VecOps::RVec jets ); - + /// Return the pointing angle of all reconstructed vertices (or V0.vtx) ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, FCCAnalysesVertex PV ); -// /// Return the pointing angle of all reconstructed vertices (or V0.vtx) -// ROOT::VecOps::RVec get_pointingangle_SV( ROOT::VecOps::RVec vertices, -// FCCAnalysesVertex PV ); + /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); -// /// Return the distances of all reconstructed vertices from PV in xy plane [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_dxy_SV( ROOT::VecOps::RVec vertices, -// FCCAnalysesVertex PV ); + /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, + FCCAnalysesVertex PV ); -// /// Return the distances of all reconstructed vertices from PV in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_d3d_SV( ROOT::VecOps::RVec vertices, -// FCCAnalysesVertex PV ); + /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, + TVector3 location ); -// /// Return the distances of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, -// TVector3 location ); + /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, + edm4hep::Vector3d location ); -// /// Return the distances of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_d3d_SV_obj( ROOT::VecOps::RVec vertices, -// edm4hep::Vector3d location ); + /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, + TVector3 location ); -// /// Return the distance in R of all reconstructed verteces from given TVector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, -// TVector3 location ); + /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) + ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, + edm4hep::Vector3d location ); -// /// Return the distances in R of all reconstructed verteces from given edm4hep::Vector3d object in 3D [mm] (or V0.vtx) -// ROOT::VecOps::RVec get_dR_SV_obj( ROOT::VecOps::RVec vertices, -// edm4hep::Vector3d location ); + /////////////////////////////////////////////////// /// For get_SV_jets /// - + /// Return the number of reconstructed SVs ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); -// /// For get_SV_jets /// + /// Return the total number of reconstructed SVs + int get_n_SV( ROOT::VecOps::RVec> vertices ); -// /// Return the number of reconstructed SVs -// ROOT::VecOps::RVec get_all_SVs( ROOT::VecOps::RVec> vertices ); + /// Return the number of reconstructed SVs per jet + ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); -// /// Return the total number of reconstructed SVs -// int get_n_SV( ROOT::VecOps::RVec> vertices ); + /// Return the tracks separated by jets + std::vector> get_tracksInJets( ROOT::VecOps::RVec recoparticles, + ROOT::VecOps::RVec thetracks, + ROOT::VecOps::RVec jets, + std::vector> jet_consti ); -// /// Return the number of reconstructed SVs per jet -// ROOT::VecOps::RVec get_n_SV_jets( ROOT::VecOps::RVec> vertices ); + /// Return V0s separated by jets + ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, + ROOT::VecOps::RVec nSV_jet ); // --- for get_SV_jets --- // ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); @@ -292,40 +295,15 @@ namespace VertexingUtils{ ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); /// Return the vertex position of all reconstructed SVs (in mm) - ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); + ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); // --- for get_SV_jets --- // -// /// Return V0s separated by jets -// ROOT::VecOps::RVec> get_svInJets( ROOT::VecOps::RVec vertices, -// ROOT::VecOps::RVec nSV_jet ); - -// // --- for get_SV_jets --- // -// ROOT::VecOps::RVec> get_invM( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_p_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_pMag_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_VertexNtrk( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_chi2_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_norm_chi2_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_nDOF_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_theta_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_phi_SV( ROOT::VecOps::RVec> vertices ); -// ROOT::VecOps::RVec> get_relTheta_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); -// ROOT::VecOps::RVec> get_relPhi_SV( ROOT::VecOps::RVec> vertices, ROOT::VecOps::RVec jets ); -// ROOT::VecOps::RVec> get_pointingangle_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); -// ROOT::VecOps::RVec> get_dxy_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); -// ROOT::VecOps::RVec> get_d3d_SV( ROOT::VecOps::RVec> vertices, FCCAnalysesVertex PV ); -// ROOT::VecOps::RVec> get_pdg_V0( ROOT::VecOps::RVec pdg, ROOT::VecOps::RVec nSV_jet ); -// ROOT::VecOps::RVec> get_invM_V0( ROOT::VecOps::RVec invM, ROOT::VecOps::RVec nSV_jet ); -// /// Return the vertex position of all reconstructed SVs (in mm) -// ROOT::VecOps::RVec> get_position_SV( ROOT::VecOps::RVec> vertices ); -// // --- for get_SV_jets --- // - -// float get_trackMom( edm4hep::TrackState & atrack ); - - -// // --- Conversion methods between the Delphes and edm4hep conventions - -/// convert track parameters, from edm4hep to delphes conventions + float get_trackMom( edm4hep::TrackState & atrack ); + + +// --- Conversion methods between the Delphes and edm4hep conventions + +/// convert track parameters, from edm4hep to delphes conventions TVectorD Edm4hep2Delphes_TrackParam( const TVectorD& param, bool Units_mm ); /// convert track parameters, from delphes to edm4hep conventions TVectorD Delphes2Edm4hep_TrackParam( const TVectorD& param, bool Units_mm ); From 3afadd5977d503745989696d857690ae61c2cb38 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Thu, 8 Aug 2024 10:58:32 +0200 Subject: [PATCH 48/49] reconstructed particle 2 track --- .../src/ReconstructedParticle2Track.cc | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/analyzers/dataframe/src/ReconstructedParticle2Track.cc b/analyzers/dataframe/src/ReconstructedParticle2Track.cc index 27d101ad25..f8aa59e890 100644 --- a/analyzers/dataframe/src/ReconstructedParticle2Track.cc +++ b/analyzers/dataframe/src/ReconstructedParticle2Track.cc @@ -5,29 +5,29 @@ namespace FCCAnalyses{ namespace ReconstructedParticle2Track{ - // ROOT::VecOps::RVec - // getRP2TRK_mom(ROOT::VecOps::RVec in, - // ROOT::VecOps::RVec tracks) { - // ROOT::VecOps::RVec result; - // for (auto & p: in) { - // if (p.tracks_begin - // getRP2TRK_charge(ROOT::VecOps::RVec in, - // ROOT::VecOps::RVec tracks) { - // ROOT::VecOps::RVec result; - // for (auto & p: in) { - // if (p.tracks_begin + getRP2TRK_mom(ROOT::VecOps::RVec in, + ROOT::VecOps::RVec tracks) { + ROOT::VecOps::RVec result; + for (auto & p: in) { + if (p.tracks_begin + getRP2TRK_charge(ROOT::VecOps::RVec in, + ROOT::VecOps::RVec tracks) { + ROOT::VecOps::RVec result; + for (auto & p: in) { + if (p.tracks_begin getRP2TRK_Bz(const ROOT::VecOps::RVec& rps, const ROOT::VecOps::RVec& tracks) { const double c_light = 2.99792458e8; @@ -524,13 +524,13 @@ getRP2TRK( ROOT::VecOps::RVec in, } // returns reco indices of tracks -ROOT::VecOps::RVec -get_recoindTRK( ROOT::VecOps::RVec in, +ROOT::VecOps::RVec +get_recoindTRK( ROOT::VecOps::RVec in, ROOT::VecOps::RVec tracks ) { ROOT::VecOps::RVec result ; - + for (unsigned int ctr=0; ctr= 0 && p.tracks_begin x) { } /// -ROOT::VecOps::RVec +ROOT::VecOps::RVec hasTRK( ROOT::VecOps::RVec in ) { ROOT::VecOps::RVec result ; result.reserve( in.size() ); - + for (auto & p: in) { if (p.tracks_begin >= 0 && p.tracks_begin != p.tracks_end) result.push_back(true) ; else result.push_back(false); From 7c528f9df94bf689928543adb3f97ae711488974 Mon Sep 17 00:00:00 2001 From: merlinothefirst Date: Thu, 8 Aug 2024 11:08:59 +0200 Subject: [PATCH 49/49] removing alp specific functions --- analyzers/dataframe/FCCAnalyses/MCParticle.h | 3 - .../FCCAnalyses/ReconstructedParticle.h | 11 +--- analyzers/dataframe/src/MCParticle.cc | 19 ------- .../dataframe/src/ReconstructedParticle.cc | 56 +------------------ .../FCCee/bsm/LLPs/ALPs/analysis_final.py | 6 +- .../FCCee/bsm/LLPs/ALPs/analysis_plots.py | 6 +- .../FCCee/bsm/LLPs/ALPs/analysis_stage1.py | 16 +++--- .../bsm/LLPs/ALPs/analysis_stage1_new.py | 18 +++--- 8 files changed, 27 insertions(+), 108 deletions(-) diff --git a/analyzers/dataframe/FCCAnalyses/MCParticle.h b/analyzers/dataframe/FCCAnalyses/MCParticle.h index 4912e51aaa..b2c6c31b87 100644 --- a/analyzers/dataframe/FCCAnalyses/MCParticle.h +++ b/analyzers/dataframe/FCCAnalyses/MCParticle.h @@ -191,9 +191,6 @@ namespace MCParticle{ /// return the delta r of the input ReconstructedParticles ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec in); - /// return the delta r of the two reconstructed photons decaying from the ALP - ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); - /// return the energy of the input MCParticles ROOT::VecOps::RVec get_e(ROOT::VecOps::RVec in); diff --git a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h index 2bab645e00..11386e4568 100644 --- a/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h +++ b/analyzers/dataframe/FCCAnalyses/ReconstructedParticle.h @@ -142,15 +142,6 @@ namespace ReconstructedParticle{ /// return the minimum delta r of the input ReconstructedParticles ROOT::VecOps::RVec get_min_delta_r(ROOT::VecOps::RVec in); - /// return the delta r of the two reconstructed photons decaying from the ALP - ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); - - /// return the delta phi of the two reconstructed photons decaying from the ALP - ROOT::VecOps::RVec get_ALP_delta_phi(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); - - /// return the delta eta of the two reconstructed photons decaying from the ALP - ROOT::VecOps::RVec get_ALP_delta_eta(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2); - /// return the energy of the input ReconstructedParticles ROOT::VecOps::RVec get_reference_point_x(ROOT::VecOps::RVec in); @@ -196,7 +187,7 @@ namespace ReconstructedParticle{ // get sum of vector of floats float get_sum_float(ROOT::VecOps::RVec in); - // get sum of vector of ints + // get sum of vector of ints int get_sum_int(ROOT::VecOps::RVec in); // get avg of vector of floats diff --git a/analyzers/dataframe/src/MCParticle.cc b/analyzers/dataframe/src/MCParticle.cc index 35286c1c3d..1d7756fb85 100644 --- a/analyzers/dataframe/src/MCParticle.cc +++ b/analyzers/dataframe/src/MCParticle.cc @@ -345,10 +345,6 @@ ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec get_delta_r(ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { - ROOT::VecOps::RVec result; - TLorentzVector tlv1; - TLorentzVector tlv2; - for (auto & p: in1) { - tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - for (auto & p: in2) { - tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - float ALP_delta_r = tlv1.DeltaR(tlv2); - result.push_back(ALP_delta_r); - return result; -} - ROOT::VecOps::RVec get_e(ROOT::VecOps::RVec in) { ROOT::VecOps::RVec result; for (auto & p: in) { diff --git a/analyzers/dataframe/src/ReconstructedParticle.cc b/analyzers/dataframe/src/ReconstructedParticle.cc index 06217273da..529ada7d16 100644 --- a/analyzers/dataframe/src/ReconstructedParticle.cc +++ b/analyzers/dataframe/src/ReconstructedParticle.cc @@ -349,7 +349,6 @@ ROOT::VecOps::RVec get_delta_eta(ROOT::VecOps::RVec get_delta_phi(ROOT::VecOps::RVec get_min_delta_r(ROOT::VecOps::RVec get_ALP_delta_r(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { - ROOT::VecOps::RVec result; - TLorentzVector tlv1; - TLorentzVector tlv2; - for (auto & p: in1) { - tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - for (auto & p: in2) { - tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - float ALP_delta_r = tlv1.DeltaR(tlv2); - result.push_back(ALP_delta_r); - return result; -} - -ROOT::VecOps::RVec get_ALP_delta_phi(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { - ROOT::VecOps::RVec result; - TLorentzVector tlv1; - TLorentzVector tlv2; - for (auto & p: in1) { - tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - for (auto & p: in2) { - tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - float ALP_delta_phi = tlv1.DeltaPhi(tlv2); - // float ALP_delta_phi = abs(tlv1.Phi() - tlv2.Phi()); - result.push_back(ALP_delta_phi); - return result; -} - -ROOT::VecOps::RVec get_ALP_delta_eta(ROOT::VecOps::RVec in1, ROOT::VecOps::RVec in2) { - ROOT::VecOps::RVec result; - TLorentzVector tlv1; - TLorentzVector tlv2; - for (auto & p: in1) { - tlv1.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - for (auto & p: in2) { - tlv2.SetXYZM(p.momentum.x, p.momentum.y, p.momentum.z, p.mass); - } - float ALP_delta_eta = abs(tlv1.Eta() - tlv2.Eta()); - result.push_back(ALP_delta_eta); - return result; -} - ROOT::VecOps::RVec get_reference_point_x(ROOT::VecOps::RVec in) { ROOT::VecOps::RVec result; for (auto & p: in) { @@ -614,7 +564,7 @@ int getJet_ntags(ROOT::VecOps::RVec in) { return result; } - // get sum of int + // get sum of int int get_sum_int(ROOT::VecOps::RVec in){ int result = std::accumulate(in.begin(), in.end(), 0); //int result = 0; @@ -631,7 +581,7 @@ int getJet_ntags(ROOT::VecOps::RVec in) { // result += in[i]; //} float result = std::accumulate(in.begin(), in.end(), 0.0f) / in.size(); - //result /= in.size(); + //result /= in.size(); return result; } @@ -641,7 +591,7 @@ int getJet_ntags(ROOT::VecOps::RVec in) { //for (int i; i < in.size(); ++i){ // result += in[i]; //} - //result /= in.size(); + //result /= in.size(); int result = std::accumulate(in.begin(), in.end(), 0.0f) / in.size(); return result; } diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py index 5f02615121..56dd6c9aca 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_final.py @@ -806,9 +806,9 @@ "RecoPhotons_min_delta_r": {"name": "RecoPhotons_min_delta_r", "title": "Reco photons minimum #DeltaR", "bin":100, "xmin":0, "xmax": 7}, - "RecoPhotons_ALP_delta_r":{"name": "RecoPhotons_ALP_delta_r", "title": "Reco photons #DeltaR (from ALP)", "bin":100, "xmin": 0, "xmax": 0.2}, - "RecoPhotons_ALP_delta_phi":{"name": "RecoPhotons_ALP_delta_phi", "title": "Reco photons #Delta#phi (from ALP)", "bin":100, "xmin": -4, "xmax": 4}, - "RecoPhotons_ALP_delta_eta":{"name": "RecoPhotons_ALP_delta_eta", "title": "Reco photons #Delta#eta (from ALP)", "bin":100, "xmin": -4, "xmax": 4}, + # "RecoPhotons_ALP_delta_r":{"name": "RecoPhotons_ALP_delta_r", "title": "Reco photons #DeltaR (from ALP)", "bin":100, "xmin": 0, "xmax": 0.2}, + # "RecoPhotons_ALP_delta_phi":{"name": "RecoPhotons_ALP_delta_phi", "title": "Reco photons #Delta#phi (from ALP)", "bin":100, "xmin": -4, "xmax": 4}, + # "RecoPhotons_ALP_delta_eta":{"name": "RecoPhotons_ALP_delta_eta", "title": "Reco photons #Delta#eta (from ALP)", "bin":100, "xmin": -4, "xmax": 4}, # "RecoPhoton_reference_point_x": {"name": "RecoPhoton_reference_point_x", "title": "Reco photons reference point x", "bin": 100, "xmin": -1, "xmax": 1}, diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py index 65d60cc139..05020d2427 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_plots.py @@ -252,9 +252,9 @@ "RecoPhotons_min_delta_r", - "RecoPhotons_ALP_delta_r", - "RecoPhotons_ALP_delta_phi", - "RecoPhotons_ALP_delta_eta", + # "RecoPhotons_ALP_delta_r", + # "RecoPhotons_ALP_delta_phi", + # "RecoPhotons_ALP_delta_eta", # "RecoPhoton_reference_point_x", diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py index 8a0af3bc97..bd89620ed7 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1.py @@ -335,7 +335,7 @@ def analysers(df): .Define("GenALPPhotons_deltaPhi", "return abs(GenALPPhoton1_phi - GenALPPhoton2_phi)") .Define("GenALPPhotons_deltaR", "return sqrt(GenALPPhotons_deltaEta*GenALPPhotons_deltaEta + GenALPPhotons_deltaPhi*GenALPPhotons_deltaPhi)") - .Define("GenALPPhotons_deltaR_2", "MCParticle::get_ALP_delta_r(GenALPPhoton1, GenALPPhoton2)") + # .Define("GenALPPhotons_deltaR_2", "MCParticle::get_ALP_delta_r(GenALPPhoton1, GenALPPhoton2)") .Define("FSGenPhotons_delta_r", "MCParticle::get_delta_r(FSGenPhoton)") .Define("GenALPPhoton1_time", "MCParticle::get_time( GenALPPhoton1 )") @@ -540,9 +540,9 @@ def analysers(df): .Define("RecoPhotons_delta_phi", "ReconstructedParticle::get_delta_phi(RecoPhotons)") .Define("RecoPhotons_delta_r", "ReconstructedParticle::get_delta_r(RecoPhotons)") - .Define("RecoPhotons_ALP_delta_r", "ReconstructedParticle::get_ALP_delta_r(RecoALPPhoton1, RecoALPPhoton2)") - .Define("RecoPhotons_ALP_delta_phi", "ReconstructedParticle::get_ALP_delta_phi(RecoALPPhoton1, RecoALPPhoton2)") - .Define("RecoPhotons_ALP_delta_eta", "ReconstructedParticle::get_ALP_delta_eta(RecoALPPhoton1, RecoALPPhoton2)") + # .Define("RecoPhotons_ALP_delta_r", "ReconstructedParticle::get_ALP_delta_r(RecoALPPhoton1, RecoALPPhoton2)") + # .Define("RecoPhotons_ALP_delta_phi", "ReconstructedParticle::get_ALP_delta_phi(RecoALPPhoton1, RecoALPPhoton2)") + # .Define("RecoPhotons_ALP_delta_eta", "ReconstructedParticle::get_ALP_delta_eta(RecoALPPhoton1, RecoALPPhoton2)") .Define("RecoPhoton_y", "ReconstructedParticle::get_y(RecoPhotons)") # .Define("RecoPhoton_time", "ReconstructedParticle::get_time(RecoPhotons)") @@ -689,7 +689,7 @@ def output(): "GenALPPhotons_deltaPhi", "GenALPPhotons_deltaR", - "GenALPPhotons_deltaR_2", + # "GenALPPhotons_deltaR_2", "FSGenPhotons_delta_r", "GenALPPhoton1_time", @@ -836,9 +836,9 @@ def output(): "RecoPhotons_delta_phi", "RecoPhotons_delta_r", - "RecoPhotons_ALP_delta_r", - "RecoPhotons_ALP_delta_phi", - "RecoPhotons_ALP_delta_eta", + # "RecoPhotons_ALP_delta_r", + # "RecoPhotons_ALP_delta_phi", + # "RecoPhotons_ALP_delta_eta", "RecoPhoton_y", # "RecoPhoton_time", diff --git a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py index 599218e79b..7aaee19310 100644 --- a/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py +++ b/examples/FCCee/bsm/LLPs/ALPs/analysis_stage1_new.py @@ -124,7 +124,7 @@ # 'ALP_Z_aa_1.GeV_cYY_0.6':{}, # 'ALP_Z_aa_1.GeV_cYY_0.8':{}, - # 'ALP_Z_aa_1.GeV_cYY_1.0':{}, + 'ALP_Z_aa_1.GeV_cYY_1.0':{}, # 'ALP_Z_aa_1.GeV_cYY_1.2':{}, # 'ALP_Z_aa_1.GeV_cYY_1.4':{}, @@ -473,7 +473,7 @@ def analysers(df): .Define("GenALPPhotons_deltaPhi", "return abs(GenALPPhoton1_phi - GenALPPhoton2_phi)") .Define("GenALPPhotons_deltaR", "return sqrt(GenALPPhotons_deltaEta*GenALPPhotons_deltaEta + GenALPPhotons_deltaPhi*GenALPPhotons_deltaPhi)") - .Define("GenALPPhotons_deltaR_2", "MCParticle::get_ALP_delta_r(GenALPPhoton1, GenALPPhoton2)") + # .Define("GenALPPhotons_deltaR_2", "MCParticle::get_ALP_delta_r(GenALPPhoton1, GenALPPhoton2)") .Define("FSGenPhotons_delta_r", "MCParticle::get_delta_r(FSGenPhoton)") .Define("GenALPPhoton1_time", "MCParticle::get_time( GenALPPhoton1 )") @@ -683,9 +683,9 @@ def analysers(df): .Define("RecoPhotons_min_delta_r", "ReconstructedParticle::get_min_delta_r(RecoPhotons)") - .Define("RecoPhotons_ALP_delta_r", "ReconstructedParticle::get_ALP_delta_r(RecoALPPhoton1, RecoALPPhoton2)") - .Define("RecoPhotons_ALP_delta_phi", "ReconstructedParticle::get_ALP_delta_phi(RecoALPPhoton1, RecoALPPhoton2)") - .Define("RecoPhotons_ALP_delta_eta", "ReconstructedParticle::get_ALP_delta_eta(RecoALPPhoton1, RecoALPPhoton2)") + # .Define("RecoPhotons_ALP_delta_r", "ReconstructedParticle::get_ALP_delta_r(RecoALPPhoton1, RecoALPPhoton2)") + # .Define("RecoPhotons_ALP_delta_phi", "ReconstructedParticle::get_ALP_delta_phi(RecoALPPhoton1, RecoALPPhoton2)") + # .Define("RecoPhotons_ALP_delta_eta", "ReconstructedParticle::get_ALP_delta_eta(RecoALPPhoton1, RecoALPPhoton2)") .Define("RecoPhoton_y", "ReconstructedParticle::get_y(RecoPhotons)") # .Define("RecoPhoton_time", "ReconstructedParticle::get_time(RecoPhotons)") @@ -867,7 +867,7 @@ def output(): "GenALPPhotons_deltaPhi", "GenALPPhotons_deltaR", - "GenALPPhotons_deltaR_2", + # "GenALPPhotons_deltaR_2", "FSGenPhotons_delta_r", "GenALPPhoton1_time", @@ -1020,9 +1020,9 @@ def output(): "RecoPhotons_min_delta_r", - "RecoPhotons_ALP_delta_r", - "RecoPhotons_ALP_delta_phi", - "RecoPhotons_ALP_delta_eta", + # "RecoPhotons_ALP_delta_r", + # "RecoPhotons_ALP_delta_phi", + # "RecoPhotons_ALP_delta_eta", "RecoPhoton_y", # "RecoPhoton_time",