Skip to content
Snippets Groups Projects
Commit fedb4fd7 authored by Frank Gaede's avatar Frank Gaede
Browse files

- copied reco classes from CLICSiD example

parent 23facd1b
No related branches found
No related tags found
No related merge requests found
Showing
with 490 additions and 0 deletions
/*
* BarrelDetector.h
*
* Created on: Apr 3, 2013
* Author: Christian Grefe, CERN
*/
#ifndef BARRELDETECTOR_H_
#define BARRELDETECTOR_H_
#include "DD4hep/Detector.h"
namespace DD4hep {
namespace DDRec {
class BarrelDetector: virtual public DetElement {
public:
BarrelDetector(const DetElement& e) : DetElement(e) {};
virtual ~BarrelDetector() {}
bool isBarrel() const {
return true;
}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* BARRELDETECTOR_H_ */
/*
* Calorimeter.h
*
* Created on: Mar 27, 2013
* Author: Christian Grefe, CERN
*/
#ifndef CALORIMETER_H_
#define CALORIMETER_H_
#include "DD4hep/Detector.h"
#include "LayeredSubdetector.h"
namespace DD4hep {
namespace DDRec {
class Calorimeter: public LayeredSubdetector {
public:
Calorimeter(const DetElement& e) : DetElement(e), LayeredSubdetector(e) {}
virtual ~Calorimeter() {}
virtual bool isCalorimeter() const {
return true;
}
};
}
} /* namespace DD4hep */
#endif /* CALORIMETER_H_ */
/*
* CylindricalBarrelCalorimeter.h
*
* Created on: Apr 17, 2013
* Author: Christian Grefe, CERN
*/
#ifndef CYLINDRICALBARRELCALORIMETER_H_
#define CYLINDRICALBARRELCALORIMETER_H_
#include "CylindricalCalorimeter.h"
#include "BarrelDetector.h"
namespace DD4hep {
namespace DDRec {
class CylindricalBarrelCalorimeter: public CylindricalCalorimeter, public BarrelDetector {
public:
CylindricalBarrelCalorimeter(const DetElement& e) : DetElement(e), CylindricalCalorimeter(e), BarrelDetector(e) {}
virtual ~CylindricalBarrelCalorimeter() {}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* CYLINDRICALBARRELCALORIMETER_H_ */
/*
* CylindricalCalorimeter.h
*
* Created on: Apr 17, 2013
* Author: Christian Grefe, CERN
*/
#ifndef CYLINDRICALCALORIMETER_H_
#define CYLINDRICALCALORIMETER_H_
#include "CylindricalDetector.h"
#include "Calorimeter.h"
namespace DD4hep {
namespace DDRec {
class CylindricalCalorimeter: public Calorimeter, public CylindricalDetector {
public:
CylindricalCalorimeter(const DetElement& e) : DetElement(e), Calorimeter(e), CylindricalDetector(e) {}
virtual ~CylindricalCalorimeter() {}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* CYLINDRICALCALORIMETER_H_ */
/*
* CylindricalDetector.h
*
* Created on: Apr 16, 2013
* Author: Christian Grefe, CERN
*/
#ifndef CYLINDRICALDETECTOR_H_
#define CYLINDRICALDETECTOR_H_
#include "DD4hep/Detector.h"
#include "DD4hep/Shapes.h"
namespace DD4hep {
namespace DDRec {
class CylindricalDetector: virtual public DetElement {
public:
CylindricalDetector(const DetElement& e) : DetElement(e) {}
virtual ~CylindricalDetector() {}
double getRMin() const {
return getCylinder()->GetRmin();
}
double getRMax() const {
return getCylinder()->GetRmax();
}
double getZMin() const {
return -getCylinder()->GetDZ() / 2.;
}
double getZMax() const {
return getCylinder()->GetDZ() / 2.;
}
protected:
Tube getCylinder() const {
return Tube(volume().solid());
}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* CYLINDRICALDETECTOR_H_ */
/*
* CylindricalEndcapCalorimeter.h
*
* Created on: Apr 17, 2013
* Author: Christian Grefe, CERN
*/
#ifndef CYLINDRICALENDCAPCALORIMETER_H_
#define CYLINDRICALENDCAPCALORIMETER_H_
#include "CylindricalCalorimeter.h"
#include "EndcapDetector.h"
namespace DD4hep {
namespace DDRec {
class CylindricalEndcapCalorimeter: public CylindricalCalorimeter, public EndcapDetector {
public:
CylindricalEndcapCalorimeter(const DetElement& e) : DetElement(e), CylindricalCalorimeter(e), EndcapDetector(e) {}
virtual ~CylindricalEndcapCalorimeter() {}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* CYLINDRICALENDCAPCALORIMETER_H_ */
/*
* EndcapDetector.h
*
* Created on: Apr 16, 2013
* Author: Christian Grefe, CERN
*/
#ifndef ENDCAPDETECTOR_H_
#define ENDCAPDETECTOR_H_
#include "DD4hep/Detector.h"
namespace DD4hep {
namespace DDRec {
class EndcapDetector: virtual public DetElement {
public:
EndcapDetector(const DetElement& e) : DetElement(e) {}
virtual ~EndcapDetector() {}
bool isEndcap() const {
return true;
}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* ENDCAPDETECTOR_H_ */
// $Id: Exceptions.h 513 2013-04-05 14:31:53Z gaede $
//====================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------
//
// Author : A.Muennich
//
//====================================================================
#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H
#include <exception>
namespace DD4hep {
//define some exception to throw
class OutsideGeometryException : public std::exception{
protected:
std::string message;
OutsideGeometryException() { /*no_op*/ ; }
public:
OutsideGeometryException( std::string text ){
message = "OutsideGeometryException: " + text ;
}
virtual const char* what() const throw() { return message.c_str() ; }
virtual ~OutsideGeometryException() throw() { /*no_op*/; }
};
}
#endif
/*
* LayerStack.h
*
* Created on: Apr 18, 2013
* Author: Christian Grefe, CERN
*/
#ifndef LAYERSTACK_H_
#define LAYERSTACK_H_
#include "DD4hep/Detector.h"
#include <vector>
namespace DD4hep {
namespace DDRec {
class LayerStack {
public:
LayerStack(const DetElement& det);
LayerStack(const LayerStack& layerStack, const DetElement& det);
virtual ~LayerStack();
virtual int getNumberOfLayers() const = 0;
virtual int getNumberOfModules(int layerIndex = 1) const = 0;
virtual DetElement getModule(int layerIndex = 1, int moduleIndex = 1) const = 0;
double getThickness(int layerIndex = 1, int moduleIndex = 1) const;
double getRadiationLengths(int layerIndex = 1, int moduleIndex = 1) const;
double getInteractionLengths(int layerIndex = 1, int moduleIndex = 1) const;
double getTotalThickness(int moduleIndex = 1) const;
double getTotalInteractionLengths(int moduleIndex = 1) const;
double getTotalRadiationLengths(int moduleIndex = 1) const;
virtual int getNumberOfSlices(int layerIndex = 1, int moduleIndex = 1) const = 0;
virtual DetElement getSlice(int layerIndex = 1, int moduleIndex = 1, int sliceIndex = 1) const = 0;
virtual int getNumberOfSensors(int layerIndex = 1, int moduleIndex = 1) const = 0;
virtual DetElement getSensor(int layerIndex = 1, int moduleIndex = 1, int sensorIndex = 1) const = 0;
protected:
DetElement det;
};
class PolyhedralCalorimeterLayerStack: public LayerStack {
public:
PolyhedralCalorimeterLayerStack(const DetElement& det);
PolyhedralCalorimeterLayerStack(const PolyhedralCalorimeterLayerStack& layerStack, const DetElement& det);
virtual ~PolyhedralCalorimeterLayerStack();
int getNumberOfLayers() const;
int getNumberOfModules(int layerIndex = 1) const;
DetElement getModule(int layerIndex = 1, int moduleIndex = 1) const;
int getNumberOfSlices(int layerIndex = 1, int moduleIndex = 1) const;
DetElement getSlice(int layerIndex = 1, int moduleIndex = 1, int sliceIndex = 1) const;
int getNumberOfSensors(int layerIndex = 1, int moduleIndex = 1) const;
DetElement getSensor(int layerIndex = 1, int moduleIndex = 1, int sensorIndex = 1) const;
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* LAYERSTACK_H_ */
/*
* LayeredSubdetector.h
*
* Created on: Mar 27, 2013
* Author: Christian Grefe, CERN
*/
#ifndef LAYEREDSUBDETECTOR_H_
#define LAYEREDSUBDETECTOR_H_
#include "LayerStack.h"
#include "DD4hep/Detector.h"
namespace DD4hep {
namespace DDRec {
class LayeredSubdetector: virtual public DetElement {
public:
LayeredSubdetector(const DetElement& e);
virtual ~LayeredSubdetector();
inline bool isLayered() const {
return true;
}
inline int getNumberOfLayers() const {
return layerStack->getNumberOfLayers();
}
inline int getNumberOfSensors(int layerIndex, int moduleIndex = 1) const {
return layerStack->getNumberOfSensors(layerIndex, moduleIndex);
}
inline DetElement getSensor(int layerIndex, int moduleIndex = 1, int sensorIndex = 1) const {
return layerStack->getSensor(layerIndex, moduleIndex, sensorIndex);
}
inline double getLayerThickness(int layerIndex, int moduleIndex = 1) const {
return layerStack->getThickness(layerIndex, moduleIndex);
}
inline double getInteractionLengths(int layerIndex, int moduleIndex = 1) const {
return layerStack->getInteractionLengths(layerIndex, moduleIndex);
}
inline double getRadiationLengths(int layerIndex, int moduleIndex = 1) const {
return layerStack->getRadiationLengths(layerIndex, moduleIndex);
}
inline double getMipEnergyLoss(int layerIndex, int moduleIndex = 1) const {
return 0.;
}
inline double getTotalThickness(int moduleIndex = 1) const {
return layerStack->getTotalThickness(moduleIndex);
}
inline double getTotalInteractionLengths(int moduleIndex = 1) const {
return layerStack->getTotalInteractionLengths(moduleIndex);
}
inline double getTotalRadiationLengths(int moduleIndex = 1) const {
return layerStack->getTotalRadiationLengths(moduleIndex);
}
protected:
LayerStack* layerStack;
private:
void getExtension();
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* LAYEREDSUBDETECTOR_H_ */
/*
* PolyhedralBarrelCalorimeter.h
*
* Created on: Apr 3, 2013
* Author: Christian Grefe, CERN
*/
#ifndef POLYHEDRALBARRELCALORIMETER_H_
#define POLYHEDRALBARRELCALORIMETER_H_
#include "BarrelDetector.h"
#include "PolyhedralCalorimeter.h"
namespace DD4hep {
namespace DDRec {
class PolyhedralBarrelCalorimeter: public BarrelDetector, public PolyhedralCalorimeter {
public:
PolyhedralBarrelCalorimeter(const DetElement& e) : DetElement(e), BarrelDetector(e), PolyhedralCalorimeter(e) {}
virtual ~PolyhedralBarrelCalorimeter() {}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* POLYHEDRALBARRELCALORIMETER_H_ */
/*
* PolyhedralCalorimeter.h
*
* Created on: Apr 17, 2013
* Author: Christian Grefe, CERN
*/
#ifndef POLYHEDRALCALORIMETER_H_
#define POLYHEDRALCALORIMETER_H_
#include "PolyhedralDetector.h"
#include "Calorimeter.h"
namespace DD4hep {
namespace DDRec {
class PolyhedralCalorimeter: public PolyhedralDetector, public Calorimeter {
public:
PolyhedralCalorimeter(const DetElement& e) : DetElement(e), Calorimeter(e), PolyhedralDetector(e) {}
virtual ~PolyhedralCalorimeter() {}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* POLYHEDRALCALORIMETER_H_ */
/*
* PolyhedralDetector.h
*
* Created on: Apr 3, 2013
* Author: Christian Grefe, CERN
*/
#ifndef POLYHEDRALDETECTOR_H_
#define POLYHEDRALDETECTOR_H_
#include "DD4hep/Detector.h"
namespace DD4hep {
namespace DDRec {
class PolyhedralDetector : virtual public DetElement {
public:
PolyhedralDetector(const DetElement& e) : DetElement(e) {}
virtual ~PolyhedralDetector() {}
int getNSides() const {
return getPolyhedra()->GetNedges();
}
double getRMin() const {
return getPolyhedra()->GetRmin(0);
}
double getRMax() const {
return getPolyhedra()->GetRmax(0);
}
double getZMin() const {
return getPolyhedra()->GetZ(0);
}
double getZMax() const {
return getPolyhedra()->GetZ(1);
}
protected:
PolyhedraRegular getPolyhedra() const {
return PolyhedraRegular(volume().solid());
}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* POLYHEDRALDETECTOR_H_ */
/*
* PolyhedralEndcapCalorimeter.h
*
* Created on: Apr 16, 2013
* Author: Christian Grefe, CERN
*/
#ifndef POLYHEDRALENDCAPCALORIMETER_H_
#define POLYHEDRALENDCAPCALORIMETER_H_
#include "EndcapDetector.h"
#include "PolyhedralCalorimeter.h"
namespace DD4hep {
namespace DDRec {
class PolyhedralEndcapCalorimeter: public EndcapDetector, public PolyhedralCalorimeter {
public:
PolyhedralEndcapCalorimeter(const DetElement& e) : DetElement(e), EndcapDetector(e), PolyhedralCalorimeter(e) {}
virtual ~PolyhedralEndcapCalorimeter() {}
};
} /* namespace DDRec */
} /* namespace DD4hep */
#endif /* POLYHEDRALENDCAPCALORIMETER_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment