]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added dummy vertexer (meanSPDvertex will be added as a vertex).
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Nov 2013 17:30:55 +0000 (17:30 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Nov 2013 17:30:55 +0000 (17:30 +0000)
Extra data saved in the performance task

ITS/UPGRADE/AliITSUReconstructor.cxx
ITS/UPGRADE/AliITSUVertexer.cxx [new file with mode: 0644]
ITS/UPGRADE/AliITSUVertexer.h [new file with mode: 0644]
ITS/UPGRADE/CMakelibITSUpgradeRec.pkg
ITS/UPGRADE/ITSUpgradeRecLinkDef.h
ITS/UPGRADE/testITSU/AliTaskITSUPerf.cxx

index 0fe045cfb3fb0e23436e2fae3eb1dd0758f97c56..c089ea3938c4b1fb6b501536f8ddbbb6f68dcab4 100644 (file)
@@ -36,6 +36,7 @@
 #include "AliITSUDigitPix.h"
 #include "AliITSUClusterizer.h"
 #include "AliITSUClusterPix.h"
+#include "AliITSUVertexer.h"
 #include "AliMagF.h"
 
 ClassImp(AliITSUReconstructor)
@@ -191,10 +192,9 @@ AliVertexer* AliITSUReconstructor::CreateVertexer() const
 {
   // create a ITS vertexer
   // to be implemented for the upgrade
-
-  AliDebug(1,"ITSU vertexer should be initiated here\n");
-  return 0;
-
+  AliInfo("Creating dummy vertexer");
+  //  AliDebug(1,"ITSU vertexer should be initiated here\n");
+  return new AliITSUVertexer();
 }
 
 //_____________________________________________________________________________
diff --git a/ITS/UPGRADE/AliITSUVertexer.cxx b/ITS/UPGRADE/AliITSUVertexer.cxx
new file mode 100644 (file)
index 0000000..7d0604f
--- /dev/null
@@ -0,0 +1,51 @@
+/**************************************************************************
+ * Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+#include "AliITSUVertexer.h"
+#include "AliESDVertex.h"
+#include "AliLog.h"
+#include <TString.h>
+#include <TTree.h>
+
+/////////////////////////////////////////////////////////////////
+// THIS IS A DUMMY CLASS
+////////////////////////////////////////////////////////////////
+
+ClassImp(AliITSUVertexer)
+
+
+
+//______________________________________________________________________
+AliITSUVertexer::AliITSUVertexer():AliVertexer()
+{
+}
+
+
+//______________________________________________________________________
+AliITSUVertexer::~AliITSUVertexer() {
+  // Destructor
+}
+
+//______________________________________________________________________
+AliESDVertex* AliITSUVertexer::FindVertexForCurrentEvent(TTree *)
+{
+  Double_t startPos[3]={GetNominalPos()[0],GetNominalPos()[1],GetNominalPos()[2]};
+  Double_t startCov[6]={GetNominalCov()[0],GetNominalCov()[1],GetNominalCov()[2],
+                       GetNominalCov()[3],GetNominalCov()[4],GetNominalCov()[5]};
+  AliESDVertex* vtx = new AliESDVertex(startPos,startCov,99999.,-2);
+  AliInfo("Creating dummy vertex from the mean vertex");
+  vtx->Print();
+  return vtx;
+}  
+
diff --git a/ITS/UPGRADE/AliITSUVertexer.h b/ITS/UPGRADE/AliITSUVertexer.h
new file mode 100644 (file)
index 0000000..1b576e5
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef ALIITSUVERTEXERZ_H
+#define ALIITSUVERTEXERZ_H
+
+#include<AliVertexer.h>
+
+///////////////////////////////////////////////////////////////////
+//                                                               //
+// Dummy vertexer plugin                                         //
+//                                                               //
+///////////////////////////////////////////////////////////////////
+
+class AliESDVertex;
+
+class AliITSUVertexer : public AliVertexer {
+
+ public:
+  AliITSUVertexer();
+  virtual ~AliITSUVertexer();
+  virtual AliESDVertex* FindVertexForCurrentEvent(TTree *itsClusterTree);
+  void PrintStatus() const {}
+
+ protected:
+
+ private:
+  AliITSUVertexer(const AliITSUVertexer& vtxr);
+  AliITSUVertexer& operator=(const AliITSUVertexer& vtxr );
+
+  ClassDef(AliITSUVertexer,1 );
+};
+
+#endif
index 13cb1ab64972a380f6701eb2883cbd94563b2bc7..7fbdc4401094addfb4dc7faca77456055a8df14c 100644 (file)
@@ -39,6 +39,7 @@ set ( SRCS
     AliITSUTrackCond.cxx
     AliITSUTrackHyp.cxx
     AliITSUMatLUT.cxx
+    AliITSUVertexer.cxx
 
 #
 #    v0/AliITSlayerUpgrade.cxx 
index 18a6d318013acffe4fac45e57dc5627ea32dda31..daaa8489075f1a287cde00af50845d235ad08bfe 100644 (file)
@@ -25,6 +25,7 @@
 #pragma link C++ class AliITSUTrackCond+;
 #pragma link C++ class AliITSUTrackHyp+;
 #pragma link C++ class AliITSUMatLUT+;
+#pragma link C++ class AliITSUVertexer+;
 
 //
 
index 53025d9c40f87b2837b2ab2d5d31bb44887cb784..cbbbe2038ea6c21ccf39ab0ed3297f15161a72e5 100644 (file)
@@ -87,21 +87,26 @@ typedef struct {
   Char_t  mcCl[7];
   Char_t  rcCl[7];
   Char_t  fcCl[7];
-  Float_t qCl[7];
   Char_t  charge;
+  Float_t zV;
   Float_t ptMC;
   Float_t etaMC;
   Float_t pt;
   Float_t eta;
+  Float_t ptTPC;
+  Float_t etaTPC;
   Float_t dcaR;
   Float_t dcaZ;
   Float_t dcaRE;
   Float_t dcaZE;
   Float_t ptE;
+  Float_t ptTPCE;
   Float_t phi;
   Int_t   pdg;
   Int_t   lbl;
+  Int_t   lblTPC;
   Int_t   spl;
+  Int_t   evID;
 } trInfo_t;
 
 trInfo_t trackInfo;
@@ -222,21 +227,26 @@ void AliTaskITSUPerf::UserCreateOutputObjects()
   fTree->Branch("mcCl",&trackInfo.mcCl,"mcCl[7]/b");
   fTree->Branch("rcCl",&trackInfo.rcCl,"rcCl[7]/b");
   fTree->Branch("fcCl",&trackInfo.fcCl,"fcCl[7]/b");
-  fTree->Branch("qCl" ,&trackInfo.qCl,  "qCl[7]/F");
   fTree->Branch("charge",&trackInfo.charge,"charge/B");
+  fTree->Branch("zV",    &trackInfo.zV,"zV/F");
   fTree->Branch("ptMC",  &trackInfo.ptMC,"ptMC/F");
   fTree->Branch("etaMC", &trackInfo.etaMC,"etaMC/F");
   fTree->Branch("pt",  &trackInfo.pt,"pt/F");
   fTree->Branch("eta", &trackInfo.eta,"eta/F");
+  fTree->Branch("ptTPC",  &trackInfo.ptTPC,"ptTPC/F");
+  fTree->Branch("etaTPC", &trackInfo.etaTPC,"etaTPC/F");
   fTree->Branch("dcaR", &trackInfo.dcaR,"dcaR/F");
   fTree->Branch("dcaZ", &trackInfo.dcaZ,"dcaZ/F");
   fTree->Branch("dcaRE", &trackInfo.dcaRE,"dcaRE/F");
   fTree->Branch("dcaZE", &trackInfo.dcaZE,"dcaZE/F");
   fTree->Branch("ptE",  &trackInfo.ptE,"ptE/F");
+  fTree->Branch("ptTPCE",  &trackInfo.ptTPCE,"ptTPCE/F");
   fTree->Branch("phi",  &trackInfo.phi,"phi/F");
-  fTree->Branch("pdf",  &trackInfo.pdg,"pdg/I");
+  fTree->Branch("pdg",  &trackInfo.pdg,"pdg/I");
   fTree->Branch("lbl",  &trackInfo.lbl,"lbl/I");
+  fTree->Branch("lblTPC",  &trackInfo.lblTPC,"lblTPC/I");
   fTree->Branch("spl",  &trackInfo.spl,"spl/I");
+  fTree->Branch("evID",  &trackInfo.evID,"evID/I");
   fOutput->Add(fTree);
   //
   fTPCCut = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
@@ -263,13 +273,13 @@ void AliTaskITSUPerf::UserExec(Option_t *)
   AliAnalysisManager* anMan = AliAnalysisManager::GetAnalysisManager();
   fRPTree = 0;
   AliESDInputHandlerRP *handRP = (AliESDInputHandlerRP*)anMan->GetInputEventHandler();
-  if (!handRP) { AliFatal("No Input handler"); return; }
+  if (!handRP) { AliFatal("No RP handler"); return; }
   //
   fESDEvent  = handRP->GetEvent();
   if (!fESDEvent) { AliFatal("No AliESDEvent"); return; }
   //
   fRPTree = handRP->GetTreeR("ITS");
-  if (!fRPTree) { AliWarning("No ITS cluster tree"); /*return;*/ }
+  if (!fRPTree) { AliWarning("Invalid ITS cluster tree"); }
   //
   AliMCEventHandler* eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
   if (!eventHandler) { AliFatal("Could not retrieve MC event handler"); return; }
@@ -430,6 +440,9 @@ void AliTaskITSUPerf::CheckTracks()
   // build mc truth info for tracks 
   Bool_t dump = kFALSE;
   Bool_t dump1 = kFALSE;
+  static int evid = 0;
+  trackInfo.evID = evid++;
+  trackInfo.zV   = fESDEvent->GetPrimaryVertex()->GetZ();
   //
   int ntr = fESDEvent->GetNumberOfTracks();
   int ntrMC = fStack->GetNtrack();
@@ -482,6 +495,7 @@ void AliTaskITSUPerf::CheckTracks()
     //
     if (fTree) {
       trackInfo.lbl = labMC;
+      trackInfo.lblTPC = labMCTPC;
       trackInfo.prim = (mcStatus&BIT(kMCPrimBit)) != 0;
       trackInfo.rcbl = !reject;
       trackInfo.nClITS = trc->GetNcls(0);
@@ -491,6 +505,9 @@ void AliTaskITSUPerf::CheckTracks()
       trackInfo.charge = trc->Charge();
       trackInfo.pt = trc->Pt();
       trackInfo.eta = trc->Eta();
+      //
+      
+      //
       trackInfo.spl = trc->GetITSModuleIndex(10);
       trackInfo.phi = part->Phi();    
       trackInfo.pdg = part->PdgCode();
@@ -498,32 +515,27 @@ void AliTaskITSUPerf::CheckTracks()
       trackInfo.dcaZ = dcaRZ[1];
       trackInfo.dcaRE = TMath::Sqrt(trc->GetSigmaY2());
       trackInfo.dcaZE = TMath::Sqrt(trc->GetSigmaZ2());
-      trackInfo.ptE   = TMath::Sqrt(trc->GetSigma1Pt2())*trackInfo.pt*trackInfo.pt;
+      trackInfo.ptE   = TMath::Sqrt(trc->GetSigma1Pt2());
+
+      const AliExternalTrackParam* ttpc = trc->GetTPCInnerParam();
+      if (ttpc) {
+       trackInfo.ptTPC = ttpc->Pt();
+       trackInfo.etaTPC = ttpc->Eta();
+       trackInfo.ptTPCE = TMath::Sqrt(ttpc->GetSigma1Pt2());//*ttpc->Pt()*ttpc->Pt();
+      }
+      else {
+       trackInfo.ptTPC = -1;
+       trackInfo.etaTPC = 0;
+       trackInfo.ptTPCE = -1;
+      }
       //
       trackInfo.nClITSMC = 0;
       for (int il=0;il<7;il++) {
        trackInfo.mcCl[il] = (mcStatus & (0x1<<(il+kITSHitBits))) != 0;
        if (trackInfo.mcCl[il]) trackInfo.nClITSMC++;
-       trackInfo.rcCl[il] = (fRPTree) ? 0 : trc->HasPointOnITSLayer(il); // when clusters are available, fill in the cl. loop
-       trackInfo.qCl[il]  = 0;
+       trackInfo.rcCl[il] = trc->HasPointOnITSLayer(il);
        trackInfo.fcCl[il] = trc->HasSharedPointOnITSLayer(il);
       }
-      int htc = 0,clID,lrID;
-      Int_t lrclID = 0;
-      // here we access clusters really attached to the track
-      if (fRPTree) {
-       while ( (lrclID=trc->GetITSModuleIndex(htc++))>=0 ) { // in principle, one can have >1 attached cluster/layer
-         clID = AliITSUAux::UnpackCluster(lrclID,lrID);
-         AliITSUClusterPix* cl = (AliITSUClusterPix*)fITS->GetLayerActive(lrID)->GetCluster(clID);
-         //    printf("cl%d on Lr%d id=%d: pack=%d Cl=%p Q=%d\n",htc,lrID,clID,lrclID,cl,cl ? cl->GetQ():0);
-         if (cl) {
-         trackInfo.rcCl[lrID]++;
-         trackInfo.qCl[lrID] += (Float_t)cl->GetQ();
-         }
-         else printf("Failed to fetch cluster: cl%d on Lr%d id=%d: pack=%d\n",htc,lrID,clID,lrclID);
-       }
-      }
-      //
       fTree->Fill();
     }
     if (reject) {