CMCDigiHit.h
//-----------------------------------------------------------------------------
// $Header: /tmp_mnt/asis/offline/ceres/cool/project/RCS/CMCDigiHit.h,v 2.1 1996/10/04 08:42:51 voigt Exp $
//
// COOL Program Library
// Copyright (C) CERES collaboration, 1996
//
// Declaration of class CMCDigiHit.
//
// this class needs operator == () well defined for use in RWTPtrOrderedVector<T>
//
// structure of this class:
// int type of hit: 0=radiatorCher, 1=windowCher, 2=dEdx
// int pointer to geant track
// CHit original GEANT hit
// float theta/phi of particle direction at detector (only for SiDCs/PadC)
//
// CHit digitized hit (added 'detector effects' like chromatics, diffusion...)
// filled by <detector>.digitize()
//
//-----------------------------------------------------------------------------
#ifndef CMCDIGIHIT_H
#define CMCDIGIHIT_H
#include <iostream.h>
#include "cool.h"
#include "CMCHit.h"
class CMCGeantTrack;
class CMCDigiHit {
public:
CMCDigiHit();
~CMCDigiHit();
// use default copy/assignment constructors
public:
inline int getIndex () { return index ; }
inline int getType () { return type ; }
inline float getTheta () { return theta ; }
inline float getPhi () { return phi ; }
inline CMCHit& getGeantHit () { return geantHit; }
inline CMCHit& getDigiHit () { return digiHit; }
inline CMCGeantTrack* getGeantTrack () { return track; }
inline void setIndex (int val ) { index = val; }
inline void setType (int val ) { type = val; }
inline void setTheta (float val ) { theta = val; }
inline void setPhi (float val ) { phi = val; }
inline void setGeantHit (CMCHit &aHit) { geantHit = aHit; }
inline void setDigiHit (CMCHit &aHit) { digiHit = aHit; }
inline void setGeantTrack (CMCGeantTrack *val ) { track = val; }
public:
void print(ostream& = cout) const;
inline CBoolean operator== (const CMCDigiHit&) const;
protected:
int index; // index of hit in list for operator ==
int type; // type of hit (radCher, winCher, dEdx ... ) (RICHes only)
CMCGeantTrack *track; // index of track in track list
// coordinates from GEANT (RICHes: pads)
// ... (i.e. without detector effects) (others: cm)
// z is always zero, since the info is not stored in the GEANT labels
// amp is energy loss (for Si-detectors and PadChamber only) from GEANT
CMCHit geantHit;
float theta; // theta at detector (for Si-detectors and PadChamber only)
float phi; // phi at detector (for Si-detectors and PadChamber only)
// coordinates after folding with detector response (same units
// as from GEANT) ... (e.g diffusion, chromatic aberrations...)
CMCHit digiHit;
};
CBoolean CMCDigiHit::operator== (const CMCDigiHit& hit) const
{
return (index == hit.index);
}
#endif /* CMCDIGIHIT_H */