]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRecoParam.cxx
Replace QADataMakerSteer by QAManager deriving from CDBManager
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoParam.cxx
index cf4c883f48ece070e2bc1224ae30d7aefe0bb8a9..c70d7a3a38328f1e7c6f535a7bc3be85faeceb7b 100644 (file)
@@ -26,7 +26,9 @@
 
 
 #include "AliMUONRecoParam.h"
+#include "AliMUONPadStatusMaker.h"
 
+#include "AliRecoParam.h"
 #include "AliLog.h"
 
 #include <Riostream.h>
@@ -39,7 +41,6 @@ AliMUONRecoParam::AliMUONRecoParam()
 : AliDetectorRecoParam(),
   fClusteringMode("MLEM"),
   fTrackingMode("KALMAN"),
-  fMostProbBendingMomentum(0.),
   fMinBendingMomentum(0.),
   fMaxBendingMomentum(0.),
   fMaxNonBendingSlope(0.),
@@ -65,13 +66,15 @@ AliMUONRecoParam::AliMUONRecoParam()
   fUseSmoother(kFALSE),
   fSaveFullClusterInESD(kTRUE),
   fCalibrationMode("NOGAIN"),
-  fBypassSt45(kFALSE)
+  fBypassSt45(0),
+  fPadGoodnessMask(0),
+  fChargeSigmaCut(4.0),
+  fRemoveConnectedTracksInSt12(kFALSE)
 {
   /// Constructor
-  SetNameTitle("MUON","MUON");
   
-  // use the default parameters for low flux environment
-  SetLowFluxParam();
+  SetNameTitle("Dummy","Dummy");
+  SetDefaultLimits();
 }
 
 //_____________________________________________________________________________
@@ -80,6 +83,18 @@ AliMUONRecoParam::~AliMUONRecoParam()
   /// Destructor
 }
 
+//_____________________________________________________________________________
+void
+AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
+{
+       /// Set the bypass status
+       
+       if ( st4 && st5 ) fBypassSt45 = 45;
+       else if ( st4 ) fBypassSt45 = 4;
+       else if ( st5 ) fBypassSt45 = 5;
+       else fBypassSt45 = 0;
+}
+
 //_____________________________________________________________________________
 Option_t*
 AliMUONRecoParam::GetCalibrationMode() const
@@ -131,7 +146,8 @@ void AliMUONRecoParam::SetLowFluxParam()
 {
   /// Set reconstruction parameters for low flux environment
   
-  fMostProbBendingMomentum = 2.;
+  SetNameTitle("Low Flux","Low Flux");
+  SetEventSpecie(AliRecoParam::kLowMult);
   fMinBendingMomentum = 1.;
   fMaxBendingMomentum = 3000.;
   fMaxNonBendingSlope = 0.3;
@@ -153,10 +169,15 @@ void AliMUONRecoParam::SetLowFluxParam()
   fMakeMoreTrackCandidates = kFALSE;
   fComplementTracks = kTRUE;
   fImproveTracks = kTRUE;
+  fRemoveConnectedTracksInSt12 = kTRUE;
   fUseSmoother = kTRUE;
-  for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
+  for (Int_t iCh = 0; iCh < 10; iCh++) {
+    fUseChamber[iCh] = kTRUE;
+    fDefaultNonBendingReso[iCh] = 0.144;
+    fDefaultBendingReso[iCh] = 0.01;
+  }
   for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
-  fBypassSt45 = kFALSE;
+  fBypassSt45 = 0;
   
 }
 
@@ -165,7 +186,8 @@ void AliMUONRecoParam::SetHighFluxParam()
 {
   /// Set reconstruction parameters for high flux environment
   
-  fMostProbBendingMomentum = 2.;
+  SetNameTitle("High Flux","High Flux");
+  SetEventSpecie(AliRecoParam::kHighMult);
   fMinBendingMomentum = 1.;
   fMaxBendingMomentum = 3000.;
   fMaxNonBendingSlope = 0.3;
@@ -187,10 +209,15 @@ void AliMUONRecoParam::SetHighFluxParam()
   fMakeMoreTrackCandidates = kFALSE;
   fComplementTracks = kTRUE;
   fImproveTracks = kTRUE;
+  fRemoveConnectedTracksInSt12 = kFALSE;
   fUseSmoother = kTRUE;
-  for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
+  for (Int_t iCh = 0; iCh < 10; iCh++) {
+    fUseChamber[iCh] = kTRUE;
+    fDefaultNonBendingReso[iCh] = 0.144;
+    fDefaultBendingReso[iCh] = 0.01;
+  }
   for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
-  fBypassSt45 = kFALSE;
+  fBypassSt45 = 0;
   
 }
 
@@ -199,7 +226,8 @@ void AliMUONRecoParam::SetCosmicParam()
 {
   /// Set reconstruction parameters for high flux environment
   
-  fMostProbBendingMomentum = 2.;
+  SetNameTitle("Cosmic","Cosmic");
+  SetEventSpecie(AliRecoParam::kCosmic);
   fMinBendingMomentum = 1.;
   fMaxBendingMomentum = 10000000.;
   fMaxNonBendingSlope = 0.3;
@@ -220,12 +248,33 @@ void AliMUONRecoParam::SetCosmicParam()
   fMakeMoreTrackCandidates = kFALSE;
   fComplementTracks = kTRUE;
   fImproveTracks = kTRUE;
+  fRemoveConnectedTracksInSt12 = kTRUE;
   fUseSmoother = kTRUE;
   fSaveFullClusterInESD = kTRUE;
-  for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
+  for (Int_t iCh = 0; iCh < 10; iCh++) {
+    fUseChamber[iCh] = kTRUE;
+    fDefaultNonBendingReso[iCh] = 0.144;
+    fDefaultBendingReso[iCh] = 0.01;
+  }
   for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
-  fBypassSt45 = kFALSE;
+  fBypassSt45 = 0;
+  
+}
+
+//_____________________________________________________________________________
+UInt_t
+AliMUONRecoParam::RequestedStationMask() const
+{
+  /// Get the mask of the requested station, i.e. an integer where 
+  /// bit n is set to one if the station n was requested
   
+  UInt_t m(0);
+  
+  for ( Int_t i = 0; i < 5; ++i ) 
+  {
+    if ( RequestStation(i) ) m |= ( 1 << i );
+  }
+  return m;
 }
 
 //_____________________________________________________________________________
@@ -234,22 +283,37 @@ void AliMUONRecoParam::Print(Option_t *option) const
   /// print reconstruction parameters
   /// if option = FULL then print also unused parameters
   
-  cout<<endl<<"\t------Reconstruction parameters------"<<endl;
+  cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
+  
+  if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
   
   cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
   cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
   cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
 
-  if (BypassSt45()) cout << "Will bypass St45 (replacing their clusters by generated ones from trigger tracks)" << endl;
+       TString bypass;
+       
+       if ( BypassSt45() )
+       {
+               bypass = "stations 4 and 5";
+       }
+       else if ( BypassSt4() ) 
+       {
+               bypass = "station 4";
+       }
+       else if ( BypassSt5() ) 
+       {
+               bypass = "station 5";
+       }
+       
+  if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
   
   if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
   else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
   
   if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
   else cout<<"Save partial cluster info in ESD"<<endl;
-  
-  cout<<Form("Most probable bending momentum (used only if B=0) = %5.2f",fMostProbBendingMomentum)<<endl;
-  
+    
   cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
   
   cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
@@ -309,6 +373,9 @@ void AliMUONRecoParam::Print(Option_t *option) const
   } else if (fImproveTracks)
     cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
   
+  if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
+  else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
+  
   if (strstr(option,"FULL")) {
     cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
     if (fUseSmoother) cout<<"ON"<<endl;
@@ -344,7 +411,62 @@ void AliMUONRecoParam::Print(Option_t *option) const
   } while (++st < 5);
   if (discardedSt) cout<<endl;
   
-  cout<<"\t-------------------------------------"<<endl<<endl;
+  cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
+  cout << "Which means we reject pads having the condition = " <<
+  AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
   
+  cout << "The pad limits we are using are :" << endl;
+  
+  cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl;
+  cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl;
+  cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
+  cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
+  cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
+  cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
+  cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
+  
+  cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
+  
+  cout << "chamber non bending resolution = |";
+  for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
+  cout << endl;
+  cout << "chamber bending resolution = |";
+  for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
+  cout << endl;
+  
+  cout<<"\t-----------------------------------------------------"<<endl<<endl;
+  
+}
+
+//_____________________________________________________________________________
+void
+AliMUONRecoParam::SetDefaultLimits()
+{
+       /// Set the default limits and pad goodness policy
+
+       fHVSt12Limits[0]=1500;
+       fHVSt12Limits[1]=2000;
+
+       fHVSt345Limits[0]=1500;
+       fHVSt345Limits[1]=2000;
+
+       fPedMeanLimits[0] = 50;
+       fPedMeanLimits[1] = 1024;
+       
+       fPedSigmaLimits[0] = 0.1;
+       fPedSigmaLimits[1] = 100;
+
+       fGainA1Limits[0] = 0.1;
+       fGainA1Limits[1] = 10;
+
+       fGainA2Limits[0] = -1E30;
+       fGainA2Limits[1] = 1E30;
+       
+       fGainThresLimits[0] = 0;
+       fGainThresLimits[1] = 4095;
+       
+       fPadGoodnessMask = 0x8080;
+  
+  fChargeSigmaCut = 4.0;
 }