6 reader_ =
new TMVA::Reader(
"!Color:Silent");
21 reader_->BookMVA(
"Likelihood", weightsFile);
27 if (conversion->nTracks() != 2)
return -1.;
33 double delta_phi = conversion->tracks()[0]->innerMomentum().phi()-conversion->tracks()[1]->innerMomentum().phi();
34 double pi = 3.14159265;
36 while (delta_phi > pi) delta_phi -= 2*
pi;
37 while (delta_phi < -pi) delta_phi += 2*
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");
77 if (conversion.
nTracks() != 2)
return -1.;
85 double pi = 3.14159265;
87 while (delta_phi > pi) delta_phi -= 2*
pi;
88 while (delta_phi < -pi) delta_phi += 2*
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;
113 std::vector<Float_t> inputVec;
115 inputVec.push_back(log_abs_cot_theta_ );
119 float like =
reader_->EvaluateMVA(inputVec,
"Likelihood");
double pairCotThetaSeparation() const
Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks. Original tracks are used.
std::vector< edm::RefToBase< reco::Track > > tracks() const
vector of track to base references
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)