Documentation
¶
Index ¶
- Variables
- func ChargeOverBox(x, y float64, integ ChargeIntegrator, bbox geo.BBox) float64
- func ClusterLoop(dec DEClustersDecoder, tcsel TaggedClusterSelector, firstEvent int, ...) (int, int)
- func DEClusterResidual(declu *DEClusters, i int, declupos DEClusterPositioner) float64
- func DumpClusters(index int, tc *TaggedClusters, selected []int)
- func FillHistogramCollection(tc *TaggedClusters, selected []int, hc *Collection, ...)
- func Gaus(x, cst, mu, sigma float64) float64
- func Landau(x, mu, sigma float64) float64
- func Levy(x, mu, sigma float64) float64
- func Moyal(x, cst, mu, sigma float64) float64
- func PlotHistogramCollection(hc *Collection) []*hplot.Plot
- func PlotResidual(h *hbook.H1D) *hplot.Plot
- func SameCluster(ca, cb Cluster) bool
- func SameDigitLocation(da, db Digit) bool
- func SamePreCluster(a, b PreCluster) bool
- func SaveFunction(outputFileName string)
- func SavePlot(p *hplot.Plot, outputFileName string, name string)
- func ShareDigits(a, b PreCluster) bool
- type ChargeIntegrator
- type ChargeSpreader
- type ClipScale
- type ClipTicker
- type Cluster
- type ClusterCharge
- type ClusterCharger
- type ClusterPos
- type Clusterizer
- type Collection
- func (ob *Collection) Add(h hbook.Object) error
- func (ob *Collection) Get(hname string) (*hbook.Object, error)
- func (ob *Collection) H1D(hname string) (*hbook.H1D, error)
- func (ob *Collection) H1Ds() []*hbook.H1D
- func (ob *Collection) H2D(hname string) (*hbook.H2D, error)
- func (ob *Collection) NObjects() int
- func (ob *Collection) Print(out io.Writer)
- type CounterCollection
- type DEClusterPositioner
- type DEClusterPositionerCOG
- type DEClusters
- type DEClustersDecoder
- type DEClustersEncoder
- type Digit
- type DigitGroup
- type Fitter
- type IntegrateFunc
- type Plotter
- type PreCluster
- type TaggedClusterSelector
- type TaggedClusterSelectorMult
- type TaggedClusterSelectorSplit
- type TaggedClusterSelectorTrue
- type TaggedClusters
- func (tc *TaggedClusters) Clusters() []Cluster
- func (tc *TaggedClusters) IsDup(i int) bool
- func (tc *TaggedClusters) IsSimple(i int) bool
- func (tc *TaggedClusters) IsSplit(i int) bool
- func (tc *TaggedClusters) Label(i int) string
- func (tc *TaggedClusters) NDuplicates() int
- func (tc *TaggedClusters) PrintSelected(w io.Writer, sel []int)
- func (tc *TaggedClusters) String() string
- type WeightModel
Constants ¶
This section is empty.
Variables ¶
var ( ErrCannotAddNilObject = errors.New("Cannot add a nil object") ErrCannotAddUnnamedObject = errors.New("Cannot add an unnamed object") ErrNonExistingObject = errors.New("Non existing object") )
var SegCache mapping.SegCache
Functions ¶
func ChargeOverBox ¶
func ChargeOverBox(x, y float64, integ ChargeIntegrator, bbox geo.BBox) float64
Integrate a unit charge originating from (x,y) over the surface given by (lowerLeft,topRight)
func ClusterLoop ¶
func ClusterLoop(dec DEClustersDecoder, tcsel TaggedClusterSelector, firstEvent int, maxEvents int, worker func(index int, tc *TaggedClusters, selected []int)) (int, int)
func DEClusterResidual ¶
func DEClusterResidual(declu *DEClusters, i int, declupos DEClusterPositioner) float64
func DumpClusters ¶
func DumpClusters(index int, tc *TaggedClusters, selected []int)
func FillHistogramCollection ¶
func FillHistogramCollection(tc *TaggedClusters, selected []int, hc *Collection, declupos DEClusterPositioner)
func PlotHistogramCollection ¶
func PlotHistogramCollection(hc *Collection) []*hplot.Plot
func SameCluster ¶
SameCluster returns true if the two clusters : - have the same precluster - have close enough positions
func SameDigitLocation ¶
SameDigitLocation returns true if the digits are the same pad
func SamePreCluster ¶
func SamePreCluster(a, b PreCluster) bool
SamePreCluster returns true if both preclusters have : - the same digits - in the same order
func SaveFunction ¶
func SaveFunction(outputFileName string)
func ShareDigits ¶
func ShareDigits(a, b PreCluster) bool
ShareDigits returns true if both precluster have at least one digit in common
Types ¶
type ChargeIntegrator ¶
ChargeIntegrator wraps the single Integrate method.
type ChargeSpreader ¶
type ChargeSpreader interface { // SpreadCharge spreads the charge q originating at position (x,y) // over several digits that are returned SpreadCharge(q, x, y float64) []Digit }
ChargeSpreader wraps the single SpreadCharge method.
type ClipTicker ¶
type Cluster ¶
type Cluster struct { // Pre is the PreCluster this cluster originates from. Pre PreCluster // Pos is the cluster position. Pos ClusterPos // Q is the total charge of the cluster. Q ClusterCharge }
Cluster represents a MCH cluster.
type ClusterCharge ¶
type ClusterCharge float64
ClusterCharge represents the total charge of a cluster.
type ClusterCharger ¶
type ClusterCharger interface { // Charge (re)computes the charge of the cluster. Charge(clu Cluster) float64 // Name of the charger Name() string }
ClusterCharger computes the position of a cluster.
type ClusterPos ¶
ClusterPos represents the 2D position of a cluster. The position is relative to one detection element.
func (ClusterPos) String ¶
func (pos ClusterPos) String() string
String gets a string representation of the position.
type Clusterizer ¶
type Clusterizer interface { // Clusterize converts a precluster into one or several clusters. Clusterize(pre PreCluster) []Cluster }
Clusterizer wraps the single Clusterizer method.
type Collection ¶
type Collection struct { Name string // contains filtered or unexported fields }
func CreateHistogramCollection ¶
func CreateHistogramCollection() *Collection
func NewCollection ¶
func NewCollection(name string) *Collection
func (*Collection) H1Ds ¶
func (ob *Collection) H1Ds() []*hbook.H1D
func (*Collection) NObjects ¶
func (ob *Collection) NObjects() int
func (*Collection) Print ¶
func (ob *Collection) Print(out io.Writer)
type CounterCollection ¶
type CounterCollection struct {
// contains filtered or unexported fields
}
func NewCounterCollection ¶
func NewCounterCollection() *CounterCollection
func (*CounterCollection) Incr ¶
func (cc *CounterCollection) Incr(label string)
func (*CounterCollection) String ¶
func (cc *CounterCollection) String() string
type DEClusterPositioner ¶
type DEClusterPositioner interface { // Position (re)computes the position of the cluster. Position(declu *DEClusters, i int) (x, y float64) // Name of the positioner. Name() string }
DEClusterPositioner computes the 2D position of clusters
func NewDEClusterPositioner ¶
func NewDEClusterPositioner(name string) DEClusterPositioner
type DEClusterPositionerCOG ¶
type DEClusterPositionerCOG struct {
Wmod WeightModel
}
func (DEClusterPositionerCOG) Name ¶
func (clupos DEClusterPositionerCOG) Name() string
func (DEClusterPositionerCOG) Position ¶
func (declupos DEClusterPositionerCOG) Position(declu *DEClusters, i int) (float64, float64)
type DEClusters ¶
type DEClusters struct { // DeID is the detection element id of those clusters. DeID mapping.DEID // Clusters is the list of clusters of this group. Clusters []Cluster }
DEClusters represents a group of clusters for one detection element.
func MockClustersFromDigitGroups ¶
func MockClustersFromDigitGroups(deid mapping.DEID, positions []ClusterPos, charges []ClusterCharge, dgs []DigitGroup) DEClusters
type DEClustersDecoder ¶
type DEClustersDecoder interface { // Decode reads the next DEClusters from its input and stores it // in the value pointed by clu. Decode(declu *DEClusters) error // Close may be necessary for those decoder implementations. Close() }
DEClustersDecoder decodes DEClusters from an underlying stream.
type DEClustersEncoder ¶
type DEClustersEncoder interface { // Encode writes the encoding of clu to the stream. Encode(declu *DEClusters) error // Close may be necessary for those decoder implementations to flush data. Close() }
DEClustersDecoder encodes DEClusters onto the underlying stream.
type Digit ¶
type DigitGroup ¶
type Fitter ¶
type Fitter struct { Integrator ChargeIntegrator Method optimize.Method }
Fitter implements DEClusterPositioner.
type IntegrateFunc ¶
IntegrateFunc functions implement ChargeIntegrator.
func (IntegrateFunc) Integrate ¶
func (f IntegrateFunc) Integrate(x1, y1, x2, y2 float64) float64
type PreCluster ¶
type PreCluster struct {
DigitGroup
}
func (PreCluster) Charge ¶
func (pre PreCluster) Charge() float64
func (PreCluster) NofPads ¶
func (pre PreCluster) NofPads() int
func (PreCluster) String ¶
func (pre PreCluster) String() string
type TaggedClusterSelector ¶
type TaggedClusterSelector interface { // Select decides if a cluster is to be kept or not. Select(tagclu *TaggedClusters, i int) bool // Name of the selector. Name() string }
TaggedClusterSelector selects or discard a cluster from a tagged group based on some criteria.
func NewClusterSelector ¶
func NewClusterSelector(selector string) TaggedClusterSelector
type TaggedClusterSelectorMult ¶
type TaggedClusterSelectorMult struct {
// contains filtered or unexported fields
}
func (TaggedClusterSelectorMult) Name ¶
func (sel TaggedClusterSelectorMult) Name() string
func (TaggedClusterSelectorMult) Select ¶
func (sel TaggedClusterSelectorMult) Select(tc *TaggedClusters, i int) bool
type TaggedClusterSelectorSplit ¶
type TaggedClusterSelectorSplit struct{}
func (TaggedClusterSelectorSplit) Name ¶
func (sel TaggedClusterSelectorSplit) Name() string
func (TaggedClusterSelectorSplit) Select ¶
func (sel TaggedClusterSelectorSplit) Select(tc *TaggedClusters, i int) bool
type TaggedClusterSelectorTrue ¶
type TaggedClusterSelectorTrue struct{}
func (TaggedClusterSelectorTrue) Name ¶
func (sel TaggedClusterSelectorTrue) Name() string
func (TaggedClusterSelectorTrue) Select ¶
func (sel TaggedClusterSelectorTrue) Select(tc *TaggedClusters, i int) bool
type TaggedClusters ¶
type TaggedClusters struct {
// contains filtered or unexported fields
}
func GetTaggedClusters ¶
func GetTaggedClusters(declu *DEClusters) *TaggedClusters
func (*TaggedClusters) Clusters ¶
func (tc *TaggedClusters) Clusters() []Cluster
func (*TaggedClusters) IsDup ¶
func (tc *TaggedClusters) IsDup(i int) bool
func (*TaggedClusters) IsSimple ¶
func (tc *TaggedClusters) IsSimple(i int) bool
func (*TaggedClusters) IsSplit ¶
func (tc *TaggedClusters) IsSplit(i int) bool
func (*TaggedClusters) Label ¶
func (tc *TaggedClusters) Label(i int) string
func (*TaggedClusters) NDuplicates ¶
func (tc *TaggedClusters) NDuplicates() int
func (*TaggedClusters) PrintSelected ¶
func (tc *TaggedClusters) PrintSelected(w io.Writer, sel []int)
func (*TaggedClusters) String ¶
func (tc *TaggedClusters) String() string
type WeightModel ¶
type WeightModel int
const ( NoWeight WeightModel = iota + 1 RegularWeight SquaredWeight )