Phys DA with variable number of reference PMT
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Oct 2009 11:57:24 +0000 (11:57 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Oct 2009 11:57:24 +0000 (11:57 +0000)
T0/T0Physda.cxx
T0/inPhys.dat

index 0e7bded..1bc0749 100644 (file)
@@ -46,7 +46,7 @@ SOULD BE CHANGED BACK BEFORE BEAM
 #include "TF1.h"
 #include "TSpectrum.h"
 #include "TVirtualFitter.h"
-int cbx, ccbx;
+int cbx, ccbx, npmtA, npmtC;
 float clx,cmx,cclx,ccmx;
 
 /* Main routine
@@ -82,10 +82,9 @@ int main(int argc, char **argv) {
     switch(c) {
     case 'a': {fscanf(inp, "%d", &ccbx ); break;} //N of X bins hCFD1_CFD
     case 'b': {fscanf(inp, "%f", &cclx ); break;} //Low x hCFD1_CFD
-    case 'c': {fscanf(inp, "%f", &ccmx ); break;} //High x hCFD1_CFD
-      //      case 'd': {fscanf(inp, "%d", &cbx ); break;} //N of X bins hCFD
-      //      case 'e': {fscanf(inp, "%f", &clx ); break;} //Low x hCFD
-//      case 'f': {fscanf(inp, "%f", &cmx ); break;} //High x hCFD
+    case 'c': {fscanf(inp, "%f", &ccmx ); break;} //High x hCFD1_CF
+    case 'd': {fscanf(inp, "%d", &npmtC ); break;} //number of reference PMTC
+    case 'e': {fscanf(inp, "%d", &npmtA ); break;} //number of reference PMTA
     }
   }
   fclose(inp);
@@ -208,11 +207,11 @@ int main(int argc, char **argv) {
       for (Int_t ik = 0; ik<24; ik++)
        if(allData[ik+1][0]!=0 ){
          if(ik<12){
-            hCFD1minCFD[ik]->Fill(allData[ik+1][0]-allData[1][0]);
+            hCFD1minCFD[ik]->Fill(allData[ik+1][0]-allData[npmtC][0]);
             if(iev == 20000)   meanShift[ik] =  hCFD1minCFD[ik]->GetMean();  
          }
          if(ik>11){
-           hCFD1minCFD[ik]->Fill(allData[ik+45][0]-allData[57][0]);
+           hCFD1minCFD[ik]->Fill(allData[ik+45][0]-allData[56+npmtA][0]);
            if(iev == 20000)    
              meanShift[ik] =  hCFD1minCFD[ik]->GetMean();  
          }
index 430d5a5..c3aacc2 100644 (file)
@@ -1,3 +1,5 @@
 a 400
 b -200.0
 c 200.0
+d 1
+e 1