]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityCorrFctn.cxx
Bring AliFemto up to date with latest code developements
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / AliFemtoShareQualityCorrFctn.cxx
index 0effcc86d4e12bbf4c4d65903c3700da0588588b..27c9f4cb3a4c10b80599cd4cbb9bf1ba113e965f 100644 (file)
@@ -135,7 +135,7 @@ AliFemtoString AliFemtoShareQualityCorrFctn::Report(){
 //____________________________
 void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
   // add real (effect) pair
-  //  double tQinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
+  double tQinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
   Int_t nh = 0;
   Int_t an = 0;
   Int_t ns = 0;
@@ -195,49 +195,57 @@ void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
     hsfval = ns*1.0/nh;
   }
 
-//   if ((tQinv < 0.01) && (hsmval<-0.46)) {
-//     cout << "Quality  Sharity " << hsmval << " " << hsfval << " " << pair->Track1()->Track() << " " << pair->Track2()->Track() << endl;
-//     cout << "Qinv of the pair is " << tQinv << endl;
-//     cout << "Clusters: " << endl;
-//     for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
-//       cout << imap ;
-//       if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
-//       else cout << " 0 " ;
-//       if (pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
-//       else cout << " 0 " ;
-//       cout << "     ";
-//       if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
-//       else cout << " X ";
-//       if (pair->Track2()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
-//       else cout << " X ";
-//       cout << endl;
-//     }
-//     cout << "Momentum1 " 
-//      << pair->Track1()->Track()->P().x() << " " 
-//      << pair->Track1()->Track()->P().y() << " "  
-//      << pair->Track1()->Track()->P().z() << " "  
-//      << pair->Track1()->Track()->Label() << " "  
-//      << pair->Track1()->Track()->TrackId() << " "  
-//      << pair->Track1()->Track()->Flags() << " "
-//      << pair->Track1()->Track()->KinkIndex(0) << " "
-//      << pair->Track1()->Track()->KinkIndex(1) << " "
-//      << pair->Track1()->Track()->KinkIndex(2) << " "
-//      << endl;
-//     cout << "Momentum2 " 
-//      << pair->Track2()->Track()->P().x() << " "  
-//      << pair->Track2()->Track()->P().y() << " "  
-//      << pair->Track2()->Track()->P().z() << " "  
-//      << pair->Track2()->Track()->Label() << " "  
-//      << pair->Track2()->Track()->TrackId() << " "  
-//      << pair->Track2()->Track()->Flags() << " " 
-//      << pair->Track2()->Track()->KinkIndex(0) << " "
-//      << pair->Track2()->Track()->KinkIndex(1) << " "
-//      << pair->Track2()->Track()->KinkIndex(2) << " "
-//      << endl;
-//   }
+  if ((tQinv < 0.005) && (hsmval<-0.0)) {
+    cout << "Quality  Sharity " << hsmval << " " << hsfval << " " << pair->Track1()->Track() << " " << pair->Track2()->Track() << endl;
+    cout << "Qinv of the pair is " << tQinv << endl;
+    cout << "Clusters: " << endl;
+    for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
+      cout << imap ;
+      if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
+      else cout << " 0 " ;
+      if (pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) cout << " 1 ";
+      else cout << " 0 " ;
+      cout << "     ";
+      if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
+      else cout << " X ";
+      if (pair->Track2()->Track()->TPCsharing().TestBitNumber(imap)) cout << " S ";
+      else cout << " X ";
+      cout << endl;
+    }
+    cout << "Momentum1 " 
+        << pair->Track1()->Track()->P().x() << " " 
+        << pair->Track1()->Track()->P().y() << " "  
+        << pair->Track1()->Track()->P().z() << " "  
+        << pair->Track1()->Track()->Label() << " "  
+        << pair->Track1()->Track()->TrackId() << " "  
+        << pair->Track1()->Track()->Flags() << " "
+        << pair->Track1()->Track()->KinkIndex(0) << " "
+        << pair->Track1()->Track()->KinkIndex(1) << " "
+        << pair->Track1()->Track()->KinkIndex(2) << " "
+        << pair->Track1()->Track()->ITSchi2() << " "
+        << pair->Track1()->Track()->ITSncls() << " "
+        << pair->Track1()->Track()->TPCchi2() << " "
+        << pair->Track1()->Track()->TPCncls() << " "
+        << endl;
+    cout << "Momentum2 " 
+        << pair->Track2()->Track()->P().x() << " "  
+        << pair->Track2()->Track()->P().y() << " "  
+        << pair->Track2()->Track()->P().z() << " "  
+        << pair->Track2()->Track()->Label() << " "  
+        << pair->Track2()->Track()->TrackId() << " "  
+        << pair->Track2()->Track()->Flags() << " " 
+        << pair->Track2()->Track()->KinkIndex(0) << " "
+        << pair->Track2()->Track()->KinkIndex(1) << " "
+        << pair->Track2()->Track()->KinkIndex(2) << " "
+        << pair->Track2()->Track()->ITSchi2() << " "
+        << pair->Track2()->Track()->ITSncls() << " "
+        << pair->Track2()->Track()->TPCchi2() << " "
+        << pair->Track2()->Track()->TPCncls() << " "
+        << endl;
+  }
 
-//   fShareNumerator->Fill(tQinv, hsfval);
-//   fQualityNumerator->Fill(tQinv, hsmval);
+  fShareNumerator->Fill(tQinv, hsfval);
+  fQualityNumerator->Fill(tQinv, hsmval);
   //  cout << "AliFemtoShareQualityCorrFctn::AddRealPair : " << pair->qInv() << " " << tQinv <<
   //" " << pair->Track1().FourMomentum() << " " << pair->Track2().FourMomentum() << endl;
 }
@@ -296,9 +304,23 @@ void AliFemtoShareQualityCorrFctn::AddMixedPair( AliFemtoPair* pair){
 
 void AliFemtoShareQualityCorrFctn::WriteHistos()
 {
+  // Write out result histograms
   fShareNumerator->Write();
   fShareDenominator->Write();
   fQualityNumerator->Write();
   fQualityDenominator->Write();
   
 }
+//______________________________
+TList* AliFemtoShareQualityCorrFctn::GetOutputList()
+{
+  // Prepare the list of objects to be written to the output
+  TList *tOutputList = new TList();
+
+  tOutputList->Add(fShareNumerator); 
+  tOutputList->Add(fShareDenominator);  
+  tOutputList->Add(fQualityNumerator);  
+  tOutputList->Add(fQualityDenominator);  
+
+  return tOutputList;
+}