Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups in TrackingTools/GsfTools #26020

Merged
merged 3 commits into from Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion TrackingTools/GsfTools/BuildFile.xml
@@ -1,5 +1,4 @@
<use name="ofast-flag"/>
<use name="boost"/>
<use name="CLHEP"/>
<export>
<lib name="1"/>
Expand Down
2 changes: 1 addition & 1 deletion TrackingTools/GsfTools/interface/CloseComponentsMerger.icc
@@ -1,4 +1,4 @@
#include "TrackingTools/GsfTools/interface/MultiGaussianStateCombiner.h"
#include "TrackingTools/GsfTools/interface/MultiGaussianState.h"
#include "TrackingTools/GsfTools/interface/MultiGaussianStateAssembler.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

Expand Down
2 changes: 1 addition & 1 deletion TrackingTools/GsfTools/interface/GaussianStateLessWeight.h
Expand Up @@ -2,7 +2,7 @@
#define GaussianStateLessWeight_h_

#include "TrackingTools/GsfTools/interface/SingleGaussianState.h"
#include "boost/shared_ptr.hpp"
#include <memory>

/** \class GaussianStateLessWeight
* Compare two SingleGaussianState acc. to their weight.
Expand Down
32 changes: 31 additions & 1 deletion TrackingTools/GsfTools/interface/MultiGaussianState.h
Expand Up @@ -2,7 +2,7 @@
#define MultiGaussianState_H

#include "TrackingTools/GsfTools/interface/SingleGaussianState.h"
#include "boost/shared_ptr.hpp"
#include <memory>

#include <vector>

Expand Down Expand Up @@ -109,6 +109,36 @@ class MultiGaussianState {
// static int constructsCombinedState_;
};

/**
* Class to collapse (combine) a Gaussian mixture of states
* into one.
* (c.f. R. Fruewirth et.al., Comp.Phys.Comm 100 (1997) 1
*/

//NOTE: Circular dependency between MultiGaussianState and
// MultiGaussianStateCombiner requires they be in the same
// headerfile

template <unsigned int N>
class MultiGaussianStateCombiner {

private:
typedef SingleGaussianState<N> SingleState;
typedef MultiGaussianState<N> MultiState;
typedef typename MultiGaussianState<N>::SingleStatePtr SingleStatePtr;
typedef typename MultiGaussianState<N>::SingleStateContainer VSC;

public:

// typedef std::vector<SingleState> VSC;

SingleStatePtr combine(const MultiState & theState) const;
SingleStatePtr combine(const VSC& theComponents) const;

};


#include "TrackingTools/GsfTools/interface/MultiGaussianStateCombiner.icc"
#include "TrackingTools/GsfTools/interface/MultiGaussianState.icc"

// template <unsigned int N> int MultiGaussianState<N>::instances_ = 0;
Expand Down
4 changes: 3 additions & 1 deletion TrackingTools/GsfTools/interface/MultiGaussianState.icc
@@ -1,5 +1,6 @@
#ifndef TrackingTools_GsfTools_MultiGaussianState_icc
#define TrackingTools_GsfTools_MultiGaussianState_icc
#include "TrackingTools/GsfTools/interface/MultiGaussianState.h"
#include "TrackingTools/GsfTools/interface/MultiGaussianStateCombiner.h"

// template <unsigned int N>
// MultiGaussianState<N>::MultiGaussianState
Expand Down Expand Up @@ -69,3 +70,4 @@ MultiGaussianState<N>::rescaleWeight (double scale)
ic!=theComponents.end(); ic++ ) (**ic).rescaleWeight(scale);
if (theCombinedStateUp2Date) theCombinedState->rescaleWeight(scale);
}
#endif
33 changes: 0 additions & 33 deletions TrackingTools/GsfTools/interface/MultiGaussianStateCombiner.h

This file was deleted.

1 change: 0 additions & 1 deletion TrackingTools/GsfTools/interface/SingleGaussianState1D.h
Expand Up @@ -2,7 +2,6 @@
#define SingleGaussianState1D_H

#include "TrackingTools/GsfTools/interface/SingleGaussianState.h"
#include "boost/shared_ptr.hpp"

/** One-dimensional (single) Gaussian state. Used for the description
* of Gaussian mixtures in one dimension.
Expand Down
Expand Up @@ -5,7 +5,7 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "TrackingTools/GsfTools/interface/CloseComponentsMerger.h"
#include <boost/shared_ptr.hpp>
#include <memory>

/** Provides the "CloseComponents" algorithm ("Merger") for reducing
* the number of components in a multi-
Expand Down
Expand Up @@ -5,7 +5,7 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "TrackingTools/GsfTools/interface/DistanceBetweenComponents.h"
#include <boost/shared_ptr.hpp>
#include <memory>

/** Provides algorithms to measure the distance between components
* (currently either using a Kullback-Leibler or a Mahalanobis distance)
Expand Down