Trigger class updated
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 31 Mar 2006 11:00:46 +0000 (11:00 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 31 Mar 2006 11:00:46 +0000 (11:00 +0000)
ZDC/AliZDCTrigger.cxx
ZDC/AliZDCTrigger.h

index 00b96fc..48c0340 100644 (file)
@@ -33,13 +33,17 @@ AliZDCTrigger::AliZDCTrigger() : AliTriggerDetector()
    CreateInputs();
    //
    SetZNMinCut(0);
-   SetZDCMinCut(0);
+   SetZDCLeftMinCut(0);
+   SetZDCRightMinCut(0);
    SetZEMMinCut(0);
    SetZDCLeftEMDCuts(0,0);
    SetZDCRightEMDCuts(0,0);
-   SetZDCMBCut(0);
-   SetZDCCentrCut(0);
-   SetZDCSemiCentrCut(0);
+   SetZDCLeftMBCut(0);
+   SetZDCRightMBCut(0);
+   SetZDCLeftCentrCut(0);
+   SetZDCRightCentrCut(0);
+   SetZDCLeftSemiCentrCut(0);
+   SetZDCRightSemiCentrCut(0);
    SetZEMCentrCut(0);
 
 }
@@ -73,40 +77,59 @@ void AliZDCTrigger::Trigger()
    if (!TD) cerr<<"AliZDCTrigger: digits tree not found\n";
    TD->SetBranchAddress("ZDC", &pdigit);
    //
-   Float_t ZNSignal[2], ZPSignal[2], ZDCSumSignal[2], ZEMSumSignal[2];
+   Float_t ZNLeftSignal[2], ZPLeftSignal[2], ZDCLeftSumSignal[2];
+   Float_t ZNRightSignal[2], ZPRightSignal[2], ZDCRightSumSignal[2];
+   Float_t ZEMSumSignal[2];
    for(Int_t iDigit=0; iDigit<TD->GetEntries(); iDigit++){
       TD->GetEntry(iDigit);
       //
+      // *** ZDC LEFT
       if(digit.GetSector(0)==1)
-         for(Int_t i=0; i<2; i++){
-           ZNSignal[i] += digit.GetADCValue(i);
-           ZDCSumSignal[i] += digit.GetADCValue(i);
+         for(Int_t i=0; i<2; i++){ //0=high range; 1=low range
+           ZNLeftSignal[i] += digit.GetADCValue(i);
+           ZDCLeftSumSignal[i] += digit.GetADCValue(i);
          }
       else if(digit.GetSector(0)==2)
          for(Int_t i=0; i<2; i++){
-           ZPSignal[i] += digit.GetADCValue(i);
-           ZDCSumSignal[i] += digit.GetADCValue(i);
+           ZPLeftSignal[i] += digit.GetADCValue(i);
+           ZDCLeftSumSignal[i] += digit.GetADCValue(i);
          }
       else if(digit.GetSector(0)==3)
          for(Int_t i=0; i<2; i++) ZEMSumSignal[i] += digit.GetADCValue(i);
+      // *** ZDC RIGHT
+      else if(digit.GetSector(0)==4)
+         for(Int_t i=0; i<2; i++){ //0=high range; 1=low range
+           ZNRightSignal[i] += digit.GetADCValue(i);
+           ZDCRightSumSignal[i] += digit.GetADCValue(i);
+         }
+      else if(digit.GetSector(0)==5)
+         for(Int_t i=0; i<2; i++){
+           ZPRightSignal[i] += digit.GetADCValue(i);
+           ZDCRightSumSignal[i] += digit.GetADCValue(i);
+         }
    }
    // *******************************************************************
-   if(ZNSignal[1]>fZDCLeftEMDCuts[0] && ZNSignal[1]<fZDCLeftEMDCuts[1] && 
-       ZEMSumSignal[1]<fZEMMinCut){ // *** n EMD event
-       SetInput("ZDC_EMD_L1");
+   if(ZNLeftSignal[0]>fZDCLeftEMDCuts[0] && ZNLeftSignal[0]<fZDCLeftEMDCuts[1] && 
+      ZNRightSignal[0]>fZDCRightEMDCuts[0] && ZNRightSignal[0]<fZDCRightEMDCuts[1] &&
+      ZEMSumSignal[1]<fZEMMinCut){ // *** 1n EMD trigger
+        SetInput("ZDC_EMD_L1");
    }
    // *******************************************************************
-   if(ZDCSumSignal[0]>fZDCMBCut) // *** ZDC minimum bias
-     SetInput("ZDC_1_L1");
+   if(ZDCLeftSumSignal[1]>fZDCLeftMBCut && ZDCRightSumSignal[1]>fZDCRightMBCut) 
+       // *** ZDC minimum bias trigger
+       SetInput("ZDC_1_L1");
    // *******************************************************************
-   if(ZDCSumSignal[0]>fZDCMinCut && ZDCSumSignal[0]<fZDCMBCut) 
-     // *** ZDC central (0-10%)
-     SetInput("ZDC_2_L1");
+   if(ZDCLeftSumSignal[1]>fZDCLeftMinCut && ZDCLeftSumSignal[1]<fZDCLeftCentrCut &&
+      ZDCRightSumSignal[1]>fZDCRightMinCut && ZDCRightSumSignal[1]<fZDCRightCentrCut &&
+      ZEMSumSignal[1]>fZEMCentrCut) 
+       // *** ZDC central (0-10%)
+       SetInput("ZDC_2_L1");
    // *******************************************************************
-   if(ZDCSumSignal[0]>fZDCCentrCut && ZDCSumSignal[0]<fZDCSemiCentrCut
-          && ZEMSumSignal[0]>fZEMCentrCut) 
-     // *** ZDC semi-central (10-40%)
-     SetInput("ZDC_3_L1");
+   if(ZDCLeftSumSignal[1]>fZDCLeftCentrCut && ZDCLeftSumSignal[1]<fZDCLeftSemiCentrCut &&
+      ZDCRightSumSignal[1]>fZDCRightCentrCut && ZDCRightSumSignal[1]<fZDCRightSemiCentrCut
+      && ZEMSumSignal[1]>fZEMCentrCut) 
+       // *** ZDC semi-central (10-40%)
+       SetInput("ZDC_3_L1");
    
 }
 
@@ -118,10 +141,16 @@ void AliZDCTrigger::SetZNMinCut(Float_t ZNMinCut)
 }
 
 //________________________________________________________________
-void AliZDCTrigger::SetZDCMinCut(Float_t ZDCMinCut) 
+void AliZDCTrigger::SetZDCLeftMinCut(Float_t ZDCLeftMinCut) 
 {
-  if(ZDCMinCut)  fZDCMinCut = ZDCMinCut;
-  else  fZDCMinCut = 800.;
+  if(ZDCLeftMinCut)  fZDCLeftMinCut = ZDCLeftMinCut;
+  else  fZDCLeftMinCut = 800.;
+}
+//________________________________________________________________
+void AliZDCTrigger::SetZDCRightMinCut(Float_t ZDCRightMinCut) 
+{
+  if(ZDCRightMinCut)  fZDCRightMinCut = ZDCRightMinCut;
+  else  fZDCRightMinCut = 800.;
 }
 
 //________________________________________________________________
@@ -175,22 +204,40 @@ void AliZDCTrigger::SetZDCRightEMDCuts(Float_t ZDCRightEMDCutInf,
   }
 }
 //________________________________________________________________
-void AliZDCTrigger::SetZDCMBCut(Float_t ZDCMBCut) 
+void AliZDCTrigger::SetZDCLeftMBCut(Float_t ZDCLeftMBCut) 
+{
+  if(ZDCLeftMBCut) fZDCLeftMBCut = ZDCLeftMBCut;
+  else fZDCLeftMBCut = 800.;
+}
+//________________________________________________________________
+void AliZDCTrigger::SetZDCRightMBCut(Float_t ZDCRightMBCut) 
+{
+  if(ZDCRightMBCut) fZDCRightMBCut = ZDCRightMBCut;
+  else fZDCRightMBCut = 800.;
+}
+//________________________________________________________________
+void AliZDCTrigger::SetZDCLeftCentrCut(Float_t ZDCLeftCentrCut) 
+{
+  if(ZDCLeftCentrCut) fZDCLeftCentrCut = ZDCLeftCentrCut;
+  else fZDCLeftCentrCut = 10000.;
+}
+//________________________________________________________________
+void AliZDCTrigger::SetZDCRightCentrCut(Float_t ZDCRightCentrCut) 
 {
-  if(ZDCMBCut) fZDCMBCut = ZDCMBCut;
-  else fZDCMBCut = 800.;
+  if(ZDCRightCentrCut) fZDCRightCentrCut = ZDCRightCentrCut;
+  else fZDCRightCentrCut = 10000.;
 }
 //________________________________________________________________
-void AliZDCTrigger::SetZDCCentrCut(Float_t ZDCCentrCut) 
+void AliZDCTrigger::SetZDCLeftSemiCentrCut(Float_t ZDCLeftSemiCentrCut) 
 {
-  if(ZDCCentrCut) fZDCCentrCut = ZDCCentrCut;
-  else fZDCCentrCut = 10000.;
+  if(ZDCLeftSemiCentrCut) fZDCLeftSemiCentrCut = ZDCLeftSemiCentrCut;
+  else fZDCLeftSemiCentrCut = 18500.;
 }
 //________________________________________________________________
-void AliZDCTrigger::SetZDCSemiCentrCut(Float_t ZDCSemiCentrCut) 
+void AliZDCTrigger::SetZDCRightSemiCentrCut(Float_t ZDCRightSemiCentrCut) 
 {
-  if(ZDCSemiCentrCut) fZDCSemiCentrCut = ZDCSemiCentrCut;
-  else fZDCSemiCentrCut = 18500.;
+  if(ZDCRightSemiCentrCut) fZDCRightSemiCentrCut = ZDCRightSemiCentrCut;
+  else fZDCRightSemiCentrCut = 18500.;
 }
 //________________________________________________________________
 void AliZDCTrigger::SetZEMCentrCut(Float_t ZEMCentrCut) 
index f533e0f..88d035d 100644 (file)
@@ -23,7 +23,7 @@ class AliZDCTrigger : public AliTriggerDetector
    virtual void    Trigger();
 
    // Print method
-   virtual void Print(Option_t *) const {
+/*   virtual void Print(Option_t *) const {
      printf("\t AliZDCTrigger: fZNMinCut = %1.0f, fZDCMinCut = %1.0f, fZEMMinCut= %1.0f \n"
      "fZDCLeftEMDCuts = [%1.0f, %1.0f], fZDCRightEMDCuts = [%1.0f, %1.0f], fZDCMBCut = %1.0f\n"
      "fZDCCentrCut = %1.0f, fZDCSemiCentrCut = %1.0f, fZEMCentrCut = %1.0f\n\n",
@@ -31,31 +31,40 @@ class AliZDCTrigger : public AliTriggerDetector
      fZDCRightEMDCuts[0],fZDCRightEMDCuts[1],fZDCMBCut,fZDCCentrCut,fZDCSemiCentrCut,
      fZEMCentrCut);
    }
+*/
  
  protected:
    
    // Setters   
    void SetZNMinCut(Float_t ZNMinCut);
-   void SetZDCMinCut(Float_t ZDCMinCut);
+   void SetZDCLeftMinCut(Float_t ZDCLeftMinCut);
+   void SetZDCRightMinCut(Float_t ZDCRightMinCut);
    void SetZEMMinCut(Float_t ZEMMinCut);
    void SetZDCLeftEMDCuts(Float_t *ZDCLeftEMDCuts);
    void SetZDCLeftEMDCuts(Float_t ZDCLeftEMDCutInf, Float_t ZDCLeftEMDCutSup);
    void SetZDCRightEMDCuts(Float_t *ZDCRightEMDCuts);
    void SetZDCRightEMDCuts(Float_t ZDCRightEMDCutInf, Float_t  ZDCRightEMDCutSup);
-   void SetZDCMBCut(Float_t ZDCMBCut);
-   void SetZDCCentrCut(Float_t ZDCCentrCuts);
-   void SetZDCSemiCentrCut(Float_t ZDCSemiCentrCut);
+   void SetZDCLeftMBCut(Float_t ZDCLeftMBCut);
+   void SetZDCRightMBCut(Float_t ZDCRightMBCut);
+   void SetZDCLeftCentrCut(Float_t ZDCLeftCentrCuts);
+   void SetZDCRightCentrCut(Float_t ZDCRightCentrCuts);
+   void SetZDCLeftSemiCentrCut(Float_t ZDCLeftSemiCentrCut);
+   void SetZDCRightSemiCentrCut(Float_t ZDCRightSemiCentrCut);
    void SetZEMCentrCut(Float_t ZEMCentrCut);
 
    // Data member
    Float_t fZNMinCut;   
-   Float_t fZDCMinCut;   
+   Float_t fZDCLeftMinCut;   
+   Float_t fZDCRightMinCut;   
    Float_t fZEMMinCut;   
    Float_t fZDCLeftEMDCuts[2];
    Float_t fZDCRightEMDCuts[2];
-   Float_t fZDCMBCut;
-   Float_t fZDCCentrCut;
-   Float_t fZDCSemiCentrCut;
+   Float_t fZDCLeftMBCut;
+   Float_t fZDCRightMBCut;
+   Float_t fZDCLeftCentrCut;
+   Float_t fZDCRightCentrCut;
+   Float_t fZDCLeftSemiCentrCut;
+   Float_t fZDCRightSemiCentrCut;
    Float_t fZEMCentrCut;   
     
   ClassDef(AliZDCTrigger,1)  // ZDC Trigger Detector class