Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:13:29

0001 /*!
0002  *  \file     AnaMvtxTelescopeHits.h
0003  *  \brief    Analyze Mvtx 4 ladder cosmic telescope in simulations
0004  *  \details  Analyze simulations of hits in the 4 ladder
0005  *            Mvtx cosimic ray telescope
0006  *  \author   Darren McGlinchey
0007  */
0008 
0009 #ifndef __AnaMvtxTelescopeHits_H__
0010 #define __AnaMvtxTelescopeHits_H__
0011 
0012 // --- need to check all these includes...
0013 #include <fun4all/SubsysReco.h>
0014 // #include <GenFit/GFRaveVertex.h>
0015 // #include <GenFit/Track.h>
0016 #include <string>
0017 #include <vector>
0018 #include <map>
0019 
0020 #include "TMath.h"
0021 
0022 class SvtxTrack;
0023 class SvtxTrackMap;
0024 class SvtxVertexMap;
0025 class SvtxVertex;
0026 class PHCompositeNode;
0027 class PHG4TruthInfoContainer;
0028 class SvtxClusterMap;
0029 class SvtxCluster;
0030 class SvtxEvalStack;
0031 class JetMap;
0032 
0033 class TFile;
0034 class TTree;
0035 class TH1D;
0036 class TH2D;
0037 
0038 
0039 typedef std::vector<SvtxCluster*> ClusVec;
0040 typedef std::vector<ClusVec> TrkVec;
0041 typedef std::multimap<unsigned int, SvtxCluster*> LyrClusMap;
0042 
0043 
0044 class AnaMvtxTelescopeHits: public SubsysReco {
0045 
0046 public:
0047 
0048   AnaMvtxTelescopeHits(const std::string &name = "AnaMvtxTelescopeHits",
0049                const std::string &ofName = "out.root");
0050 
0051   int Init(PHCompositeNode*);
0052   int InitRun(PHCompositeNode*);
0053   int process_event(PHCompositeNode*);
0054   int End(PHCompositeNode*);
0055 
0056 private:
0057 
0058   //-- Functions
0059   int GetNodes(PHCompositeNode *);   //! Get all nodes
0060 
0061   // PHGenFit::Track* MakeGenFitTrack(PHCompositeNode *, 
0062   //                                  const SvtxTrack* intrack, 
0063   //                                  const SvtxVertex* vertex);
0064 
0065   // int GetTrackCandidates(LyrClusMap* clusmap, TrkVec* trkvec);
0066 
0067   // void LinkClusters(ClusVec* trk, unsigned int next_lyr, LyrClusMap* clusmap, TrkVec* trkvec);
0068 
0069   // ClusVec ChooseBestTrk(TrkVec* trkcnd);
0070 
0071   // double FitTrk(ClusVec* trk);
0072 
0073   double CalcSlope(double x0, double y0, double x1, double y1);
0074   double CalcIntecept(double x0, double y0, double m);
0075   double CalcProjection(double x, double m, double b);
0076   //-- Nodes
0077   SvtxClusterMap* _clustermap;
0078 
0079   //-- Flags
0080 
0081 
0082   //-- Output
0083   std::string _foutname;  
0084   TFile *_f;
0085 
0086   TH1D* hlayer;
0087   TH1D* hsize_phi[4];
0088   TH1D* hsize_z[4]; 
0089   TH2D* hphiz[4];
0090   TH1D* hdphi[4];
0091   TH1D* hdz[4];
0092 
0093 
0094   //-- internal variables
0095   int _ievent;
0096 
0097 
0098 };
0099 
0100 #endif // __AnaMvtxTelescopeHits_H__