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

Running code-format for alca #26626

Merged
merged 2 commits into from May 6, 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
40 changes: 16 additions & 24 deletions Alignment/CocoaDDLObjects/interface/CocoaMaterialElementary.h
@@ -1,8 +1,9 @@
// COCOA class header file
//Id: CocoaMaterialElementary.h
//CAT: Model
// Id: CocoaMaterialElementary.h
// CAT: Model
//
// Class to manage the sets of fitted entries (one set per each measurement data set)
// Class to manage the sets of fitted entries (one set per each measurement
// data set)
//
// History: v1.0
// Pedro Arce
Expand All @@ -12,37 +13,28 @@

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"


class CocoaMaterialElementary
{
class CocoaMaterialElementary {

public:
//---------- Constructors / Destructor
CocoaMaterialElementary( ALIstring name, float density, ALIstring symbol, float A, ALIint Z );
~CocoaMaterialElementary(){ };

ALIstring getName() const {
return theName; }
float getDensity() const {
return theDensity; }
ALIstring getSymbol() const {
return theSymbol; }
float getA() const {
return theA; }
ALIint getZ() const {
return theZ; }

ALIbool operator==(const CocoaMaterialElementary& mate ) const;
CocoaMaterialElementary(ALIstring name, float density, ALIstring symbol,
float A, ALIint Z);
~CocoaMaterialElementary(){};

private:
ALIstring getName() const { return theName; }
float getDensity() const { return theDensity; }
ALIstring getSymbol() const { return theSymbol; }
float getA() const { return theA; }
ALIint getZ() const { return theZ; }

ALIbool operator==(const CocoaMaterialElementary &mate) const;

private:
ALIstring theName;
float theDensity;
ALIstring theSymbol;
float theA;
ALIint theZ;

};

#endif

25 changes: 10 additions & 15 deletions Alignment/CocoaDDLObjects/interface/CocoaSolidShape.h
@@ -1,36 +1,31 @@
// COCOA class header file
//Id: CocoaSolidShape.h
//CAT: Model
// Id: CocoaSolidShape.h
// CAT: Model
//
// Class to manage the sets of fitted entries (one set per each measurement data set)
//
// History: v1.0
// Class to manage the sets of fitted entries (one set per each measurement
// data set)
//
// History: v1.0
// Pedro Arce

#ifndef _CocoaSolidShape_HH
#define _CocoaSolidShape_HH

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"


class CocoaSolidShape
{
class CocoaSolidShape {

public:
//---------- Constructors / Destructor
CocoaSolidShape( ALIstring type );
virtual ~CocoaSolidShape(){ };
CocoaSolidShape(ALIstring type);
virtual ~CocoaSolidShape(){};

ALIstring getType() const {
return theType; }
ALIstring getType() const { return theType; }

// ALIbool operator==(const CocoaSolidShape& mate );

private:

ALIstring theType;

};

#endif

24 changes: 9 additions & 15 deletions Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h
@@ -1,7 +1,7 @@
// COCOA class header file
//Id: CocoaSolidShapeBox.h
// Id: CocoaSolidShapeBox.h
//
// History: v1.0
// History: v1.0
// Pedro Arce

#ifndef _CocoaSolidShapeBox_HH
Expand All @@ -10,28 +10,22 @@
#include "Alignment/CocoaDDLObjects/interface/CocoaSolidShape.h"
#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"


class CocoaSolidShapeBox : public CocoaSolidShape
{
class CocoaSolidShapeBox : public CocoaSolidShape {

public:
//---------- Constructors / Destructor
CocoaSolidShapeBox( ALIstring type, ALIfloat xdim, ALIfloat ydim, ALIfloat zdim );
~CocoaSolidShapeBox() override{ };
CocoaSolidShapeBox(ALIstring type, ALIfloat xdim, ALIfloat ydim,
ALIfloat zdim);
~CocoaSolidShapeBox() override{};

ALIfloat getXHalfLength() const {
return theXHalfLength; }
ALIfloat getYHalfLength() const {
return theYHalfLength; }
ALIfloat getZHalfLength() const {
return theZHalfLength; }
ALIfloat getXHalfLength() const { return theXHalfLength; }
ALIfloat getYHalfLength() const { return theYHalfLength; }
ALIfloat getZHalfLength() const { return theZHalfLength; }

private:

ALIfloat theXHalfLength;
ALIfloat theYHalfLength;
ALIfloat theZHalfLength;
};

#endif

31 changes: 12 additions & 19 deletions Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h
@@ -1,7 +1,7 @@
// COCOA class header file
//Id: CocoaSolidShapeTubs.h
// Id: CocoaSolidShapeTubs.h
//
// History: v1.0
// History: v1.0
// Pedro Arce

#ifndef _CocoaSolidShapeTubs_HH
Expand All @@ -11,33 +11,26 @@
#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"

class CocoaSolidShapeTubs : public CocoaSolidShape
{
class CocoaSolidShapeTubs : public CocoaSolidShape {

public:
//---------- Constructors / Destructor
CocoaSolidShapeTubs( const ALIstring pType, ALIfloat pRMin, ALIfloat pRMax, ALIfloat pDz, ALIfloat pSPhi = 0.*deg, ALIfloat pDPhi = 360.*deg );
~CocoaSolidShapeTubs() override{ };
ALIfloat getInnerRadius() const {
return theInnerRadius; }
ALIfloat getOuterRadius() const {
return theOuterRadius ; }
ALIfloat getZHalfLength() const {
return theZHalfLength ; }
ALIfloat getStartPhiAngle() const {
return theStartPhiAngle ; }
ALIfloat getDeltaPhiAngle() const {
return theDeltaPhiAngle ; }
CocoaSolidShapeTubs(const ALIstring pType, ALIfloat pRMin, ALIfloat pRMax,
ALIfloat pDz, ALIfloat pSPhi = 0. * deg,
ALIfloat pDPhi = 360. * deg);
~CocoaSolidShapeTubs() override{};
ALIfloat getInnerRadius() const { return theInnerRadius; }
ALIfloat getOuterRadius() const { return theOuterRadius; }
ALIfloat getZHalfLength() const { return theZHalfLength; }
ALIfloat getStartPhiAngle() const { return theStartPhiAngle; }
ALIfloat getDeltaPhiAngle() const { return theDeltaPhiAngle; }

private:

ALIfloat theInnerRadius;
ALIfloat theOuterRadius;
ALIfloat theZHalfLength;
ALIfloat theStartPhiAngle;
ALIfloat theDeltaPhiAngle;

};

#endif

33 changes: 13 additions & 20 deletions Alignment/CocoaDDLObjects/src/CocoaMaterialElementary.cc
@@ -1,34 +1,27 @@
// COCOA class implementation file
//Id: CocoaMaterialElementary.cc
//CAT: Model
// Id: CocoaMaterialElementary.cc
// CAT: Model
//
// History: v1.0
// Pedro Arce
#include <map>
#include <cmath> // include floating-point std::abs functions
#include <fstream>
#include <cmath> // include floating-point std::abs functions
#include <map>

#include "Alignment/CocoaDDLObjects/interface/CocoaMaterialElementary.h"

CocoaMaterialElementary::CocoaMaterialElementary(ALIstring name, float density,
ALIstring symbol, float A,
ALIint Z)
: theName(name), theDensity(density), theSymbol(symbol), theA(A), theZ(Z) {}

CocoaMaterialElementary::CocoaMaterialElementary( ALIstring name, float density, ALIstring symbol, float A, ALIint Z ) :
theName(name),
theDensity(density),
theSymbol(symbol),
theA(A),
theZ(Z)
{
}


ALIbool CocoaMaterialElementary::operator==(const CocoaMaterialElementary& mate ) const
{
ALIbool CocoaMaterialElementary::
operator==(const CocoaMaterialElementary &mate) const {
// GM: Using numeric_limits<float>::epsilon() might be better instead of a
// magic number 'kTolerance'. Not changing this to not break code
// potentially relying on this number.
const float kTolerance = 1.E-9;
return ( std::abs(mate.getDensity() - theDensity) < kTolerance
&& mate.getSymbol() == theSymbol
&& std::abs(mate.getA() - theA) < kTolerance
&& mate.getZ() == theZ );
return (std::abs(mate.getDensity() - theDensity) < kTolerance &&
mate.getSymbol() == theSymbol &&
std::abs(mate.getA() - theA) < kTolerance && mate.getZ() == theZ);
}
15 changes: 5 additions & 10 deletions Alignment/CocoaDDLObjects/src/CocoaSolidShape.cc
@@ -1,17 +1,12 @@
// COCOA class implementation file
//Id: CocoaSolidShape.cc
//CAT: Model
// Id: CocoaSolidShape.cc
// CAT: Model
//
// History: v1.0
// History: v1.0
// Pedro Arce
#include <map>
#include <fstream>
#include <map>

#include "Alignment/CocoaDDLObjects/interface/CocoaSolidShape.h"


CocoaSolidShape::CocoaSolidShape( ALIstring type )
{

theType = type;
}
CocoaSolidShape::CocoaSolidShape(ALIstring type) { theType = type; }
15 changes: 7 additions & 8 deletions Alignment/CocoaDDLObjects/src/CocoaSolidShapeBox.cc
@@ -1,20 +1,19 @@
// COCOA class implementation file
//Id: CocoaSolidShapeBox.cc
//CAT: Model
// Id: CocoaSolidShapeBox.cc
// CAT: Model
//
// History: v1.0
// History: v1.0
// Pedro Arce
#include <map>
#include <fstream>
#include <map>

#include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h"


CocoaSolidShapeBox::CocoaSolidShapeBox( ALIstring type, ALIfloat xdim, ALIfloat ydim, ALIfloat zdim ): CocoaSolidShape( type )
{
CocoaSolidShapeBox::CocoaSolidShapeBox(ALIstring type, ALIfloat xdim,
ALIfloat ydim, ALIfloat zdim)
: CocoaSolidShape(type) {

theXHalfLength = xdim;
theYHalfLength = ydim;
theZHalfLength = zdim;
}

15 changes: 8 additions & 7 deletions Alignment/CocoaDDLObjects/src/CocoaSolidShapeTubs.cc
@@ -1,21 +1,22 @@
// COCOA class implementation file
//Id: CocoaSolidShapeTubs.cc
//CAT: Model
// Id: CocoaSolidShapeTubs.cc
// CAT: Model
//
// History: v1.0
// History: v1.0
// Pedro Arce
#include <map>
#include <fstream>
#include <map>

#include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h"

CocoaSolidShapeTubs::CocoaSolidShapeTubs( const ALIstring type, ALIfloat pRMin, ALIfloat pRMax, ALIfloat pDz, ALIfloat pSPhi, ALIfloat pDPhi ) : CocoaSolidShape( type )
{
CocoaSolidShapeTubs::CocoaSolidShapeTubs(const ALIstring type, ALIfloat pRMin,
ALIfloat pRMax, ALIfloat pDz,
ALIfloat pSPhi, ALIfloat pDPhi)
: CocoaSolidShape(type) {

theInnerRadius = pRMin;
theOuterRadius = pRMax;
theZHalfLength = pDz;
theStartPhiAngle = pSPhi;
theDeltaPhiAngle = pDPhi;
}