Adding ZN/ZP centralities
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Apr 2013 12:31:07 +0000 (12:31 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Apr 2013 12:31:07 +0000 (12:31 +0000)
PWGLF/FORWARD/GEO/AliAnalysisTaskZDCTreeMaker.cxx
PWGLF/FORWARD/GEO/AliAnalysisTaskZDCTreeMaker.h

index ab80ddb..d682fd9 100644 (file)
@@ -84,12 +84,14 @@ AliAnalysisTaskZDCTreeMaker::AliAnalysisTaskZDCTreeMaker():
     fZPAEnergy(0),
     fZEM1Energy(0), 
     fZEM2Energy(0),
-//    fTDCZEM1(0),
-//    fTDCZEM2(0),
     fCentralityV0M(0),
     fCentralityV0A(0),
     fCentralityV0C(0),
-    fCentralityCL1(0)
+    fCentralityCL1(0),
+    fCentralityZNA(0),
+    fCentralityZPA(0),    
+    fCentralityZNC(0),
+    fCentralityZPC(0)    
 {   
    // Default constructor
 
@@ -112,10 +114,6 @@ AliAnalysisTaskZDCTreeMaker::AliAnalysisTaskZDCTreeMaker():
      fTDCZPA[ihit] = 9999;
   }
   
-  /*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++) fTDCcorr[itdc][ihit]=-9999.;
-  }*/
 }   
 
 //________________________________________________________________________
@@ -129,10 +127,10 @@ AliAnalysisTaskZDCTreeMaker::AliAnalysisTaskZDCTreeMaker(const char *name):
     fCentralityTree(0x0),
     fIsEventSelected(kFALSE),
     fIsPileupFromSPD(kFALSE),
-    fxVertex(0),       
-    fyVertex(0),       
-    fzVertex(0),       
-    fVertexer3d(kFALSE), 
+    fxVertex(0),        
+    fyVertex(0),        
+    fzVertex(0),        
+    fVertexer3d(kFALSE),
     fNTracklets(0),
     fIsV0ATriggered(0),
     fIsV0CTriggered(0),
@@ -145,12 +143,15 @@ AliAnalysisTaskZDCTreeMaker::AliAnalysisTaskZDCTreeMaker(const char *name):
     fZPAEnergy(0),
     fZEM1Energy(0), 
     fZEM2Energy(0),
-//    fTDCZEM1(0),
-//    fTDCZEM2(0),
     fCentralityV0M(0),
     fCentralityV0A(0),
     fCentralityV0C(0),
-    fCentralityCL1(0)
+    fCentralityCL1(0),
+    fCentralityZNA(0),
+    fCentralityZPA(0),    
+    fCentralityZNC(0),
+    fCentralityZPC(0)    
+    
 {
   // Default constructor
   fNClusters[0]=fNClusters[1]=0;
@@ -173,11 +174,6 @@ AliAnalysisTaskZDCTreeMaker::AliAnalysisTaskZDCTreeMaker(const char *name):
      fTDCZPA[ihit] = 9999;
   }
   
-  /*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++) fTDCcorr[itdc][ihit]=-9999.;
-  }*/
-  
   // Output slot #1 writes into a TList container
   DefineOutput(1, TList::Class()); 
   //DefineOutput(1, TTree::Class()); 
@@ -212,7 +208,7 @@ void AliAnalysisTaskZDCTreeMaker::UserCreateOutputObjects()
 
     fCentralityTree = new TTree("fCentralityTree", "Centrality vs. multiplicity tree");
     //
-//    fCentralityTree->Branch("trigClass",&fTrigClass,"trigClass/C");
+    fCentralityTree->Branch("trigClass",&fTrigClass,"trigClass/C");
     fCentralityTree->Branch("eventSelected",&fIsEventSelected,"eventSelected/O");
     fCentralityTree->Branch("xVertex", &fxVertex,"xVertex/D");
     fCentralityTree->Branch("yVertex", &fyVertex,"yVertex/D");
@@ -254,6 +250,10 @@ void AliAnalysisTaskZDCTreeMaker::UserCreateOutputObjects()
     fCentralityTree->Branch("centrV0Amult", &fCentralityV0A, "centrV0Amult/F");
     fCentralityTree->Branch("centrV0Cmult", &fCentralityV0C, "centrV0Cmult/F");
     fCentralityTree->Branch("centrSPDclu1", &fCentralityCL1, "centrSPDclu1/F");
+    fCentralityTree->Branch("centrZNA", &fCentralityZNA, "centrZNA/F");
+    fCentralityTree->Branch("centrZPA", &fCentralityZPA, "centrZPA/F");
+    fCentralityTree->Branch("centrZNC", &fCentralityZNA, "centrZNC/F");
+    fCentralityTree->Branch("centrZPC", &fCentralityZPA, "centrZPC/F");
   
     fOutput->Add(fCentralityTree);      
     PostData(1, fOutput);
@@ -283,11 +283,8 @@ void AliAnalysisTaskZDCTreeMaker::UserExec(Option_t */*option*/)
       if(!fIsMCInput && esd->GetEventType()!=7) return; 
       
       // ***** Trigger selection
-      //TString triggerClass = esd->GetFiredTriggerClasses();
-      //sprintf(fTrigClass,"%s",triggerClass.Data());
-      
-      // Taking only C1ZED triggers
-      //if(triggerClass.Contains("C1ZED")==0) return;
+      TString triggerClass = esd->GetFiredTriggerClasses();
+      sprintf(fTrigClass,"%s",triggerClass.Data());
       
       // use response of AliPhysicsSelection
       fIsEventSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kAnyINT);       
@@ -298,7 +295,10 @@ void AliAnalysisTaskZDCTreeMaker::UserExec(Option_t */*option*/)
       fCentralityV0A = centrality->GetCentralityPercentile("V0A");
       fCentralityV0C = centrality->GetCentralityPercentile("V0C");
       fCentralityCL1 = centrality->GetCentralityPercentile("CL1");
-      //fCentralityZDC = centrality->GetCentralityPercentile("ZEMvsZDC");
+      fCentralityZNA = centrality->GetCentralityPercentile("ZNA");
+      fCentralityZPA = centrality->GetCentralityPercentile("ZPA");
+      fCentralityZNC = centrality->GetCentralityPercentile("ZNC");
+      fCentralityZPC = centrality->GetCentralityPercentile("ZPC");
                 
       const AliESDVertex *vertex = esd->GetPrimaryVertexSPD();
       fxVertex = vertex->GetX();
@@ -360,11 +360,6 @@ void AliAnalysisTaskZDCTreeMaker::UserExec(Option_t */*option*/)
         fTDCZPA[itdc] = esdZDC->GetZDCTDCData(13, itdc);
       }
 
-      /*for(Int_t itdc=0; itdc<32; itdc++){
-        for(Int_t i=0; i<4; i++){
-          fTDCvalues[itdc][i] = esdZDC->GetZDCTDCData(itdc, i);
-        }
-      }*/      
   }   
   else if(fAnalysisInput.CompareTo("AOD")==0){
 
@@ -385,11 +380,14 @@ void AliAnalysisTaskZDCTreeMaker::UserExec(Option_t */*option*/)
       fCentralityV0A = centrality->GetCentralityPercentile("V0A");
       fCentralityV0C = centrality->GetCentralityPercentile("V0C");
       fCentralityCL1 = centrality->GetCentralityPercentile("CL1");
-      //fCentralityZDC = centrality->GetCentralityPercentile("ZEMvsZDC");
-     
+      fCentralityZNA = centrality->GetCentralityPercentile("ZNA");
+      fCentralityZPA = centrality->GetCentralityPercentile("ZPA");
+      fCentralityZNC = centrality->GetCentralityPercentile("ZNC");
+      fCentralityZPC = centrality->GetCentralityPercentile("ZPC");
+      
       // ***** Trigger selection
-      //TString triggerClass = aod->GetFiredTriggerClasses();
-      //sprintf(fTrigClass,"%s",triggerClass.Data());
+      TString triggerClass = aod->GetFiredTriggerClasses();
+      sprintf(fTrigClass,"%s",triggerClass.Data());
       
       const AliAODVertex *vertex = aod->GetPrimaryVertexSPD();
       fxVertex = vertex->GetX();
index 85bd141..54305bb 100644 (file)
@@ -81,9 +81,6 @@ class AliAnalysisTaskZDCTreeMaker : public AliAnalysisTaskSE {
   Float_t  fZNAtowerLG[5];     //  ZNA 5 tower signals
   Float_t  fZPAtowerLG[5];     //  ZPA 5 tower signals
   //
-//  Int_t    fTDCvalues[32][4];   // TDC raw values !ONLY FOR ESDs ANALYSIS!
-//  Float_t  fTDCcorr[32][4];     // TDC corrected values  !ONLY FOR ESDs ANALYSIS!
-  //
   Int_t    fTDCZNC[4];      // TDC raw values !ONLY FOR ESDs ANALYSIS!
   Int_t    fTDCZPC[4];      // TDC raw values !ONLY FOR ESDs ANALYSIS!
   Int_t    fTDCZNA[4];      // TDC raw values !ONLY FOR ESDs ANALYSIS!
@@ -91,15 +88,19 @@ class AliAnalysisTaskZDCTreeMaker : public AliAnalysisTaskSE {
 //  Int_t    fTDCZEM1;      // TDC raw values !ONLY FOR ESDs ANALYSIS!
 //  Int_t    fTDCZEM2;      // TDC raw values !ONLY FOR ESDs ANALYSIS!
   
-  Float_t fCentralityV0M;        // Centrality from V0A+V0C
-  Float_t fCentralityV0A;        // Centrality from V0A
-  Float_t fCentralityV0C;        // Centrality from V0C
-  Float_t fCentralityCL1;        // Centrality from Clusters in layer 1
+  Float_t fCentralityV0M;       // Centrality from V0A+V0C
+  Float_t fCentralityV0A;       // Centrality from V0A
+  Float_t fCentralityV0C;       // Centrality from V0C
+  Float_t fCentralityCL1;       // Centrality from Clusters in layer 1
+  Float_t fCentralityZNA;       // Centrality from ZNA
+  Float_t fCentralityZPA;       // Centrality from ZPA
+  Float_t fCentralityZNC;       // Centrality from ZNC
+  Float_t fCentralityZPC;       // Centrality from ZPC
   //
   AliAnalysisTaskZDCTreeMaker& operator= (const AliAnalysisTaskZDCTreeMaker& ana);
   AliAnalysisTaskZDCTreeMaker(const AliAnalysisTaskZDCTreeMaker& c);
   //
-  ClassDef(AliAnalysisTaskZDCTreeMaker,2); 
+  ClassDef(AliAnalysisTaskZDCTreeMaker,3); 
 
 };