]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ESD tags for muons modified, since they revealed to be
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Dec 2009 20:10:26 +0000 (20:10 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Dec 2009 20:10:26 +0000 (20:10 +0000)
really useful to perform quick checks for these 900GeV data! I have completely
removed a vertex cut (before muons were counted within a vertex
range) and I added another tag (NFWMatchedMuons) to count muons.

(R. Arnaldi)

STEER/AliESDTagCreator.cxx
STEER/AliEventTag.cxx
STEER/AliEventTag.h
STEER/AliEventTagCuts.cxx
STEER/AliEventTagCuts.h

index 3451455115c2ee1d6d20360160cab8c73c76e532..bcc676d3fd7d31c49ecfb08ce2e519371eab6cec 100644 (file)
@@ -222,7 +222,7 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
   // Creates the tags for all the events in a given ESD file
   Bool_t fIsSim = kTRUE;
   Int_t ntrack;
-  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons;
+  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
   Int_t nPos, nNeg, nNeutr;
   Int_t nK0s, nNeutrons, nPi0s, nGamas;
   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
@@ -292,7 +292,7 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
     ntrack = 0; nPos = 0; nNeg = 0; nNeutr =0;
     nK0s = 0; nNeutrons = 0; nPi0s = 0;
     nGamas = 0; nProtons = 0; nKaons = 0;
-    nPions = 0; nMuons = 0; nElectrons = 0; nFWMuons = 0;        
+    nPions = 0; nMuons = 0; nElectrons = 0; nFWMuons = 0; nFWMatchedMuons = 0;   
     nCh1GeV = 0; nCh3GeV = 0; nCh10GeV = 0;
     nMu1GeV = 0; nMu3GeV = 0; nMu10GeV = 0;
     nEl1GeV = 0; nEl3GeV = 0; nEl10GeV = 0;
@@ -415,19 +415,18 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
       fEnergy = TMath::Sqrt(fMUONMASS * fMUONMASS + fPxRec * fPxRec + fPyRec * fPyRec + fPzRec * fPzRec);
       fEPvector.SetPxPyPzE(fPxRec, fPyRec, fPzRec, fEnergy);
       
-      // total number of muons inside a vertex cut 
-      if((TMath::Abs(fZ)<fZVertexCut) && (TMath::Sqrt(fY*fY+fX*fX)<fRhoVertexCut)) {
-       nMuons++;
-       nFWMuons++;
-       if(fEPvector.Pt() > fLowPtCut) {
-         nMu1GeV++; 
-         if(fEPvector.Pt() > fHighPtCut) {
-           nMu3GeV++; 
-           if (fEPvector.Pt() > fVeryHighPtCut) {
-             nMu10GeV++;
-           }
-         }
-       }
+      if (muonTrack->GetMatchTrigger()>0) nFWMatchedMuons++;
+      
+      nMuons++;
+      nFWMuons++;
+      if(fEPvector.Pt() > fLowPtCut) {
+        nMu1GeV++; 
+        if(fEPvector.Pt() > fHighPtCut) {
+          nMu3GeV++; 
+          if (fEPvector.Pt() > fVeryHighPtCut) {
+            nMu10GeV++;
+          }
+        }
       }
     }//muon track loop
     
@@ -496,6 +495,7 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
     evTag->SetNumOfPions(nPions);
     evTag->SetNumOfMuons(nMuons);
     evTag->SetNumOfFWMuons(nFWMuons);
+    evTag->SetNumOfFWMatchedMuons(nFWMatchedMuons);
     evTag->SetNumOfElectrons(nElectrons);
     evTag->SetNumOfPhotons(nGamas);
     evTag->SetNumOfPi0s(nPi0s);
@@ -597,7 +597,7 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
   // Creates the tags for all the events in a given ESD file
   Bool_t fIsSim = kTRUE;
   Int_t ntrack;
-  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons;
+  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
   Int_t nPos, nNeg, nNeutr;
   Int_t nK0s, nNeutrons, nPi0s, nGamas;
   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
@@ -647,6 +647,7 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
     nPions = 0;
     nMuons = 0;
     nFWMuons = 0;
+    nFWMatchedMuons = 0;
     nElectrons = 0;      
     nCh1GeV = 0;
     nCh3GeV = 0;
@@ -767,19 +768,18 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
       fEnergy = TMath::Sqrt(fMUONMASS * fMUONMASS + fPxRec * fPxRec + fPyRec * fPyRec + fPzRec * fPzRec);
       fEPvector.SetPxPyPzE(fPxRec, fPyRec, fPzRec, fEnergy);
       
-      // total number of muons inside a vertex cut 
-      if((TMath::Abs(fZ)<fZVertexCut) && (TMath::Sqrt(fY*fY+fX*fX)<fRhoVertexCut)) {
-       nMuons++;
-       nFWMuons++;
-       if(fEPvector.Pt() > fLowPtCut) {
-         nMu1GeV++; 
-         if(fEPvector.Pt() > fHighPtCut) {
-           nMu3GeV++; 
-           if (fEPvector.Pt() > fVeryHighPtCut) {
-             nMu10GeV++;
-           }
-         }
-       }
+      if (muonTrack->GetMatchTrigger()>0) nFWMatchedMuons++;
+      
+      nMuons++;
+      nFWMuons++;
+      if(fEPvector.Pt() > fLowPtCut) {
+        nMu1GeV++; 
+        if(fEPvector.Pt() > fHighPtCut) {
+          nMu3GeV++; 
+          if (fEPvector.Pt() > fVeryHighPtCut) {
+            nMu10GeV++;
+          }
+        }
       }
     }//muon track loop
     
@@ -841,6 +841,7 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
     evTag->SetNumOfPions(nPions);
     evTag->SetNumOfMuons(nMuons);
     evTag->SetNumOfFWMuons(nFWMuons);
+    evTag->SetNumOfFWMatchedMuons(nFWMatchedMuons);
     evTag->SetNumOfElectrons(nElectrons);
     evTag->SetNumOfPhotons(nGamas);
     evTag->SetNumOfPi0s(nPi0s);
@@ -952,7 +953,7 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
   // Creates the tags for all the events in a given ESD file
   Bool_t fIsSim = kTRUE;
   Int_t ntrack;
-  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons;
+  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
   Int_t nPos, nNeg, nNeutr;
   Int_t nK0s, nNeutrons, nPi0s, nGamas;
   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
@@ -996,6 +997,7 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
     nPions = 0;
     nMuons = 0;
     nFWMuons = 0;
+    nFWMatchedMuons = 0;
     nElectrons = 0;      
     nCh1GeV = 0;
     nCh3GeV = 0;
@@ -1116,19 +1118,18 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
       fEnergy = TMath::Sqrt(fMUONMASS * fMUONMASS + fPxRec * fPxRec + fPyRec * fPyRec + fPzRec * fPzRec);
       fEPvector.SetPxPyPzE(fPxRec, fPyRec, fPzRec, fEnergy);
       
-      // total number of muons inside a vertex cut 
-      if((TMath::Abs(fZ)<fZVertexCut) && (TMath::Sqrt(fY*fY+fX*fX)<fRhoVertexCut)) {
-       nMuons++;
-       nFWMuons++;
-       if(fEPvector.Pt() > fLowPtCut) {
-         nMu1GeV++; 
-         if(fEPvector.Pt() > fHighPtCut) {
-           nMu3GeV++; 
-           if (fEPvector.Pt() > fVeryHighPtCut) {
-             nMu10GeV++;
-           }
-         }
-       }
+      if (muonTrack->GetMatchTrigger()>0) nFWMatchedMuons++;
+
+      nMuons++;
+      nFWMuons++;
+      if(fEPvector.Pt() > fLowPtCut) {
+        nMu1GeV++; 
+        if(fEPvector.Pt() > fHighPtCut) {
+          nMu3GeV++; 
+          if (fEPvector.Pt() > fVeryHighPtCut) {
+            nMu10GeV++;
+          }
+        }
       }
     }//muon track loop
     
@@ -1187,6 +1188,7 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
     evTag->SetNumOfPions(nPions);
     evTag->SetNumOfMuons(nMuons);
     evTag->SetNumOfFWMuons(nFWMuons);
+    evTag->SetNumOfFWMatchedMuons(nFWMatchedMuons);
     evTag->SetNumOfElectrons(nElectrons);
     evTag->SetNumOfPhotons(nGamas);
     evTag->SetNumOfPi0s(nPi0s);
@@ -1298,7 +1300,7 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
 
   // Creates the tags for all the events in a given ESD file
   Int_t ntrack;
-  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons;
+  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
   Int_t nPos, nNeg, nNeutr;
   Int_t nK0s, nNeutrons, nPi0s, nGamas;
   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
@@ -1359,6 +1361,7 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
     nPions = 0;
     nMuons = 0;
     nFWMuons = 0;
+    nFWMatchedMuons = 0;
     nElectrons = 0;      
     nCh1GeV = 0;
     nCh3GeV = 0;
@@ -1476,19 +1479,18 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
       fEnergy = TMath::Sqrt(fMUONMASS * fMUONMASS + fPxRec * fPxRec + fPyRec * fPyRec + fPzRec * fPzRec);
       fEPvector.SetPxPyPzE(fPxRec, fPyRec, fPzRec, fEnergy);
       
-      // total number of muons inside a vertex cut 
-      if((TMath::Abs(fZ)<fZVertexCut) && (TMath::Sqrt(fY*fY+fX*fX)<fRhoVertexCut)) {
-       nMuons++;
-       nFWMuons++;
-       if(fEPvector.Pt() > fLowPtCut) {
-         nMu1GeV++; 
-         if(fEPvector.Pt() > fHighPtCut) {
-           nMu3GeV++; 
-           if (fEPvector.Pt() > fVeryHighPtCut) {
-             nMu10GeV++;
-           }
-         }
-       }
+      if (muonTrack->GetMatchTrigger()>0) nFWMatchedMuons++;
+
+      nMuons++;
+      nFWMuons++;
+      if(fEPvector.Pt() > fLowPtCut) {
+        nMu1GeV++; 
+        if(fEPvector.Pt() > fHighPtCut) {
+          nMu3GeV++; 
+          if (fEPvector.Pt() > fVeryHighPtCut) {
+            nMu10GeV++;
+          }
+        }
       }
     }//muon track loop
 
@@ -1549,6 +1551,7 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
     evTag->SetNumOfPions(nPions);
     evTag->SetNumOfMuons(nMuons);
     evTag->SetNumOfFWMuons(nFWMuons);
+    evTag->SetNumOfFWMatchedMuons(nFWMatchedMuons);
     evTag->SetNumOfElectrons(nElectrons);
     evTag->SetNumOfPhotons(nGamas);
     evTag->SetNumOfPi0s(nPi0s);
index 65e2be83f5b269eca275c76e30eca3d76bb24182..6eb15cdec3cc9474075db275da9fd9a6417ead55 100644 (file)
@@ -79,6 +79,7 @@ ClassImp(AliEventTag)
     fNumberOfElectronsAbove10GeV(-10),
     fNumberOfElectrons(-10),
     fNumberOfFWMuons(-10),
+    fNumberOfFWMatchedMuons(-10),
     fNumberOfMuons(-10),
     fNumberOfPions(-10),
     fNumberOfKaons(-10),
@@ -165,6 +166,7 @@ AliEventTag::AliEventTag(const AliEventTag & evTag) :
   fNumberOfElectronsAbove10GeV(evTag.fNumberOfElectronsAbove10GeV),
   fNumberOfElectrons(evTag.fNumberOfElectrons),
   fNumberOfFWMuons(evTag.fNumberOfFWMuons),
+  fNumberOfFWMatchedMuons(evTag.fNumberOfFWMatchedMuons),
   fNumberOfMuons(evTag.fNumberOfMuons),
   fNumberOfPions(evTag.fNumberOfPions),
   fNumberOfKaons(evTag.fNumberOfKaons),
@@ -253,6 +255,7 @@ AliEventTag & AliEventTag::operator=(const AliEventTag &evTag) {
     SetNumOfElectronsAbove10GeV(evTag.GetNumOfElectronsAbove10GeV());
     SetNumOfElectrons(evTag.GetNumOfElectrons());
     SetNumOfFWMuons(evTag.GetNumOfFWMuons());
+    SetNumOfFWMatchedMuons(evTag.GetNumOfFWMatchedMuons());
     SetNumOfMuons(evTag.GetNumOfMuons());
     SetNumOfPions(evTag.GetNumOfPions());
     SetNumOfKaons(evTag.GetNumOfKaons());
index 660b8cc545e8eda4dfcea8137ee1d00f2d7128fa..f27adfd76b66a775ecc990e44b37dcf39b6083b2 100644 (file)
@@ -81,6 +81,7 @@ class AliEventTag : public TObject {
   void SetNumOfElectronsAbove10GeV(Int_t i) {fNumberOfElectronsAbove10GeV = i;}
   void SetNumOfElectrons(Int_t Ptr) {fNumberOfElectrons = Ptr;}
   void SetNumOfFWMuons(Int_t Ptr) {fNumberOfFWMuons = Ptr;}
+  void SetNumOfFWMatchedMuons(Int_t Ptr) {fNumberOfFWMatchedMuons = Ptr;}
   void SetNumOfMuons(Int_t Ptr) {fNumberOfMuons = Ptr;}
   void SetNumOfPions(Int_t Ptr) {fNumberOfPions = Ptr;}
   void SetNumOfKaons(Int_t Ptr) {fNumberOfKaons = Ptr;}
@@ -166,6 +167,7 @@ class AliEventTag : public TObject {
   Int_t       GetNumOfElectronsAbove10GeV() const {return fNumberOfElectronsAbove10GeV;}
   Int_t       GetNumOfElectrons() const {return fNumberOfElectrons;}
   Int_t       GetNumOfFWMuons() const {return fNumberOfFWMuons;}
+  Int_t       GetNumOfFWMatchedMuons() const {return fNumberOfFWMatchedMuons;}
   Int_t       GetNumOfMuons() const {return fNumberOfMuons;}
   Int_t       GetNumOfPions() const {return fNumberOfPions;}
   Int_t       GetNumOfKaons() const {return fNumberOfKaons;}
@@ -251,6 +253,7 @@ class AliEventTag : public TObject {
   Int_t     fNumberOfElectronsAbove10GeV;   //Number of electrons above 10 GeV/c
   Int_t     fNumberOfElectrons;                    //Number of electrons
   Int_t     fNumberOfFWMuons;              //Number of forward muons
+  Int_t     fNumberOfFWMatchedMuons;       //Number of forward matched muons
   Int_t     fNumberOfMuons;                //Number of muons
   Int_t     fNumberOfPions;                //Number of pions
   Int_t     fNumberOfKaons;                //Number of kaons
index 4d3da6f605f151cf6d02e49aa1504f53e83abd47..fb90f087fda5a601bb909d349ff42f62d529f5f1 100644 (file)
@@ -127,6 +127,8 @@ AliEventTagCuts::AliEventTagCuts() :
   fNElectronsFlag(kFALSE),
   fNFWMuonsMin(-1), fNFWMuonsMax(100000),
   fNFWMuonsFlag(kFALSE),
+  fNFWMatchedMuonsMin(-1), fNFWMatchedMuonsMax(100000),
+  fNFWMatchedMuonsFlag(kFALSE),
   fNMuonsMin(-1), fNMuonsMax(100000),
   fNMuonsFlag(kFALSE),
   fNPionsMin(-1), fNPionsMax(100000),
@@ -235,6 +237,7 @@ void AliEventTagCuts::Reset() {
   fNElectronsAbove10GeVFlag = kFALSE;
   fNElectronsFlag = kFALSE;
   fNFWMuonsFlag = kFALSE;
+  fNFWMatchedMuonsFlag = kFALSE;
   fNMuonsFlag = kFALSE;
   fNPionsFlag = kFALSE;
   fNKaonsFlag = kFALSE;
@@ -310,6 +313,7 @@ void AliEventTagCuts::Reset() {
   fNElectronsAbove10GeVMin = -1; fNElectronsAbove10GeVMax = 100000;
   fNElectronsMin = -1; fNElectronsMax = 100000;
   fNFWMuonsMin = -1; fNFWMuonsMax = 100000;
+  fNFWMatchedMuonsMin = -1; fNFWMatchedMuonsMax = 100000;
   fNMuonsMin = -1; fNMuonsMax = 100000;
   fNPionsMin = -1; fNPionsMax = 100000;
   fNKaonsMin = -1; fNKaonsMax = 100000;
@@ -776,6 +780,15 @@ void AliEventTagCuts::SetNFWMuonRange(Int_t low, Int_t high) {
   fNFWMuonsFlag = kTRUE;
 }
 
+//___________________________________________________________________________
+void AliEventTagCuts::SetNFWMatchedMuonRange(Int_t low, Int_t high) {
+  //Sets the forward trigger matched muon multiplicity range
+  //and the corresponding flag to kTRUE if the cut is used.
+  fNFWMatchedMuonsMin = low;
+  fNFWMatchedMuonsMax = high;
+  fNFWMatchedMuonsFlag = kTRUE;
+}
+
 //___________________________________________________________________________
 void AliEventTagCuts::SetNMuonRange(Int_t low, Int_t high) {
   //Sets the muon multiplicity range
@@ -1123,6 +1136,10 @@ Bool_t AliEventTagCuts::IsAccepted(AliEventTag *EvTag) const {
     if((EvTag->GetNumOfFWMuons() < fNFWMuonsMin) || (EvTag->GetNumOfFWMuons() > fNFWMuonsMax))
       return kFALSE; 
   
+  if(fNFWMatchedMuonsFlag)
+    if((EvTag->GetNumOfFWMatchedMuons() < fNFWMatchedMuonsMin) || (EvTag->GetNumOfFWMatchedMuons() > fNFWMatchedMuonsMax))
+      return kFALSE; 
+  
   if(fNMuonsFlag)
     if((EvTag->GetNumOfMuons() < fNMuonsMin) || (EvTag->GetNumOfMuons() > fNMuonsMax))
       return kFALSE; 
index 9909c58087fbe7bec06b17e8821b693fdbda5f64..a4c66eb1fcf00d701d4900720423c9a579e53b33 100644 (file)
@@ -79,6 +79,7 @@ class AliEventTagCuts : public TObject {
   void SetNElectronsAbove10GeVRange(Int_t low, Int_t high);
   void SetNElectronRange(Int_t low, Int_t high);
   void SetNFWMuonRange(Int_t low, Int_t high);
+  void SetNFWMatchedMuonRange(Int_t low, Int_t high);
   void SetNMuonRange(Int_t low, Int_t high);
   void SetNPionRange(Int_t low, Int_t high);
   void SetNKaonRange(Int_t low, Int_t high);
@@ -212,6 +213,8 @@ class AliEventTagCuts : public TObject {
   Bool_t fNElectronsFlag;                                     // Shows whether this cut is used or not
   Int_t fNFWMuonsMin, fNFWMuonsMax;                           // # of forward muons range
   Bool_t fNFWMuonsFlag;                                       // Shows whether this cut is used or not
+  Int_t fNFWMatchedMuonsMin, fNFWMatchedMuonsMax;             // # of forward matched muons range
+  Bool_t fNFWMatchedMuonsFlag;                                // Shows whether this cut is used or not
   Int_t fNMuonsMin, fNMuonsMax;                               // # of muons range
   Bool_t fNMuonsFlag;                                         // Shows whether this cut is used or not
   Int_t fNPionsMin, fNPionsMax;                               // # of pions range