]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTracker.cxx
- Disentangle masks effect from trigger chamber efficiency estimation.
[u/mrichter/AliRoot.git] / MUON / AliMUONTracker.cxx
index 1acb43fe58e60333d33989306bfc20cc11738fda..5223dbc8734058000eab07af8cf09ac1d35bcc6a 100644 (file)
@@ -54,7 +54,7 @@
 #include "AliMUONVClusterServer.h"
 #include "AliMUONVDigitStore.h"
 #include "AliMUONVTriggerStore.h"
-#include "AliMUONDigitMaker.h"
+#include "AliMUONTriggerUtilities.h"
 #include <Riostream.h>
 #include <TRandom.h>
 #include <TTree.h>
@@ -68,11 +68,10 @@ ClassImp(AliMUONTracker)
 AliMUONTracker::AliMUONTracker(const AliMUONRecoParam* recoParam,
                                AliMUONVClusterServer* clusterServer,
                                AliMUONVDigitStore& digitStore,
-                               const AliMUONDigitMaker* digitMaker,
                                const AliMUONGeometryTransformer* transformer,
-                               const AliMUONTriggerCircuit* triggerCircuit)
+                               const AliMUONTriggerCircuit* triggerCircuit,
+                               const AliMUONTriggerUtilities* triggerUtilities)
 : AliTracker(),
-fkDigitMaker(digitMaker), // not owner
 fkTransformer(transformer), // not owner
 fkTriggerCircuit(triggerCircuit), // not owner
 fTrackHitPatternMaker(0x0),
@@ -87,12 +86,12 @@ fTriggerTrackStore(0x0),
 fkRecoParam(recoParam)
 {
   /// constructor
-  if (fkTransformer && fkDigitMaker)
-    fTrackHitPatternMaker = new AliMUONTrackHitPattern(recoParam,*fkTransformer,*fkDigitMaker);
+  if (fkTransformer)
+    fTrackHitPatternMaker = new AliMUONTrackHitPattern(recoParam,*fkTransformer,fkDigitStore,triggerUtilities);
   
   if (!fClusterServer)
   {
-    AliInfo("No cluster server given. Will use AliMUONLegacyClusterServer");
+    AliDebug(1,"No cluster server given. Will use AliMUONLegacyClusterServer");
     fIsOwnerOfClusterServer = kTRUE;
   }
   else
@@ -168,7 +167,7 @@ Int_t AliMUONTracker::LoadClusters(TTree* clustersTree)
     fInputClusterStore = AliMUONVClusterStore::Create(*clustersTree);
     if ( fInputClusterStore ) 
     {
-      AliInfo(Form("Created %s from cluster tree",fInputClusterStore->ClassName()));
+      AliDebug(1,Form("Created %s from cluster tree",fInputClusterStore->ClassName()));
       fInputClusterStore->Clear();
       fInputClusterStore->Connect(*clustersTree,kFALSE);
     }
@@ -191,7 +190,7 @@ Int_t AliMUONTracker::Clusters2Tracks(AliESDEvent* esd)
 {
   /// Performs the tracking and store the resulting tracks in the ESD
   AliDebug(1,"");
-  AliCodeTimerAuto("")
+  AliCodeTimerAuto("",0)
   
   if (!fTrackReco) 
   {
@@ -219,13 +218,11 @@ Int_t AliMUONTracker::Clusters2Tracks(AliESDEvent* esd)
     fTrackReco->EventReconstructTrigger(*fkTriggerCircuit,*fTriggerStore,*(TriggerTrackStore()));
   }
   
-  if ( ( GetRecoParam()->BypassSt4() || 
-                                GetRecoParam()->BypassSt5() ) && 
-                       TriggerTrackStore()->GetSize() > 5 ) 
+  if ( TriggerTrackStore()->GetSize() > GetRecoParam()->GetMaxTriggerTracks() ) 
   {
-    // Hard cut to reject shower events
+    // cut to reject shower events
     
-    AliCodeTimerAuto("MUON Shower events");
+    AliCodeTimerAuto("MUON Shower events",1);
 
     AliWarning(Form("Probably got a shower event (%d trigger tracks). Will not reconstruct tracks.",
                     TriggerTrackStore()->GetSize()));
@@ -257,12 +254,12 @@ void AliMUONTracker::FillESD(const AliMUONVTrackStore& trackStore, AliESDEvent*
 {
   /// Fill the ESD from the trackStore
   AliDebug(1,"");
-  AliCodeTimerAuto("")
+  AliCodeTimerAuto("",0)
   
   // get ITS vertex
   Double_t vertex[3] = {0., 0., 0.};
   const AliESDVertex* esdVert = esd->GetVertex(); 
-  if (esdVert->GetNContributors()) {
+  if (esdVert->GetNContributors() > 0 || !strcmp(esdVert->GetTitle(),"vertexer: smearMC")) {
     esdVert->GetXYZ(vertex);
     AliDebug(1,Form("found vertex (%e,%e,%e)",vertex[0],vertex[1],vertex[2]));
   }
@@ -348,7 +345,7 @@ AliMUONVTrackReconstructor* AliMUONTracker::CreateTrackReconstructor(const AliMU
     return 0x0;
   }
   
-  AliInfoClass(Form("Will use %s for tracking",trackReco->ClassName()));
+  AliDebugClass(1,Form("Will use %s for tracking",trackReco->ClassName()));
   
   return trackReco;
 }