![]() |
Mixed Data Coincidence Analysis Software 1.0
A program to analyze files produced by the EventMixer software.
|
Public Member Functions | |
GammaEnergyChart (char *gammaFile, int minA=-100000, int maxA=1000000, int minZ=-100000, int maxZ=1000000, float tol=3E-3, float bgTol=5E-2) | |
Constructor, constructs the object. | |
~GammaEnergyChart () | |
Destructor, destroys the object. | |
void | addCoincidence (pair< EventHit *, EventHit * > toAdd, float epsilon) |
Adds a gamma line. | |
map< pair< int, int >, vector < GammaLine * > > * | getGammaLines () |
Private Attributes | |
map< pair< int, int >, vector < GammaLine * > > * | myGammaLines |
Gamma data from text file. Key is <A, Z>, value is a vector with gamma lines. |
Definition at line 23 of file GammaEnergyChart.hh.
GammaEnergyChart::GammaEnergyChart | ( | char * | gammaFile, |
int | minA = -100000 , |
||
int | maxA = 1000000 , |
||
int | minZ = -100000 , |
||
int | maxZ = 1000000 , |
||
float | tol = 3E-3 , |
||
float | bgTol = 5E-2 |
||
) |
Constructor, constructs the object.
gammaFile | File containing gamma data of interesting nuclides. |
minA | Discard A below this value. |
maxA | Discard A above this value. |
minZ | Discard Z below this value. |
maxZ | Discard Z above this value. |
Definition at line 15 of file GammaEnergyChart.cc.
References myGammaLines.
{ FILE * myFileStream = fopen(gammaFile,"r"); if(myFileStream==NULL) { fprintf (stderr,"Could not open input event file %s, exiting.", gammaFile); exit(1); } myGammaLines = new map<pair<int, int>, vector<GammaLine*> >; //Read in all gamma lines while(!feof(myFileStream)) { int tempA, tempZ; float tempGamma, tempProb; fscanf(myFileStream, "%d %d %e %e", &tempA, &tempZ, &tempGamma, &tempProb); tempGamma/=1000; if(!(tempA< minA || tempA > maxA || tempZ < minZ || tempZ > maxZ)) { (*myGammaLines)[make_pair(tempA, tempZ)].push_back(new GammaLine(tol, bgTol)); (*myGammaLines)[make_pair(tempA, tempZ)].back()->gamma = tempGamma; (*myGammaLines)[make_pair(tempA, tempZ)].back()->probability = tempProb; } } }
Adds a gamma line.
toAdd | The eventhit to add. |
epsilon | Tolerance of energy. |
Definition at line 40 of file GammaEnergyChart.cc.
References myGammaLines.
Referenced by GammaIdentifier::addCoincidence().
{ for(map< pair< int , int > , vector < GammaLine * > > ::iterator it = myGammaLines->begin(); it!=myGammaLines->end(); it++) { for(vector<GammaLine*>::iterator ig = it->second.begin(); ig!=it->second.end(); ig++) { //cout << (*ig)->gamma << " " << toAdd.second->Ge << " " << abs((*ig)->gamma-toAdd.second->Ge) << " " << (*ig)->gamma-toAdd.second->Ge << " EPS: " << epsilon << endl; (*ig)->addCoincidenceIfValid(toAdd); } } }