Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #30 from alicerobson/newheaders
Browse files Browse the repository at this point in the history
Newheaders
  • Loading branch information
cbernet authored Apr 7, 2017
2 parents fcb2018 + 7e17749 commit 586c877
Show file tree
Hide file tree
Showing 93 changed files with 224 additions and 465 deletions.
2 changes: 2 additions & 0 deletions examples/example_dag_pair.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "papas/graphtools/DirectedAcyclicGraph.h"

#include <iostream>

class idpair {
public:
int itype;
Expand Down
7 changes: 5 additions & 2 deletions papas/datatypes/Cluster.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#ifndef Cluster_h
#define Cluster_h

#include "TVector3.h"
#include "papas/datatypes/Definitions.h"
#include "papas/datatypes/IdCoder.h"

#include <list>
#include <stdio.h>

#include "TVector3.h"

#include "papas/datatypes/IdCoder.h"

namespace papas {

/** @brief The Cluster class can be used with raw, smeared and merged clusters.
Expand Down
8 changes: 0 additions & 8 deletions papas/datatypes/Definitions.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// Definitions.h
// papas
//
// Created by Alice Robson on 12/05/16.
//
//

#ifndef Definitions_h
#define Definitions_h

Expand Down
16 changes: 3 additions & 13 deletions papas/datatypes/DefinitionsCollections.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
//
// DefinitionsCollections.h
//
// Created by Alice Robson on 26/05/16.
//
//

#ifndef DefinitionsCollections_h
#define DefinitionsCollections_h

#include "papas/datatypes/Cluster.h"
#include "papas/datatypes/IdCoder.h"
#include "papas/datatypes/Particle.h"
#include "papas/datatypes/Track.h"
#include "papas/graphtools/Edge.h"

#include <list>
#include <unordered_map>
#if WITHSORT
Expand All @@ -31,9 +21,9 @@ class Particle;
typedef std::list<Particle> ListParticles; ///< list of Particles
typedef std::unordered_map<unsigned long long, Edge> Edges; ///< collection of Edge objects
#if WITHSORT
typedef std::set<Identifier, std::greater<Identifier>> Ids; ///< collection containing Id objects
typedef std::set<Identifier, std::greater<Identifier>> Ids; ///< set containing Identifiers
#else
typedef std::unordered_set<Identifier> Ids; ///< collection containing Id objects
typedef std::unordered_set<Identifier> Ids; ///< set containing Identifiers
#endif
typedef std::unordered_map<Identifier, Track> Tracks; ///< collection containing Track objects
typedef std::unordered_map<Identifier, PFBlock> Blocks; ///< collection containing Block objects
Expand Down
10 changes: 10 additions & 0 deletions papas/datatypes/Event.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
#ifndef Event_h
#define Event_h

#include "papas/datatypes/Cluster.h"
#include "papas/datatypes/DefinitionsCollections.h"
#include "papas/datatypes/IdCoder.h"
#include "papas/datatypes/Particle.h"
#include "papas/datatypes/Track.h"
#include "papas/graphtools/DefinitionsNodes.h"
#include "papas/reconstruction/PFBlock.h"

#include <memory>
#include <string>
#include <unordered_map>

namespace papas {

class Cluster;

/**
* @brief The Event stores pointers to collections of Clusters, Tracks, Blocks, Particles in its
* internal ClusterCollections, Track Collections etc. It also contains a shared pointer to a history object
Expand Down
7 changes: 0 additions & 7 deletions papas/datatypes/Helix.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// Helix.hpp
//
// Created by Alice Robson on 11/05/16.
//
//

#ifndef Helix_h
#define Helix_h

Expand Down
4 changes: 3 additions & 1 deletion papas/datatypes/HistoryHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
#define HistoryHelper_h

#include "papas/datatypes/DefinitionsCollections.h"
#include "papas/datatypes/Event.h"
#include "papas/datatypes/IdCoder.h"
#include "papas/graphtools/DirectedAcyclicGraph.h"

namespace papas {

// forward declarations
class Event;
/**
* @brief The HistoryHelper is used to access history information stored in a Event.
* The Event contains history information eg which clusters and tracks were used
Expand Down
1 change: 1 addition & 0 deletions papas/datatypes/IdCoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define IdCoder_h

#include "papas/datatypes/Definitions.h"

#include <inttypes.h>
#include <iostream>

Expand Down
15 changes: 7 additions & 8 deletions papas/datatypes/Particle.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
//
// Created by Alice Robson on 29/11/15.
//
//
#ifndef PARTICLE_H
#define PARTICLE_H

#include "papas/datatypes/Definitions.h"

#include <memory>

#include "TLorentzVector.h"
#include "TVector3.h"
#include "papas/datatypes/Definitions.h"
#include "papas/datatypes/Path.h"
#include "papas/utility/PDebug.h"
class Track;

namespace papas {

// Forward declarations
class Path;
/// Main Particle class
///
/// Contains 4-momentum vector, particle id and accessor functions
Expand Down
8 changes: 0 additions & 8 deletions papas/datatypes/ParticlePData.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// particledata.h
// fastsim
//
// Created by Alice Robson on 13/01/16.
//
//

#ifndef particledata_h
#define particledata_h

Expand Down
10 changes: 3 additions & 7 deletions papas/datatypes/Path.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
//
// Created by Alice Robson on 02/12/15.
//
//
#ifndef path_h
#define path_h

#include <map>

#include "TLorentzVector.h"
#include "TVector3.h"

#include "papas/datatypes/Definitions.h"
#include <map>
#include <memory>
#include <vector>

namespace papas {

Expand Down
8 changes: 6 additions & 2 deletions papas/datatypes/Track.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#ifndef PAPAS_TRACK_H
#define PAPAS_TRACK_H

#include "TLorentzVector.h"
#include "papas/datatypes/Definitions.h"

#include "TVector3.h"
#include "papas/datatypes/Path.h"

#include <memory>

namespace papas {

class Path;
/** @brief Determines the trajectory in space and time of a particle (charged or neutral).
attributes:
Expand Down
13 changes: 3 additions & 10 deletions papas/datatypes/src/Cluster.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
//
// Cluster.cpp
// papas
//
// Created by Alice Robson on 28/04/16.
//
//

#include "papas/datatypes/Cluster.h"
#include "papas/datatypes/IdCoder.h"
#include "papas/utility/StringFormatter.h"

#include <iomanip>

#include "papas/utility/StringFormatter.h"

namespace papas {

double Cluster::s_maxEnergy = 0;
Expand Down
4 changes: 0 additions & 4 deletions papas/datatypes/src/Event.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include "papas/datatypes/Event.h"
#include "papas/datatypes/Cluster.h"
#include "papas/datatypes/Particle.h"
#include "papas/datatypes/Track.h"
#include "papas/reconstruction/PFBlock.h"
#include <stdio.h>

namespace papas {
/// Event holds pointers to collections of particles, clusters etc and the address of the history associated with
Expand Down
13 changes: 3 additions & 10 deletions papas/datatypes/src/Helix.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
//
// Helix.cpp
// papas
//
// Created by Alice Robson on 11/05/16.
//
//

#include "papas/datatypes/Helix.h"
#include "papas/datatypes/Definitions.h"
#include "papas/utility/DeltaR.h"

#include <array>

#include "papas/utility/DeltaR.h"

namespace papas {
extern double gconstc;

Expand Down
3 changes: 1 addition & 2 deletions papas/datatypes/src/HistoryHelper.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

#include "papas/datatypes/HistoryHelper.h"

#include "papas/datatypes/Event.h"
#include "papas/graphtools/DirectedAcyclicGraph.h"

namespace papas {

Expand Down
4 changes: 3 additions & 1 deletion papas/datatypes/src/IdCoder.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "papas/datatypes/IdCoder.h"
#include "papas/utility/StringFormatter.h"

#include <assert.h>
#include <bitset>
#include <cmath>
#include <inttypes.h>
#include <iostream>

#include "papas/utility/StringFormatter.h"

//
// Encode information into an identifier
//
Expand Down
9 changes: 2 additions & 7 deletions papas/datatypes/src/Particle.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#include "papas/datatypes/Particle.h"

/**
* @brief Particle from which more complex particles are derived
*/
#include <iomanip> //lxplus needs this
#include <iostream>

#include "papas/datatypes/Definitions.h"
#include "papas/datatypes/Helix.h"
#include "papas/datatypes/IdCoder.h"
#include "spdlog/details/format.h"
#include <iomanip>
#include <iostream>

namespace papas {

Expand Down
9 changes: 1 addition & 8 deletions papas/datatypes/src/ParticlePData.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
//
// ParticlePData.cpp
// papas
//
// Created by Alice Robson on 11/05/16.
//
//

#include "papas/datatypes/ParticlePData.h"

namespace papas {

const double ParticlePData::m_e = 0.000511;
Expand Down
9 changes: 1 addition & 8 deletions papas/datatypes/src/Path.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
//
// path.cpp
// fastsim_cmake
//
// Created by Alice Robson on 02/12/15.
//
//

#include "papas/datatypes/Path.h"

#include <iostream>

namespace papas {
Expand Down
8 changes: 5 additions & 3 deletions papas/datatypes/src/Track.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

#include "papas/datatypes/Track.h"
#include "papas/datatypes/IdCoder.h"
#include "papas/utility/PDebug.h"

#include <iostream>
#include <iomanip>

#include "papas/datatypes/IdCoder.h"
#include "papas/utility/StringFormatter.h"

namespace papas {

Track::Track(const TVector3& p3, double charge, const std::shared_ptr<Path> path, unsigned int index, char subtype)
Expand Down
7 changes: 0 additions & 7 deletions papas/detectors/CMS.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
//
// Created by Alice Robson on 29/11/15.
//
//
#ifndef CMS_H
#define CMS_H

#include "papas/detectors/Detector.h"
#include <memory>
#include <string>
#include <vector>

namespace papas {

Expand Down
5 changes: 1 addition & 4 deletions papas/detectors/CMSEcal.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
//
// Created by Alice Robson on 29/11/15.
//
//
#ifndef CMSECAL_H
#define CMSECAL_H

#include "papas/detectors/Calorimeter.h"

#include <vector>

namespace papas {
Expand Down
5 changes: 1 addition & 4 deletions papas/detectors/CMSField.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
//
// Created by Alice Robson on 29/11/15.
//
//
#ifndef CMSFIELD_H
#define CMSFIELD_H

#include "papas/detectors/Field.h"

namespace papas {

// Forward declaration
class VolumeCylinder;
/// CMS specific implementation of Detector Field element
///
Expand Down
5 changes: 1 addition & 4 deletions papas/detectors/CMSHcal.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
//
// Created by Alice Robson on 29/11/15.
//
//
#ifndef CMSHCAL_H
#define CMSHCAL_H

#include "papas/detectors/Calorimeter.h"

#include <vector>

namespace papas {
Expand Down
Loading

0 comments on commit 586c877

Please sign in to comment.