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 2 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/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
5 changes: 3 additions & 2 deletions 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,8 +109,9 @@ class MultiGaussianState {
// static int constructsCombinedState_;
};

#if !defined(EXCLUDE_MultiGaussianState_ICC)
#include "TrackingTools/GsfTools/interface/MultiGaussianState.icc"

#endif
// template <unsigned int N> int MultiGaussianState<N>::instances_ = 0;
// template <unsigned int N> int MultiGaussianState<N>::maxInstances_ = 0;
// template <unsigned int N> int MultiGaussianState<N>::constructsCombinedState_ = 0;
Expand Down
3 changes: 3 additions & 0 deletions TrackingTools/GsfTools/interface/MultiGaussianState.icc
@@ -1,3 +1,5 @@
#ifndef TrackingTools_GsfTools_MultiGaussianState_icc
#define TrackingTools_GsfTools_MultiGaussianState_icc
#include "TrackingTools/GsfTools/interface/MultiGaussianState.h"
#include "TrackingTools/GsfTools/interface/MultiGaussianStateCombiner.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be more practical or at least less recursive-looking to simply merge MultiGaussianState.h, MultiGaussianState.icc, MultiGaussianStateCombiner.h, and MultiGaussianStateCombiner.icc
?

The updates made in this PR are adding a touch of duality on top what's already looking recursive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging them should work. I was trying to do the absolute minimum change since I do not know the original author's intent.


Expand Down Expand Up @@ -69,3 +71,4 @@ MultiGaussianState<N>::rescaleWeight (double scale)
ic!=theComponents.end(); ic++ ) (**ic).rescaleWeight(scale);
if (theCombinedStateUp2Date) theCombinedState->rescaleWeight(scale);
}
#endif
3 changes: 3 additions & 0 deletions TrackingTools/GsfTools/interface/MultiGaussianStateCombiner.h
@@ -1,7 +1,9 @@
#ifndef MultiGaussianStateCombiner_H
#define MultiGaussianStateCombiner_H

#define EXCLUDE_MultiGaussianState_ICC
#include "TrackingTools/GsfTools/interface/MultiGaussianState.h"
#undef EXCLUDE_MultiGaussianState_ICC
#include "TrackingTools/GsfTools/interface/SingleGaussianState.h"

/**
Expand Down Expand Up @@ -29,5 +31,6 @@ class MultiGaussianStateCombiner {
};

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

#endif
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