42 std::list<ExtendedTrack>& tracks2,
46 std::vector<TH1*>& trackResidualsAtFirstCluster,
47 std::vector<TH1*>& clusterClusterResiduals)
54 for (
auto& track1 : tracks1) {
56 auto itTrack2 = tracks2.begin();
58 itTrack2 = find(itTrack2, tracks2.end(), track1);
59 }
while (itTrack2 != tracks2.end() && itTrack2->hasMatchFound() && ++itTrack2 != tracks2.end());
60 if (itTrack2 != tracks2.end()) {
61 track1.setMatchFound(
true);
62 itTrack2->setMatchFound(
true);
63 track1.setMatchIdentical(
true);
64 itTrack2->setMatchIdentical(
true);
68 bool areCovCompatible =
areCompatible(track1.param().getCovariances(), itTrack2->param().getCovariances(),
precision);
69 if (!areParamCompatible || !areCovCompatible) {
72 if (printAll || (printDiff && !areParamCompatible)) {
75 if (printAll || (printDiff && !areCovCompatible)) {
76 printCovResiduals(track1.param().getCovariances(), itTrack2->param().getCovariances());
83 for (
auto& track1 : tracks1) {
85 if (track1.hasMatchFound()) {
89 for (
auto& track2 : tracks2) {
90 if (!track2.hasMatchFound() && track2.isMatching(track1)) {
91 track1.setMatchFound(
true);
92 track2.setMatchFound(
true);
96 bool areCovCompatible =
areCompatible(track1.param().getCovariances(), track2.param().getCovariances(),
precision);
97 if (!areParamCompatible || !areCovCompatible) {
100 if (printAll || (printDiff && !areParamCompatible)) {
103 if (printAll || (printDiff && !areCovCompatible)) {
104 printCovResiduals(track1.param().getCovariances(), track2.param().getCovariances());
113 for (
const auto& track1 : tracks1) {
114 if (!track1.hasMatchFound()) {
116 std::cout <<
"did not find a track in file 2 matching: " << track1 <<
"\n";
123 for (
const auto& track2 : tracks2) {
124 if (!track2.hasMatchFound()) {
126 std::cout <<
"did not find a track in file 1 matching: " << track2 <<
"\n";
161 static const double sigmaPDCA23 = 80.;
162 static const double sigmaPDCA310 = 54.;
163 static const double nSigmaPDCA = 6.;
164 static const double relPRes = 0.0004;
165 static const double slopeRes = 0.0005;
167 double thetaAbs = TMath::ATan(track.
getRabs() / 505.) * TMath::RadToDeg();
168 if (thetaAbs < 2. || thetaAbs > 10.) {
172 double eta = track.
P().Eta();
173 if (eta < -4. || eta > -2.5) {
178 double pDCA = pUncorr * track.
getDCA();
179 double sigmaPDCA = (thetaAbs < 3) ? sigmaPDCA23 : sigmaPDCA310;
180 double pTot = track.
P().P();
181 double nrp = nSigmaPDCA * relPRes * pTot;
182 double pResEffect = sigmaPDCA / (1. - nrp / (1. + nrp));
183 double slopeResEffect = 535. * slopeRes * pTot;
184 double sigmaPDCAWithRes = TMath::Sqrt(pResEffect * pResEffect + slopeResEffect * slopeResEffect);
185 if (pDCA > nSigmaPDCA * sigmaPDCAWithRes) {
int compareEvents(std::list< ExtendedTrack > &tracks1, std::list< ExtendedTrack > &tracks2, double precision, bool printDiff, bool printAll, std::vector< TH1 * > &trackResidualsAtFirstCluster, std::vector< TH1 * > &clusterClusterResiduals)