]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New vertexer class for setting the interaction vertex in TED or TDI positions, to...
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Aug 2008 16:38:14 +0000 (16:38 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Aug 2008 16:38:14 +0000 (16:38 +0000)
ITS/AliITSRecoParam.h
ITS/AliITSReconstructor.cxx
ITS/AliITSVertexerFixed.cxx [new file with mode: 0644]
ITS/AliITSVertexerFixed.h [new file with mode: 0644]
ITS/ITSrecLinkDef.h
ITS/libITSrec.pkg

index a6d5fcc7b67101a844e256d8a166458b4a6de985..7db02742364d67ae9e7da3e240b196c2b479ea26 100644 (file)
@@ -78,6 +78,8 @@ class AliITSRecoParam : public AliDetectorRecoParam
   void     SetVertexerCosmics() { SetVertexer(2); }
   void     SetVertexerIons() { SetVertexer(3); }
   void     SetVertexerSmearMC() { SetVertexer(4); }
+  void     SetVertexerFixedOnTDI() {SetVertexer(5);} // for injection tests
+  void     SetVertexerFixedOnTED() {SetVertexer(6);} // for injection tests
   Int_t    GetVertexer() const { return fVertexer; }
   void     SetClusterFinder(Int_t cf=0) { fClusterFinder=cf; }
   void     SetClusterFinderV2() { SetClusterFinder(0); }
index 789d9411906c4a125c0aca1c1d6633c94aff6c66..aae6b120c3b5a29fd8b6a59f262355e4ea20b508 100644 (file)
@@ -33,6 +33,7 @@
 #include "AliITStrackerSA.h"
 #include "AliITSVertexerIons.h"
 #include "AliITSVertexerFast.h"
+#include "AliITSVertexerFixed.h"
 #include "AliITSVertexer3D.h"
 #include "AliITSVertexerZ.h"
 #include "AliITSVertexerCosmics.h"
@@ -185,6 +186,14 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
     Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n");
     return new AliITSVertexerCosmics();
   }
+  if(vtxOpt==5){ 
+    Info("CreateVertexer","vertex is fixed in the position of the TDI\n");
+    return new AliITSVertexerFixed("TDI");
+  }
+  if(vtxOpt==6){ 
+    Info("CreateVertexer","vertex is fixed in the position of the TED\n");
+    return new AliITSVertexerFixed("TED");
+  }
   // by default an AliITSVertexer3D object is instatiated
   Info("CreateVertexer","a AliITSVertexer3D object has been selected\n");
   AliITSVertexer3D*  vtxr = new AliITSVertexer3D();
diff --git a/ITS/AliITSVertexerFixed.cxx b/ITS/AliITSVertexerFixed.cxx
new file mode 100644 (file)
index 0000000..095b847
--- /dev/null
@@ -0,0 +1,91 @@
+/**************************************************************************
+ * 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 <Riostream.h>
+#include "AliESDVertex.h"
+#include "AliLog.h"
+#include <TString.h>
+#include "AliITSVertexerFixed.h"
+
+/////////////////////////////////////////////////////////////////////////
+//                                                                     //
+// Fixed vertexer - creates a vertex in a defined postion (x,y,z)      //
+// the standard contructor takes a sting to specify the case           //
+// Useful for reconstruction of injection tests with beam on TDI       //
+//                                                                     //
+/////////////////////////////////////////////////////////////////////////
+
+ClassImp(AliITSVertexerFixed)
+
+
+
+//______________________________________________________________________
+AliITSVertexerFixed::AliITSVertexerFixed():AliITSVertexer()
+{
+  // Default Constructor
+  AliWarning("This contructor sets the vertex in (0,0,0)");
+  for(Int_t k=0; k<3;k++){ 
+    fVtxPos[k]=0.;
+    fVtxErr[k]=0.5;  
+  }
+}
+
+//______________________________________________________________________
+AliITSVertexerFixed::AliITSVertexerFixed(TString option):AliITSVertexer()
+{
+  // Standard constructor
+  if(option.Contains("TDI")){
+    fVtxPos[0]=0.;
+    fVtxPos[1]=0.;
+    fVtxPos[2]=8000.;  // TDI at z=80 m
+    fVtxErr[0]=1.;
+    fVtxErr[1]=1.;
+    fVtxErr[2]=100.;   
+   }
+  else if(option.Contains("TED")){
+    fVtxPos[0]=0.;
+    fVtxPos[1]=0.;
+    fVtxPos[2]=34000.;  // TED at z=+340 m
+    fVtxErr[0]=1.;
+    fVtxErr[1]=1.;
+    fVtxErr[2]=100.;   
+  }else{
+    AliError(Form("%s is invalid, sets the vertex in (0,0,0)",option.Data()));
+    for(Int_t k=0; k<3;k++){ 
+      fVtxPos[k]=0.;
+      fVtxErr[k]=0.5;  
+    }
+  }
+}
+
+
+//______________________________________________________________________
+AliESDVertex* AliITSVertexerFixed::FindVertexForCurrentEvent(TTree * /*itsClusterTree */){
+  // Defines the AliITSVertex for the current event
+  
+  fCurrentVertex = new AliESDVertex(fVtxPos,fVtxErr,"Fixed Vertex");
+  return fCurrentVertex;
+  
+}
+
+//________________________________________________________
+void AliITSVertexerFixed::PrintStatus() const {
+  // Print current status
+  cout <<"=======================================================\n";
+
+  cout<<"Fixed positions: ";
+  for(Int_t k=0;k<3;k++)cout<<" "<<fVtxPos[k]<<"+-"<<fVtxErr[k];
+  cout<<endl;
+}
+
diff --git a/ITS/AliITSVertexerFixed.h b/ITS/AliITSVertexerFixed.h
new file mode 100644 (file)
index 0000000..d24fe73
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef ALIITSVERTEXERFIXED_H
+#define ALIITSVERTEXERFIXED_H
+/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/*$Id $*/
+
+#include <AliITSVertexer.h>
+class TString;
+
+///////////////////////////////////////////////////////////////////////
+//                                                                   //
+// Create vertex in fixed position (e.g. TDI for injection tests)    //
+// Origin: M. Masera, F. Prino (masera@to.infn.it, prino@to.infn.it) //
+//                                                                   //
+///////////////////////////////////////////////////////////////////////
+
+
+class AliITSVertexerFixed : public AliITSVertexer {
+
+ public:
+  AliITSVertexerFixed();
+  AliITSVertexerFixed(TString option);
+  virtual AliESDVertex* FindVertexForCurrentEvent(TTree* /* itsClusterTree */ );
+  void SetVtxPosition(Double_t pos[3]){
+    for(Int_t k=0; k<3;k++) fVtxPos[k]=pos[k];
+  }
+  void SetVtxError(Double_t err[3]){
+    for(Int_t k=0; k<3;k++) fVtxErr[k]=err[k];
+  }
+
+  virtual void PrintStatus() const;
+
+ private:
+  Double_t fVtxPos[3];    // vertex coordinates
+  Double_t fVtxErr[3];    // vertex errors
+
+
+
+ClassDef(AliITSVertexerFixed,0);
+};
+
+#endif
index 89ca88bc9ae3b02a940b7e1988760d86717884a6..6858342f0f5a9bc5b5cb3f18797c3633fc033f21 100644 (file)
@@ -45,6 +45,8 @@
 #pragma link C++ class  AliITSVertexerZ+;
 #pragma link C++ class  AliITSVertexer3D+;
 #pragma link C++ class  AliITSVertexer3DTapan+;
+#pragma link C++ class AliITSVertexerFast+;
+#pragma link C++ class AliITSVertexerFixed+;
 #pragma link C++ class  AliITSMeanVertexer+;
 #pragma link C++ class  AliITSZPoint+;
 
@@ -60,7 +62,6 @@
 #pragma link C++ class AliITSclusterTable+;
 #pragma link C++ class AliITStrackerSA+;
 #pragma link C++ class AliITStrackSA+;
-#pragma link C++ class AliITSVertexerFast+;
 #pragma link C++ class AliITSReconstructor+;
 #pragma link C++ class AliITSRecoParam+;
 #pragma link C++ class AliITSClusterFinderV2+;
index 8e722a08d9f564bf36556aaf84059127af86e268..db1bcc4f98a4d9cbfdbb1f68ec814bc3b9eb1684 100644 (file)
@@ -26,6 +26,7 @@ SRCS =        AliITSDetTypeRec.cxx \
                AliITSVertexer3D.cxx \
                AliITSVertexerZ.cxx \
                AliITSVertexerFast.cxx \
+               AliITSVertexerFixed.cxx \
                AliITSVertexer3DTapan.cxx \
                AliITSMeanVertexer.cxx \
                AliITSZPoint.cxx \