-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parametrization.h
1808 lines (1550 loc) · 68.9 KB
/
Parametrization.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// $Id: Parametrization.h,v 1.75 2011/05/26 07:42:52 mschrode Exp $
//
#ifndef CALIBCORE_PARAMETRIZATION_H
#define CALIBCORE_PARAMETRIZATION_H
#include <cmath>
#include <vector>
#include "CalibData.h"
#include "gsl/gsl_errno.h"
#include "gsl/gsl_math.h"
#include "gsl/gsl_roots.h"
//! \brief Abstract base class for parametrizations of
//! correction functions
//!
//! Interface to different parametrizations for the
//! underlying hypothesis of the GlobalFit. Allows
//! to correct a tower or jet measurement.
//! \author Hartmut Stadie
//! \date Thu Apr 03 17:09:50 CEST 2008
//! $Id: Parametrization.h,v 1.75 2011/05/26 07:42:52 mschrode Exp $
// -----------------------------------------------------------------
class Parametrization
{
public:
//! \brief Constructor
//! \param ntowerpars Number of parameters for tower parametrization
//! \param njetpars Number of parameters for (eta,phi)-dependent jet parametrization
//! \param ntrackpars Number of parameters for track parametrization
//! \param nglobaljetpars Number of parameters for global jet parametrization
Parametrization(unsigned int ntowerpars, unsigned int njetpars,
unsigned int ntrackpars, unsigned int nglobaljetpars) :
ntowerpars_(ntowerpars), njetpars_(njetpars), ntrackpars_(ntrackpars),
nglobaljetpars_(nglobaljetpars) {}
virtual ~Parametrization() {}
//! \brief Corrects the measured tower Et
//!
//! The parameters of the tower correction function
//! may depend on the tower Et, eta, and phi.
//!
//! \param x Tower Et measurement that is to be corrected.
//! The measurement contains the following
//! members (see also Measurement):
//! - x->pt : et of whole tower
//! - x->EMF : et of ECAL part
//! - x->HadF : et of HCAL part
//! - x->OutF : et of Outer part
//! - x->E : en of Outer part
//! - x->eta : eta of tower
//! - x->phi : phi of tower
//! \param par Parameters of the correction function of this tower
//! \return The corrected Et of a tower
// -----------------------------------------------------------------
virtual double correctedTowerEt(const Measurement *x,const double *par) const = 0;
//! \brief Corrects the measured jet Et
//!
//! The parameters of the jet correction function
//! may depend on the jet Et, eta, and phi.
//!
//! \param x Jet Et measurement that is to be corrected.
//! The measurement contains the following
//! members (see also Measurement):
//! - x->pt : et of whole jet
//! - x->EMF : et of ECAL part
//! - x->HadF : et of HCAL part
//! - x->OutF : et of Outer part
//! - x->E : en of Outer part
//! - x->eta : eta of jet
//! - x->phi : phi of jet
//! \param par Parameters of the correction function of this jet
//! \return The corrected Et of a jet
// -----------------------------------------------------------------
virtual double correctedJetEt(const Measurement *x,const double *par) const = 0;
//! \brief Returns the expected signal of a track in the Calorimeter
//!
//! \param x Track Et measurement from which the expected response
//! of the calorimeter is calculated (see also TTrack).
//! \param par Parameters of the response function of this track
//! \return The expected calorimeter response
// -----------------------------------------------------------------
virtual double expectedResponse(const Measurement *x,const double *par) const { return x->pt;}
//! \brief Corrects the measured jet Et with global
//! correction function
//!
//! The parameters of the global jet correction function
//! are independent of the jet Et, eta, and phi.
//!
//! \param x Jet Et measurement that is to be corrected.
//! The measurement contains the following
//! members (see also Measurement):
//! - x->pt : et of whole jet
//! - x->EMF : et of ECAL part
//! - x->HadF : et of HCAL part
//! - x->OutF : et of Outer part
//! - x->E : en of Outer part
//! - x->eta : eta of jet
//! - x->phi : phi of jet
//! \param par Parameters of the global correction function
//! \return The corrected Et of a jet
// -----------------------------------------------------------------
virtual double correctedGlobalJetEt(const Measurement *x,const double *par) const { return x->pt;}
//! \brief Get the name of the parametrization class
//! \return Name of the parametrization class
// -----------------------------------------------------------------
virtual const char * name() const = 0;
//! \brief Get the number of parameters of the tower parametrization
//! \return Number of parameters of the tower parametrization
// -----------------------------------------------------------------
unsigned int nTowerPars() const { return ntowerpars_;}
//! \brief Get the number of parameters of the jet parametrization
//! \return Number of parameters of the jet parametrization
// -----------------------------------------------------------------
unsigned int nJetPars() const { return njetpars_;}
//! \brief Get the number of parameters of the track parametrization
//! \return Number of parameters of the track parametrization
// -----------------------------------------------------------------
unsigned int nTrackPars() const { return ntrackpars_;}
//! \brief Get the number of parameters of the global jet parametrization
//! \return Number of parameters of the global jet parametrization
// -----------------------------------------------------------------
unsigned int nGlobalJetPars() const { return nglobaljetpars_;}
//! \brief Returns the expected response for a jet with true x-> Et
//! (this is the inverted jet correction
//!
//! \param x Measurement describing the true jet properties
//! \param par Parameters of the jet response function
//! \return the expected calorimeter response
// -----------------------------------------------------------------
virtual double inverseJetCorrection(const Measurement *x,const double *par) const { return -1;}
//! \brief Get the number of parameters of the track p
//! \return Number of parameters of the track parametrization
// -----------------------------------------------------------------
virtual bool hasInvertedCorrection() const { return false;}
virtual bool needsUpdate() const { return false; }
virtual void update(const double * par) {;}
protected:
//interpolotion code from JetMETObjects/Utilities
static double quadraticInterpolation(double fZ, const double fX[3], const double fY[3])
{
// Quadratic interpolation through the points (x[i],y[i]). First find the parabola that
// is defined by the points and then calculate the y(z).
double D[4],a[3];
D[0] = fX[0]*fX[1]*(fX[0]-fX[1])+fX[1]*fX[2]*(fX[1]-fX[2])+fX[2]*fX[0]*(fX[2]-fX[0]);
D[3] = fY[0]*(fX[1]-fX[2])+fY[1]*(fX[2]-fX[0])+fY[2]*(fX[0]-fX[1]);
D[2] = fY[0]*(pow(fX[2],2)-pow(fX[1],2))+fY[1]*(pow(fX[0],2)-pow(fX[2],2))+fY[2]*(pow(fX[1],2)-pow(fX[0],2));
D[1] = fY[0]*fX[1]*fX[2]*(fX[1]-fX[2])+fY[1]*fX[0]*fX[2]*(fX[2]-fX[0])+fY[2]*fX[0]*fX[1]*(fX[0]-fX[1]);
if (D[0] != 0)
{
a[0] = D[1]/D[0];
a[1] = D[2]/D[0];
a[2] = D[3]/D[0];
}
else
{
a[0] = 0.0;
a[1] = 0.0;
a[2] = 0.0;
}
return a[0]+fZ*(a[1]+fZ*a[2]);
}
private:
Parametrization();
unsigned int ntowerpars_; //!< Number of parameters of the tower parametrization
unsigned int njetpars_; //!< Number of parameters of the jet parametrization
unsigned int ntrackpars_; //!< Number of parameters of the track parametrization
unsigned int nglobaljetpars_; //!< Number of parameters of the global jet parametrization
};
//! \brief Parametrization that does not change a thing
//!
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class ConstParametrization : public Parametrization {
public:
ConstParametrization() : Parametrization(0,0,0,0) {}
const char* name() const { return "ConstParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt;
}
};
//! \brief Parametrization of the hadronic tower response
//! by a step function in Et
//!
//! The total jet measurement remains unchanged.
//!
//! This parametrization has 12 tower parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class StepParametrization : public Parametrization {
public:
StepParametrization() : Parametrization(12,0,0,0) {}
const char* name() const { return "StepParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
double result = 0;
if(x->HadF>=0.0 && x->HadF<=1.0) result = x->EMF+x->OutF + par[0]*x->HadF;
else if (x->HadF> 1.0 && x->HadF<= 2.0) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if (x->HadF> 2.0 && x->HadF<= 5.0) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if (x->HadF> 5.0 && x->HadF<= 10.0) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if (x->HadF> 10.0 && x->HadF<= 20.0) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if (x->HadF> 20.0 && x->HadF<= 40.0) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if (x->HadF> 40.0 && x->HadF<= 80.0) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if (x->HadF> 80.0 && x->HadF<= 160.0) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if (x->HadF> 160.0 && x->HadF<= 300.0) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if (x->HadF> 300.0 && x->HadF<= 600.0) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if (x->HadF> 600.0 && x->HadF<=1000.0) result = x->EMF+x->OutF+par[10]*x->HadF;
else if (x->HadF>1000.0 ) result = x->EMF+x->OutF+par[11]*x->HadF;
return result;
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt;
//OutOfCone, Dominant, parametrized in Et since cone R lorenz invariant
//return x->pt * ( 1. + 0.295 * par[0] * exp(- 0.02566 * par[1] * x->pt));
/*
double result = 0;
if(x->pt>=0.0 && x->pt<=5.0) result = par[0]*x->pt + par[1];
else if (x->pt>5.0 && x->pt<=20.0) result = par[2]*x->pt + par[3];
else if (x->pt>20.0 && x->pt<=80.0) result = par[4]*x->pt + par[5];
else if (x->pt>80.0 ) result = par[6]*x->pt + par[7];
return result;
*/
}
};
//! \brief Parametrization of the hadronic tower response
//! by a step function in E
//!
//! Additionally, the total jet measurement is corrected
//! by an Et-dependent function.
//!
//! This parametrization has 12 tower parameters and 2
//! jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class StepParametrizationEnergy : public Parametrization {
public:
StepParametrizationEnergy() : Parametrization(12,2,0,0) {}
const char* name() const { return "StepParametrizationEnergy";}
double correctedTowerEt(const Measurement *x,const double *par) const {
double result = 0;
// reweight from et to en
double e = x->HadF * x->E / x->pt;
if(e>=0.0 && e<=1.0) result = x->EMF+x->OutF + par[0]*x->HadF;
else if (e> 1.0 && e<= 2.0) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if (e> 2.0 && e<= 5.0) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if (e> 5.0 && e<= 10.0) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if (e> 10.0 && e<= 20.0) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if (e> 20.0 && e<= 40.0) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if (e> 40.0 && e<= 80.0) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if (e> 80.0 && e<= 160.0) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if (e> 160.0 && e<= 300.0) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if (e> 300.0 && e<= 600.0) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if (e> 600.0 && e<=1000.0) result = x->EMF+x->OutF+par[10]*x->HadF;
else if (e>1000.0 ) result = x->EMF+x->OutF+par[11]*x->HadF;
return result;
}
double correctedJetEt(const Measurement *x,const double *par) const {
//OutOfCone, Dominant, parametrized in Et since cone R lorenz invariant
return x->pt * ( 1. + 0.295 * par[0] * exp(- 0.02566 * par[1] * x->pt));
}
};
//! \brief Parametrization of the hadronic tower
//! response by a step function in EMF
//!
//! Parametrization of hadronic response of a tower
//! by a step function with 3 sets of parametrizations for
//! different em fractions.
//!
//! This parametrization has 36 tower parameters.
//!
//! The total jet measurement remains unchanged.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class StepEfracParametrization : public Parametrization {
public:
StepEfracParametrization() : Parametrization(36,0,0,0) {} //(36,2) {}
const char* name() const { return "StepEfracParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
double result=0;
double Efrac = x->EMF/(x->HadF+x->OutF+x->EMF);
if( Efrac < 0.2 ) {
if(x->HadF>=0.0 && x->HadF<=1.0) result = x->EMF+x->OutF+par[ 0]*x->HadF;
else if (x->HadF> 1.0 && x->HadF<= 2.0) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if (x->HadF> 2.0 && x->HadF<= 5.0) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if (x->HadF> 5.0 && x->HadF<= 10.0) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if (x->HadF> 10.0 && x->HadF<= 20.0) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if (x->HadF> 20.0 && x->HadF<= 40.0) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if (x->HadF> 40.0 && x->HadF<= 80.0) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if (x->HadF> 80.0 && x->HadF<= 160.0) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if (x->HadF> 160.0 && x->HadF<= 300.0) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if (x->HadF> 300.0 && x->HadF<= 600.0) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if (x->HadF> 600.0 && x->HadF<=1000.0) result = x->EMF+x->OutF+par[10]*x->HadF;
else if (x->HadF>1000.0 ) result = x->EMF+x->OutF+par[11]*x->HadF;
} else if (Efrac < 0.5) {
if(x->HadF>=0.0 && x->HadF<=1.0) result = x->EMF+x->OutF+par[12]*x->HadF;
else if (x->HadF> 1.0 && x->HadF<= 2.0) result = x->EMF+x->OutF+par[13]*x->HadF;
else if (x->HadF> 2.0 && x->HadF<= 5.0) result = x->EMF+x->OutF+par[14]*x->HadF;
else if (x->HadF> 5.0 && x->HadF<= 10.0) result = x->EMF+x->OutF+par[15]*x->HadF;
else if (x->HadF> 10.0 && x->HadF<= 20.0) result = x->EMF+x->OutF+par[16]*x->HadF;
else if (x->HadF> 20.0 && x->HadF<= 40.0) result = x->EMF+x->OutF+par[17]*x->HadF;
else if (x->HadF> 40.0 && x->HadF<= 80.0) result = x->EMF+x->OutF+par[18]*x->HadF;
else if (x->HadF> 80.0 && x->HadF<= 160.0) result = x->EMF+x->OutF+par[19]*x->HadF;
else if (x->HadF> 160.0 && x->HadF<= 300.0) result = x->EMF+x->OutF+par[20]*x->HadF;
else if (x->HadF> 300.0 && x->HadF<= 600.0) result = x->EMF+x->OutF+par[21]*x->HadF;
else if (x->HadF> 600.0 && x->HadF<=1000.0) result = x->EMF+x->OutF+par[22]*x->HadF;
else if (x->HadF>1000.0 ) result = x->EMF+x->OutF+par[23]*x->HadF;
} else {
if(x->HadF>=0.0 && x->HadF<=1.0) result = x->EMF+x->OutF+par[24]*x->HadF;
else if (x->HadF> 1.0 && x->HadF<= 2.0) result = x->EMF+x->OutF+par[25]*x->HadF;
else if (x->HadF> 2.0 && x->HadF<= 5.0) result = x->EMF+x->OutF+par[26]*x->HadF;
else if (x->HadF> 5.0 && x->HadF<= 10.0) result = x->EMF+x->OutF+par[27]*x->HadF;
else if (x->HadF> 10.0 && x->HadF<= 20.0) result = x->EMF+x->OutF+par[28]*x->HadF;
else if (x->HadF> 20.0 && x->HadF<= 40.0) result = x->EMF+x->OutF+par[29]*x->HadF;
else if (x->HadF> 40.0 && x->HadF<= 80.0) result = x->EMF+x->OutF+par[30]*x->HadF;
else if (x->HadF> 80.0 && x->HadF<= 160.0) result = x->EMF+x->OutF+par[31]*x->HadF;
else if (x->HadF> 160.0 && x->HadF<= 300.0) result = x->EMF+x->OutF+par[32]*x->HadF;
else if (x->HadF> 300.0 && x->HadF<= 600.0) result = x->EMF+x->OutF+par[33]*x->HadF;
else if (x->HadF> 600.0 && x->HadF<=1000.0) result = x->EMF+x->OutF+par[34]*x->HadF;
else if (x->HadF>1000.0 ) result = x->EMF+x->OutF+par[35]*x->HadF;
}
return result;
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt;
//OutOfCone, Dominant, parametrized in Et since cone R lorenz invariant
//return x->pt * ( 1. + 0.295 * par[0] * exp(- 0.02566 * par[1] * x->pt));
}
};
//! \brief Parametrization of the hadronic jet response
//! by a step function in EMF
//!
//! Parametrization of hadronic response of a jet by a step
//! function with 3 sets of parametrizations for
//! different em fractions; the tower response remains
//! unchanged.
//!
//! This parametrization has 65 jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class StepJetParametrization : public Parametrization {
public:
StepJetParametrization() : Parametrization(0,65,0,0) {}
const char* name() const { return "StepJetParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
double pt = x->pt;
double Efrac = x->EMF/( x->EMF+x->HadF+x->OutF);
double result = 0.;
if(Efrac < 0.2) {
if(pt>=0.0 && pt<=10.0) result = x->EMF+x->OutF+par[ 0]*x->HadF;
else if (pt> 10.0 && pt<= 20.0) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if (pt> 20.0 && pt<= 30.0) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if (pt> 30.0 && pt<= 40.0) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if (pt> 40.0 && pt<= 60.0) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if (pt> 60.0 && pt<= 80.0) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if (pt> 80.0 && pt<=100.0) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if (pt>100.0 && pt<=120.0) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if (pt>120.0 && pt<=140.0) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if (pt>140.0 && pt<=160.0) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if (pt>160.0 && pt<=180.0) result = x->EMF+x->OutF+par[10]*x->HadF;
else if (pt>180.0 && pt<=200.0) result = x->EMF+x->OutF+par[11]*x->HadF;
else if (pt>200.0 && pt<=225.0) result = x->EMF+x->OutF+par[12]*x->HadF;
else if (pt>225.0 && pt<=250.0) result = x->EMF+x->OutF+par[13]*x->HadF;
else if (pt>250.0 && pt<=275.0) result = x->EMF+x->OutF+par[14]*x->HadF;
else if (pt>275.0 && pt<=300.0) result = x->EMF+x->OutF+par[15]*x->HadF;
else if (pt>300.0 && pt<=350.0) result = x->EMF+x->OutF+par[16]*x->HadF;
else if (pt>350.0 && pt<=400.0) result = x->EMF+x->OutF+par[17]*x->HadF;
else if (pt>400.0 && pt<=500.0) result = x->EMF+x->OutF+par[18]*x->HadF;
else if (pt>500.0 && pt<=700.0) result = x->EMF+x->OutF+par[19]*x->HadF;
else if (pt>700.0 ) result = x->EMF+x->OutF+par[20]*x->HadF;
} else if (Efrac < 0.5) {
if(pt>=0.0 && pt<=10.0) result = x->EMF+x->OutF+par[21]*x->HadF;
else if (pt> 10.0 && pt<= 20.0) result = x->EMF+x->OutF+par[22]*x->HadF;
else if (pt> 20.0 && pt<= 30.0) result = x->EMF+x->OutF+par[23]*x->HadF;
else if (pt> 30.0 && pt<= 40.0) result = x->EMF+x->OutF+par[24]*x->HadF;
else if (pt> 40.0 && pt<= 60.0) result = x->EMF+x->OutF+par[25]*x->HadF;
else if (pt> 60.0 && pt<= 80.0) result = x->EMF+x->OutF+par[26]*x->HadF;
else if (pt> 80.0 && pt<=100.0) result = x->EMF+x->OutF+par[27]*x->HadF;
else if (pt>100.0 && pt<=120.0) result = x->EMF+x->OutF+par[28]*x->HadF;
else if (pt>120.0 && pt<=140.0) result = x->EMF+x->OutF+par[29]*x->HadF;
else if (pt>140.0 && pt<=160.0) result = x->EMF+x->OutF+par[30]*x->HadF;
else if (pt>160.0 && pt<=180.0) result = x->EMF+x->OutF+par[31]*x->HadF;
else if (pt>180.0 && pt<=200.0) result = x->EMF+x->OutF+par[32]*x->HadF;
else if (pt>200.0 && pt<=225.0) result = x->EMF+x->OutF+par[33]*x->HadF;
else if (pt>225.0 && pt<=250.0) result = x->EMF+x->OutF+par[34]*x->HadF;
else if (pt>250.0 && pt<=275.0) result = x->EMF+x->OutF+par[35]*x->HadF;
else if (pt>275.0 && pt<=300.0) result = x->EMF+x->OutF+par[36]*x->HadF;
else if (pt>300.0 && pt<=350.0) result = x->EMF+x->OutF+par[37]*x->HadF;
else if (pt>350.0 && pt<=400.0) result = x->EMF+x->OutF+par[38]*x->HadF;
else if (pt>400.0 && pt<=500.0) result = x->EMF+x->OutF+par[39]*x->HadF;
else if (pt>500.0 && pt<=700.0) result = x->EMF+x->OutF+par[40]*x->HadF;
else if (pt>700.0 ) result = x->EMF+x->OutF+par[41]*x->HadF;
} else {
if(pt>=0.0 && pt<=10.0) result = x->EMF+x->OutF+par[42]*x->HadF;
else if (pt> 10.0 && pt<= 20.0) result = x->EMF+x->OutF+par[43]*x->HadF;
else if (pt> 20.0 && pt<= 30.0) result = x->EMF+x->OutF+par[44]*x->HadF;
else if (pt> 30.0 && pt<= 40.0) result = x->EMF+x->OutF+par[45]*x->HadF;
else if (pt> 40.0 && pt<= 60.0) result = x->EMF+x->OutF+par[46]*x->HadF;
else if (pt> 60.0 && pt<= 80.0) result = x->EMF+x->OutF+par[47]*x->HadF;
else if (pt> 80.0 && pt<=100.0) result = x->EMF+x->OutF+par[48]*x->HadF;
else if (pt>100.0 && pt<=120.0) result = x->EMF+x->OutF+par[49]*x->HadF;
else if (pt>120.0 && pt<=140.0) result = x->EMF+x->OutF+par[50]*x->HadF;
else if (pt>140.0 && pt<=160.0) result = x->EMF+x->OutF+par[51]*x->HadF;
else if (pt>160.0 && pt<=180.0) result = x->EMF+x->OutF+par[52]*x->HadF;
else if (pt>180.0 && pt<=200.0) result = x->EMF+x->OutF+par[53]*x->HadF;
else if (pt>200.0 && pt<=225.0) result = x->EMF+x->OutF+par[54]*x->HadF;
else if (pt>225.0 && pt<=250.0) result = x->EMF+x->OutF+par[55]*x->HadF;
else if (pt>250.0 && pt<=275.0) result = x->EMF+x->OutF+par[56]*x->HadF;
else if (pt>275.0 && pt<=300.0) result = x->EMF+x->OutF+par[57]*x->HadF;
else if (pt>300.0 && pt<=350.0) result = x->EMF+x->OutF+par[58]*x->HadF;
else if (pt>350.0 && pt<=400.0) result = x->EMF+x->OutF+par[59]*x->HadF;
else if (pt>400.0 && pt<=500.0) result = x->EMF+x->OutF+par[60]*x->HadF;
else if (pt>500.0 && pt<=700.0) result = x->EMF+x->OutF+par[61]*x->HadF;
else if (pt>700.0 ) result = x->EMF+x->OutF+par[62]*x->HadF;
}
//OutOfCone, Dominant, parametrized in Et since cone R lorenz invariant
result *= ( 1. + 0.295 * par[63] * exp(- 0.02566 * par[64] * result));
return result;
}
};
//! \brief Parametrization of tower and jet response
//! by some "clever" function
//!
//!
//! This parametrization has 2 jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class MyParametrization: public Parametrization {
public:
MyParametrization() : Parametrization(0,2,0,0) {}
const char* name() const { return "MyParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->EMF + x->HadF + x->OutF;
//return x->EMF + par[0]*x->HadF + par[1]*log(x->pt) + par[2];
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->EMF + (par[0] + x->HadF * par[1]/1000) * x->HadF + x->OutF;;
}
};
//! \brief Parametrization of tower and jet response
//! with some ideas from the JetMET group
//!
//! This parametrization has 3 tower parameters and 5
//! jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class JetMETParametrization: public Parametrization {
public:
JetMETParametrization() : Parametrization(3,5,0,0) {}
const char* name() const { return "JetMETParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return par[1] * x->HadF + par[2] * x->EMF + x->OutF + par[0];
}
double correctedJetEt(const Measurement *x,const double *par) const {
double logx = log(x->HadF);
if(logx < 0) logx = 0;
return (par[0] - par[1]/(pow(logx,par[2]) + par[3]) + par[4]/x->HadF) * x->HadF;
}
};
//! \brief Simple parametrization that uses a global scale factor
//!
//! This parametrization has 0 tower parameters, 0 track parameters
//! and 1 global jet parameter, no eta or phi dependence.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class GlobalScaleFactorParametrization: public Parametrization {
public:
GlobalScaleFactorParametrization() : Parametrization(0,0,0,1) {}
const char* name() const { return "GlobalScaleFactorParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedGlobalJetEt(const Measurement *x, const double *par) const {
return par[0] * x->pt;
}
};
//! \brief Simple tower and jet parametrization
//!
//! This parametrization has 3 tower parameters and 3
//! jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class SimpleParametrization: public Parametrization {
public:
SimpleParametrization() : Parametrization(3,3,0,0) {}
const char* name() const { return "SimpleParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return par[1] * x->EMF + par[2] * x->HadF + x->OutF + par[0];
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt * ( par[2] + par[0] * exp( -par[1] * x->pt ) );
}
};
//! \brief Parametrization for toy MC with constant response
//!
//! This is the parametrization of the correction for ToyMC
//! events with a constant tower response i.e. when specifying
//! only one tower constant. In this parametrization, the
//! hadronic part of the tower Et is corrected.
//!
//! This parametrization has 1 tower parameter.
//!
//! \sa Parametrization, ToyMC
// -----------------------------------------------------------------
class ToyParametrization: public Parametrization {
public:
ToyParametrization() : Parametrization(1,0,0,0) {}
const char* name() const { return "ToyParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return par[0] * x->HadF + x->EMF + x->OutF;
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt;
}
};
//! \brief Parametrization for toy MC with constant response
//!
//! This is the parametrization of the correction for ToyMC
//! events with a constant tower response i.e. when specifying
//! only one tower constant. In this parametrization, the
//! hadronic part of the jet Et is corrected.
//!
//! This parametrization has 1 jet parameters.
//!
//! \sa Parametrization, ToyMC
// -----------------------------------------------------------------
class ToyJetParametrization: public Parametrization {
public:
ToyJetParametrization() : Parametrization(0,1,0,0) {}
const char* name() const { return "ToyJetParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
//return par[0] * x->HadF + x->EMF + x->OutF;
return par[0] * x->pt;
}
};
//! \brief Parametrization for toy MC with step function of
//! hadronic tower Et
//!
//! In this parametrization, the hadronic part of
//! tower Et is corrected by a step function. It is
//! intended for a pt spectrum from 0 - 300 GeV
//!
//! This parametrization has 15 tower parameters.
//!
//! \note This parametrization is intended for studying
//! cutoff and resolution effects on the minimization
//! procedure.
//!
//! \sa Parametrization, ToyMC
// -----------------------------------------------------------------
class ToyStepParametrization : public Parametrization {
public:
ToyStepParametrization() : Parametrization(15,0,0,0) {}
const char* name() const { return "ToyStepParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
double result = 0.;
double pt = x->HadF;
if(pt < 2.) result = x->EMF+x->OutF+par[ 0]*x->HadF;
else if(pt < 5.) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if(pt < 10.) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if(pt < 20.) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if(pt < 30.) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if(pt < 40.) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if(pt < 50.) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if(pt < 60.) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if(pt < 70.) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if(pt < 80.) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if(pt < 90.) result = x->EMF+x->OutF+par[10]*x->HadF;
else if(pt < 100.) result = x->EMF+x->OutF+par[11]*x->HadF;
else if(pt < 110.) result = x->EMF+x->OutF+par[12]*x->HadF;
else if(pt < 120.) result = x->EMF+x->OutF+par[13]*x->HadF;
else result = x->EMF+x->OutF+par[14]*x->HadF;
return result;
}
double correctedJetEt(const Measurement *x,const double *par) const {
return x->pt;
}
};
//! \brief Parametrization for toy MC with step function of
//! hadronic jet Et
//!
//! In this parametrization, the hadronic part of the
//! jet Et is corrected by a step function. It is
//! intended for a pt spectrum from 0 - 300 GeV
//!
//! This parametrization has 15 jet parameters.
//!
//! \note This parametrization is intended for studying
//! cutoff and resolution effects on the minimization
//! procedure.
//!
//! \sa Parametrization, ToyMC
// -----------------------------------------------------------------
class ToyStepJetParametrization : public Parametrization {
public:
ToyStepJetParametrization() : Parametrization(0,15,0,0) {}
const char* name() const { return "ToyStepJetParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
double pt = x->HadF;
double result = 0.;
if(pt < 25. ) result = x->EMF+x->OutF+par[ 0]*x->HadF;
else if(pt < 50.) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if(pt < 75.) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if(pt < 100.) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if(pt < 125.) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if(pt < 150.) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if(pt < 175.) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if(pt < 200.) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if(pt < 225.) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if(pt < 250.) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if(pt < 275.) result = x->EMF+x->OutF+par[10]*x->HadF;
else if(pt < 300.) result = x->EMF+x->OutF+par[11]*x->HadF;
else if(pt < 325.) result = x->EMF+x->OutF+par[12]*x->HadF;
else if(pt < 350.) result = x->EMF+x->OutF+par[13]*x->HadF;
else result = x->EMF+x->OutF+par[14]*x->HadF;
return result;
}
};
//! \brief Complete Track Parametrization
//!
//! Same parametrization as StepEfracParametrization,
//! if track outside tracker or track errors too large
//!
//! This parametrization has 12 tower parameters,
//! 3 jet parameters, and 6 track parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class TrackParametrization : public Parametrization {
public:
TrackParametrization() : Parametrization(12,3,6,0) {} //(36,3,3,0) {}
const char* name() const { return "TrackParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const
{
double result=0;
//double Efrac = x->EMF/(x->HadF+x->OutF+x->EMF);
//if( Efrac < 0.2 ) {
if(x->HadF>=0.0 && x->HadF<=1.0) result = x->EMF+x->OutF+par[ 0]*x->HadF;
else if (x->HadF> 1.0 && x->HadF<= 2.0) result = x->EMF+x->OutF+par[ 1]*x->HadF;
else if (x->HadF> 2.0 && x->HadF<= 5.0) result = x->EMF+x->OutF+par[ 2]*x->HadF;
else if (x->HadF> 5.0 && x->HadF<= 10.0) result = x->EMF+x->OutF+par[ 3]*x->HadF;
else if (x->HadF> 10.0 && x->HadF<= 20.0) result = x->EMF+x->OutF+par[ 4]*x->HadF;
else if (x->HadF> 20.0 && x->HadF<= 40.0) result = x->EMF+x->OutF+par[ 5]*x->HadF;
else if (x->HadF> 40.0 && x->HadF<= 80.0) result = x->EMF+x->OutF+par[ 6]*x->HadF;
else if (x->HadF> 80.0 && x->HadF<= 160.0) result = x->EMF+x->OutF+par[ 7]*x->HadF;
else if (x->HadF> 160.0 && x->HadF<= 300.0) result = x->EMF+x->OutF+par[ 8]*x->HadF;
else if (x->HadF> 300.0 && x->HadF<= 600.0) result = x->EMF+x->OutF+par[ 9]*x->HadF;
else if (x->HadF> 600.0 && x->HadF<=1000.0) result = x->EMF+x->OutF+par[10]*x->HadF;
else if (x->HadF>1000.0 ) result = x->EMF+x->OutF+par[11]*x->HadF;
if(result < x->EMF+x->OutF) result = x->EMF+x->OutF;
return result;
}
double correctedJetEt(const Measurement *x,const double *par) const
{
double result;
/*
//result = x->pt * ( 1. + 0.295 * par[3] * exp(- 0.02566 * par[4] * x->pt));
result = x->pt;
*/
if(x->E < -500) //set to -1000 or -800 for track jets! Positive for all others
{
if(x->E < 900) //set to -1000 for Calo Rest
result = x->pt; //*par[0];
else //set to -800 for complete Track Jet
result = x->pt * par[2];
}
else
result = par[1] * x->pt;
if(result < 0) result = 0;
return result;
}
double expectedResponse(const Measurement *x,const double *par) const
{
double result=0;
double PiFrac;
//Groom
double eh = 1.48 * par[0];
//Wigman
//double eh = 1.39 * par[0];
//double ehECAL = 1.6 ;//* par[1];
double TrackEMF = 0;
//bool LS = false;
TTrack* temp = (TTrack*)(x);
//if(temp->EM1 < 1.2) LS = true; //late showering particle
//this is Groom's Parametrization:
TrackEMF = temp->EM1 / (temp->Had1 + temp->EM1); //bei 1X1 EMF ueberschaetzt, da shower schmaler, bei 3X3 zu viele andere Tracks
if(TrackEMF > 1) TrackEMF = 1;
if(TrackEMF < 0) TrackEMF = 0;
//JPT alg (2004/15):
//TrackEMF = 0.4; //mean value from Test Beam
//Groom
PiFrac = 1 - pow(((x->E + par[4]) /(fabs(par[2]) * 0.96) ),(par[3] * 0.816) - 1 );
//Wigman
//PiFrac = 0.11*par[2] * log(par[3] * x->E);
if(PiFrac > 1) PiFrac = 1; //do not allow unphysical results
if(PiFrac < 0) PiFrac = 0; //happens e.g. for TrackPt<2GeV
if(eh < 0.1) eh=0.1;
double responseH = (1 + (eh - 1) * PiFrac) / eh;
/*
//double responseE = (1 + (ehECAL - 1) * PiFrac) / ehECAL;
double responseE = 1;
double resultE = x->pt * TrackEMF * responseE;
//if(LS) resultE = temp->EM1;
if((temp->EM5 > 0) && (temp->EM5 < resultE) ) resultE = temp->EM5;
double resultH = x->pt * (1 - TrackEMF) * responseH;
if((temp->Had5 > 0) && (temp->Had5 < resultH) ) resultH = temp->Had5;
result = resultE + resultH;
*/
result = x->pt * responseH;
return result;
}
};
//! \brief L2L3 JetMET parametrization
//!
//! This parametrization uses the correction functions
//! from the JetMET group:
//! - There is no tower correction function
//! - The jet Et is corrected eta-dependent with the
//! L2 correction function
//! - The jet Et is corrected globally with the L3
//! correction function
//!
//! This parametrization has 6 jet parameters and
//! 4 global jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class L2L3JetParametrization : public Parametrization {
public:
L2L3JetParametrization() : Parametrization(0,5,0,4) {}
const char* name() const { return "L2L3JetParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
//! \brief Code from L2RelativeCorrector
//! \code
//! double pt = (fPt < p[0]) ? p[0] : (fPt > p[1]) ? p[1] : fPt;
//! double x = pt
//! double result = [0]+[1]*log10(x)+[2]*pow(log10(x),2)+[3]*pow(log10(x),3)+[4]*pow(x/500.0,3)
//! \endcode
double correctedJetEt(const Measurement *x,const double *par) const {
double pt = (x->pt < 1.0) ? 1.0 : (x->pt > 2000.0) ? 2000.0 : x->pt;
double logpt = log10(pt);
double c = par[0]+logpt*(0.1 * par[1]+logpt *(0.01* par[2]+logpt*(0.01*par[3])))+ par[4] * pow(pt/500.0,3);
if(c < 0.5) {
//std::cout << "L2L3JetParametrization::correctedJetEt: at limit " << c << " for pt=" << x->pt
// << " and eta = " << x->eta << std ::endl;
c = 0.5;
}
if(c > 10.0) {
//std::cout << "L2L3JetParametrization::correctedJetEt: at limit " << c << " for pt=" << x->pt
// << " and eta = " << x->eta << std ::endl;
c = 10.0;
}
//assert(c > 0);
return c * x->pt;
}
//! \brief Code from SimpleL3AbsoluteCorrector
//! \code
//! double pt = (fPt < p[0]) ? p[0] : (fPt > p[1]) ? p[1] : fPt;
//! double log10pt = log10(pt);
//! double result = p[2]+p[3]/(pow(log10pt,p[4])+p[5]);
//! \endcode
double correctedGlobalJetEt(const Measurement *x,const double *par) const {
double pt = (x->pt < 1.0) ? 1.0 : (x->pt > 5000.0) ? 5000.0 : x->pt;
double logpt = log10(pt);
double c = par[0] + par[1]/(pow(logpt,par[2]) + par[3]);
if(c < 0.1) {
//std::cout << "L2L3JetParametrization::correctedGlobalJetEt: at limit " << c << " for pt=" << x->pt
// << " and eta = " << x->eta << std ::endl;
c = 0.1;
}
if(c > 10.0) {
//std::cout << "L2L3JetParametrization::correctedGlobalJetEt: at limit " << c << " for pt=" << x->pt
// << " and eta = " << x->eta << std ::endl;
c = 10.0;
}
//assert(c > 0);
return c * x->pt;
}
};
//! \brief L2L3 JetMET parametrization
//!
//! This parametrization uses the correction functions
//! from the JetMET group:
//! - There is no tower correction function
//! - The jet Et is corrected eta-dependent with the
//! product of the L2 and L3 correction functions.
//!
//! This parametrization has 7 jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class L2L3JetParametrization2 : public Parametrization {
public:
L2L3JetParametrization2() : Parametrization(0,7,0,0) {}
const char* name() const { return "L2L3JetParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
//code from L2RelativeCorrector
//double pt = (fPt < p[0]) ? p[0] : (fPt > p[1]) ? p[1] : fPt;
//double logpt = log10(pt);
//double result = p[2]+logpt*(p[3]+logpt*(p[4]+logpt*(p[5]+logpt*(p[6]+logpt*p[7]))));
double pt = (x->pt < 4.0) ? 4.0 : (x->pt > 2000.0) ? 2000.0 : x->pt;
double logpt = log10(pt);
//double result = par[0]+logpt*(par[1]+logpt*(par[2]+logpt*(par[3]+logpt*(par[4]+logpt*par[5]))));
double c1 = par[0]+logpt*(par[1]*0.01+logpt*0.001*par[2]);
pt = (c1 * x->pt < 4.0) ? 4.0 : (c1 * x->pt > 2000.0) ? 2000.0 : c1 * x->pt;
logpt = log10(pt);
//result = par[6] + par[7]/(pow(logpt,par[8]) + par[9]);
double c2 = par[3] + par[4]/(pow(logpt,par[5]) + par[6]);
//std::cout << par[0] << ", " << par[1] << ", " << par[2] << ", " << par[3] << ", "
// << par[4] << " c2:" << c2 << " Et:" << x->pt << '\n';
return c2 * c1 * x->pt;
}
};
//! \brief Complete Track Parametrization
//!
//! Same parametrization as L2L3JetParametrization,
//! if track outside tracker or track errors too large
//!
//! This parametrization has 3 jet parameters, 5 track
//! parameters, and 4 global jet parameters.
//!
//! \sa Parametrization
// -----------------------------------------------------------------
class L2L3JetTrackParametrization : public Parametrization {
public:
L2L3JetTrackParametrization() : Parametrization(0,3,5,4) {}
const char* name() const { return "L2L3JetTrackParametrization";}
double correctedTowerEt(const Measurement *x,const double *par) const {
return x->pt;
}
double correctedJetEt(const Measurement *x,const double *par) const {
//code from L2RelativeCorrector
//double pt = (fPt < p[0]) ? p[0] : (fPt > p[1]) ? p[1] : fPt;
//double logpt = log10(pt);