Adding setters and getters to retrieve Local Trigger number from AliMUONTrack (Thanks...
authorpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Feb 2007 15:45:38 +0000 (15:45 +0000)
committerpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Feb 2007 15:45:38 +0000 (15:45 +0000)
MUON/AliMUONTrack.cxx
MUON/AliMUONTrack.h
MUON/AliMUONTriggerTrack.cxx
MUON/AliMUONTriggerTrack.h
MUON/AliMUONVTrackReconstructor.cxx

index 5a140572a995ad737981bfe6bbd3ad9bf7655557..a4082acf2f937ba19aba3b63195b58a89c87f526 100644 (file)
@@ -59,6 +59,7 @@ AliMUONTrack::AliMUONTrack()
     fVertex(0x0),
     fFitFMin(-1.),
     fMatchTrigger(kFALSE),
+    floTrgNum(-1),
     fChi2MatchTrigger(0.),
     fTrackID(0)
 {
@@ -77,6 +78,7 @@ AliMUONTrack::AliMUONTrack(AliMUONHitForRec* hitForRec1, AliMUONHitForRec* hitFo
     fVertex(0x0),
     fFitFMin(-1.),
     fMatchTrigger(kFALSE),
+    floTrgNum(-1),    
     fChi2MatchTrigger(0.),
     fTrackID(0)
 {
@@ -166,6 +168,7 @@ AliMUONTrack::AliMUONTrack (const AliMUONTrack& theMUONTrack)
     fVertex(0x0),
     fFitFMin(theMUONTrack.fFitFMin),
     fMatchTrigger(theMUONTrack.fMatchTrigger),
+    floTrgNum(theMUONTrack.floTrgNum),    
     fChi2MatchTrigger(theMUONTrack.fChi2MatchTrigger),
     fTrackID(theMUONTrack.fTrackID)
 {
@@ -253,6 +256,7 @@ AliMUONTrack & AliMUONTrack::operator=(const AliMUONTrack& theMUONTrack)
   fFitWithVertex      =  theMUONTrack.fFitWithVertex;
   fFitFMin            =  theMUONTrack.fFitFMin;
   fMatchTrigger       =  theMUONTrack.fMatchTrigger;
+  floTrgNum           =  theMUONTrack.floTrgNum;
   fChi2MatchTrigger   =  theMUONTrack.fChi2MatchTrigger;
   fTrackID            =  theMUONTrack.fTrackID;
 
@@ -555,6 +559,7 @@ void AliMUONTrack::Print(Option_t* opt) const
       //", NonBendSlope=" << setw(8) << setprecision(5)  << GetNonBendingSlope()*180./TMath::Pi() <<
       //", BendSlope=" << setw(8) << setprecision(5)     << GetBendingSlope()*180./TMath::Pi() <<
       ", Match2Trig=" << setw(1) << GetMatchTrigger()  << 
+      ", LoTrgNum=" << setw(3) << GetLoTrgNum()  << 
       ", Chi2-tracking-trigger=" << setw(8) << setprecision(5) <<  GetChi2MatchTrigger() << endl ;
     GetTrackParamAtHit()->First()->Print("full");
   }
index 9056efa8bbfaf7891a98c3e4d1ba98b56ddda847..f2cec41d00ae0c5cb567cc0ecc9a49f719b33f87 100644 (file)
@@ -71,8 +71,12 @@ class AliMUONTrack : public TObject
   void                       SetFitFMin(Double_t chi2) { fFitFMin = chi2; }
        /// return kTrue if track matches with trigger track, kFalse if not
   Bool_t                     GetMatchTrigger(void) const {return fMatchTrigger;}
+  /// returns the local trigger number corresponding to the trigger track 
+  Int_t                      GetLoTrgNum(void) const {return floTrgNum;}
        /// set the flag telling whether track matches with trigger track or not
-  void                      SetMatchTrigger(Bool_t matchTrigger) {fMatchTrigger = matchTrigger;}
+   void                             SetMatchTrigger(Bool_t matchTrigger) {fMatchTrigger = matchTrigger;}
+   /// set the local trigger number corresponding to the trigger track
+   void                             SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;}
        /// return the chi2 of trigger/track matching 
   Double_t                   GetChi2MatchTrigger(void) const {return fChi2MatchTrigger;}
        /// set the chi2 of trigger/track matching 
@@ -110,6 +114,7 @@ class AliMUONTrack : public TObject
   
   Double_t fFitFMin; ///< minimum value of the function minimized by the fit
   Bool_t fMatchTrigger; ///< 1 if track matches with trigger track, 0 if not
+  Int_t floTrgNum; ///< the number of the corresponding loTrg, -1 if no matching
   Double_t fChi2MatchTrigger; ///< chi2 of trigger/track matching 
   
   Int_t fTrackID; ///< track ID = track number in TrackRefs
index c548751aa958dd5dea7d408b4e8d466ef6a02038..aadbe0bdb7ca246e1d5616d2cb78d7bd7a81ee76 100644 (file)
@@ -29,7 +29,6 @@
 #include "AliMUONTriggerTrack.h"
 #include "AliMUONTrackReconstructor.h" 
 
-
 //__________________________________________________________________________
 AliMUONTriggerTrack::AliMUONTriggerTrack()
   : TObject(),
@@ -37,18 +36,20 @@ AliMUONTriggerTrack::AliMUONTriggerTrack()
     fy11(0),
     fthetax(0),
     fthetay(0),
+    floTrgNum(0),
     fGTPattern(0)
 
 {
   /// default ctr
 }
 //__________________________________________________________________________
-AliMUONTriggerTrack::AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t thetax, Float_t thetay, Long_t theGTPattern)
+AliMUONTriggerTrack::AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t thetax, Float_t thetay, Int_t loTrgNum, Long_t theGTPattern)
     : TObject(),
       fx11(x11),
       fy11(y11),
       fthetax(thetax),
       fthetay(thetay),
+      floTrgNum(loTrgNum),
       fGTPattern(theGTPattern)
 {
 /// ctor from local trigger output
@@ -69,6 +70,7 @@ AliMUONTriggerTrack::AliMUONTriggerTrack (const AliMUONTriggerTrack& theMUONTrig
       fy11(theMUONTriggerTrack.fy11),
       fthetax(theMUONTriggerTrack.fthetax),
       fthetay(theMUONTriggerTrack.fthetay),
+      floTrgNum(theMUONTriggerTrack.floTrgNum),
       fGTPattern(theMUONTriggerTrack.fGTPattern)    
 {
 ///
@@ -93,7 +95,9 @@ theMUONTriggerTrack)
     fy11 = theMUONTriggerTrack.fy11;
     fthetax = theMUONTriggerTrack.fthetax;
     fthetay = theMUONTriggerTrack.fthetay;
+    floTrgNum = theMUONTriggerTrack.floTrgNum;
     fGTPattern = theMUONTriggerTrack.fGTPattern;
 
     return *this;
 }
+
index 498b2baeec29928c288fb358b2a37b40be9f8070..9013e75777609b9da141ddf5dd5c25f5b57ef7c3 100644 (file)
@@ -21,20 +21,21 @@ class AliMUONTriggerTrack : public TObject
     virtual ~AliMUONTriggerTrack(); // Destructor
     AliMUONTriggerTrack (const AliMUONTriggerTrack& AliMUONTriggerTrack); // copy constructor
     AliMUONTriggerTrack& operator=(const AliMUONTriggerTrack& AliMUONTriggerTrack); // assignment operator
-    AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t thetax, Float_t thetay,
-                        Long_t theGTPattern); 
-
+    AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t thetax, Float_t thetay, Int_t iloTrg, Long_t theGTPattern); 
+    
     // getter
     Float_t GetX11()    const {return fx11;}
     Float_t GetY11()    const {return fy11;}
     Float_t GetThetax() const {return fthetax;}
-    Float_t GetThetay() const {return fthetay;}    
+    Float_t GetThetay() const {return fthetay;}
+    Int_t   GetLoTrgNum() const {return floTrgNum;}    
 
     // setter
     void SetX11(Float_t x)     {fx11 = x;}
     void SetY11(Float_t y)     {fy11 = y;}
     void SetThetax(Float_t tx) {fthetax = tx;}
-    void SetThetay(Float_t ty) {fthetay = ty;}    
+    void SetThetay(Float_t ty) {fthetay = ty;}
+    void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;}    
 
     void SetGTPattern(UChar_t pat) {fGTPattern = pat;}    
     UChar_t GetGTPattern() const {return fGTPattern;}    
@@ -45,9 +46,10 @@ protected:
   Float_t fy11;    ///< y position of fired X strip in MC11
   Float_t fthetax; ///< track theta angle in X   
   Float_t fthetay; ///< track theta angle in Y
+  Int_t   floTrgNum; ///< local trigger number
   UChar_t fGTPattern; ///< Global trigger pattern  (do not work with static statement) 
 
-  ClassDef(AliMUONTriggerTrack, 3) // Reconstructed trigger track in ALICE dimuon spectrometer
+  ClassDef(AliMUONTriggerTrack, 4) // Reconstructed trigger track in ALICE dimuon spectrometer
     };
        
 #endif
index ac931b473b46dee549da9c88c39993910c749bb7..dfa1795e4a2640b3bc762a51e4ec7af3cfb0deb5 100644 (file)
@@ -310,6 +310,7 @@ void AliMUONVTrackReconstructor::ValidateTracksWithTrigger(void)
   TClonesArray *recTriggerTracks = fMUONData->RecTriggerTracks();
   
   Bool_t matchTrigger;
+  Int_t loTrgNum;
   Double_t distTriggerTrack[3];
   Double_t xTrack, yTrack, ySlopeTrack, chi2MatchTrigger, minChi2MatchTrigger, chi2;
   
@@ -317,7 +318,8 @@ void AliMUONVTrackReconstructor::ValidateTracksWithTrigger(void)
   while (track) {
     matchTrigger = kFALSE;
     chi2MatchTrigger = 0.;
-    
+    loTrgNum = -1;
+
     trackParam = *((AliMUONTrackParam*) (track->GetTrackParamAtHit()->Last()));
     AliMUONTrackExtrap::ExtrapToZ(&trackParam, AliMUONConstants::DefaultChamberZ(10)); // extrap to 1st trigger chamber
     
@@ -331,6 +333,7 @@ void AliMUONVTrackReconstructor::ValidateTracksWithTrigger(void)
       distTriggerTrack[0] = (triggerTrack->GetX11()-xTrack)/kDistSigma[0];
       distTriggerTrack[1] = (triggerTrack->GetY11()-yTrack)/kDistSigma[1];
       distTriggerTrack[2] = (TMath::Tan(triggerTrack->GetThetay())-ySlopeTrack)/kDistSigma[2];
+      loTrgNum=triggerTrack->GetLoTrgNum();
       chi2 = 0.;
       for (Int_t iVar = 0; iVar < 3; iVar++) chi2 += distTriggerTrack[iVar]*distTriggerTrack[iVar];
       chi2 /= 3.; // Normalized Chi2: 3 degrees of freedom (X,Y,slopeY)
@@ -343,6 +346,7 @@ void AliMUONVTrackReconstructor::ValidateTracksWithTrigger(void)
     }
     
     track->SetMatchTrigger(matchTrigger);
+    track->SetLoTrgNum(loTrgNum);
     track->SetChi2MatchTrigger(chi2MatchTrigger);
     
     track = (AliMUONTrack*) fRecTracksPtr->After(track);
@@ -426,6 +430,7 @@ Bool_t AliMUONVTrackReconstructor::MakeTriggerTracks(void)
     fTriggerTrack->SetThetax(thetax);
     fTriggerTrack->SetThetay(thetay);
     fTriggerTrack->SetGTPattern(gloTrigPat);
+    fTriggerTrack->SetLoTrgNum(i);
          
     fMUONData->AddRecTriggerTrack(*fTriggerTrack);
   } // end of loop on Local Trigger