RecoLocalCalo
HGCalRecProducers
interface
ComputeClusterTime.h
Go to the documentation of this file.
1
#ifndef RecoLocalCalo_HGCalRecProducers_ComputeClusterTime_h
2
#define RecoLocalCalo_HGCalRecProducers_ComputeClusterTime_h
3
4
// user include files
5
#include <algorithm>
6
#include <cmath>
7
#include <numeric>
8
#include <vector>
9
#include <string>
10
11
// functions to select the hits to compute the time of a given cluster
12
// start with the only hits with timing information
13
// average among the hits contained in the chosen time interval
14
// weighted average wrt resolution or preferred function
15
16
// N.B. time is corrected wrt vtx-calorimeter distance
17
// with straight line and light speed hypothesis
18
// for charged tracks or heavy particles (longer track length or beta < 1)
19
// need to correct the offset at analysis level
20
21
namespace
hgcalsimclustertime
{
22
23
class
ComputeClusterTime
{
24
public
:
25
ComputeClusterTime
(
float
Xmix,
float
Xmax
,
float
Cterm,
float
Aterm);
26
ComputeClusterTime
();
27
28
void
setParameters
(
float
Xmix,
float
Xmax
,
float
Cterm,
float
Aterm);
29
30
//time resolution parametrization
31
float
timeResolution
(
float
xVal);
32
33
float
getTimeError
(
std::string
type
,
float
xVal);
34
35
//time-interval based on that ~210ps wide and with the highest number of hits
36
//apply weights if provided => weighted mean
37
//return also error on the mean
38
//only effective with a minimum number of hits with time (3 from TDR time)
39
std::pair<float, float>
fixSizeHighestDensity
(std::vector<float>&
time
,
40
std::vector<float>
weight
= std::vector<float>(),
41
unsigned
int
minNhits = 3,
42
float
deltaT = 0.210,
/*time window in ns*/
43
float
timeWidthBy = 0.5);
44
45
private
:
46
float
xMin_
;
47
float
xMax_
;
48
float
cTerm_
;
49
float
aTerm_
;
50
};
51
52
}
// namespace hgcalsimclustertime
53
54
#endif
hgcalsimclustertime
Definition:
ComputeClusterTime.h:21
hgcalsimclustertime::ComputeClusterTime::xMin_
float xMin_
Definition:
ComputeClusterTime.h:46
hgcalsimclustertime::ComputeClusterTime::fixSizeHighestDensity
std::pair< float, float > fixSizeHighestDensity(std::vector< float > &time, std::vector< float > weight=std::vector< float >(), unsigned int minNhits=3, float deltaT=0.210, float timeWidthBy=0.5)
Definition:
ComputeClusterTime.cc:64
hgcalsimclustertime::ComputeClusterTime::timeResolution
float timeResolution(float xVal)
Definition:
ComputeClusterTime.cc:41
hgcalsimclustertime::ComputeClusterTime::aTerm_
float aTerm_
Definition:
ComputeClusterTime.h:49
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:37
PixelVTXMonitor_cfi.Xmax
Xmax
Definition:
PixelVTXMonitor_cfi.py:8
hgcalsimclustertime::ComputeClusterTime::ComputeClusterTime
ComputeClusterTime()
Definition:
ComputeClusterTime.cc:30
hgcalsimclustertime::ComputeClusterTime::cTerm_
float cTerm_
Definition:
ComputeClusterTime.h:48
hgcalsimclustertime::ComputeClusterTime
Definition:
ComputeClusterTime.h:23
hgcalsimclustertime::ComputeClusterTime::xMax_
float xMax_
Definition:
ComputeClusterTime.h:47
hgcalsimclustertime::ComputeClusterTime::getTimeError
float getTimeError(std::string type, float xVal)
Definition:
ComputeClusterTime.cc:46
ntuplemaker.time
time
Definition:
ntuplemaker.py:310
hgcalsimclustertime::ComputeClusterTime::setParameters
void setParameters(float Xmix, float Xmax, float Cterm, float Aterm)
Definition:
ComputeClusterTime.cc:32
weight
Definition:
weight.py:1
Generated for CMSSW Reference Manual by
1.8.16