//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class TpcAvalanche // see TpcAvalanche.hh for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // Cristoforo Simonetto TUM // // //----------------------------------------------------------- // This Class' Header ------------------ #include "TpcAvalanche.h" // C/C++ Headers ---------------------- #include // Collaborating Class Headers -------- //#include "CLHEP/GenericFunctions/Gaussian.hh" #include "TpcDriftedElectron.h" ClassImp(TpcAvalanche) // Class Member definitions ----------- TpcAvalanche::TpcAvalanche() : _x(0),_y(0),_t(0),_amp(0), _mother(0) {;} TpcAvalanche::TpcAvalanche(const double x, const double y, const double t, const double Amp, TpcDriftedElectron* tpcDElectronp) : _x(x),_y(y),_t(t),_amp(Amp), _mother(tpcDElectronp) {;} unsigned int TpcAvalanche::mcTrackId() const { if (_mother==0) return 0; return _mother->mcTrackId(); } unsigned int TpcAvalanche::mcHitId() const { if (_mother==0) return 0; return _mother->mcHitId(); } bool operator== (const TpcAvalanche& lhs,const TpcAvalanche& rhs) { double dx=lhs._x - rhs._x; double dy=lhs._y - rhs._y; double dt=lhs._t - rhs._t; double d2=dx*dx+dy*dy; return (d2<1E-10) && (fabs(dt)<1E-4); } std::ostream& operator<< (std::ostream& s, const TpcAvalanche& me){ s << "TpcAvalanche:\n" << " t ="<