diff --git a/macros/runCond/fluenceExtract.C b/macros/runCond/fluenceExtract.C index f2ad0a0..1cf153f 100755 --- a/macros/runCond/fluenceExtract.C +++ b/macros/runCond/fluenceExtract.C @@ -78,7 +78,9 @@ // Executable method int fluenceExtract(int argc, char* argv[]){ - double radius = 2000.0; + double radius = -10.0; + double radmin = 0.0; + double radmax = 2000.0; bool useRadius = false; TString det("TT"); @@ -91,8 +93,32 @@ } } - - + // Set the radius to an irrelevant value + if (radius<0.0) { + radius = 2000.0; + } else { + // Elena - implement circular crowns + if (radius == 45) { + radmax = 45.0; + } else if (radius == 75) { + radmin = 45.0; + radmax = 75.0; + } else if (radius == 175) { + // This setting is the only one for the IT + radmin = 0.0; + radmax = 175.0; + } else if (radius == 40) { + // Placeholder for "rest of the sector" + // r < 40 mm has too little statistics anyways! + radmin = 75.0; + if (strcmp(det.Data(),"IT")==0) { + // The only radius for the IT is 175 mm + radmin = 175.0; + } + radmax = 2000.0; + } + } + TString lay; if (strcmp(det.Data(),"TT")==0) { @@ -104,7 +130,7 @@ Info("fluenceExtract","Extract fluence for %s / %s",lay.Data(),det.Data()); if (useRadius) { - Info("fluenceExtract","Radius restriction to r<%4.2 mm",radius); + Info("fluenceExtract","Radius restriction to %4.2 mm < r < %4.2 mm", radmin, radmax); } @@ -202,7 +228,8 @@ TCut c_hit(Form("(Sec==%d)",sec)); if (useRadius) { - c_hit=c_hit&&Form("(TMath::Sqrt(x*x+y*y)<%f/10)",radius); + // Elena - implement circular crowns + c_hit=c_hit&&Form("(TMath::Sqrt(x*x+y*y)>%f/10 && (TMath::Sqrt(x*x+y*y)<%f/10)", radmin, radmax); } t_hit->Draw("y:x>>h_hit7",c_hit,"goff");