]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
support for EGA triggers (Rachid)
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Oct 2013 10:23:58 +0000 (10:23 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Oct 2013 10:23:58 +0000 (10:23 +0000)
PWG/EMCAL/AliEmcalTriggerMaker.cxx
PWG/EMCAL/AliEmcalTriggerMaker.h

index 970d62881d3a879ff504bd80788dc436064647af..1d2f1f1e6a35746f877992ceede31605f4dfe716 100644 (file)
@@ -147,19 +147,22 @@ Bool_t AliEmcalTriggerMaker::Run()
     return kTRUE;
   }
   
-  // do not process, if sooner than 11h period
-  if( InputEvent()->GetRunNumber() < 167693 )
-    return kTRUE;
-
-  // do not process any MC, since no MC was generated with correct
-  // EMCal trigger L1 jet trigger simulation, yet
-  // productions will be enabled, once some correct once are produced
-  if( MCEvent() != 0 )
-    return kTRUE;
+//   // do not process, if sooner than 11h period
+//   if( InputEvent()->GetRunNumber() < 167693 )
+//     return kTRUE;
+// 
+//   // do not process any MC, since no MC was generated with correct
+//   // EMCal trigger L1 jet trigger simulation, yet
+//   // productions will be enabled, once some correct once are produced
+//   if( MCEvent() != 0 )
+//     return kTRUE;
   
   // must reset before usage, or the class will fail 
   fCaloTriggers->Reset();
-  
+  for (Int_t i=0; i<2; i++) {
+    fEGA[i] = 0;
+    fEJE[i] = 0;
+  }
   // first run over the patch array to compose a map of 2x2 patch energies
   // which is then needed to construct the full patch ADC energy
   // class is not empty
@@ -181,6 +184,19 @@ Bool_t AliEmcalTriggerMaker::Run()
       fCaloTriggers->GetL1TimeSum( adcAmp );
                        if( adcAmp > -1 )
                                patchADC[globCol][globRow] = adcAmp;
+      
+      fCaloTriggers->GetTriggerBits( tBits );
+      
+      Int_t isMC = 0;
+      if (MCEvent()) isMC = 1;
+      
+      Int_t offSet = (1 - isMC) * kTriggerTypeEnd;
+      if (tBits) {
+        if ((tBits >> (offSet + kL1GammaHigh)) & 1 ) fEGA[0] = 1;
+        if ((tBits >> (offSet + kL1GammaLow )) & 1 ) fEGA[1] = 1;
+        if ((tBits >> (offSet + kL1JetHigh  )) & 1 ) fEJE[0] = 1;
+        if ((tBits >> (offSet + kL1JetLow   )) & 1 ) fEJE[1] = 1;
+      }
                } // patches
        } // array not empty
   
index fa04ebfe1723c166d015652eb802da95e3c473eb..9fa511ba2a5c65b9a2206b92b8e288f9f1774337 100644 (file)
@@ -28,6 +28,9 @@ class AliEmcalTriggerMaker : public AliAnalysisTaskEmcal {
   
   void SetV0InName(const char *name) { fV0InName      = name; }
 
+  Int_t IsEGA(Int_t level) {if (level > 1 || level < 0) AliError("EGA: check the requested threshold"); return fEGA[level];}
+  Int_t IsEJE(Int_t level) {if (level > 1 || level < 0) AliError("EJE: check the requested threshold"); return fEJE[level];}
+  
  protected:  
   TString            fCaloTriggersOutName;    // name of output track array
   TString            fCaloTriggerSetupOutName;    // name of output track array
@@ -40,6 +43,9 @@ class AliEmcalTriggerMaker : public AliAnalysisTaskEmcal {
   Double_t           fPatchADCSimple[48][64]; //! patch map for simple offline trigger
   Int_t              fThresholdConstants[4][3]; // simple offline trigger thresholds constants
 
+  Int_t              fEGA[2];
+  Int_t              fEJE[2];
+  
  private:
   AliEmcalTriggerMaker(const AliEmcalTriggerMaker&);            // not implemented
   AliEmcalTriggerMaker &operator=(const AliEmcalTriggerMaker&); // not implemented