/* Copyright 2008-2010, Technische Universitaet Muenchen, Authors: Christian Hoeppner & Sebastian Neubert This file is part of GENFIT. GENFIT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GENFIT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GENFIT. If not, see . */ /** @addtogroup genfit * @{ */ #ifndef GFTRACKCAND_H #define GFTRACKCAND_H #include #include #include #include "assert.h" #include "TObject.h" #include "TVector3.h" /** @brief Track candidate -- a list of cluster indices * * @author Christian Höppner (Technische Universität München, original author) * @author Sebastian Neubert (Technische Universität München, original author) * * The main task of the GFTrackCand object is to store a list of indices to * cluster objects. Each cluster in the Track is identified by it's * detector ID and it's index in the corresponding TClonesArray. * Also there is a ordering parameter rho, to order hits. * Optionally, plane indices for the hits can be stored (most importantly * for fitting with the GFDaf). * This information is used by the RecoHitFactory to automatically load * RecoHits into a Track. Through this it is possible to define Tracks over * an arbitrary number of different detectors. * * In addition GFTrackCand offers members to store starting values for the fit. * However this information is not autmatically used in genfit!!! * But a pointer to a GFTrackCand can be passed to the RKTrackRep to make use of this information. * * @sa RecoHitFactory */ class GFTrackCand : public TObject { public: // Constructors/Destructors --------- GFTrackCand(); ~GFTrackCand(); /** @brief Initializing constructor * * @param curv Curvature from prefit. There is no stringent definition what * this parameter means at the moment. * @param dip Dip angle from prefit. There is no stringent definition what * this parameter means at the moment. * @param inv Dummy paramter. Has been used to mark inverted tracks * in the past. * @param detIDs collection of detector IDs. Each detector ID needs * a corresponding GFRecoHitProducer. See RecoHitFactory for details. * @param hitIDs collection of hit indices. */ GFTrackCand(double curv, double dip, double inv, std::vector detIDs, std::vector hitIDs); /* @brief same as previous ctor, but with ordering parameters */ GFTrackCand(double curv, double dip, double inv, std::vector detIDs, std::vector hitIDs, std::vector rhos); /* @brief == operator does not check for rho */ friend bool operator== (const GFTrackCand& lhs, const GFTrackCand& rhs); // Accessors ----------------------- /** @brief Get detector ID and cluster index (hitId) for hit number i */ void getHit(unsigned int i, unsigned int& detId, unsigned int& hitId) const { assert(i GetHitIDs(int detId=-1); std::vector GetDetIDs() const {return fDetId;} std::vector GetRhos() const {return fRho;} std::set GetUniqueDetIDs() const { std::set retVal; for(unsigned int i=0;i fDetId; std::vector fHitId; std::vector fPlaneId; std::vector fRho; double fCurv; // curvature from pattern reco double fDip; // dip angle from pattern reco bool fInv; // true if inverted track TVector3 fPosSeed; //seed value for the track: pos TVector3 fDirSeed; //direction TVector3 fPosError; //error on position seed given as a standard deviation TVector3 fDirError; //error on direction seed given as a standard deviation double fQoverpSeed; //q/p int fMcTrackId; //if MC simulation, store the mct track id here int fPdg; // particle data groupe's id for a particle // Private Methods ----------------- public: ClassDef(GFTrackCand,5) }; #endif /** @} */