Updating task
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Feb 2013 09:41:08 +0000 (09:41 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Feb 2013 09:41:08 +0000 (09:41 +0000)
PWGLF/FORWARD/GEO/AliAnalysisTaskZDCpAcalib.cxx
PWGLF/FORWARD/GEO/AliAnalysisTaskZDCpAcalib.h

index 7ec4e81..91ecef8 100644 (file)
@@ -77,11 +77,18 @@ AliAnalysisTaskZDCpAcalib::AliAnalysisTaskZDCpAcalib():
      fZNAtower[itow]=0.;  
      fZNCtowerLG[itow]=0.;
      fZNAtowerLG[itow]=0.;
+     fZPCtower[itow]=0.;  
+     fZPAtower[itow]=0.;  
+     fZPCtowerLG[itow]=0.;
+     fZPAtowerLG[itow]=0.;
 
   }
   
-  for(Int_t itdc=0; itdc<32; itdc++){
-    for(Int_t ihit=0; ihit<4; ihit++) fTDCvalues[itdc][ihit]=9999;
+  for(Int_t ihit=0; ihit<4; ihit++){
+    fZNCtdc[ihit]=9999;
+    fZNAtdc[ihit]=9999;
+    fZPCtdc[ihit]=9999;
+    fZPAtdc[ihit]=9999;
   }
 }   
 
@@ -105,11 +112,18 @@ AliAnalysisTaskZDCpAcalib::AliAnalysisTaskZDCpAcalib(const char *name):
      fZNAtower[itow]=0.;  
      fZNCtowerLG[itow]=0.;
      fZNAtowerLG[itow]=0.;
+     fZPCtower[itow]=0.;  
+     fZPAtower[itow]=0.;  
+     fZPCtowerLG[itow]=0.;
+     fZPAtowerLG[itow]=0.;
 
   }
   
-  for(Int_t itdc=0; itdc<32; itdc++){
-    for(Int_t ihit=0; ihit<4; ihit++) fTDCvalues[itdc][ihit]=9999;
+  for(Int_t ihit=0; ihit<4; ihit++){
+     fZNCtdc[ihit]=9999;
+     fZNAtdc[ihit]=9999;
+     fZPCtdc[ihit]=9999;
+     fZPAtdc[ihit]=9999;
   }
   
   // Output slot #1 writes into a TList container
@@ -153,7 +167,14 @@ void AliAnalysisTaskZDCpAcalib::UserCreateOutputObjects()
     fCentralityTree->Branch("znatower", fZNAtower, "znatower[5]/F");
     fCentralityTree->Branch("znctowerLG", fZNCtowerLG, "znctowerLG[5]/F");
     fCentralityTree->Branch("znatowerLG", fZNAtowerLG, "znatowerLG[5]/F");
-    fCentralityTree->Branch("tdc", fTDCvalues, "tdc[32][4]/I");
+    fCentralityTree->Branch("zpctower", fZNCtower, "znctower[5]/F");
+    fCentralityTree->Branch("zpatower", fZNAtower, "znatower[5]/F");
+    fCentralityTree->Branch("zpctowerLG", fZNCtowerLG, "znctowerLG[5]/F");
+    fCentralityTree->Branch("zpatowerLG", fZNAtowerLG, "znatowerLG[5]/F");
+    fCentralityTree->Branch("tdcZNC", fZNCtdc, "tdcZNC[4]/I");
+    fCentralityTree->Branch("tdcZNA", fZNAtdc, "tdcZNA[4]/I");
+    fCentralityTree->Branch("tdcZPC", fZPCtdc, "tdcZPC[4]/I");
+    fCentralityTree->Branch("tdcZPA", fZPAtdc, "tdcZPA[4]/I");
       
     fOutput->Add(fCentralityTree);      
     PostData(1, fOutput);
@@ -197,21 +218,30 @@ void AliAnalysisTaskZDCpAcalib::UserExec(Option_t */*option*/)
        
       const Double_t * towZNC = esdZDC->GetZN1TowerEnergy();
       const Double_t * towZNA = esdZDC->GetZN2TowerEnergy();
+      const Double_t * towZPC = esdZDC->GetZP1TowerEnergy();
+      const Double_t * towZPA = esdZDC->GetZP2TowerEnergy();
       //
       const Double_t * towZNCLG = esdZDC->GetZN1TowerEnergyLR();
       const Double_t * towZNALG = esdZDC->GetZN2TowerEnergyLR();
+      const Double_t * towZPCLG = esdZDC->GetZP1TowerEnergyLR();
+      const Double_t * towZPALG = esdZDC->GetZP2TowerEnergyLR();
       //
       for(Int_t it=0; it<5; it++){
          fZNCtower[it] = (Float_t) (towZNC[it]);
          fZNAtower[it] = (Float_t) (towZNA[it]); 
          fZNCtowerLG[it] = (Float_t) (towZNCLG[it]);
          fZNAtowerLG[it] = (Float_t) (towZNALG[it]); 
+         fZPCtower[it] = (Float_t) (towZPC[it]);
+         fZPAtower[it] = (Float_t) (towZPA[it]); 
+         fZPCtowerLG[it] = (Float_t) (towZPCLG[it]);
+         fZPAtowerLG[it] = (Float_t) (towZPALG[it]); 
       }
 
-      for(Int_t itdc=0; itdc<32; itdc++){
-        for(Int_t i=0; i<4; i++){
-          fTDCvalues[itdc][i] = esdZDC->GetZDCTDCData(itdc, i);
-        }
+      for(Int_t i=0; i<4; i++){
+          fZNCtdc[i] = esdZDC->GetZDCTDCData(10, i);
+          fZPCtdc[i] = esdZDC->GetZDCTDCData(11, i);
+          fZNAtdc[i] = esdZDC->GetZDCTDCData(12, i);
+          fZPAtdc[i] = esdZDC->GetZDCTDCData(13, i);
       }      
   }   
   
index 8cdfead..5765734 100644 (file)
@@ -37,33 +37,40 @@ class AliAnalysisTaskZDCpAcalib : public AliAnalysisTaskSE {
 
  private:
 
-  Int_t    fDebug;             //  Debug flag
-  TString  fAnalysisInput;     // "ESD", "AOD"
-  Bool_t   fIsMCInput;          // true when input is MC
-  Bool_t   fUseSpecialOutput;   // do we use special output instead of merging?
+  Int_t    fDebug;            //  Debug flag
+  TString  fAnalysisInput;     // "ESD", "AOD"
+  Bool_t   fIsMCInput;         // true when input is MC
+  Bool_t   fUseSpecialOutput;  // do we use special output instead of merging?
   //
-  TList   *fOutput;            //! list send on output slot 0
+  TList   *fOutput;           //! list send on output slot 0
   //
-  TTree   *fCentralityTree;     //! output tree
+  TTree   *fCentralityTree;    //! output tree
   //
-  char     fTrigClass[100];    //  fired trigger classes
+  char     fTrigClass[100];    //  fired trigger classes
   //
-  Bool_t   fIsEventSelected;    //  is physics selection on
+  Bool_t   fIsEventSelected;   //  is physics selection on
   //
-  Int_t    fIsV0ATriggered;    //  VOA decision
-  Int_t    fIsV0CTriggered;    //  V0C decision
+  Int_t    fIsV0ATriggered;    //  VOA decision
+  Int_t    fIsV0CTriggered;    //  V0C decision
   //
-  Float_t  fZNCtower[5];       //  ZNC 5 tower signals
-  Float_t  fZNAtower[5];       //  ZNA 5 tower signals
-  Float_t  fZNCtowerLG[5];     //  ZNC 5 tower signals
-  Float_t  fZNAtowerLG[5];     //  ZPC 5 tower signals
+  Float_t  fZNCtower[5];       //  ZNC 5 tower signals
+  Float_t  fZNAtower[5];       //  ZNA 5 tower signals
+  Float_t  fZNCtowerLG[5];     //  ZNC 5 tower signals
+  Float_t  fZNAtowerLG[5];     //  ZPC 5 tower signals
+  Float_t  fZPCtower[5];       //  ZNC 5 tower signals
+  Float_t  fZPAtower[5];       //  ZNA 5 tower signals
+  Float_t  fZPCtowerLG[5];     //  ZNC 5 tower signals
+  Float_t  fZPAtowerLG[5];     //  ZPC 5 tower signals
   //
-  Int_t    fTDCvalues[32][4];   // TDC raw values !ONLY FOR ESDs ANALYSIS!
+  Int_t    fZNCtdc[4];         // TDC raw values !ONLY FOR ESDs ANALYSIS!
+  Int_t    fZNAtdc[4];         // TDC raw values !ONLY FOR ESDs ANALYSIS!
+  Int_t    fZPCtdc[4];         // TDC raw values !ONLY FOR ESDs ANALYSIS!
+  Int_t    fZPAtdc[4];         // TDC raw values !ONLY FOR ESDs ANALYSIS!
   
   AliAnalysisTaskZDCpAcalib& operator= (const AliAnalysisTaskZDCpAcalib& ana);
   AliAnalysisTaskZDCpAcalib(const AliAnalysisTaskZDCpAcalib& c);
   //
-  ClassDef(AliAnalysisTaskZDCpAcalib,1); 
+  ClassDef(AliAnalysisTaskZDCpAcalib,2); 
 
 };