129 Camera(
const int aNbits=14,
const int aNy=256,
const int aNz=256);
147 void WriteMap(
const string aOutFileName=
"./mymaps.root");
156 inline void SetSize(
const double aXsize=1.0,
const double aYsize=1.0,
const double aZsize=1.0){
202 inline void SetPixelValue(
const CAMERA_MAPTYPE aMapType,
const int aPixIndexY,
const int aPixIndexZ,
const int aValue,
const double aValueErr=0.0){
203 cam_map[aMapType]->SetBinError(aPixIndexY+1,aPixIndexZ+1,aValueErr);
204 cam_map[aMapType]->SetBinContent(aPixIndexY+1,aPixIndexZ+1,aValue);
217 return cam_map[aMapType]->GetBinContent(aPixIndexY+1,aPixIndexZ+1);
230 return cam_map[aMapType]->GetBinError(aPixIndexY+1,aPixIndexZ+1);
305 void SetName(
const string aName);
391 void AddPhoton(
const double aEnergy,
const double aY,
const double aZ,
392 const int aSourceIndex=0,
const int aParticleIndex=0);
413 void AddCosmicRay(
const double aEnergy,
const double aY,
const double aZ,
414 const double aCosTheta,
const double aSinTheta,
415 const double aCosPhi,
const double aSinPhi,
416 const int aSourceIndex=0,
const int aParticleIndex=0);
449 double aPar1=-1.0,
double aPar2=-1.0,
450 double aPar3=-1.0,
double aPar4=-1.0);
This module is used to configure a CCD camera.
CAMERA_MAPTYPE
Enumerator to describe the different types of maps.
Definition: CameraConfig.h:25
@ pixntype
number of map types.
Definition: CameraConfig.h:29
@ pixamplitude
raw amplitude map.
Definition: CameraConfig.h:26
const int CAMERA_NHITMAX
Maximum number of hits per picture.
Definition: CameraConfig.h:19
This module is used to perform three-dimensional rotations.
CCD camera.
Definition: Camera.h:97
void SetTime(const ULong64_t aTime=0)
Sets the camera time [ms].
Definition: Camera.h:333
virtual ~Camera(void)
Camera class destructor.
Definition: Camera.cc:83
void ResetMap(const CAMERA_MAPTYPE aMapType)
Resets a given map.
Definition: Camera.h:255
TH2S * GetMap(const CAMERA_MAPTYPE aMapType)
Returns a camera map.
Definition: Camera.h:536
TH2F * cam_gain
gain map.
Definition: Camera.h:559
UInt_t cam_dt
electronic integration time [ms].
Definition: Camera.h:551
double cam_photon_resy
Gaussian width for photons (Y): only used for the TTree!!! See TreeFill().
Definition: Camera.h:562
int TreeFill(void)
Fills all the TTree branches with current parameters.
Definition: Camera.cc:155
void TreeInit(void)
Initializes a camera TTree.
Definition: Camera.cc:125
double GetYsize(void)
Returns the camera physical size in the Y direction [mm].
Definition: Camera.h:172
double GetXsize(void)
Returns the camera physical size in the X direction [mm].
Definition: Camera.h:166
void SetMap(const CAMERA_MAPTYPE aMapType, TH2S *aMap)
Sets an external camera map.
Definition: Camera.cc:398
int cam_nbits
number of bits to encode the raw amplitude.
Definition: Camera.h:545
double cam_hitz[CAMERA_NHITMAX]
hit position in the Z direction.
Definition: Camera.h:556
double GetZsize(void)
Returns the camera physical size in the Z direction [mm].
Definition: Camera.h:178
void SetGainUniform(const double aGain)
Sets a uniform gain map.
Definition: Camera.cc:449
void SetSize(const double aXsize=1.0, const double aYsize=1.0, const double aZsize=1.0)
Sets the physical size of the camera CCD.
Definition: Camera.h:156
int GetMapNz(void)
Returns the number of pixels in the Z direction.
Definition: Camera.h:245
void GenAmplitudeNoiseMap(void)
Fills the raw amplitude map with intrinsic pixel noise.
Definition: Camera.cc:324
void SetName(const string aName)
Sets the camera name.
Definition: Camera.cc:108
void SetPixelValue(const CAMERA_MAPTYPE aMapType, const int aPixIndexY, const int aPixIndexZ, const int aValue, const double aValueErr=0.0)
Assigns a value to a given pixel of a given map.
Definition: Camera.h:202
double cam_zsize
physical size in the Z direction [mm].
Definition: Camera.h:549
void SetFrozenBrightY(const int aPixIndexY)
Sets an entire line of pixels (Y) at amplitude saturation.
Definition: Camera.cc:352
void SetFrozenBrightZ(const int aPixIndexZ)
Sets an entire line of pixels (Z) at amplitude saturation.
Definition: Camera.cc:362
void SetRandomPixelBright(const int aN)
Sets a given number of pixels, randomly chosen, at amplitude saturation (dark and read noise maps).
Definition: Camera.cc:372
string cam_name
camera name.
Definition: Camera.h:544
double cam_ysize
physical size in the Y direction [mm].
Definition: Camera.h:548
TRandom3 * randgen
random generator.
Definition: Camera.h:540
double GetPixelError(const CAMERA_MAPTYPE aMapType, const int aPixIndexY, const int aPixIndexZ)
Returns the error value of a given pixel.
Definition: Camera.h:229
double cam_photon_resz
Gaussian width for photons (Z): only used for the TTree!!! See TreeFill().
Definition: Camera.h:563
UInt_t GetTimeResolution(void)
Returns the camera electronic integration time [ms].
Definition: Camera.h:326
int TreeWrite(void)
Writes the TTree to the current directory.
Definition: Camera.h:515
double cam_xsize
physical size in the X direction [mm].
Definition: Camera.h:547
void SetPhotonResolution(const double aPixelResY=1.0, const double aPixelResZ=1.0)
Sets the spatial resolution to inject photons in the camera frame.
Definition: Camera.h:350
int cam_ampmax
maximum raw amplitude.
Definition: Camera.h:546
void SetPixelDistributions(const CAMERA_MAPTYPE aMapType, double aPar1=-1.0, double aPar2=-1.0, double aPar3=-1.0, double aPar4=-1.0)
Sets a Gaussian distribution for a given pixel map.
Definition: Camera.cc:427
void SetRandomPixelDead(const int aN)
Sets a given number of pixels, randomly chosen, at 0 amplitude (dark and read noise maps).
Definition: Camera.cc:385
Camera(const int aNbits=14, const int aNy=256, const int aNz=256)
Camera class constuctor.
TF1 * cam_photon_gaus[2]
Gaussian energy distribution for photons.
Definition: Camera.h:561
int cam_hitn
number of hits.
Definition: Camera.h:552
void AddPhoton(const double aEnergy, const double aY, const double aZ, const int aSourceIndex=0, const int aParticleIndex=0)
Adds one photon to the current amplitude map.
Definition: Camera.cc:172
ULong64_t cam_time
camera time [ms]
Definition: Camera.h:550
double cam_cosmic_pixenergy
Energy loss per pixel (comic ray).
Definition: Camera.h:564
void WriteMap(const string aOutFileName="./mymaps.root")
Write the current camera maps in a ROOT file.
Definition: Camera.cc:94
TH2S * cam_map[pixntype]
pixel amplitude map, pixel intrinsic noise maps.
Definition: Camera.h:558
void TreeReset(void)
Resets baskets, buffers and entries count in all branches and leaves.
Definition: Camera.h:504
void AddCosmicRay(const double aEnergy, const double aY, const double aZ, const double aCosTheta, const double aSinTheta, const double aCosPhi, const double aSinPhi, const int aSourceIndex=0, const int aParticleIndex=0)
Adds one cosmic ray to the current amplitude map.
Definition: Camera.cc:230
void SetTimeResolution(const UInt_t aTimeResolution=100)
Sets the camera electronic integration time [ms].
Definition: Camera.h:318
int cam_hitastro[CAMERA_NHITMAX]
hit astro-particle index.
Definition: Camera.h:554
int GetMapNy(void)
Returns the number of pixels in the Y direction.
Definition: Camera.h:237
void TreeDelete(void)
Deletes the TTree.
Definition: Camera.h:524
void SetCosmicRayEnergyLoss(const double aEnergyLoss=1.0)
Sets the energy loss per pixel for cosmic rays.
Definition: Camera.h:365
int GetPixelValue(const CAMERA_MAPTYPE aMapType, const int aPixIndexY, const int aPixIndexZ)
Returns the value of a given pixel and a given map.
Definition: Camera.h:216
string GetName(void)
Returns the camera name.
Definition: Camera.h:311
ULong64_t GetTime(void)
Returns the camera time [ms].
Definition: Camera.h:341
void SetGain(TH2F *aGainMap)
Sets a gain map.
Definition: Camera.cc:461
int cam_hitsrc[CAMERA_NHITMAX]
hit source index.
Definition: Camera.h:553
TTree * cam_tree
camera tree.
Definition: Camera.h:536
void AddPixelAmplitudeValue(const int aPixIndexY, const int aPixIndexZ, const int aValue)
Increments the amplitude value of a given pixel.
Definition: Camera.h:188
double cam_hity[CAMERA_NHITMAX]
hit position in the Y direction.
Definition: Camera.h:555
Three-dimensional rotations.
Definition: Rotation.h:138