]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliReconstruction.cxx
AliESDHeader: AliTriggerConfiguration and more trigger scalers added
[u/mrichter/AliRoot.git] / STEER / AliReconstruction.cxx
index 5103a0b668718efef70d8fbc1e197b47968db031..2c96eca2de695fa63c6b788112f3c45cc57f33fe 100644 (file)
@@ -1719,6 +1719,7 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
       fRunLoader->GetHeader()->Reset(fRawReader->GetRunNumber(), 
                                     iEvent, iEvent);
     fRunLoader->TreeE()->Fill();
+
     if (fRawReader && fRawReader->UseAutoSaveESD())
       fRunLoader->TreeE()->AutoSave("SaveSelf");
   }
@@ -2178,6 +2179,7 @@ void AliReconstruction::SlaveTerminate()
 
   if (fIsNewRunLoader) { // galice.root didn't exist
     fRunLoader->WriteHeader("OVERWRITE");
+    fRunLoader->WriteTrigger("OVERWRITE");
     fRunLoader->CdGAFile();
     fRunLoader->Write(0, TObject::kOverwrite);
   }
@@ -2916,7 +2918,12 @@ Bool_t AliReconstruction::FillTriggerESD(AliESDEvent*& esd)
           if(TMath::Abs(Int_t(orbit-(input.GetIR(i))->GetOrbit()))<=1){
             esdheader->AddTriggerIR(input.GetIR(i));
          }
+       AliCentralTrigger* rlCTP = fRunLoader->GetTrigger();
+       rlCTP->SetL0TriggerInputs(input.GetL0Inputs());
+       rlCTP->SetL1TriggerInputs(input.GetL1Inputs());
+       rlCTP->SetL2TriggerInputs(input.GetL2Inputs());
     }
+    if (fIsNewRunLoader) fRunLoader->TreeCT()->Fill();
   }
   return kTRUE;
 }
@@ -3045,6 +3052,7 @@ Bool_t AliReconstruction::InitRunLoader()
     }
     fIsNewRunLoader = kTRUE;
     fRunLoader->MakeTree("E");
+    fRunLoader->MakeTree("GG");
 
     if (fNumberOfEventsPerFile > 0)
       fRunLoader->SetNumberOfEventsPerFile(fNumberOfEventsPerFile);
@@ -3683,6 +3691,10 @@ Bool_t AliReconstruction::GetEventInfo()
     }
     aCTP->SetClassMask(mask);
     aCTP->SetClusterMask(clmask);
+
+    AliCentralTrigger* rlCTP = fRunLoader->GetTrigger();
+    rlCTP->SetClassMask(mask);
+    rlCTP->SetClusterMask(clmask);
   }
   else {
     fEventInfo.SetEventType(AliRawEventHeaderBase::kPhysicsEvent);
@@ -3937,7 +3949,6 @@ Bool_t AliReconstruction::IsHighPt() const {
   // that was reconstructed by both ITS and TPC, the event is accepted
 
   // Track cuts
-
   const Double_t pTmin = 1.5;
   const Double_t pTmax = 100;
   ULong_t mask = 0;
@@ -3946,6 +3957,7 @@ Bool_t AliReconstruction::IsHighPt() const {
   const Double_t pTminCosmic = 5.;
   const Double_t pTmaxCosmic = 100;
   ULong_t maskCosmic = 0;
+  Int_t cosmicCount=0;
   maskCosmic |= (AliESDtrack::kTPCrefit);
 
   Bool_t isOK = kFALSE;
@@ -3970,10 +3982,11 @@ Bool_t AliReconstruction::IsHighPt() const {
          && trk->GetInnerParam()->Pt() < pTmaxCosmic
          && (trk->GetStatus() & maskCosmic) == maskCosmic ) {
        
-       isOK = kTRUE;
+       cosmicCount++;
        break;
       }
     }
+    if (cosmicCount>1) isOK=kTRUE;
   }
   return isOK;
 }
@@ -4005,8 +4018,10 @@ void AliReconstruction::WriteESDfriend() {
   // 3. Sample randomly events if we still have remaining slot
 
   fNall++;
-
   Bool_t isSelected = kFALSE;
+  //
+  // Store all friends for B field OFF 
+  if (TMath::Abs(AliTrackerBase::GetBz())<0.5) isSelected=kTRUE;
 
   if (IsCosmicOrCalibSpecie()) { // Selection of calib or cosmic events
     fNspecie++;