5 #include "include/BaseAnalysis.h"
6 #include "include/isolation.h"
7 #include "include/HEPData.h"
12 #define MAdouble64 double
18 const static bool USE_REWEIGHT=
false;
19 static std::uniform_real_distribution<double> rd(0.0,1.0);
23 return (p1->
pT() > p2->
pT());
32 std::vector <const HEP::Particle *> particles;
34 bool single_photon_trigger =
false;
35 bool di_photon_trigger =
false;
36 bool muon_trigger =
false;
37 double weight_multiplier;
40 void sort_reverse_pt()
42 std::sort(particles.begin(),particles.end(),mycomp);
47 for (
int i=0; i<particles.size(); i++)
48 p_tot += particles[i]->mom();
52 double get_invariant_mass () {
53 return get_momentum().
m();
57 return get_momentum().pT();
60 HEP::P4 get_position ()
const {
return position; };
63 if (particles.size() > 0)
68 particles.push_back(part);
73 double dxy=position.
pT();
79 for (
int i=0; i<particles.size(); i++) {
81 if(abs(particles[i]->pid()) == 11) Nelectrons++;
88 for (
int i=0; i<particles.size(); i++) {
90 if(PDG::isLepton(particles[i]->pid())) Nleptons++;
96 particles.push_back(part);
98 position = part->prod_vertex();
112 weight_multiplier=1.0;
122 void update_vertex_types(vector<dv_candidate> & dv_candidates,
bool & found_ee,
bool & found_emu,
bool & found_mumu);
124 MAdouble64 DVRecoEfficiencyZPrime100GeVToEE (MAdouble64 r_xy, MAdouble64 pT) ;
126 MAdouble64 DVRecoEfficiencyZPrime100GeVToEMU (MAdouble64 r_xy, MAdouble64 pT);
128 MAdouble64 DVRecoEfficiencyZPrime100GeVToEMU (MAdouble64 r_xy, MAdouble64 pT);
130 MAdouble64 DVRecoEfficiencyZPrime100GeVToMUMU (MAdouble64 r_xy, MAdouble64 pT);
132 MAdouble64 DVRecoEfficiencyZPrime250GeVToEE (MAdouble64 r_xy, MAdouble64 pT);
134 MAdouble64 DVRecoEfficiencyZPrime250GeVToEMU (MAdouble64 r_xy, MAdouble64 pT);
136 MAdouble64 DVRecoEfficiencyZPrime250GeVToMUMU (MAdouble64 r_xy, MAdouble64 pT);
138 MAdouble64 DVRecoEfficiencyZPrime500GeVToEE (MAdouble64 r_xy, MAdouble64 pT);
140 MAdouble64 DVRecoEfficiencyZPrime500GeVToEMU (MAdouble64 r_xy, MAdouble64 pT);
142 MAdouble64 DVRecoEfficiencyZPrime500GeVToMUMU (MAdouble64 r_xy, MAdouble64 pT) ;
144 MAdouble64 DVRecoEfficiencyZPrime750GeVToEE (MAdouble64 r_xy, MAdouble64 pT);
146 MAdouble64 DVRecoEfficiencyZPrime750GeVToEMU (MAdouble64 r_xy, MAdouble64 pT);
148 MAdouble64 DVRecoEfficiencyZPrime750GeVToMUMU (MAdouble64 r_xy, MAdouble64 pT);
149 MAdouble64 DVRecoEfficiencyZPrime1000GeVToEE (MAdouble64 r_xy, MAdouble64 pT);
150 MAdouble64 DVRecoEfficiencyZPrime1000GeVToEMU (MAdouble64 r_xy, MAdouble64 pT);
152 MAdouble64 DVRecoEfficiencyZPrime1000GeVToMUMU (MAdouble64 r_xy, MAdouble64 pT);
154 MAdouble64 DVRecoEfficiencyRPVEE (MAdouble64 r_xy, MAdouble64 mDV, MAdouble64 pT) ;
156 MAdouble64 DVRecoEfficiencyRPVEMU (MAdouble64 r_xy, MAdouble64 mDV, MAdouble64 pT);
157 MAdouble64 DVRecoEfficiencyRPVMUMU (MAdouble64 r_xy, MAdouble64 mDV, MAdouble64 pT);
165 template<
typename T1>
bool crVeto1(vector<T1> &v1,
const double &drmin)
168 for (
int j=0;j<v1.size();j++)
169 for (
int i=j+1;i<v1.size();i++)
171 if (drCos(v1[i]->mom(),v1[j]->mom()) < drmin)
176 template<
typename T1,
typename T2>
bool crVeto2(vector<T1> &v1, vector<T2> &v2,
const double &drmin)
179 for (
int j=0;j<v1.size();j++)
180 for (
int i=0;i<v2.size();i++)
182 if (drCos(v2[i]->mom(),v1[j]->mom()) < drmin)
187 bool cosmicRayVeto(vector<HEP::Particle*> &finalStateElectrons, vector<HEP::Particle*> &finalStateMuons);
190 double materialVetoWeight(
HEP::P4 &vertex);
192 double disabledPixelModulesVetoWeight(
HEP::P4 &vertex);
194 void apply_d_xy_criterion (vector<dv_candidate> &DV_candidates,
double d_xy_min);
196 void apply_fiducial_volume_criterion (vector<dv_candidate> &DV_candidates,
double radius,
double half_length);
198 double apply_dis_pixel_mod_veto (vector<dv_candidate> &DV_candidates, std::mt19937 &engine);
200 double apply_material_veto (vector<dv_candidate> &DV_candidates, std::mt19937 &engine);
202 void require_leptons (vector<dv_candidate> &DV_candidates,
int N_min) ;
204 void require_invariant_mass (vector<dv_candidate> &DV_candidates,
int m_min);
206 void require_opposite_charge (vector<dv_candidate> &DV_candidates);
208 void apply_trigger_matching (vector<dv_candidate> &DV_candidates);
210 void apply_preselection_matching (vector<dv_candidate> &DV_candidates) ;
Simple event class, separating particles into classes.
Definition: heputil.h:227
A 4-momentum class for vectors.
Definition: Vectors.h:45
double pT() const
Get the transverse momentum (same as rho)
Definition: Vectors.h:453
double m() const
Get m.
Definition: Vectors.h:414
void clear()
Set the components to zero.
Definition: Vectors.h:82
Definition: Particle.h:24
double pT() const
Get the squared transverse momentum.
Definition: Particle.h:165