Commit d4663ba5 authored by flavigny's avatar flavigny
Browse files

* Included possible cut on TSumXY in BigRIPS PPAC

parent dcbf1466
......@@ -167,13 +167,20 @@ void TBigRIPSPPACPhysics::PreTreat(){
multiHit.push_back(Nmulti);
//Calculate TSum, TDiff and X/Y
double TSumX_tmp, TSumY_tmp;
double TDiffX_tmp, TDiffY_tmp;
double X_tmp, Y_tmp;
if(tmp.HasTXs() && tmp.HasTA()){TSumX.push_back(TX1[0]+TX2[0]-2*TA[0]);}
else {TSumX.push_back(-99999);}
if(tmp.HasTXs() && tmp.HasTA()){
TSumX_tmp = TX1[0]+TX2[0]-2*TA[0];
TSumX.push_back(TSumX_tmp);
}else {
TSumX_tmp = -99999;
TSumX.push_back(TSumX_tmp);
}
if(tmp.HasTXs()){
if(tmp.HasTXs() && ( ignore_txsum_cut[id] ||
(TSumX_tmp >= txsum_min[id] && TSumX_tmp <= txsum_max[id]) ) ){
TDiffX_tmp = (TX1[0] - TX2[0] - xns_off[id]);
TDiffX.push_back(TDiffX_tmp);
X_tmp = -1*((TDiffX_tmp * x_ns2mm[id])/2. - x_offset[id] - xpos_offset[id]);
......@@ -183,10 +190,16 @@ void TBigRIPSPPACPhysics::PreTreat(){
X.push_back(-99999);
}
if(tmp.HasTYs() && tmp.HasTA()) {TSumY.push_back(TY1[0]+TY2[0]-2*TA[0]);}
else {TSumY.push_back(-99999);}
if(tmp.HasTYs() && tmp.HasTA()) {
TSumY_tmp = TY1[0]+TY2[0]-2*TA[0];
TSumY.push_back(TSumY_tmp);
} else {
TSumY_tmp = -99999;
TSumY.push_back(TSumY_tmp);
}
if(tmp.HasTYs()) {
if(tmp.HasTYs() && (ignore_tysum_cut[id] ||
(TSumY_tmp >= tysum_min[id] && TSumY_tmp <= tysum_max[id])) ){
TDiffY_tmp = (TY1[0] - TY2[0] - yns_off[id]);
TDiffY.push_back(TDiffY_tmp);
Y_tmp = ((TDiffY_tmp * y_ns2mm[id])/2. - y_offset[id] - ypos_offset[id]);
......@@ -302,6 +315,14 @@ void TBigRIPSPPACPhysics::AddPPACs(string name, NPL::XmlParser& xml){
y_offset[ID] = b[i]->AsDouble("yoffset");
xpos_offset[ID] = b[i]->AsDouble("xpos_off");
ypos_offset[ID] = b[i]->AsDouble("ypos_off");
txsum_min[ID] = b[i]->AsDouble("txsum_min");
txsum_max[ID] = b[i]->AsDouble("txsum_max");
tysum_min[ID] = b[i]->AsDouble("tysum_min");
tysum_max[ID] = b[i]->AsDouble("tysum_max");
ignore_txsum_cut[ID] = false;
if(txsum_min[ID] >= txsum_max[ID]) ignore_txsum_cut[ID] = true;
ignore_tysum_cut[ID] = false;
if(tysum_min[ID] >= tysum_max[ID]) ignore_tysum_cut[ID] = true;
}
}
}
......
......@@ -81,19 +81,25 @@ class TBigRIPSPPACPhysics : public TObject, public NPL::VDetector{
map<int,double> RawUpperLimit;//! Upper Value of TDC range considered for a PPAC
map<int,double> RawLowerLimit;//! Lower Value of TDC range considered for a PPAC
map<int,int> IDtoFP;//! Focal plane where the PPAC is located
map<int,double> ch2ns_TX1;
map<int,double> ch2ns_TX2;
map<int,double> ch2ns_TY1;
map<int,double> ch2ns_TY2;
map<int,double> ch2ns_TA;
map<int,double> xns_off;
map<int,double> yns_off;
map<int,double> x_offset;
map<int,double> xpos_offset;
map<int,double> x_ns2mm;
map<int,double> y_offset;
map<int,double> ypos_offset;
map<int,double> y_ns2mm;
map<int,double> ch2ns_TX1;//!
map<int,double> ch2ns_TX2;//!
map<int,double> ch2ns_TY1;//!
map<int,double> ch2ns_TY2;//!
map<int,double> ch2ns_TA;//!
map<int,double> xns_off;//!
map<int,double> yns_off;//!
map<int,double> x_offset;//!
map<int,double> xpos_offset;//!
map<int,double> x_ns2mm;//!
map<int,bool> ignore_txsum_cut;//!
map<int,double> txsum_min;//!
map<int,double> txsum_max;//!
map<int,double> y_offset;//!
map<int,double> ypos_offset;//!
map<int,double> y_ns2mm;//!
map<int,bool> ignore_tysum_cut;//!
map<int,double> tysum_min;//!
map<int,double> tysum_max;//!
public: // Innherited from VDetector Class
......@@ -141,7 +147,7 @@ class TBigRIPSPPACPhysics : public TObject, public NPL::VDetector{
// Write Spectra to file
void WriteSpectra();
public: // Specific to SamuraiFDC2 Array
public: // Specific
// Clear The PreTeated object
void ClearPreTreatedData() {m_PreTreatedData->Clear();}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment