35 std::map<std::string,TMatrixT<double>*>::const_iterator it;
36 std::map<std::string,TMatrixT<double>*>::iterator it_here;
41 it_here->second =
new TMatrixT<double>[
fNhits];
43 (it_here->second)[
i].ResizeTo((it->second)[
i]);
44 (it_here->second)[
i] = (it->second)[
i];
53 it_here->second =
new TMatrixT<double>[
fNhits];
55 (it_here->second)[
i].ResizeTo((it->second)[
i]);
56 (it_here->second)[
i] = (it->second)[
i];
62 std::map<std::string,GFDetPlane*>::const_iterator ip;
63 std::map<std::string,GFDetPlane*>::iterator ip_here;
70 (ip_here->second)[
i] = ((ip->second)[
i]);
80 void GFBookkeeping::Streamer(TBuffer &R__b)
85 if (R__b.IsReading()) {
88 TObject::Streamer(R__b);
102 for(
unsigned int i=0;
i<nkeys;++
i){
106 for(
int j=0;j<
fNhits;++j){
114 for(
unsigned int i=0;
i<nkeys;++
i){
118 for(
int j=0;j<
fNhits;++j){
126 for(
unsigned int i=0;
i<nkeys;++
i){
130 for(
int j=0;j<
fNhits;++j){
138 unsigned int nFailedHits;
140 unsigned int aFailedHit;
141 for(
unsigned int i=0;
i<nFailedHits;++
i){
148 TObject::Streamer(R__b);
153 std::vector<std::string> keys;
156 R__b << (
unsigned int)(keys.size());
157 for(
unsigned int i=0;
i<keys.size();++
i){
160 for(
int j=0;j<
fNhits;++j){
168 R__b << (
unsigned int)(keys.size());
169 for(
unsigned int i=0;
i<keys.size();++
i){
172 for(
int j=0;j<
fNhits;++j){
173 ((
fPlanes[keys.at(
i)])[j]).Streamer(R__b);
180 R__b << (
unsigned int)(keys.size());
181 for(
unsigned int i=0;
i<keys.size();++
i){
184 for(
int j=0;j<
fNhits;++j){
185 ((
fNumbers[keys.at(
i)])[j]).Streamer(R__b);
201 GFException exc(
"fNhits not defined",__LINE__,__FILE__);
205 std::ostringstream ostr;
206 ostr <<
"The key " << key
207 <<
" is already occupied in GFBookkeeping::bookMatrices()";
216 GFException exc(
"fNhits not defined",__LINE__,__FILE__);
220 std::ostringstream ostr;
221 ostr <<
"The key " << key
222 <<
" is already occupied in GFBookkeeping::bookGFDetPlanes()";
232 GFException exc(
"fNhits not defined",__LINE__,__FILE__);
236 std::ostringstream ostr;
237 ostr <<
"The key " << key
238 <<
" is already occupied in GFBookkeeping::bookNumbers()";
251 const TMatrixT<double>& mat){
253 std::ostringstream ostr;
254 ostr <<
"The key " << key <<
" is unknown in GFBookkeeping::setMatrix()";
258 if(index>=(
unsigned int)
fNhits){
259 std::ostringstream ostr;
260 ostr <<
"The index " << index
261 <<
" is out of range in GFBookkeeping::setMatrix()";
271 std::ostringstream ostr;
272 ostr <<
"The key " << key <<
" is unknown in GFBookkeeping::setGFDetPlane()";
276 if(index>=(
unsigned int)
fNhits){
277 std::ostringstream ostr;
278 ostr <<
"The index " << index
279 <<
" is out of range in GFBookkeeping::setGFDetPlane()";
288 std::ostringstream ostr;
289 ostr <<
"The key " << key <<
" is unknown in GFBookkeeping::setNumber()";
293 if(index>=(
unsigned int)
fNhits){
294 std::ostringstream ostr;
295 ostr <<
"The index " << index
296 <<
" is out of range in GFBookkeeping::setNumber()";
305 TMatrixT<double>& mat){
307 std::ostringstream ostr;
308 ostr <<
"The key " << key <<
" is unknown in GFBookkeeping::getMatrix()";
312 if(index>=(
unsigned int)
fNhits){
313 std::ostringstream ostr;
314 ostr <<
"The index " << index
315 <<
" is out of range in GFBookkeeping::getMatrix()";
328 std::ostringstream ostr;
329 ostr <<
"The key " << key <<
" is unknown in GFBookkeeping::getGFDetPlane()";
333 if(index>=(
unsigned int)
fNhits){
334 std::ostringstream ostr;
335 ostr <<
"The index " << index
336 <<
" is out of range in GFBookkeeping::getGFDetPlane()";
347 std::ostringstream ostr;
348 ostr <<
"The key " << key <<
" is unknown in GFBookkeeping::getNumber()";
352 if(index>=(
unsigned int)
fNhits){
353 std::ostringstream ostr;
354 ostr <<
"The index " << index
355 <<
" is out of range in GFBookkeeping::getNumber()";
359 num = ((
fNumbers[key])[index])[0][0];
372 unsigned int retVal = 0;
393 for(
unsigned int i=0;
i<matKeys.size();++
i){
396 for(
unsigned int i=0;
i<planeKeys.size();++
i){
399 for(
unsigned int i=0;
i<numKeys.size();++
i){
406 std::map<std::string, TMatrixT<double>* >::iterator itMat;
408 if(itMat->second!=NULL)
delete [] itMat->second;
410 std::map<std::string, GFDetPlane* >::iterator itPl;
412 if(itPl->second!=NULL)
delete [] itPl->second;
414 std::map<std::string, TMatrixT<double>* >::iterator itNum;
416 if(itNum->second!=NULL)
delete [] itNum->second;
424 std::vector< std::string > keys;
425 std::map<std::string, TMatrixT<double>* >::iterator it;
427 if(it->second!=NULL) keys.push_back(it->first);
432 std::vector< std::string > keys;
433 std::map<std::string, GFDetPlane* >::iterator it;
435 if(it->second!=NULL) keys.push_back(it->first);
440 std::vector< std::string > keys;
441 std::map<std::string, TMatrixT<double>* >::iterator it;
443 if(it->second!=NULL) keys.push_back(it->first);
450 std::cout <<
"=============GFBookkeeping::print()==============" << std::endl;
451 std::cout <<
"-----printing all matrices:------" << std::endl;
453 for(
unsigned int i=0;
i<keys.size();++
i){
454 std::cout <<
"key " << keys.at(
i) <<
" has " << fNhits
455 <<
" entries:" << std::endl;
456 for(
int j=0;j<
fNhits;++j){
462 std::cout <<
"-----printing all GFDetPlanes:------" << std::endl;
464 for(
unsigned int i=0;
i<keys.size();++
i){
465 std::cout <<
"key " << keys.at(
i) <<
" has " << fNhits
466 <<
" entries:" << std::endl;
467 for(
int j=0;j<
fNhits;++j){
473 std::cout <<
"-----printing all numbers:------" << std::endl;
475 for(
unsigned int i=0;
i<keys.size();++
i){
476 std::cout <<
"key " << keys.at(
i) <<
" has " << fNhits
477 <<
" entries:" << std::endl;
478 for(
int j=0;j<
fNhits;++j){
481 std::cout << n << std::endl;
484 std::cout <<
"-----failed hits:------" << std::endl;
488 std::cout << std::endl;
unsigned int getNumFailed()
void setNumber(std::string key, unsigned int index, const double &num)
unsigned int hitFailed(unsigned int)
Detector plane genfit geometry class.
Double_t val[nBoxes][nFEBox]
std::vector< std::string > getGFDetPlaneKeys()
bool getDetPlane(std::string key, unsigned int index, GFDetPlane &pl)
void addFailedHit(unsigned int)
void bookGFDetPlanes(std::string key)
void setDetPlane(std::string key, unsigned int index, const GFDetPlane &pl)
std::map< std::string, TMatrixT< double > * > fNumbers
std::vector< std::string > getMatrixKeys()
void bookNumbers(std::string key, double val=0.)
std::map< std::string, TMatrixT< double > * > fMatrices
std::vector< std::string > getNumberKeys()
void setMatrix(std::string key, unsigned int index, const TMatrixT< double > &mat)
void bookMatrices(std::string key)
bool getNumber(std::string key, unsigned int index, double &num)
bool getMatrix(std::string key, unsigned int index, TMatrixT< double > &mat)
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
std::map< std::string, GFDetPlane * > fPlanes
std::vector< unsigned int > fFailedHits