Skip to content

Commit

Permalink
Merge pull request #27079 from cms-sw/code-format-reconstruction-acdb96
Browse files Browse the repository at this point in the history
Running code-format for reconstruction
  • Loading branch information
cmsbuild committed Jun 5, 2019
2 parents 0b6f294 + c1e01f0 commit 04a8594
Show file tree
Hide file tree
Showing 192 changed files with 16,229 additions and 17,468 deletions.
43 changes: 15 additions & 28 deletions RecoEgamma/EgammaPhotonAlgos/interface/ConversionBarrelEstimator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,41 @@
* \author Nancy Marinelli, U. of Notre Dame, US
*/

#include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
#include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
#include "DataFormats/GeometryVector/interface/Vector2DBase.h"
#include "DataFormats/GeometryVector/interface/LocalTag.h"


class TrajectoryStateOnSurface;
class RecHit;
class Plane;

class ConversionBarrelEstimator : public MeasurementEstimator {
public:

ConversionBarrelEstimator() {};
ConversionBarrelEstimator( float phiRangeMin, float phiRangeMax,
float zRangeMin, float zRangeMax, double nSigma = 3. ) :
thePhiRangeMin( phiRangeMin), thePhiRangeMax( phiRangeMax),
theZRangeMin( zRangeMin), theZRangeMax( zRangeMax), theNSigma(nSigma) {
ConversionBarrelEstimator(){};
ConversionBarrelEstimator(float phiRangeMin, float phiRangeMax, float zRangeMin, float zRangeMax, double nSigma = 3.)
: thePhiRangeMin(phiRangeMin),
thePhiRangeMax(phiRangeMax),
theZRangeMin(zRangeMin),
theZRangeMax(zRangeMax),
theNSigma(nSigma) {
// std::cout << " ConversionBarrelEstimator CTOR " << std::endl;
}
}

// zero value indicates incompatible ts - hit pair
std::pair<bool,double> estimate( const TrajectoryStateOnSurface& ts,
const TrackingRecHit& hit ) const override;
bool estimate( const TrajectoryStateOnSurface& ts,
const Plane& plane) const override;
ConversionBarrelEstimator* clone() const override {
return new ConversionBarrelEstimator(*this);
}




std::pair<bool, double> estimate(const TrajectoryStateOnSurface& ts, const TrackingRecHit& hit) const override;
bool estimate(const TrajectoryStateOnSurface& ts, const Plane& plane) const override;
ConversionBarrelEstimator* clone() const override { return new ConversionBarrelEstimator(*this); }

Local2DVector maximalLocalDisplacement( const TrajectoryStateOnSurface& ts, const Plane& plane) const override;
Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface& ts, const Plane& plane) const override;


double nSigmaCut() const {return theNSigma;}
double nSigmaCut() const { return theNSigma; }

private:

float thePhiRangeMin;
float thePhiRangeMax;
float theZRangeMin;
float theZRangeMax;
double theNSigma;



};

#endif // ConversionBarrelEstimator_H
#endif // ConversionBarrelEstimator_H
34 changes: 11 additions & 23 deletions RecoEgamma/EgammaPhotonAlgos/interface/ConversionFastHelix.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,40 @@
#include "FWCore/Framework/interface/ESHandle.h"
#include "MagneticField/Engine/interface/MagneticField.h"


/**
Generation of track parameters at a vertex using two hits and a vertex.
*/

class ConversionFastHelix {

private:

typedef FreeTrajectoryState FTS;

public:
ConversionFastHelix(const GlobalPoint& outerHit,
const GlobalPoint& middleHit,
const GlobalPoint& aVertex,
const MagneticField* field);

ConversionFastHelix(const GlobalPoint& outerHit,
const GlobalPoint& middleHit,
const GlobalPoint& aVertex,
const MagneticField* field
);

~ConversionFastHelix() {}

void makeHelix();


bool isValid() {return validStateAtVertex; }
bool isValid() { return validStateAtVertex; }

FTS stateAtVertex() ;
FTS stateAtVertex();

FTS helixStateAtVertex() ;
FTS helixStateAtVertex();

FTS straightLineStateAtVertex() ;
FTS straightLineStateAtVertex();

private:

FTS theHelix_;
bool validStateAtVertex;
FTS theHelix_;
bool validStateAtVertex;
GlobalPoint theOuterHit;
GlobalPoint theMiddleHit;
GlobalPoint theVertex;
FastCircle theCircle;
const MagneticField* mField;

};

#endif //Egamma_ConversionFastHelix_H_




#endif //Egamma_ConversionFastHelix_H_
47 changes: 14 additions & 33 deletions RecoEgamma/EgammaPhotonAlgos/interface/ConversionForwardEstimator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef RecoEGAMMA_ConversionForwardEstimator_H
#define RecoEGAMMA_ConversionForwardEstimator_H
#ifndef RecoEGAMMA_ConversionForwardEstimator_H
#define RecoEGAMMA_ConversionForwardEstimator_H

/**
* \class ConversionForwardEstimator
Expand All @@ -8,56 +8,37 @@
* \author Nancy Marinelli, U. of Notre Dame, US
*/

#include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
#include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
#include "DataFormats/GeometryVector/interface/Vector2DBase.h"
#include "DataFormats/GeometryVector/interface/LocalTag.h"


#include <iostream>
#include <iostream>
class RecHit;
class TrajectoryStateOnSurface;
class Plane;

class ConversionForwardEstimator : public MeasurementEstimator {
public:
ConversionForwardEstimator() {};
ConversionForwardEstimator( float phiRangeMin, float phiRangeMax, float dr, double nSigma = 3. ) :
thePhiRangeMin( phiRangeMin), thePhiRangeMax( phiRangeMax), dr_(dr), theNSigma(nSigma) {
ConversionForwardEstimator(){};
ConversionForwardEstimator(float phiRangeMin, float phiRangeMax, float dr, double nSigma = 3.)
: thePhiRangeMin(phiRangeMin), thePhiRangeMax(phiRangeMax), dr_(dr), theNSigma(nSigma) {
//std::cout << " ConversionForwardEstimator CTOR " << std::endl;
}
}

// zero value indicates incompatible ts - hit pair
std::pair<bool,double> estimate( const TrajectoryStateOnSurface& ts,
const TrackingRecHit& hit) const override;
bool estimate( const TrajectoryStateOnSurface& ts,
const Plane& plane) const override;
ConversionForwardEstimator* clone() const override {
return new ConversionForwardEstimator(*this);
}

std::pair<bool, double> estimate(const TrajectoryStateOnSurface& ts, const TrackingRecHit& hit) const override;
bool estimate(const TrajectoryStateOnSurface& ts, const Plane& plane) const override;
ConversionForwardEstimator* clone() const override { return new ConversionForwardEstimator(*this); }

Local2DVector maximalLocalDisplacement( const TrajectoryStateOnSurface& ts, const Plane& plane) const override;
Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface& ts, const Plane& plane) const override;

double nSigmaCut() const {return theNSigma;}
double nSigmaCut() const { return theNSigma; }

private:

float thePhiRangeMin;
float thePhiRangeMax;
float dr_;
double theNSigma;
};

#endif // ConversionForwardEstimator_H












#endif // ConversionForwardEstimator_H
16 changes: 4 additions & 12 deletions RecoEgamma/EgammaPhotonAlgos/interface/ConversionHitChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,15 @@

class Trajectory;
class ConversionHitChecker {

public:

ConversionHitChecker() {}
~ConversionHitChecker() {}

std::pair<uint8_t, Measurement1DFloat> nHitsBeforeVtx(const reco::TrackExtra &track,
const reco::Vertex &vtx,
float sigmaTolerance = 3.0) const;

std::pair<uint8_t,Measurement1DFloat> nHitsBeforeVtx(const reco::TrackExtra & track, const reco::Vertex &vtx,
float sigmaTolerance = 3.0) const;

uint8_t nSharedHits(const reco::Track &trk1, const reco::Track &trk2) const;




};

#endif // ConversionHitChecker_H


#endif // ConversionHitChecker_H
91 changes: 35 additions & 56 deletions RecoEgamma/EgammaPhotonAlgos/interface/ConversionSeedFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@
#include "DataFormats/Math/interface/Vector3D.h"
#include "DataFormats/Math/interface/Point3D.h"


#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"

// C/C++ headers
#include <string>
#include <vector>




//
namespace edm {
class ConsumesCollector;
Expand All @@ -48,90 +44,73 @@ class FreeTrajectoryState;
class TrajectoryStateOnSurface;
class NavigationSchool;


class ConversionSeedFinder {

public:


public:
ConversionSeedFinder();
ConversionSeedFinder( const edm::ParameterSet& config,edm::ConsumesCollector & iC );

virtual ~ConversionSeedFinder(){}
ConversionSeedFinder(const edm::ParameterSet& config, edm::ConsumesCollector& iC);


virtual void makeSeeds(const edm::Handle<edm::View<reco::CaloCluster> > & allBc ) =0 ;

virtual ~ConversionSeedFinder() {}

virtual void makeSeeds(const edm::Handle<edm::View<reco::CaloCluster> >& allBc) = 0;

TrajectorySeedCollection& seeds() { return theSeeds_; }
virtual void setCandidate(float e, GlobalPoint pos) {
theSCenergy_ = e;
theSCPosition_ = pos;
}
std::vector<const DetLayer*> const& layerList() const { return theLayerList_; }

TrajectorySeedCollection & seeds() { return theSeeds_;}
virtual void setCandidate( float e, GlobalPoint pos ) { theSCenergy_=e; theSCPosition_= pos; }
std::vector<const DetLayer*> const & layerList() const { return theLayerList_;}


void setMeasurementTracker(const MeasurementTracker* tracker) const { ; }
const MeasurementTracker* getMeasurementTracker() const {return theMeasurementTracker_;}
const MeasurementTracker* getMeasurementTracker() const { return theMeasurementTracker_; }

/// Initialize EventSetup objects at each event
void setEventSetup( const edm::EventSetup& es ) ;
void setNavigationSchool(const NavigationSchool *navigation) { theNavigationSchool_ = navigation; }
void setEvent( const edm::Event& e ) ;

void clear() {
theSeeds_.clear();
}

protected:
void setEventSetup(const edm::EventSetup& es);
void setNavigationSchool(const NavigationSchool* navigation) { theNavigationSchool_ = navigation; }
void setEvent(const edm::Event& e);

void clear() { theSeeds_.clear(); }

protected:
//edm::ParameterSet conf_; found this to be completely unused
void findLayers();
void findLayers(const FreeTrajectoryState & fts);
void findLayers(const FreeTrajectoryState& fts);

FreeTrajectoryState trackStateFromClusters ( int aCharge,
const GlobalPoint & gpOrigine,
PropagationDirection dir,
float scaleFactor ) const;

FreeTrajectoryState trackStateFromClusters(int aCharge,
const GlobalPoint& gpOrigine,
PropagationDirection dir,
float scaleFactor) const;

void printLayer(int i) const ;
void printLayer(int i) const;


TrajectorySeedCollection theSeeds_;
GlobalPoint theSCPosition_;


std::string theMeasurementTrackerName_;
const MeasurementTracker* theMeasurementTracker_;
const MeasurementTracker* theMeasurementTracker_;
const TrackingGeometry* theTrackerGeom_;
const NavigationSchool *theNavigationSchool_ = nullptr;
const NavigationSchool* theNavigationSchool_ = nullptr;


edm::ESHandle<MagneticField> theMF_;
edm::ESHandle<GeometricSearchTracker> theGeomSearchTracker_;
edm::ESHandle<GeometricSearchTracker> theGeomSearchTracker_;

edm::EDGetTokenT<reco::BeamSpot> beamSpotToken_;
edm::EDGetTokenT<MeasurementTrackerEvent> measurementTrkToken_;

KFUpdator theUpdator_;
PropagationDirection dir_;
reco::CaloCluster* theSC_;
float theSCenergy_;

KFUpdator theUpdator_;
PropagationDirection dir_;
reco::CaloCluster* theSC_;
float theSCenergy_;
std::vector<const DetLayer*> theLayerList_;


std::vector<const DetLayer *> theLayerList_ ;

GlobalPoint theBCPosition_;
float theBCEnergy_;
float theBCEnergy_;

const Propagator* thePropagatorAlongMomentum_;
const Propagator* thePropagatorOppositeToMomentum_;
const Propagator* thePropagatorAlongMomentum_;
const Propagator* thePropagatorOppositeToMomentum_;

reco::BeamSpot theBeamSpot_;
edm::Handle<MeasurementTrackerEvent> theTrackerData_;


edm::Handle<MeasurementTrackerEvent> theTrackerData_;
};

#endif
Loading

0 comments on commit 04a8594

Please sign in to comment.