--- PamCut/Collections/EffRigCollection/EffRigCollection.cpp 2009/10/27 10:18:54 1.5 +++ PamCut/Collections/EffRigCollection/EffRigCollection.cpp 2010/03/26 16:29:46 1.8 @@ -34,8 +34,10 @@ bool efficiency_(Int_t* sel, Int_t* det, Double_t* eff, Double_t* errLow, Double_t* errHigh); } -EffRigCollection::EffRigCollection(const char *collectionName, TString outFileBase, TString rigBinsFile, int errMethod, bool owns) : - EffCollection(collectionName, outFileBase, errMethod, owns), _bins(0), _selVector(0), _detVector(0), _outUp(0), _outDown(0) { +EffRigCollection::EffRigCollection(const char *collectionName, TString outFileBase, TString rigBinsFile, int errMethod, + bool owns) : + EffCollection(collectionName, outFileBase, errMethod, owns), _bins(0), _selVector(0), _detVector(0), _outUp(0), + _outDown(0) { ifstream rigBinListFile; rigBinListFile.open(rigBinsFile); @@ -61,7 +63,7 @@ // NOTE: at this point a TrkPhSinCut should be already performed, // since we are going to retrieve rigidity. - float rig = event->GetTrack(0)->GetTrkTrack()->GetRigidity(); + float rig = 1./event->GetTrack(0)->GetTrkTrack()->GetDeflection(); if (rig >= _bins[0]) { int i = 1; @@ -117,7 +119,6 @@ errGraph.SetMarkerStyle(7); errGraph.GetYaxis()->SetRangeUser(0, 1.2); - if (_errMethod == EFFERR_ROOT) { double binning[_bins.size()]; for (unsigned int i = 0; i < _bins.size(); i++) @@ -173,12 +174,12 @@ outTextFile.precision(newPrec); outTextFile.setf(ios::fixed, ios::floatfield); for (unsigned int i = 0; i < _selVector.size(); i++) { - outTextFile << setw(10) << _bins[i] << setw(10) << _bins[i + 1] << setw(10) << _detVector[i] << setw(10) - << _selVector[i]; + outTextFile << setw(10) << _bins[i] << " " << setw(10) << _bins[i + 1] << " " << setw(10) << _detVector[i] << " " + << setw(10) << _selVector[i] << " "; if (_selVector[i] != 0) - outTextFile << setw(10) << eff[i] << setw(10) << errLow[i] << setw(10) << errHigh[i] << "\n"; + outTextFile << setw(10) << eff[i] << " " << setw(10) << errLow[i] << " " << setw(10) << errHigh[i]; else - outTextFile << setw(10) << 0. << setw(10) << 0. << setw(10) << 0.; + outTextFile << setw(10) << 0. << " " << setw(10) << 0. << " " << setw(10) << 0.; if (i < _selVector.size() - 1) //Avoids to print an empty line at the end of the file outTextFile << endl;