StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcAnalysisMaker.h
1 /**********************************************
2  *
3  * $Id: StMcAnalysisMaker.h,v 1.12 2015/03/13 18:44:50 perev Exp $
4  * $Log: StMcAnalysisMaker.h,v $
5  * Revision 1.12 2015/03/13 18:44:50 perev
6  * Roll back
7  *
8  * Revision 1.10 2014/08/06 11:43:26 jeromel
9  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
10  *
11  * Revision 1.9 2005/11/22 21:51:53 fisyak
12  * Add NTuple for svt and ssd hit
13  *
14  * Revision 1.8 2004/01/13 21:06:04 fisyak
15  * Add TpcHitNtuple usind IdTruth info
16  *
17  * Revision 1.7 2003/09/10 19:47:22 perev
18  * ansi corrs
19  *
20  * Revision 1.6 2000/04/20 16:59:47 calderon
21  * Pick up the makers with the new names
22  * Change the name from "McAnalysis" to "StMcAnalysisMaker"
23  * No longer use the helix, use the primary track momentum when available
24  * (also avoids dependency on StEventSummary)
25  * Denominator for mom. resolution histograms is now simulated momentum.
26  *
27  * Revision 1.5 1999/09/10 19:11:15 calderon
28  * Write the Ntuple in StMcAnalysisMaker into a file.
29  * This way it can be accessed after the macro finishes,
30  * otherwise it gets deleted.
31  *
32  * Revision 1.4 1999/09/09 23:59:38 calderon
33  * Made the following changes:
34  *
35  * -book histograms and ntuple in Init()
36  * -do not delete the histograms, they are supposed to be
37  * deleted automatically by the chain
38  * -don't create the canvas here, now done in the macro
39  *
40  * Revision 1.3 1999/07/29 15:08:33 calderon
41  * Include Mom. Resolution example (Histograms & Ntuple)
42  *
43  * Revision 1.2 1999/07/28 20:27:30 calderon
44  * Version with SL99f libraries
45  *
46  *
47  * Examples to use the structures from
48  * StMcEvent and StAssociationMaker
49  *
50  **********************************************/
51 
52 #ifndef StMcAnalysisMaker_HH
53 #define StMcAnalysisMaker_HH
54 
55 #ifndef StMaker_H
56 #include "StMaker.h"
57 #endif
58 
59 // - if not using the methods of the class, then we can just put class TCanvas;
60 // - however, if we are using the methods of TCanvas, then #include "TCanvas.h"
61 
62 class TH1F;
63 class TH2F;
64 class TFile;
65 class TNtuple;
66 class TCanvas;
67 
68 
69 class StMcAnalysisMaker : public StMaker {
70 
71  public:
72 
73  StMaker* currentChain;
74  StMcAnalysisMaker(const char* name = "StMcAnalysisMaker",
75  const char* title = "event/StMcAnalysisMaker");
76  virtual ~StMcAnalysisMaker();
77  virtual void Clear(const char* opt="");
78  virtual Int_t Init();
79  virtual Int_t Make();
80  virtual Int_t Finish();
81 
82  // SetZones --> divide canvas into 2 x 2 zones
83  virtual void SetZones(Int_t columns=2, Int_t rows=2);
84 
85  TH1F* mMomResolution;
89  TH2F* coordRec;
91  TFile* mNtupleFile;
92  TNtuple* mTrackNtuple;
93  TNtuple* mTpcHitNtuple;
94  TNtuple* mSvtHitNtuple;
95  TNtuple* mSsdHitNtuple;
96  // Data-members to make up the output Canvases
97  TCanvas* mAssociationCanvas;
98  Int_t mPadColumns; // Number of the columns (TPad's) on the single Canvas
99  Int_t mPadRows; // Number of the rows (TPad's) on the single Canvas
100 
101 private:
102 
103  Bool_t drawinit;
104 
106  static const Int_t mNumDeltaX;
107  static const Int_t mNumDeltaZ;
108  static const Float_t mMinDeltaX;
109  static const Float_t mMaxDeltaX;
110  static const Float_t mMinDeltaZ;
111  static const Float_t mMaxDeltaZ;
112 
113  virtual const char* GetCVS() const
114  {static const char cvs[]="Tag $Name: $ $Id: StMcAnalysisMaker.h,v 1.12 2015/03/13 18:44:50 perev Exp $ built " __DATE__ " " __TIME__; return cvs;}
115 
116  // the following is a ROOT macro that is needed in all ROOT accessible code
117  ClassDef(StMcAnalysisMaker,0)
118 
119 };
120 
121 inline void StMcAnalysisMaker::SetZones(Int_t columns, Int_t rows){ mPadColumns =columns; mPadRows = rows;}
122 
123 #endif
TH2F * coordRec
Diff. between x and z coordinates of the hits.
TNtuple * mTpcHitNtuple
Miscellaneous info of the track pairs.
virtual Int_t Make()
virtual Int_t Finish()
TCanvas * mAssociationCanvas
Miscellaneous info of the TPC hit pairs.
TNtuple * mTrackNtuple
File to contain the mTrackNtuple, otherwise it is deleted!
TH2F * mSvtHitResolution
Diff. between x and z coordinates of the hits.
TFile * mNtupleFile
X and Y coord of MC Track.
TNtuple * mSsdHitNtuple
Miscellaneous info of the TPC hit pairs.
TH2F * coordMcPartner
X and Y coord of rec. Track.
TH2F * mHitResolution
Diff. between p of rec. & Monte Carlo, in %.
TH2F * mSsdHitResolution
Diff. between x and z coordinates of the hits.
TNtuple * mSvtHitNtuple
Miscellaneous info of the TPC hit pairs.