6 reader_ = std::make_unique<TMVA::Reader>(
"!Color:Silent");
19 reader_->BookMVA(
"Likelihood", weightsFile);
24 if (conversion->nTracks() != 2)
31 double delta_phi = conversion->tracks()[0]->innerMomentum().phi() - conversion->tracks()[1]->innerMomentum().phi();
32 double pi = 3.14159265;
34 while (delta_phi > pi)
36 while (delta_phi < -pi)
40 double chi2_1 = conversion->tracks()[0]->normalizedChi2();
41 double pt_1 = conversion->tracks()[0]->pt();
43 double chi2_2 = conversion->tracks()[1]->normalizedChi2();
44 double pt_2 = conversion->tracks()[1]->pt();
46 double chi2_max_pt = chi2_1;
47 double chi2_min_pt = chi2_2;
62 std::vector<Float_t> inputVec;
64 inputVec.push_back(log_abs_cot_theta_);
68 float like =
reader_->EvaluateMVA(inputVec,
"Likelihood");
83 double pi = 3.14159265;
85 while (delta_phi > pi)
87 while (delta_phi < -pi)
91 double chi2_1 = conversion.
tracks()[0]->normalizedChi2();
92 double pt_1 = conversion.
tracks()[0]->pt();
94 double chi2_2 = conversion.
tracks()[1]->normalizedChi2();
95 double pt_2 = conversion.
tracks()[1]->pt();
97 double chi2_max_pt = chi2_1;
98 double chi2_min_pt = chi2_2;
101 chi2_max_pt = chi2_2;
102 chi2_min_pt = chi2_1;
113 std::vector<Float_t> inputVec;
115 inputVec.push_back(log_abs_cot_theta_);
119 float like =
reader_->EvaluateMVA(inputVec,
"Likelihood");
static std::vector< std::string > checklist log
std::unique_ptr< TMVA::Reader > reader_
double pairCotThetaSeparation() const
Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks. Original tracks are used.
void setWeightsFile(const char *weightsFile)
ConversionLikelihoodCalculator()
unsigned int nTracks() const
Number of tracks= 0,1,2.
double delta_phi(double ph11, double phi2)
double calculateLikelihood(reco::ConversionRef conversion)
const std::vector< math::XYZVectorF > & tracksPin() const
Vector of track momentum measured at the innermost hit.
void conversion(EventAux const &from, EventAuxiliary &to)
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references