ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » (UNKNOWN) » HMdcVertexWriter

class HMdcVertexWriter: public HReconstructor

_HADES_CLASS_DESCRIPTION


 HMdcVertexWriter

 This class writes the reconstructed Event vertex to an root output file
 which will be later used for the preparation of the simulations files for
 the event embeddding. The class has to connect last to the task list to not
 write out skipped events.

 Output file name :
 1. If the outputfile is set in HADES it will be equal outputfile_vertex.root.
    The file will be splitted in the same way as the the root output file.
 2. If the outputdir is set filenames are derived in the same way but the dir
    corresponds to the set one.
 3. If no outputdir is set and no output file is set in HADES the outputfile
    will be equal to the current inputfile_vertex.root
 4. if setOutputFile( filename_includingpath) is used all automatic derivation
    from HADES input or outputfile name is disabled (manual mode, use this when
    running from HRootSource)

  static void HMdcVertexWriter::setSkipNoVertex (Bool_t skip = kTRUE){doSkipNoVertex = skip; }
  With doSkipNoVertex == kTRUE (default : kTRUE) events without calculated vertex will be skipped.

  with setVertexType(Int_t type)
  kVertexCluster  = 1,(cluster finder vertex (mean middle of target segment position in z, x,y on 0,0))
  kVertexSegment  = 2 (Mdc inner segments used to estimated the vertex,default),
  kVertexParticle = 3 (fully reconstructed and sorted HParticleCand used to estimate the vertex),
  kVertexClusterMeanXY = 4 (user provided mean x,y, z from vertexCluster)
  kVertexGeant         = 5 (use primary vertex from HGeant)
  the reconstructed vertex type can be selected.
  with void setUserSelectionEvent(Bool_t (*function)(TObjArray* ),TObjArray* params=0) the user
  can set a event selection function of the form

  Bool_t myEventSelection(TObjArray* params){

   if(goodEvent) return kTRUE;
   else          return kFALSE;
 }

  where params cand be used to pass parameters for the used
  event selection. The event selection should be used in combination
  with setSkipNoVertex(kTRUE)

Function Members (Methods)

public:
HMdcVertexWriter()
HMdcVertexWriter(const Text_t* name, const Text_t* title)
virtual~HMdcVertexWriter()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidHReconstructor::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Bool_tHReconstructor::connectTask(HTask* task, Int_t n = 0)
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual Int_texecute()
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual Bool_tfinalize()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual HTask*HReconstructor::getComposite()
virtual voidHReconstructor::getConnections()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual HTask*HTask::getOwner()
TObjArrayHReconstructor::getTable()
virtual HTask*HReconstructor::getTask(const Char_t* name)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual Bool_tinit()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tHReconstructor::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual voidHReconstructor::isTimed(Bool_t flag = kTRUE)
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual HTask*HReconstructor::next(Int_t& errCode)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HTask&HTask::operator=(const HTask&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidHReconstructor::printTimer()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Bool_tHTask::reinit()
voidTObject::ResetBit(UInt_t f)
virtual voidHReconstructor::resetTimer()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidHReconstructor::setActive(Bool_t state)MENU
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual Bool_tHTask::setConnections()
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidHTask::setManual()
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetOutputDir(TString dir = "")
voidsetOutputFile(TString file = "")
virtual voidHTask::setOwner(HTask* atask)
static voidsetSkipNoVertex(Bool_t skip = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetUserEventSelection(Bool_t (*)(TObjArray*) function, TObjArray* params = 0)
static voidsetVertexType(Int_t type, Double_t meanx = -1000., Double_t meany = -1000.)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

protected:
static Bool_tdoSkipNoVertex== kTRUE skip no vertex even if it is not calculated (default: KFALSE)
Bool_tHReconstructor::fActiveActive flag
TList*HReconstructor::fHistogramsList of histograms generated by this reconstructor.
Bool_tHTask::fIsTimedtimer flag
static Double_tfMeanXmean position of Vertex in x direction (used in vertextype = 4)
static Double_tfMeanYmean position of Vertex in y direction (used in vertextype = 4)
TStringTNamed::fNameobject identifier
TObjArrayHReconstructor::fOutputs
TStopwatchHReconstructor::fTimerTask timer
TStringTNamed::fTitleobject title
Bool_tfileNameFromInputflag to remember if filename was created from input or outputfile
Bool_tfileNameManualoutputfile set by hand
TStringfilename
Bool_tHTask::isConnected
Bool_tisEmbeddingflag to check if embedding mode is on
Bool_tHTask::isInitialised
Bool_tHTask::manual
TFile*outfilepointer to root file
TStringoutputdiroutputdirectory (optional)
HTask*HTask::owner
TObjArray*pUserParamsuser params for event selection
Bool_t (*)(TObjArray*)pUserSelectEvent! user provided function pointer to lepton selection
TNtuple*vertexpointer to vertex ntuple
static Int_tvertextypekVertexCluster= 1, kVertexSegment = 2 (segments), kVertexParticle = 3 , kVertexClustMeanXY = 4 , kVertexGeant = 5

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcVertexWriter(void)
 Default constructor .
HMdcVertexWriter(const Text_t* name, const Text_t* title)
 Constructor calls the constructor of class HReconstructor with the name
 and the title as arguments.
~HMdcVertexWriter(void)
 destructor close output if still open
Bool_t init(void)
 init the ascii io ofstream with filename
 taken from the current file of the data source
 The file name will be checked inside the eventloop
 against the HADES outputfile.
Int_t execute(void)
 check if the root output file should be changed (taking
 the file name from the HADES out put file). The coordinates
 of the Event Vertex will be written to the root file output.
Bool_t finalize(void)
 close the root file ouput
void setSkipNoVertex(Bool_t skip = kTRUE)
{ doSkipNoVertex = skip; }
void setVertexType(Int_t type, Double_t meanx = -1000., Double_t meany = -1000.)
void setOutputDir(TString dir = "")
{ outputdir = dir; }
void setOutputFile(TString file = "")
{ filename = gSystem->BaseName(file.Data()); outputdir = gSystem->DirName(file.Data()); fileNameManual = kTRUE ;}
void setUserEventSelection(Bool_t (*)(TObjArray*) function, TObjArray* params = 0)
{ pUserSelectEvent = function; pUserParams=params;}