-
Notifications
You must be signed in to change notification settings - Fork 0
/
LHC-FASER_base_lepton_distribution_stuff.hpp
executable file
·1108 lines (965 loc) · 33.7 KB
/
LHC-FASER_base_lepton_distribution_stuff.hpp
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
/*
* LHC-FASER_base_lepton_distribution_stuff.hpp
*
* Created on: 17 Mar 2010
* Authors: Ben O'Leary (benjamin.oleary@gmail.com)
* Jonas Lindert (jonas.lindert@googlemail.com)
* Carsten Robens (carsten.robens@gmx.de)
* Copyright 2010 Ben O'Leary, Jonas Lindert, Carsten Robens
*
* This file is part of LHC-FASER.
*
* LHC-FASER is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LHC-FASER is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LHC-FASER. If not, see <http://www.gnu.org/licenses/>.
*
* The GNU General Public License should be in GNU_public_license.txt
* the files of LHC-FASER are:
* LHC-FASER.hpp
* LHC-FASER.cpp
* LHC-FASER_base_electroweak_cascade_stuff.hpp
* LHC-FASER_base_electroweak_cascade_stuff.cpp
* LHC-FASER_base_kinematics_stuff.hpp
* LHC-FASER_base_kinematics_stuff.cpp
* LHC-FASER_base_lepton_distribution_stuff.hpp
* LHC-FASER_base_lepton_distribution_stuff.cpp
* LHC-FASER_charged_electroweak_cascade_stuff.hpp
* LHC-FASER_charged_electroweak_cascade_stuff.cpp
* LHC-FASER_cross-section_stuff.hpp
* LHC-FASER_cross-section_stuff.cpp
* LHC-FASER_derived_lepton_distributions.hpp
* LHC-FASER_derived_lepton_distributions.cpp
* LHC-FASER_electroweak_cascade_collection_stuff.hpp
* LHC-FASER_electroweak_cascade_collection_stuff.cpp
* LHC-FASER_full_cascade_stuff.hpp
* LHC-FASER_full_cascade_stuff.cpp
* LHC-FASER_global_stuff.hpp
* LHC-FASER_global_stuff.cpp
* LHC-FASER_input_handling_stuff.hpp
* LHC-FASER_input_handling_stuff.cpp
* LHC-FASER_jet_kinematics_stuff.hpp
* LHC-FASER_jet_kinematics_stuff.cpp
* LHC-FASER_lepton_kinematics_stuff.hpp
* LHC-FASER_lepton_kinematics_stuff.cpp
* LHC-FASER_neutral_electroweak_cascade_stuff.hpp
* LHC-FASER_neutral_electroweak_cascade_stuff.cpp
* LHC-FASER_signal_calculator_stuff.hpp
* LHC-FASER_signal_calculator_stuff.cpp
* LHC-FASER_signal_data_collection_stuff.hpp
* LHC-FASER_signal_data_collection_stuff.cpp
* LHC-FASER_sparticle_decay_stuff.hpp
* LHC-FASER_sparticle_decay_stuff.cpp
* LHC-FASER_template_classes.hpp
* and README.LHC-FASER.txt which describes the package.
*
* LHC-FASER also requires CppSLHA. It should be found in a subdirectory
* included with this package.
*
* LHC-FASER also requires grids of lookup values. These should also be
* found in a subdirectory included with this package.
*/
/* this is a set of classes used for the calculation of the fraction of leptons
* that pass various cuts at the moment. it also includes jets by pretending
* that they're basically leptons.
*/
#ifndef LHC_FASER_BASE_LEPTON_DISTRIBUTION_STUFF_HPP
#define LHC_FASER_BASE_LEPTON_DISTRIBUTION_STUFF_HPP
#include "CppSLHA/CppSLHA.hpp"
#include "LHC-FASER_global_stuff.hpp"
namespace LHC_FASER
{
// this class is to make it easier to update the effective squark mass.
class effectiveSquarkMassHolder
{
public:
effectiveSquarkMassHolder();
virtual
~effectiveSquarkMassHolder();
virtual double
getEffectiveSquarkMass()
= 0;
//protected:
// nothing
};
// this derived class is for the case of on-shell squarks:
class onShellSquarkMassHolder : public effectiveSquarkMassHolder
{
public:
onShellSquarkMassHolder(
CppSLHA::particle_property_set const* const onShellSquark );
virtual
~onShellSquarkMassHolder();
virtual double
getEffectiveSquarkMass();
CppSLHA::particle_property_set const*
getOnShellSquark()
const;
protected:
CppSLHA::particle_property_set const* onShellSquark;
};
// this derived class is for the case of splitting an on-shell squark's mass
// between an on-shell boson and a virtual squark:
class squarkMinusBosonMassHolder : public effectiveSquarkMassHolder
{
public:
squarkMinusBosonMassHolder(
CppSLHA::particle_property_set const* const onShellSquark,
CppSLHA::particle_property_set const* const onShellBoson,
CppSLHA::particle_property_set const* const onShellEwino );
virtual
~squarkMinusBosonMassHolder();
virtual double
getEffectiveSquarkMass();
bool
isEquivalent( CppSLHA::particle_property_set const* const onShellSquark,
CppSLHA::particle_property_set const* const onShellBoson,
CppSLHA::particle_property_set const* const onShellEwino )
const;
protected:
CppSLHA::particle_property_set const* onShellSquark;
CppSLHA::particle_property_set const* onShellBoson;
CppSLHA::particle_property_set const* onShellEwino;
};
/* this derived class is for the case of fudging splitting an on-shell
* squark's mass between an on-shell boson and a virtual squark, using
* instead the mass it should have to have approximately the right energy for
* the boson for the case of the virtual squark being on-shell (meant to be
* used along with giving the on-shell squark in place of the virtual squark
* for the decay to an electroweakino, so that the masses work out):
*/
class squarkPlusBosonMassHolder : public effectiveSquarkMassHolder
{
public:
squarkPlusBosonMassHolder(
CppSLHA::particle_property_set const* const virtualSquark,
CppSLHA::particle_property_set const* const onShellBoson,
CppSLHA::particle_property_set const* const onShellEwino );
virtual
~squarkPlusBosonMassHolder();
virtual double
getEffectiveSquarkMass();
bool
isEquivalent( CppSLHA::particle_property_set const* const virtualSquark,
CppSLHA::particle_property_set const* const onShellBoson,
CppSLHA::particle_property_set const* const onShellEwino )
const;
protected:
CppSLHA::particle_property_set const* virtualSquark;
CppSLHA::particle_property_set const* onShellBoson;
CppSLHA::particle_property_set const* onShellEwino;
};
// this class is for emulating doing minor symbolic algebra.
class leptonDistributionExpansionTerm
{
public:
static double const minimumInputEnergy;
// this is used to prevent trying to take logarithms of 0.0 or less.
leptonDistributionExpansionTerm( int const powerOfEnergy,
int const powerOfLogarithm,
double const coefficientValue,
leptonDistributionExpansionTerm* const referenceTerm = NULL );
virtual
~leptonDistributionExpansionTerm();
leptonDistributionExpansionTerm const*
getReferenceTerm()
const;
int
getPowerOfEnergy()
const;
int
getPowerOfLogarithm()
const;
double
getCoefficient()
const;
void
setCoefficient( double const coefficientValue );
void
addToCoefficient( double const coefficientValue );
void
normalizeCoefficient( double const normalizingFactor );
// this just multiplies coefficientValue by normalizingFactor.
virtual double
evaluate( double const inputEnergy )
const;
// this evaluates this term for the given input energy.
virtual double
getArea( double startEnergy,
double endEnergy )
const;
// this gives the definite integral of the term from startEnergy to
// endEnergy.
protected:
int powerOfEnergy;
int powerOfLogarithm;
double coefficientValue;
leptonDistributionExpansionTerm* const referenceTerm;
// this is for ease of updating coefficients in tauon-decay distributions.
};
class leptonDistributionInverseTerm : public leptonDistributionExpansionTerm
{
public:
leptonDistributionInverseTerm( double const coefficientValue,
leptonDistributionExpansionTerm* const referenceTerm = NULL );
virtual
~leptonDistributionInverseTerm();
virtual double
evaluate( double const inputEnergy )
const;
// this evaluates this term for the given input energy.
virtual double
getArea( double startEnergy,
double endEnergy )
const;
// this gives the definite integral of the term from startEnergy to
// endEnergy.
//protected:
// nothing.
};
class leptonDistributionConstantTerm : public leptonDistributionExpansionTerm
{
public:
leptonDistributionConstantTerm( double const coefficientValue,
leptonDistributionExpansionTerm* const referenceTerm = NULL );
virtual
~leptonDistributionConstantTerm();
virtual double
evaluate( double const inputEnergy )
const;
// this evaluates this term for the given input energy.
virtual double
getArea( double startEnergy,
double endEnergy )
const;
// this gives the definite integral of the term from startEnergy to
// endEnergy.
//protected:
// nothing.
};
class leptonDistributionPowerTerm : public leptonDistributionExpansionTerm
{
public:
leptonDistributionPowerTerm( int const powerOfEnergy,
double const coefficientValue,
leptonDistributionExpansionTerm* const referenceTerm = NULL );
virtual
~leptonDistributionPowerTerm();
virtual double
evaluate( double const inputEnergy )
const;
// this evaluates this term for the given input energy.
virtual double
getArea( double startEnergy,
double endEnergy )
const;
// this gives the definite integral of the term from startEnergy to
// endEnergy.
//protected:
// nothing.
};
// this is a class to hold a set of leptonDistributionExpansionTerm
// objects relevant for an energy range for the distribution.
class segmentTermSet
{
public:
segmentTermSet();
~segmentTermSet();
double
getSegmentStart()
const;
void
setSegmentStart( double const inputValue );
double
getSegmentEnd()
const;
void
setSegmentEnd( double const inputValue );
void
setSegmentRange( double const rangeStart,
double const rangeEnd );
std::vector< leptonDistributionExpansionTerm* > const*
getTerms()
const;
int
getNumberOfTerms()
const;
leptonDistributionExpansionTerm*
addTerm( int const powerOfEnergy,
int const powerOfLogarithm,
leptonDistributionExpansionTerm* const referenceTerm = NULL,
double const
coefficientValue = CppSLHA::CppSLHA_global::really_wrong_value );
void
normalizeCoefficients( double const normalizingFactor );
// this goes through each term & gets it to multiply its coefficient
// by normalizingFactor.
double
getCoefficient( int const powerOfEnergy,
int const powerOfLogarithm )
const;
double
evaluate( double const inputEnergy )
const;
// this evaluates the sum of the set of terms for the given input energy.
double
getArea()
const;
// this evaluates the sum of the areas of the set of terms for the
// segment's range.
protected:
std::vector< leptonDistributionExpansionTerm* > segmentTerms;
// the segmentTermSet is responsible for calling the destructors of the
// leptonDistributionExpansionTerms held in segmentTerms.
leptonDistributionExpansionTerm* termAdder;
double segmentStart;
double segmentEnd;
};
/* this class is the base abstract class for the functors for obtaining
* energy distributions for the visible decay productSet of tau leptons with
* given energy distributions.
* (yes, left-handed tau leptons / right-handed tau antileptons give harder
* muons / electrons but softer pions than the other helicity.)
*/
class tauDecayCoefficient
{
public:
tauDecayCoefficient();
virtual
~tauDecayCoefficient();
virtual double
operator()( int const visibleProductEnergyPower
/* the power of the visible product's energy for the term. */,
int const visibleProductLogPower
/* the power of the logarithm of the visible product's energy for the term. */,
int const tauLeptonEnergyPower
/* the power of the tau lepton's energy for the term. */,
int const tauLeptonLogPower
/* the power of the logarithm of the tau lepton's energy for the term. */,
double tauMinEnergy
/* the minimum of the range of the tau lepton energies considered. */,
double const tauMaxEnergy
/* the maximum of the range of the tau lepton energies considered. */,
bool const isInsideRange )
const
= 0;
/* this is overridden by functions which return the value of the
* coefficient for the specified term for the tauon decay product from the
* specified term for the tauon.
*/
//protected:
// nothing.
};
/* this functor returns the coefficient for the muon distribution which would
* come from a left-handed tau lepton distribution of the given power of the
* tau lepton's energy & power of logarithm thereof, for requested integer
* powers of the muon's energy or logarithm thereof, which also depends on
* whether the muon's energy is inside the range of the tau lepton's energy
* for this segment.
*/
class hardMuonFromTau : public tauDecayCoefficient
{
public:
hardMuonFromTau();
virtual
~hardMuonFromTau();
virtual double
operator()( int const visibleProductEnergyPower
/* the power of the visible product's energy for the term. */,
int const visibleProductLogPower
/* the power of the logarithm of the visible product's energy for the term. */,
int const tauLeptonEnergyPower
/* the power of the tau lepton's energy for the term. */,
int const tauLeptonLogPower
/* the power of the logarithm of the tau lepton's energy for the term. */,
double tauMinEnergy
/* the minimum of the range of the tau lepton energies considered. */,
double const tauMaxEnergy
/* the maximum of the range of the tau lepton energies considered. */,
bool const isInsideRange )
const;
//protected:
// nothing.
};
/* this functor returns the coefficient for the muon distribution which would
* come from a right-handed tau lepton distribution of the given power of the
* tau lepton's energy & power of logarithm thereof, for requested integer
* powers of the muon's energy or logarithm thereof, which also depends on
* whether the muon's energy is inside the range of the tau lepton's energy
* for this segment.
*/
class softMuonFromTau : public tauDecayCoefficient
{
public:
softMuonFromTau();
virtual
~softMuonFromTau();
virtual double
operator()( int const visibleProductEnergyPower
/* the power of the visible product's energy for the term. */,
int const visibleProductLogPower
/* the power of the logarithm of the visible product's energy for the term. */,
int const tauLeptonEnergyPower
/* the power of the tau lepton's energy for the term. */,
int const tauLeptonLogPower
/* the power of the logarithm of the tau lepton's energy for the term. */,
double tauMinEnergy
/* the minimum of the range of the tau lepton energies considered. */,
double const tauMaxEnergy
/* the maximum of the range of the tau lepton energies considered. */,
bool const isInsideRange )
const;
//protected:
// nothing.
};
/* this functor returns the coefficient for the pion distribution which would
* come from a right-handed tau lepton distribution of the given power of the
* tau lepton's energy & power of logarithm thereof, for requested integer
* powers of the pion's energy or logarithm thereof, which also depends on
* whether the pion's energy is inside the range of the tau lepton's energy
* for this segment.
*/
class hardPionFromTau : public tauDecayCoefficient
{
public:
hardPionFromTau();
virtual
~hardPionFromTau();
virtual double
operator()( int const visibleProductEnergyPower
/* the power of the visible product's energy for the term. */,
int const visibleProductLogPower
/* the power of the logarithm of the visible product's energy for the term. */,
int const tauLeptonEnergyPower
/* the power of the tau lepton's energy for the term. */,
int const tauLeptonLogPower
/* the power of the logarithm of the tau lepton's energy for the term. */,
double tauMinEnergy
/* the minimum of the range of the tau lepton energies considered. */,
double const tauMaxEnergy
/* the maximum of the range of the tau lepton energies considered. */,
bool const isInsideRange )
const;
//protected:
// nothing.
};
/* this functor returns the coefficient for the pion distribution which would
* come from a left-handed tau lepton distribution of the given power of the
* tau lepton's energy & power of logarithm thereof, for requested integer
* powers of the pion's energy or logarithm thereof, which also depends on
* whether the pion's energy is inside the range of the tau lepton's energy
* for this segment.
*/
class softPionFromTau : public tauDecayCoefficient
{
public:
softPionFromTau();
virtual
~softPionFromTau();
virtual double
operator()( int const visibleProductEnergyPower
/* the power of the visible product's energy for the term. */,
int const visibleProductLogPower
/* the power of the logarithm of the visible product's energy for the term. */,
int const tauLeptonEnergyPower
/* the power of the tau lepton's energy for the term. */,
int const tauLeptonLogPower
/* the power of the logarithm of the tau lepton's energy for the term. */,
double tauMinEnergy
/* the minimum of the range of the tau lepton energies considered. */,
double const tauMaxEnergy
/* the maximum of the range of the tau lepton energies considered. */,
bool const isInsideRange )
const;
//protected:
// nothing.
};
/* this holds together a pair of segmentTermSet pointers for the 2 parts of
* of the distribution for the visible decay product of a tau lepton with
* distribution given by the 3rd segmentTermSet pointer the
* tauSegmentTriple has. it performs the role of updating the visible decay
* product terms based on the reference terms.
*/
class tauSegmentTriple
{
public:
tauSegmentTriple( std::vector< segmentTermSet* >* segmentSetToPopulate,
segmentTermSet* referenceSegment,
tauDecayCoefficient const* const tauDecay );
~tauSegmentTriple();
void
updateSegments();
protected:
segmentTermSet* referenceSegment;
segmentTermSet* lowSegment;
segmentTermSet* highSegment;
tauDecayCoefficient const* const tauDecay;
};
/* this class is just an abstract base class for some polymorphic derived
* classes. However, it does do most of the work, the derived classes just
* set up the leptonDistributionExpansionTerm objects properly.
*/
class leptonEnergyDistribution : public getsReadiedForNewPoint
{
public:
leptonEnergyDistribution( readierForNewPoint* const readierPointer,
CppSLHA::CppSLHA0 const* const spectrumPointer,
CppSLHA::particle_property_set const* const firstParticle,
effectiveSquarkMassHolder* const effectiveSquarkMass,
CppSLHA::particle_property_set const* const secondParticle,
CppSLHA::particle_property_set const* const thirdParticle,
CppSLHA::particle_property_set const* const fourthParticle );
virtual
~leptonEnergyDistribution();
double
getMinimumEnergy();
double
getMaximumEnergy();
std::vector< segmentTermSet* >*
getSegments();
std::vector< segmentTermSet* > const*
inspectSegments()
const;
double
valueAt( double const inputEnergy );
// this returns the value of the distribution at the given value, with
// arbitrary normalization (different for each distribution).
protected:
CppSLHA::CppSLHA0 const* spectrumPointer;
// this holds all the information about the MSSM point. care must be taken
// to ensure that it has the appropriate BLOCKs for the distribution.
double minimumEnergy;
double maximumEnergy;
std::vector< segmentTermSet* > segmentSet;
CppSLHA::particle_property_set const* const firstParticle;
effectiveSquarkMassHolder* const effectiveSquarkMass;
CppSLHA::particle_property_set const* const secondParticle;
CppSLHA::particle_property_set const* const thirdParticle;
CppSLHA::particle_property_set const* const fourthParticle;
/* these masses could be pulled out of spectrumData every time they are
* needed, but it's probably worthwhile to have them as quickly-accessible
* doubles:
*/
double firstMass;
// the squark mass in a standard decay, but let's pretend that I'm being
// general.
double secondMass;
// the intermediate neutralino mass in the standard decay, but could be
// e.g. the chargino mass in a certain decay.
double thirdMass;
// the slepton mass in the standard decay, but could be e.g.
// the Z boson mass or sneutrino mass.
double fourthMass;
// the lightest neutralino mass in the standard decay, but could be
// something else in some crazy cascade.
double normalizingDivisor;
// this is *an overall denominator*, rather than a multiplicative
// normalization.
double normalizingFactor;
// this *is* an overall multiplicative normalization
// (= 1.0 / normalizingDivisor ).
// this is not strictly necessary, but is handy for distributions from
// on-shell cascades:
double productionFrameEnergy;
void
reset();
// this updates the masses then calls calculate_coefficients().
virtual void
calculateCoefficients()
= 0;
// this is overridden by functions which calculate & set the coefficients
// of all the terms of the distribution.
void
normalizeCoefficients();
// this goes through each segment & gets it to divide its terms'
// coefficients by normalizingDivisor.
};
/* this is a derived class which sets up the energy distribution for a muon
* or pion which is from the decay of a left- or right-handed tau lepton or
* antilepton with the provided energy distribution.
*/
class visibleTauDecayProduct : public leptonEnergyDistribution
{
public:
visibleTauDecayProduct( readierForNewPoint* const readierPointer,
leptonEnergyDistribution* const tauDistribution,
tauDecayCoefficient const* const tauDecay );
virtual
~visibleTauDecayProduct();
protected:
leptonEnergyDistribution* const tauDistribution;
std::vector< tauSegmentTriple* > tauTriples;
virtual void
calculateCoefficients();
// this is overridden by functions which calculate & set the coefficients
// of all the terms of the distribution.
};
// inline functions
inline double
onShellSquarkMassHolder::getEffectiveSquarkMass()
{
return onShellSquark->get_absolute_mass();
}
inline CppSLHA::particle_property_set const*
onShellSquarkMassHolder::getOnShellSquark()
const
{
return onShellSquark;
}
inline double
squarkMinusBosonMassHolder::getEffectiveSquarkMass()
{
// return the on-shell squark's mass, minus the boson's mass, plus a third
// of the energy from the rest of the squark's mass.
return ( ( 4.0 * onShellSquark->get_absolute_mass()
- 4.0 * onShellBoson->get_absolute_mass()
- onShellEwino->get_absolute_mass() ) / 3.0 );
}
inline bool
squarkMinusBosonMassHolder::isEquivalent(
CppSLHA::particle_property_set const* const onShellSquark,
CppSLHA::particle_property_set const* const onShellBoson,
CppSLHA::particle_property_set const* const onShellEwino )
const
{
if( ( onShellSquark == this->onShellSquark )
&&
( onShellBoson == this->onShellBoson )
&&
( onShellEwino == this->onShellEwino ) )
{
return true;
}
else
{
return false;
}
}
inline double
squarkPlusBosonMassHolder::getEffectiveSquarkMass()
{
// return the on-shell squark's mass, plus the boson's mass, plus a third
// of the energy from the rest of the squark's mass.
return ( ( 4.0 * virtualSquark->get_absolute_mass()
+ 2.0 * onShellBoson->get_absolute_mass()
- onShellEwino->get_absolute_mass() ) / 3.0 );
}
inline bool
squarkPlusBosonMassHolder::isEquivalent(
CppSLHA::particle_property_set const* const virtualSquark,
CppSLHA::particle_property_set const* const onShellBoson,
CppSLHA::particle_property_set const* const onShellEwino )
const
{
if( ( virtualSquark == this->virtualSquark )
&&
( onShellBoson == this->onShellBoson )
&&
( onShellEwino == this->onShellEwino ) )
{
return true;
}
else
{
return false;
}
}
inline leptonDistributionExpansionTerm const*
leptonDistributionExpansionTerm::getReferenceTerm()
const
{
return referenceTerm;
}
inline int
leptonDistributionExpansionTerm::getPowerOfEnergy()
const
{
return powerOfEnergy;
}
inline int
leptonDistributionExpansionTerm::getPowerOfLogarithm()
const
{
return powerOfLogarithm;
}
inline double
leptonDistributionExpansionTerm::getCoefficient()
const
{
return coefficientValue;
}
inline void
leptonDistributionExpansionTerm::setCoefficient(
double const coefficientValue )
{
this->coefficientValue = coefficientValue;
}
inline void
leptonDistributionExpansionTerm::addToCoefficient(
double const coefficientValue )
{
this->coefficientValue += coefficientValue;
}
inline void
leptonDistributionExpansionTerm::normalizeCoefficient(
double const normalizingFactor )
// this just multiplies coefficientValue by normalizingFactor.
{
coefficientValue *= normalizingFactor;
}
inline double
leptonDistributionInverseTerm::evaluate( double const inputEnergy )
const
// this evaluates this term for the given input energy.
{
return ( coefficientValue / inputEnergy );
}
inline double
leptonDistributionInverseTerm::getArea( double startEnergy,
double endEnergy )
const
// this gives the definite integral of the term from startEnergy to
// endEnergy.
{
double returnValue( 0.0 );
if( 0.0 != coefficientValue )
{
if( minimumInputEnergy > startEnergy )
{
startEnergy = minimumInputEnergy;
}
if( endEnergy > startEnergy )
{
returnValue
= ( coefficientValue * log( ( endEnergy / startEnergy ) ) );
}
}
return returnValue;
}
inline double
leptonDistributionConstantTerm::evaluate( double const inputEnergy )
const
// this evaluates this term for the given input energy.
{
return coefficientValue;
}
inline double
leptonDistributionConstantTerm::getArea( double startEnergy,
double endEnergy )
const
// this gives the definite integral of the term from startEnergy to
// endEnergy.
{
double returnValue( 0.0 );
if( 0.0 != coefficientValue )
{
if( minimumInputEnergy > startEnergy )
{
startEnergy = minimumInputEnergy;
}
if( endEnergy > startEnergy )
{
returnValue
= ( coefficientValue * ( endEnergy - startEnergy ) );
}
}
return returnValue;
}
inline double
leptonDistributionPowerTerm::evaluate( double const inputEnergy )
const
// this evaluates this term for the given input energy.
{
if( 0.0 != coefficientValue )
{
double returnValue( coefficientValue );
for( int powerCount( powerOfEnergy );
0 < powerCount;
--powerCount )
{
returnValue *= inputEnergy;
}
return returnValue;
}
else
{
return 0.0;
}
}
inline double
segmentTermSet::getSegmentStart()
const
{
return segmentStart;
}
inline void
segmentTermSet::setSegmentStart( double const inputValue )
{
segmentStart = inputValue;
}
inline double
segmentTermSet::getSegmentEnd()
const
{
return segmentEnd;
}
inline void
segmentTermSet::setSegmentEnd( double const inputValue )
{
segmentEnd = inputValue;
}
inline void
segmentTermSet::setSegmentRange( double const rangeStart,
double const rangeEnd )
{
segmentStart = rangeStart;
segmentEnd = rangeEnd;
}
inline std::vector< leptonDistributionExpansionTerm* > const*
segmentTermSet::getTerms()
const
{
return &segmentTerms;
}
inline int
segmentTermSet::getNumberOfTerms()
const
{
return (int)(segmentTerms.size());
}
inline void
segmentTermSet::normalizeCoefficients( double const normalizingFactor )
// this goes through each term & gets it to multiply its coefficientValue by
// normalizingFactor.
{
for( std::vector< leptonDistributionExpansionTerm* >::iterator
termIterator( segmentTerms.begin() );
segmentTerms.end() > termIterator;
++termIterator )
{
(*termIterator)->normalizeCoefficient( normalizingFactor );
}
}
inline double
segmentTermSet::getCoefficient( int const powerOfEnergy,
int const powerOfLogarithm )
const
{
double returnValue( 0.0 );
// start by assuming that the coefficientValue is zero.
for( std::vector< leptonDistributionExpansionTerm* >::const_iterator
termIterator( segmentTerms.begin() );
segmentTerms.end() > termIterator;
++termIterator )
// go through all the terms...
{
if( ( powerOfEnergy == (*termIterator)->getPowerOfEnergy() )
&&
( powerOfLogarithm == (*termIterator)->getPowerOfLogarithm() ) )
// if we find the requested term with a non-zero coefficientValue...
{