Warning, file /irt/delphes/scripts/evaluator.C was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 void evaluator(const char *fname)
0013 {
0014 auto ff = new TFile(fname);
0015 auto dconfig = dynamic_cast<DelphesConfigRICH*>(ff->Get("DelphesConfigRICH"));
0016 ff->Close();
0017
0018 {
0019
0020 TVector3 p(0.0, 0.4, -3.0);
0021 printf("%f\n", p.Eta());
0022
0023
0024 auto electron = dconfig->GetMassHypothesis(11), pion = dconfig->GetMassHypothesis(211);
0025
0026
0027 double cutoff = -1.0;
0028 unsigned inefficiency = 0, misidentification = 0, contamination = 0;
0029
0030
0031 for(unsigned iq=0; iq<50; iq++) {
0032 auto truth = iq%2 ? electron : pion;
0033
0034
0035
0036
0037
0038 double theta = dconfig->GenerateMeasurement(truth->PdgCode(), p);
0039
0040
0041 auto best = dconfig->FindBestHypothesis(p, theta);
0042
0043 char signature = ' ';
0044
0045 if (truth == electron) {
0046
0047 if (best != electron) {
0048 misidentification++;
0049 signature = 'm';
0050 }
0051
0052
0053 if (best == electron && electron->GetMeasurementOffset() < cutoff) {
0054 inefficiency++;
0055 signature = 'i';
0056 }
0057 } else {
0058
0059 if (best == electron && electron->GetMeasurementOffset() > cutoff) {
0060 contamination++;
0061 signature = 'c';
0062 }
0063 }
0064
0065 printf("%3d %3d -> %7.2f [mrad] (%3d %c, %7.2f [sigma])\n", iq, truth->PdgCode(), theta,
0066 best->PdgCode(), signature, electron->GetMeasurementOffset());
0067 }
0068 }
0069 }