//*--- Author: Erik Krebs #include "hkalmdcmeaslayer.h" // from ROOT #include "TVector3.h" // from kalman #include "hkaldef.h" using namespace Kalman; #include #include using namespace std; ClassImp(HKalMdcMeasLayer) //_HADES_CLASS_DESCRIPTION /////////////////////////////////////////////////////////////////////////////// // // Class: HKalMdcMeasLayer // Inherits from: HKalPlane // // This models a measurement layer within a mini drift chamber. The geometry // of the layer is defined in class HKalPlane. // //----------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////// // ----------------------------------- // Ctors and Dtor // ----------------------------------- HKalMdcMeasLayer::HKalMdcMeasLayer(const TVector3 ¢er, const TVector3 &normal, const HKalMixture *matIn, const HKalMixture *matOut, Int_t mod, Int_t sec, Int_t lay, Double_t catDist) : HKalPlane(center, normal) { // Creates a new Mdc measurement layer. // center: a point on the layer // normal: normal vector of the layer // matIn: material inside the layer // matOut: material outside the layer // mod: module where the layer is located // sec: sector // lay: layer number in Mdc // catDist: the thickness of the mdc layer, i.e. the distance between the two cathodes, in mm materialInside = (HKalMixture*) matIn; materialOutside = (HKalMixture*) matOut; module = mod; sector = sec; layer = lay; thickness = catDist; } HKalMdcMeasLayer::~HKalMdcMeasLayer() { } // ----------------------------------- // Implementation of public methods // ----------------------------------- Bool_t HKalMdcMeasLayer::isInside(const TVector3 &point) const { // Checks if point is located inside the drift chamber or outside. Double_t dist = distanceToPlane(point); if(dist < getThickness()/2) { return kTRUE; } return kFALSE; } void HKalMdcMeasLayer::print(Option_t* opt) const { // Prints information about the measurement layer. // opt: Determines what information about the object will be printed. // If opt contains: // "Lay": print information about the geometry and location in Hades detector (module, sector, ..) // "Mat": print materials of the layer. // If opt is empty all of the above will be printed. TString stropt(opt); cout<<"**** Measurement layer of module "<print(); cout<print(); } cout<GetA() : materialOutside->GetA()); } Float_t HKalMdcMeasLayer::getZ(Bool_t inside) const { return (inside ? materialInside->GetZ() : materialOutside->GetZ()); } Float_t HKalMdcMeasLayer::getDensity(Bool_t inside) const { return (inside ? materialInside->GetDensity() : materialOutside->GetDensity()); } Float_t HKalMdcMeasLayer::getRadLength(Bool_t inside) const { return (inside ? materialInside->GetRadLength() : materialOutside->GetRadLength()); } Float_t HKalMdcMeasLayer::getExcitationEnergy(Bool_t inside) const { return (inside ? materialInside->GetExciteEner() : materialOutside->GetExciteEner()); }