1 | /*
|
---|
2 | * Delphes: a framework for fast simulation of a generic collider experiment
|
---|
3 | * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
|
---|
4 | *
|
---|
5 | * This program is free software: you can redistribute it and/or modify
|
---|
6 | * it under the terms of the GNU General Public License as published by
|
---|
7 | * the Free Software Foundation, either version 3 of the License, or
|
---|
8 | * (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This program is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | * GNU General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU General Public License
|
---|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef TimeSmearingTail_h
|
---|
20 | #define TimeSmearingTail_h
|
---|
21 |
|
---|
22 | /** \class TimeSmearingTail
|
---|
23 | *
|
---|
24 | * Performs transverse time smearing.
|
---|
25 | *
|
---|
26 | * \author Michele Selvaggi - UCL, Louvain-la-Neuve
|
---|
27 | *
|
---|
28 | * With addition of non-gaussian tails (R+Preghenella, preghenella@bo.infn.it)
|
---|
29 | * non-gaussian tails can be added on both the left/right side of the peak
|
---|
30 | * according to the "TailLeft" and "TailRight" parameters
|
---|
31 | * following a q-gaussian PDF, where Tail is the value of q (=1 for gaussian)
|
---|
32 | *
|
---|
33 | */
|
---|
34 |
|
---|
35 | #include "classes/DelphesModule.h"
|
---|
36 | #include "TMath.h"
|
---|
37 |
|
---|
38 | class TIterator;
|
---|
39 | class TObjArray;
|
---|
40 | class TF1;
|
---|
41 |
|
---|
42 | class TimeSmearingTail: public DelphesModule
|
---|
43 | {
|
---|
44 | public:
|
---|
45 | TimeSmearingTail();
|
---|
46 | ~TimeSmearingTail();
|
---|
47 |
|
---|
48 | void Init();
|
---|
49 | void Process();
|
---|
50 | void Finish();
|
---|
51 |
|
---|
52 | private:
|
---|
53 |
|
---|
54 | static Double_t qExp(Double_t x, Double_t q) {
|
---|
55 | if (TMath::Abs(q - 1.) < 0.001)
|
---|
56 | return TMath::Exp(x);
|
---|
57 | if ((1. + (1. - q) * x) > 0.)
|
---|
58 | return TMath::Power(1. + (1. - q) * x, 1. / (1. - q));
|
---|
59 | return TMath::Power(0., 1. / (1. - q));
|
---|
60 | };
|
---|
61 |
|
---|
62 | static Double_t qTOF(Double_t *_x, Double_t *_par) {
|
---|
63 | Double_t x = _x[0];
|
---|
64 | Double_t sigma = _par[0];
|
---|
65 | Double_t qR = _par[1];
|
---|
66 | Double_t qL = _par[2];
|
---|
67 | Double_t beta = 1. / (2. * sigma * sigma);
|
---|
68 | //
|
---|
69 | if (x <= 0.) return qExp(-beta * x * x, qL);
|
---|
70 | return qExp(-beta * x * x, qR);
|
---|
71 | };
|
---|
72 |
|
---|
73 | TF1 *fSignal;
|
---|
74 |
|
---|
75 | Double_t fTimeResolution;
|
---|
76 | Double_t fTailRight;
|
---|
77 | Double_t fTailLeft;
|
---|
78 |
|
---|
79 | TIterator *fItInputArray; //!
|
---|
80 |
|
---|
81 | const TObjArray *fInputArray; //!
|
---|
82 |
|
---|
83 | TObjArray *fOutputArray; //!
|
---|
84 |
|
---|
85 | ClassDef(TimeSmearingTail, 1)
|
---|
86 | };
|
---|
87 |
|
---|
88 | #endif
|
---|