fixed bug in laser spectra
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Jan 2011 07:17:55 +0000 (07:17 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Jan 2011 07:17:55 +0000 (07:17 +0000)
T0/AliT0QADataMakerRec.cxx

index 4c8a0fd..09f91f3 100644 (file)
@@ -272,37 +272,37 @@ void AliT0QADataMakerRec::InitRaws()
 
 
   TH1F* fhRawTriggerCal = new TH1F("hRawTriggerCal"," laser triggers",6,0,6);
-  Add2RawsList(fhRawTriggerCal ,169+251 , !expert, image, !saveCorr);
+  Add2RawsList(fhRawTriggerCal ,169+250 , !expert, image, !saveCorr);
   
-  TH1F* fhRawMeanCal = new TH1F("hRawMeanCal","online mean signal, calibration event",Int_t((high[170+251]-low[170+251])/4),low[170+251],high[170+251]);
-  Add2RawsList( fhRawMeanCal,170+251, expert, !image, !saveCorr);
+  TH1F* fhRawMeanCal = new TH1F("hRawMeanCal","online mean signal, calibration event",Int_t((high[170+250]-low[170+250])/4),low[170+250],high[170+250]);
+  Add2RawsList( fhRawMeanCal,170+250, expert, !image, !saveCorr);
   
-  TH1F* fhRawVertexCal = new TH1F("hRawVertexCal","online vertex signal, calibration event ",Int_t((high[171+251]-low[171+251])/4),low[171+251],high[171+251] );
-  Add2RawsList( fhRawVertexCal,171+251, expert, !image, !saveCorr);
+  TH1F* fhRawVertexCal = new TH1F("hRawVertexCal","online vertex signal, calibration event ",Int_t((high[171+250]-low[171+250])/4),low[171+250],high[171+250] );
+  Add2RawsList( fhRawVertexCal,171+250, expert, !image, !saveCorr);
   
   
-  TH1F* fhRawORAcal = new TH1F("hRawORAcal","laser OR A; counts",Int_t((high[172+251]-low[172+251])/4),low[172+251],high[172+251]);
-  Add2RawsList( fhRawORAcal,172+251, expert, !image, !saveCorr );
+  TH1F* fhRawORAcal = new TH1F("hRawORAcal","laser OR A; counts",Int_t((high[172+250]-low[172+250])/4),low[172+250],high[172+250]);
+  Add2RawsList( fhRawORAcal,172+250, expert, !image, !saveCorr );
   
   
   TH1F* fhRawORCcal = new TH1F("hRawORCcal","laserOR C;counts ",Int_t(( high[173]-low[173])/4),low[173],high[173]);
-  Add2RawsList( fhRawORCcal,173+251, expert, !image, !saveCorr);
+  Add2RawsList( fhRawORCcal,173+250, expert, !image, !saveCorr);
   
   TH1F* fhMultCentrcal = new TH1F("hMultCentrcal","laser trigger Central;counts ",Int_t(( high[174]-low[174])/4),low[174],high[174]);
-  Add2RawsList( fhMultCentrcal,174+251, expert, !image, !saveCorr);
+  Add2RawsList( fhMultCentrcal,174+250, expert, !image, !saveCorr);
   TH1F* fhMultSeCentrcal = new TH1F("hMultSemiCentrcal","laser trigger SemiCentral;counts ",Int_t(( high[175]-low[175])/4),low[175],high[175]);
-  Add2RawsList( fhMultSeCentrcal,175+251, expert, !image, !saveCorr);
+  Add2RawsList( fhMultSeCentrcal,175+250, expert, !image, !saveCorr);
   
   //multiplicity trigger
   //side A
   TH1F* fhMultAcal = new TH1F("hMultAcal","laser: full mulltiplicity;Multiplicity A side;Entries",Int_t((high[201]-low[201])/4),low[201],high[201]);
-  Add2RawsList( fhMultAcal,201+251, expert, !image, !saveCorr );
+  Add2RawsList( fhMultAcal,201+250, expert, !image, !saveCorr );
   TH1F* fhMultAScal = new TH1F("hMultASemical","laser:full multiplicity with semi-central trigger A side;Multiplicity;Entries",
                               Int_t((high[202]-low[202])/4),low[202],high[202] );
-  Add2RawsList( fhMultAScal,202+251, expert, !image, !saveCorr);
+  Add2RawsList( fhMultAScal,202+250, expert, !image, !saveCorr);
   TH1F* fhMultACcal = new TH1F("hMultACentrcal","laser:full multiplicity with central trigger A side;Multiplicity;Entries", 
                               Int_t((high[203]-low[203])/4),low[203],high[203]);
-  Add2RawsList( fhMultACcal,203+251, expert, !image, !saveCorr);
+  Add2RawsList( fhMultACcal,203+250, expert, !image, !saveCorr);
   
   TH1F* fhMultA = new TH1F("hMultA","full mulltiplicity A side;Multiplicity;Entries", Int_t((high[201]-low[201])/4) ,low[201],high[201]);
   Add2RawsList( fhMultA,201, expert, image, !saveCorr );
@@ -317,13 +317,13 @@ void AliT0QADataMakerRec::InitRaws()
   
   //side C
   TH1F* fhMultCcal = new TH1F("hMultCcal","laser:full mulltiplicity C side;Multiplicity;Entries",Int_t((high[204]-low[204])/4),low[204],high[204]);
-  Add2RawsList( fhMultCcal,204+251, expert, !image, !saveCorr );
+  Add2RawsList( fhMultCcal,204+250, expert, !image, !saveCorr );
   TH1F* fhMultCScal = new TH1F("hMultCSemical","laser:full multiplicity with semi-central trigger C side;Multiplicity;Entries",
                               Int_t((high[205]-low[205])/4),low[205],high[205] );
-  Add2RawsList( fhMultCScal,205+251, expert, !image, !saveCorr);
+  Add2RawsList( fhMultCScal,205+250, expert, !image, !saveCorr);
   TH1F* fhMultCCcal = new TH1F("hMultCCentrcal","laser:full multiplicity with central trigger C side;Multiplicity;Entries", 
                               Int_t((high[206]-low[206])/4),low[206],high[206]);
-  Add2RawsList( fhMultCCcal,206+251, expert, !image, !saveCorr);
+  Add2RawsList( fhMultCCcal,206+250, expert, !image, !saveCorr);
   
   TH1F* fhMultC = new TH1F("hMultC","full mulltiplicity C side;Multiplicity;Entries", Int_t(high[204]-low[204]/4) ,low[204],high[204]);
   Add2RawsList( fhMultC,204, expert, image, !saveCorr );
@@ -337,17 +337,17 @@ void AliT0QADataMakerRec::InitRaws()
   
   //efficiency
   TH1F* fhEffCFD = new TH1F("hEffCFDcal","CFD efficiecy laser ;#PMT; #CFD counts/nEvents",24, 0 ,24); 
-  Add2RawsList( fhEffCFD,207+251, !expert, image, !saveCorr);
+  Add2RawsList( fhEffCFD,207+250, !expert, image, !saveCorr);
   
   TH1F* fhCFDeffpsys= new TH1F("fhCFDeffpsys"," CFD efficiency; #PMT; #CFD counts/nEvents",24, 0 ,24);  
   // fhCFDeffpsys->SetMaximum(2);
   Add2RawsList( fhCFDeffpsys, 207, expert, image, !saveCorr);
   
   TH1F* fhEffLED = new TH1F("hEffLEDcal","LEDefficiecy; #PMT; #LED counts/nEvent",24, 0 ,24);
-  Add2RawsList( fhEffLED,208+251, !expert, image, !saveCorr);
+  Add2RawsList( fhEffLED,208+250, !expert, image, !saveCorr);
   
   TH1F* fhEffQTC = new TH1F("hEffQTCcal","QTC efficiecy; #PMT; QTC efficiency%s;",24, 0 ,24);
-  Add2RawsList( fhEffQTC,209+251, !expert, image, !saveCorr);
+  Add2RawsList( fhEffQTC,209+250, !expert, image, !saveCorr);
   
   
  TH2F* fhCFD = new TH2F("hCFD","CFD phys; #PMT; CFD {#channnels}",25, 0 ,25,Int_t((high[210]-low[210])/4),low[210],high[210]);
@@ -364,16 +364,16 @@ void AliT0QADataMakerRec::InitRaws()
 
    TH2F* fhCFDcal = new TH2F("hCFDcal","CFD laser; #PMT; CFD {#channnels}",25, 0 ,25,Int_t((high[210]-low[210])/4),low[210],high[210]);
   fhCFDcal->SetOption("COLZ");
-  Add2RawsList( fhCFDcal,210+251, expert, image, !saveCorr);
+  Add2RawsList( fhCFDcal,210+250, expert, image, !saveCorr);
   
   
   TH2F* fhLEDcal = new TH2F("hLEDcal","LED laser; #PMT; LED [#channnels]",25, 0 ,25,Int_t((high[211]-low[211])/4),low[211],high[211]);
   fhLEDcal->SetOption("COLZ");
-  Add2RawsList( fhLEDcal,211+251, expert, image, !saveCorr);
+  Add2RawsList( fhLEDcal,211+250, expert, image, !saveCorr);
   
   TH2F* fhQTCcal = new TH2F("hQTCcal","QTC laser; #PMT; QTC [#channnels]",25, 0 ,25,Int_t( high[212]-low[212]),low[212],high[212]);
   fhQTCcal->SetOption("COLZ");
-  Add2RawsList( fhQTCcal,212+251, expert, image, !saveCorr);
+  Add2RawsList( fhQTCcal,212+250, expert, image, !saveCorr);
   
   
   TH1F* fhNumPMTA= new TH1F("hNumPMTA","number of PMT hitted per event",13, 0 ,13);
@@ -393,28 +393,28 @@ void AliT0QADataMakerRec::InitRaws()
   Add2RawsList( fhOrCminOrA,219, expert, !image, !saveCorr);
   
   TH1F* fhOrCminOrAcal= new TH1F("fhOrCminOrAcal","T0_OR C - T0_OR A",10000,-5000,5000);
-  Add2RawsList( fhOrCminOrAcal,219+251, expert, !image, !saveCorr);
+  Add2RawsList( fhOrCminOrAcal,219+250, expert, !image, !saveCorr);
 
   TH1F* fhOrCminOrATvdcOn= new TH1F("fhOrCminOrATvdcOn","T0_OR C - T0_OR A TVDC on",10000,-5000,5000);
   Add2RawsList( fhOrCminOrATvdcOn,217, expert, !image, !saveCorr);
   
   TH1F* fhOrCminOrATvdcOncal= new TH1F("fhOrCminOrATvdcOncal","T0_OR C - T0_OR A TVDC on laser",10000,-5000,5000);
-  Add2RawsList( fhOrCminOrATvdcOncal,217+251, expert, !image, !saveCorr);
+  Add2RawsList( fhOrCminOrATvdcOncal,217+250, expert, !image, !saveCorr);
 
   TH1F* fhOrCminOrATvdcOff= new TH1F("fhOrCminOrATvdcOff","T0_OR C - T0_OR A TVDC off",10000,-5000,5000);
   Add2RawsList( fhOrCminOrATvdcOff,218, expert, !image, !saveCorr);
 
 
    TH1F* fhOrCminOrATvdcOffcal= new TH1F("fhOrCminOrATvdcOffcal","T0_OR C - T0_OR ATVDC off laser",10000,-5000,5000);
-   Add2RawsList( fhOrCminOrATvdcOffcal,218+251, expert, !image, !saveCorr);
+   Add2RawsList( fhOrCminOrATvdcOffcal,218+250, expert, !image, !saveCorr);
 
    
    const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
    for (Int_t itr=0; itr<6; itr++) {
      GetRawsData(169)->Fill(triggers[itr], fNumTriggersCal[itr]);
      GetRawsData(169)->SetBinContent(itr+1, fNumTriggersCal[itr]);
-     GetRawsData(169+251)->Fill(triggers[itr], fNumTriggers[itr]);
-     GetRawsData(169+251)->SetBinContent(itr+1, fNumTriggers[itr]);
+     GetRawsData(169+250)->Fill(triggers[itr], fNumTriggers[itr]);
+     GetRawsData(169+250)->SetBinContent(itr+1, fNumTriggers[itr]);
    }
    
 }
@@ -501,7 +501,7 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
     {  
       
       UInt_t type =rawReader->GetType();
-      if (type == 8){ shift=251; fnEventCal++;} 
+      if (type == 8){ shift=250; fnEventCal++;} 
       if (type == 7){ shift=0;   fnEventPhys++;}
       //    if (type == 7){ shift=1;   fnEventPhys++;}
       Int_t allData[110][5];
@@ -546,7 +546,7 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
              GetRawsData(shift+ik+1) -> Fill(allData[ik+sideshift][iHt]);
              GetRawsData(210+shift)->Fill(ik+1, allData[ik+sideshift][iHt]);
              if(type == 8 ) feffC[ik]++;
-             
+             AliDebug(10,Form("%i CFD %i  data %s",ik, ik+sideshift,  GetRawsData(shift+ik+1)->GetName()));
              if(type == 7  ) {
                nhitsPMT++;
                feffPhysC[ik]++;
@@ -557,6 +557,7 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
            if(allData[ik+12+sideshift][iHt] > 0) { 
              GetRawsData(shift+ik+24+1)->  Fill(allData[ik+12+sideshift][iHt]);
              GetRawsData(211+shift)->Fill(ik+1, allData[ik+12+sideshift][iHt]);
+             AliDebug(10,Form("%i LED %i  data %s",ik, ik+12+sideshift,  GetRawsData(shift+ik+1+24)->GetName()));
              if(type == 8  ) {
                feffA[ik]++;
              }
@@ -574,10 +575,17 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
                Fill(allData[2*ik+sideshiftqtc+24][iHt]-allData[2*ik+sideshiftqtc+25][iHt]);
              GetRawsData(212+shift)->Fill(ik+1, allData[2*ik+sideshiftqtc+24][iHt]-allData[2*ik+sideshiftqtc+25][iHt]);
              if(type == 8) feffqtc[ik]++;
-             
+             AliDebug(10,Form("%i QTC %i  data %s",ik, 2*ik+sideshiftqtc+24,  GetRawsData(shift+ik+1+72)->GetName()));
+
+           }
+               if(allData[2*ik+sideshiftqtc+24][iHt] > 0) {
+                 AliDebug(10,Form("%i QT0 %i  data %s",ik, 2*ik+sideshiftqtc+24,  GetRawsData(shift+ik+1+96)->GetName()));
+             GetRawsData(shift+ik+96+1)->Fill(allData[2*ik+sideshiftqtc+24][iHt]);
+           }
+           if(allData[2*ik+sideshiftqtc+25][iHt] > 0) {
+             AliDebug(10,Form("%i QT0 %i  data %s",ik, 2*ik+sideshiftqtc+25,  GetRawsData(shift+ik+1+120)->GetName()));
+             GetRawsData(shift+ik+120+1)->Fill(allData[2*ik+sideshiftqtc+25][iHt]);
            }
-           if(allData[2*ik+sideshiftqtc+24][iHt] > 0) GetRawsData(shift+ik+96+1)->Fill(allData[2*ik+sideshiftqtc+24][iHt]);
-             if(allData[2*ik+sideshiftqtc+25][iHt] > 0)  GetRawsData(shift+ik+120+1)->Fill(allData[2*ik+sideshiftqtc+25][iHt]);
          }
        
          if(type == 7  ) {
@@ -596,18 +604,28 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
        //orA-orC phys tvdc 1 
        if((allData[51][iHt]>0 && allData[52][iHt]>0) && allData[50][iHt]>0)
          {
+           AliDebug(10,Form("orA-orC phys tvdc 1  %i  data %s", 217+shift,  GetRawsData(shift+217)->GetName()));
+
            GetRawsData(217+shift)->Fill((allData[52][iHt]-allData[51][iHt])*ch2cm);
            //        GetRawsData(345) ->Fill((allData[51][iHt]+allData[52][iHt])/2.);
          }
        //orA-orC phys tvdc 0 
        if((allData[51][iHt]>0 && allData[52][iHt]>0) && allData[50][iHt]<=0)
-         GetRawsData(218+shift)->Fill((allData[52][iHt]-allData[51][iHt])*ch2cm);
-       if(allData[51][iHt]>0 && allData[52][iHt]>0)
-         GetRawsData(219+shift)->Fill((allData[52][iHt]-allData[51][iHt])*ch2cm);
+         {
+           AliDebug(10,Form("orA-orC phys tvdc 0  %i  data %s", 218+shift,  GetRawsData(shift+218)->GetName()));
+
+           GetRawsData(218+shift)->Fill((allData[52][iHt]-allData[51][iHt])*ch2cm);
+         }
+       if(allData[51][iHt]>0 && allData[52][iHt]>0) {
+         AliDebug(10,Form("orA-orC phys tvdc all  %i  data %s", 219+shift,  GetRawsData(shift+219)->GetName()));
+           GetRawsData(219+shift)->Fill((allData[52][iHt]-allData[51][iHt])*ch2cm);
+       }
        for (Int_t itr=0; itr<6; itr++) {
          if (allData[trChannel[itr]][iHt] >0) {
             if(type == 7  )fNumTriggers[itr]++;
             if(type == 8  )fNumTriggersCal[itr]++;
+            AliDebug(10,Form(" triggers %i  data %s", 170+itr+shift,  GetRawsData(170+itr+shift)->GetName()));
+
            GetRawsData(170+itr+shift)->Fill(allData[trChannel[itr]][iHt]);
          }
        }
@@ -618,6 +636,8 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
        //mult trigger signals phys
        //C side
        if(allData[53][iHt]>0 && allData[54][iHt]>0) {
+         AliDebug(10,Form(" mpdA %i  data %s", 201+shift,  GetRawsData(201+shift)->GetName()));
+
          GetRawsData(201+shift)->Fill(allData[53][iHt]-allData[54][iHt]);
          if(allData[56][iHt]>0) GetRawsData(202+shift)->Fill(allData[53][iHt]-allData[54][iHt]);
          if(allData[55][iHt]>0) GetRawsData(203+shift)->Fill(allData[53][iHt]-allData[54][iHt]);
@@ -625,12 +645,14 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
        
        //A side 
        if(allData[105][iHt]>0 && allData[106][iHt]>0) {
-         GetRawsData(204+shift)->Fill(allData[105][iHt]-allData[106][iHt]);
-         if(allData[56][iHt]>0) GetRawsData(205+shift)->Fill(allData[105][iHt]-allData[106][iHt]);
-         if(allData[55][iHt]>0) GetRawsData(206+shift)->Fill(allData[105][iHt]-allData[106][iHt]);
+         AliDebug(10,Form(" mpdC %i  data %s", 204+shift,  GetRawsData(204+shift)->GetName()));
+
+            GetRawsData(204+shift)->Fill(allData[105][iHt]-allData[106][iHt]);
+            if(allData[56][iHt]>0) GetRawsData(205+shift)->Fill(allData[105][iHt]-allData[106][iHt]);
+            if(allData[55][iHt]>0) GetRawsData(206+shift)->Fill(allData[105][iHt]-allData[106][iHt]);
        }
       }
-
+      
       GetRawsData(215)->Fill(nhitsOrA);
       GetRawsData(216)->Fill(nhitsOrC);