QwAnalysis
QwTreeEventBuffer.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*//*!
2 
3  \file QwTreeEventBuffer.h
4  \ingroup QwTracking
5 
6  \brief Definition of the class that reads simulated QweakSimG4 events
7 
8 *//*-------------------------------------------------------------------------*/
9 
10 #ifndef __QWEVENTTREEBUFFER__
11 #define __QWEVENTTREEBUFFER__
12 
13 // System headers
14 #include <vector>
15 using std::vector;
16 
17 // Boost math library for random number generation
18 #include <boost/random.hpp>
19 #include <boost/shared_ptr.hpp>
20 
21 // ROOT headers
22 #include "TROOT.h"
23 #include "TFile.h"
24 #include "TTree.h"
25 
26 // Qweak headers
27 #include "QwTypes.h"
28 #include "QwOptions.h"
29 #include "QwGeometry.h"
30 
31 // Definition of the reference detectors (## is concatenation)
32 #define REGION1_DETECTOR(chamber,var) fRegion1_Chamber ## chamber ## _WirePlane_ ## var
33 #define REGION2_DETECTOR(chamber,plane,var) fRegion2_Chamber ## chamber ## _WirePlane ## plane ## _ ## var
34 #define REGION3_DETECTOR(chamber,plane,var) fRegion3_Chamber ## chamber ## _WirePlane ## plane ## _ ## var
35 
36 // Forward declarations
37 class QwDetectorInfo;
38 class QwHit;
39 class QwHitContainer;
40 class QwTreeLine;
41 class QwPartialTrack;
42 class QwTrack;
43 class QwEvent;
44 
45 /**
46  * \class QwTreeEventBuffer
47  * \ingroup QwTracking
48  *
49  * \brief Read simulated QweakSimG4 events and generate hit lists
50  *
51  * The QwTreeEventBuffer reads simulated events from the ROOT file generated
52  * by the QweakSimG4 Geant4 Monte Carlo. From the positions at the wire planes
53  * it generates the appropriate hit lists that can then be used to benchmark
54  * the tracking code.
55  */
57 {
58  public:
59 
60  /// \brief Constructor with file name and spectrometer geometry
61  QwTreeEventBuffer(const QwGeometry& detector_info);
62  /// \brief Destructor
63  virtual ~QwTreeEventBuffer();
64 
65  /// \brief Define command line and config file options
66  static void DefineOptions(QwOptions& options);
67  /// \brief Process command line and config file options
68  void ProcessOptions(QwOptions &options);
69 
70  /// Set the number of entries per event
71  void SetEntriesPerEvent(const unsigned int n) {
74  };
75  /// Get the number of entries per event
77  /// Get the number of events in the run
78  int GetNumberOfEvents() const { return fNumberOfEvents; };
79 
80  /// Get the current run number
81  int GetRunNumber() const { return fCurrentRunNumber; };
82  /// Get the current event number
83  int GetEventNumber() const { return fCurrentEventNumber; };
84 
85  /// Get the current run label
86  TString GetRunLabel() const {
87  TString runlabel = Form("%d",fCurrentRunNumber);
88  return runlabel;
89  }
90 
91  /// \brief Open the next event file
92  unsigned int OpenNextFile();
93  /// \brief Open the event file
94  unsigned int OpenFile();
95  /// \brief Close the event file
96  unsigned int CloseFile();
97 
98  /// \brief Read the next event
99  unsigned int GetNextEvent();
100  /// \brief Read the specified event
101  unsigned int GetSpecificEvent(const int eventnumber);
102 
103 
104  /// \brief Create the hit list for this entry
105  QwHitContainer* CreateHitList(const bool resolution_effects) const;
106 
107 
108  /// \brief Get the current event
109  QwEvent* GetCurrentEvent() const { return fCurrentEvent; };
110 
111  /// \brief Get the original event
113 
114  /// \brief Get the hit list
116 
117  /// \brief Get the tree lines
118  std::vector<boost::shared_ptr<QwTreeLine> > CreateTreeLines(EQwRegionID region) const;
119 
120  /// \brief Get the partial tracks
121  std::vector<boost::shared_ptr<QwPartialTrack> > CreatePartialTracks(EQwRegionID region) const;
122 
123  /// \brief Print statistical information
124  void PrintStatInfo(int r2good,int r3good, int ngoodtracks);
125 
126  /// \brief List the available cross sections
127  void ListCrossSections();
128 
129  /// \brief Assign the correct cross section pointer
130  void AssignCrossSection();
131 
132  /// \brief Return the dereferenced cross section pointer
133  Float_t GetCrossSection();
134 
135  private:
136 
137  /// Flags
139 
140  /// Cross section flags
141  Float_t *fCrossSection;
144  static std::vector<string> fAvailableCrossSections;
145 
146  /// Set track counters
156 
157  // Randomness provider and distribution for resolution effects
158  boost::mt19937 fRandomnessGenerator; // Mersenne twister
159  boost::normal_distribution<double> fNormalDistribution;
160 
161  TFile* fFile; ///< ROOT file
162  TTree* fTree; ///< ROOT tree
163 
164  int fCurrentRunNumber; ///< Current run number
165  int fCurrentEntryNumber; ///< Current entry number
166  int fCurrentEventNumber; ///< Current event number
167 
168  int fNumberOfEntries; ///< Number of entries in the tree
169  int fNumberOfEvents; ///< Number of events in the tree (after combining entries)
170  int fNumberOfEntriesPerEvent; ///< Number of entries to combine for each event (stacking)
171 
172  std::pair<int, int> fRunRange; ///< Requested run range
173  std::pair<int, int> fEventRange; ///< Requested event range
174 
175  double fDriftTimeDistance[131];
176 
177  /// Get the number of entries in the loaded run
178  void SetNumberOfEntries(const unsigned int n) {
179  fNumberOfEntries = n;
181  };
182  /// Get the number of entries in the loaded run
183  int GetNumberOfEntries() const { return fNumberOfEntries; };
184 
185  /// \brief Read the specified entry from the tree
186  bool GetEntry(const unsigned int entry);
187 
188 
189  /// The event to be reconstructed
191 
192  /// The original event from simulation
194 
195  /// List of detector info objects (geometry information)
197 
198 
199  /// \name Branch management functions
200  // @{
201  void ReserveVectors(); ///< Reserve space for the branch vectors
202  void ClearVectors(); ///< Clear the branch vectors
203  void AttachBranches(); ///< Attache the branch vectors
204  // @}
205 
206 
207  /// \name Create hit at from the track position (x,y) and track momentum (mx,my)
208  // @{
209 
210  /// \brief Create a set of hits for one track in region 1
211  std::vector<QwHit> CreateHitRegion1(
212  const QwDetectorInfo* detectorinfo,
213  const double x, const double y,
214  const bool resolution_effects) const;
215 
216  /// \brief Create a hit for one track in region 2
218  const QwDetectorInfo* detectorinfo,
219  const double x, const double y,
220  const bool resolution_effects) const;
221 
222  /// \brief Create a set of hits for one track in region 3
223  std::vector<QwHit> CreateHitRegion3(
224  const QwDetectorInfo* detectorinfo,
225  const double x, const double y,
226  const double mx, const double my,
227  const bool resolution_effects) const;
228 
229  /// \brief Create a pair of hits for one track in the cerenkov or trigger scintillator
230  std::vector<QwHit> CreateHitCerenkov(
231  const QwDetectorInfo* detectorinfo,
232  const double x, const double y) const;
233 
234  /// \brief Get drift distance from drift time or vice versa
235  void LoadDriftTimeDistance();
236  double GetR2DriftDistanceFromTime(double time) const;
237  double GetR2DriftTimeFromDistance(double dist) const;
238 
239  /// \brief Get local coordinate from global coordinates and octant number
240  double xGlobalToLocal (double x, double y, int octant) const;
241  double yGlobalToLocal (double x, double y, int octant) const;
242  double pxGlobalToLocal (double px, double py, int octant) const;
243  double pyGlobalToLocal (double px, double py, int octant) const;
244 
245  // @}
246 
247  /// \name Branch vectors
248  // @{
249 
250  // Primary
269 
278 
279  // Region1
281 
282  // Region1 WirePlane
297 
312 
313 
314  // Region2
316 
317  // Region2 WirePlane1
334 
351 
352  // Region2 WirePlane2
369 
386 
387  // Region2 WirePlane3
404 
421 
422  // Region2 WirePlane4
439 
456 
457  // Region2 WirePlane5
474 
491 
492  // Region2 WirePlane6
509 
526 
527 
528  // Region3
530 
531  // Region3 ChamberFront WirePlaneU
548 
549  // Region3 ChamberFront WirePlaneV
566 
567  // Region3 ChamberBack WirePlaneU
584 
585  // Region3 ChamberBack WirePlaneV
602 
603 
604  // Trigger Scintillator
618 
619 
620  // Cerenkov
625 
631 
641 
642  // @}
643  // end of the branch vectors
644 
645 }; // class QwTreeEventBuffer
646 
647 #endif // __QWTREEEVENTBUFFER__
void PrintStatInfo(int r2good, int r3good, int ngoodtracks)
Print statistical information.
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_GlobalMomentumZ
vector< Float_t > fCerenkov_Detector_HitLocalExitPositionY
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_LocalPositionX
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_LocalMomentumY
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneGlobalMomentumX
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneGlobalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneLocalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneLocalPositionZ
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_GlobalPositionY
vector< Int_t > fRegion2_ChamberBack_WirePlane4_PackageID
Int_t fRegion2_ChamberFront_WirePlane6_NbOfHits
Int_t fRegion2_ChamberBack_WirePlane3_NbOfHits
static int fNumOfSimulated_R3_TS_MD_Tracks
Int_t fRegion3_ChamberFront_WirePlaneV_NbOfHits
Int_t fRegion3_ChamberBack_WirePlaneV_HasBeenHit
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneLocalPositionZ
Int_t fRegion2_ChamberFront_WirePlane1_NbOfHits
int GetRunNumber() const
Get the current run number.
vector< Float_t > fCerenkov_Detector_HitLocalPositionY
int fNumberOfEntriesPerEvent
Number of entries to combine for each event (stacking)
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneLocalPositionY
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneLocalPositionZ
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneGlobalMomentumX
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneLocalMomentumX
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_GlobalMomentumZ
Float_t fTriggerScintillator_Detector_HitGlobalPositionZ
QwEvent * GetCurrentEvent() const
Get the current event.
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_LocalMomentumZ
Float_t fPrimary_CrossSectionRadDISIntOnly
virtual ~QwTreeEventBuffer()
Destructor.
vector< Int_t > fRegion2_ChamberFront_WirePlane6_ParticleType
static int fNumOfSimulated_R2_R3_Tracks
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneLocalPositionZ
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneLocalMomentumZ
vector< Int_t > fRegion3_ChamberBack_WirePlaneU_ParticleType
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneLocalMomentumX
Read simulated QweakSimG4 events and generate hit lists.
Float_t fPrimary_OriginVertexPositionZ
Float_t fTriggerScintillator_Detector_HitLocalExitPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneGlobalMomentumZ
void ReserveVectors()
Reserve space for the branch vectors.
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneGlobalPositionX
vector< Int_t > fRegion2_ChamberFront_WirePlane3_PackageID
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_GlobalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneGlobalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneLocalMomentumY
QwHitContainer * CreateHitList(const bool resolution_effects) const
Create the hit list for this entry.
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_LocalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneGlobalMomentumY
static int fNumOfSimulated_TS_MD_Tracks
bool GetEntry(const unsigned int entry)
Read the specified entry from the tree.
std::vector< QwHit > CreateHitRegion1(const QwDetectorInfo *detectorinfo, const double x, const double y, const bool resolution_effects) const
Create a set of hits for one track in region 1.
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneGlobalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneLocalPositionZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_GlobalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneGlobalPositionZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_LocalMomentumX
Int_t fRegion1_ChamberBack_WirePlane_PlaneHasBeenHit
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneGlobalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneGlobalMomentumY
bool fEnableR2Hits
Flags.
Int_t fRegion2_ChamberFront_WirePlane4_NbOfHits
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneLocalPositionX
Float_t fPrimary_PreScatteringKineticEnergy
Float_t fTriggerScintillator_Detector_HitGlobalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneLocalMomentumY
vector< Int_t > fRegion2_ChamberFront_WirePlane4_PackageID
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneLocalPositionY
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneGlobalMomentumY
An options class.
Definition: QwOptions.h:133
vector< Int_t > fRegion2_ChamberFront_WirePlane2_PackageID
Float_t fTriggerScintillator_Detector_HitLocalExitPositionX
int GetNumberOfEntries() const
Get the number of entries in the loaded run.
QwHit * CreateHitRegion2(const QwDetectorInfo *detectorinfo, const double x, const double y, const bool resolution_effects) const
Create a hit for one track in region 2.
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_LocalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneLocalPositionY
Int_t fRegion2_ChamberBack_WirePlane1_NbOfHits
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneLocalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneGlobalMomentumZ
Float_t fPrimary_CrossSectionRadDIS
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneLocalMomentumY
boost::normal_distribution< double > fNormalDistribution
int fNumberOfEntries
Number of entries in the tree.
int fCurrentEventNumber
Current event number.
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneLocalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneLocalPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneLocalPositionZ
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneLocalPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneGlobalMomentumZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_LocalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneGlobalPositionY
QwEvent * fOriginalEvent
The original event from simulation.
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneGlobalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneGlobalMomentumZ
vector< Int_t > fRegion2_ChamberBack_WirePlane4_ParticleType
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneGlobalPositionZ
Float_t fPrimary_OriginVertexTotalEnergy
void ListCrossSections()
List the available cross sections.
int GetNumberOfEvents() const
Get the number of events in the run.
void LoadDriftTimeDistance()
Get drift distance from drift time or vice versa.
unsigned int OpenNextFile()
Open the next event file.
std::vector< boost::shared_ptr< QwTreeLine > > CreateTreeLines(EQwRegionID region) const
Get the tree lines.
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneLocalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneGlobalPositionZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_GlobalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneGlobalPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneLocalMomentumX
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_GlobalPositionZ
QwEvent * fCurrentEvent
The event to be reconstructed.
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneGlobalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneLocalPositionZ
Int_t fRegion2_ChamberFront_WirePlane6_PlaneHasBeenHit
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneGlobalPositionZ
TTree * fTree
ROOT tree.
Float_t fPrimary_CrossSectionBornTotal
QwHitContainer * GetHitContainer() const
Get the hit list.
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneLocalMomentumX
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_LocalPositionY
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_LocalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneLocalPositionZ
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneGlobalPositionZ
static int fNumOfSimulated_R2_TS_MD_Tracks
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneLocalPositionY
void SetNumberOfEntries(const unsigned int n)
Get the number of entries in the loaded run.
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_LocalMomentumX
Int_t fRegion2_ChamberBack_WirePlane5_PlaneHasBeenHit
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneGlobalPositionX
vector< Int_t > fRegion3_ChamberFront_WirePlaneV_PackageID
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_GlobalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneLocalPositionX
vector< Int_t > fRegion3_ChamberFront_WirePlaneU_ParticleType
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneLocalPositionY
Int_t fRegion2_ChamberFront_WirePlane3_NbOfHits
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneGlobalMomentumX
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneGlobalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneGlobalPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneLocalMomentumZ
vector< Int_t > fRegion2_ChamberBack_WirePlane1_ParticleType
int fNumberOfEvents
Number of events in the tree (after combining entries)
Int_t fRegion2_ChamberFront_WirePlane1_PlaneHasBeenHit
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneGlobalPositionX
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneGlobalPositionY
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_GlobalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneLocalPositionX
Int_t fRegion2_ChamberBack_WirePlane4_NbOfHits
Int_t fRegion3_ChamberBack_WirePlaneV_NbOfHits
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_LocalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneLocalMomentumY
Float_t fPrimary_OriginVertexMomentumDirectionZ
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneLocalPositionY
vector< Int_t > fRegion2_ChamberFront_WirePlane1_PackageID
static int fNumOfSimulated_MD_Tracks
vector< Float_t > fCerenkov_Detector_HitLocalExitPositionX
std::vector< QwHit > CreateHitRegion3(const QwDetectorInfo *detectorinfo, const double x, const double y, const double mx, const double my, const bool resolution_effects) const
Create a set of hits for one track in region 3.
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneLocalPositionX
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_LocalPositionX
static int fNumOfSimulated_ValidTracks
Set track counters.
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_GlobalPositionZ
int fCurrentRunNumber
Current run number.
double fDriftTimeDistance[131]
Float_t fTriggerScintillator_Detector_HitLocalPositionX
Float_t fPrimary_OriginVertexKineticEnergy
vector< Float_t > fCerenkov_PMT_PMTLeftNbOfPEs
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneLocalPositionY
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneGlobalPositionY
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneLocalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneGlobalPositionZ
vector< Float_t > fCerenkov_Detector_HitGlobalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneGlobalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneLocalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneGlobalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneGlobalPositionZ
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneGlobalPositionZ
Float_t fPrimary_CrossSectionRadQEIntOnly
Int_t fTriggerScintillator_Detector_HasBeenHit
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneLocalMomentumX
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_GlobalPositionZ
Contains a tracked event, i.e. all information from hits to tracks.
Definition: QwEvent.h:156
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneGlobalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneLocalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneGlobalMomentumX
Int_t fRegion3_ChamberBack_WirePlaneU_NbOfHits
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneLocalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneGlobalMomentumY
Bool_t fTriggerScintillator_HasBeenHit
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneGlobalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneGlobalPositionY
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_LocalPositionZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_GlobalPositionX
vector< Int_t > fRegion2_ChamberBack_WirePlane3_ParticleType
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneLocalPositionX
static void DefineOptions(QwOptions &options)
Define command line and config file options.
double pyGlobalToLocal(double px, double py, int octant) const
EQwRegionID
Definition: QwTypes.h:16
QwEvent * GetOriginalEvent() const
Get the original event.
vector< Int_t > fRegion2_ChamberFront_WirePlane5_ParticleType
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneLocalMomentumX
vector< Int_t > fRegion3_ChamberBack_WirePlaneU_PackageID
Float_t fPrimary_CrossSectionRadElasticIntOnly
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneGlobalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneGlobalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneGlobalMomentumX
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneGlobalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneGlobalPositionY
void AttachBranches()
Attache the branch vectors.
vector< Float_t > fCerenkov_Detector_HitLocalExitPositionZ
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneLocalMomentumY
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneLocalPositionY
unsigned int OpenFile()
Open the event file.
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneLocalMomentumX
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_LocalPositionX
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneGlobalMomentumY
Contains the complete track as a concatenation of partial tracks.
Definition: QwTrack.h:30
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_LocalPositionY
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneLocalPositionZ
Int_t fRegion2_ChamberFront_WirePlane4_PlaneHasBeenHit
vector< Float_t > fCerenkov_Detector_HitLocalPositionX
vector< Int_t > fRegion2_ChamberBack_WirePlane5_PackageID
unsigned int GetNextEvent()
Read the next event.
boost::mt19937 fRandomnessGenerator
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneLocalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneGlobalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneLocalMomentumZ
unsigned int GetSpecificEvent(const int eventnumber)
Read the specified event.
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneGlobalPositionZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_LocalPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneLocalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneLocalMomentumX
vector< Int_t > fCerenkov_PMT_PMTTotalNbOfHits
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_LocalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneGlobalMomentumY
double GetR2DriftTimeFromDistance(double dist) const
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneGlobalMomentumZ
Float_t fPrimary_OriginVertexThetaAngle
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneGlobalMomentumZ
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneLocalPositionY
Int_t fRegion2_ChamberBack_WirePlane4_PlaneHasBeenHit
Float_t fPrimary_CrossSectionRadQE
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_GlobalPositionY
double GetR2DriftDistanceFromTime(double time) const
Int_t fRegion2_ChamberFront_WirePlane2_NbOfHits
Float_t fTriggerScintillator_Detector_HitLocalPositionY
double xGlobalToLocal(double x, double y, int octant) const
Get local coordinate from global coordinates and octant number.
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneGlobalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneLocalPositionX
Int_t fRegion3_ChamberFront_WirePlaneU_HasBeenHit
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneLocalPositionZ
const QwGeometry fDetectorInfo
List of detector info objects (geometry information)
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneGlobalPositionX
double yGlobalToLocal(double x, double y, int octant) const
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_LocalPositionY
void AssignCrossSection()
Assign the correct cross section pointer.
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneLocalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneLocalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneLocalPositionY
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneLocalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneLocalPositionX
vector< Int_t > fRegion2_ChamberBack_WirePlane5_ParticleType
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneLocalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneLocalPositionX
Float_t fTriggerScintillator_Detector_HitGlobalPositionX
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_LocalMomentumX
Float_t fPrimary_CrossSectionRadTotal
TFile * fFile
ROOT file.
vector< Float_t > fRegion2_ChamberFront_WirePlane2_PlaneGlobalMomentumX
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_GlobalMomentumY
vector< Float_t > fRegion2_ChamberFront_WirePlane5_PlaneGlobalPositionX
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_GlobalPositionY
vector< Float_t > fCerenkov_Detector_HitLocalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneGlobalPositionZ
Int_t fRegion2_ChamberFront_WirePlane5_NbOfHits
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneLocalMomentumY
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneGlobalPositionX
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_GlobalPositionX
vector< Int_t > fRegion2_ChamberBack_WirePlane3_PackageID
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_LocalMomentumX
vector< Int_t > fRegion2_ChamberFront_WirePlane1_ParticleType
Int_t fTriggerScintillator_Detector_NbOfHits
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneGlobalMomentumX
One-dimensional (u, v, or x) track stubs and associated hits.
Definition: QwTreeLine.h:51
int GetEntriesPerEvent() const
Get the number of entries per event.
vector< Int_t > fRegion2_ChamberBack_WirePlane6_ParticleType
Int_t fRegion1_ChamberFront_WirePlane_NbOfHits
vector< Int_t > fRegion2_ChamberBack_WirePlane2_ParticleType
vector< Float_t > fRegion2_ChamberFront_WirePlane4_PlaneGlobalPositionY
Float_t * fCrossSection
Cross section flags.
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneGlobalPositionX
QwTreeEventBuffer(const QwGeometry &detector_info)
Constructor with file name and spectrometer geometry.
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneGlobalPositionY
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneLocalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneGlobalPositionY
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneGlobalPositionY
unsigned int CloseFile()
Close the event file.
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneGlobalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneGlobalMomentumX
vector< Int_t > fRegion2_ChamberFront_WirePlane4_ParticleType
std::vector< boost::shared_ptr< QwPartialTrack > > CreatePartialTracks(EQwRegionID region) const
Get the partial tracks.
Int_t fRegion2_ChamberBack_WirePlane2_PlaneHasBeenHit
Float_t fPrimary_OriginVertexPhiAngle
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneGlobalMomentumY
double pxGlobalToLocal(double px, double py, int octant) const
vector< Float_t > fCerenkov_PMT_PMTTotalNbOfPEs
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneLocalMomentumZ
vector< Int_t > fRegion2_ChamberFront_WirePlane6_PackageID
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_LocalMomentumZ
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
Definition: QwGeometry.h:27
Int_t fRegion2_ChamberFront_WirePlane5_PlaneHasBeenHit
An options class which parses command line, config file and environment.
Int_t fRegion2_ChamberBack_WirePlane6_NbOfHits
Float_t GetCrossSection()
Return the dereferenced cross section pointer.
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_GlobalMomentumZ
int fCurrentEntryNumber
Current entry number.
vector< Int_t > fTriggerScintillator_Detector_ParticleType
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_GlobalPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneLocalPositionY
Int_t fRegion2_ChamberBack_WirePlane5_NbOfHits
TString GetRunLabel() const
Get the current run label.
static std::vector< string > fAvailableCrossSections
vector< Float_t > fCerenkov_Detector_HitGlobalPositionZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_GlobalMomentumX
Float_t fPrimary_OriginVertexPositionX
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneGlobalMomentumX
Hit structure uniquely defining each hit.
Definition: QwHit.h:43
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneGlobalMomentumX
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneGlobalMomentumY
std::pair< int, int > fEventRange
Requested event range.
Int_t fRegion2_ChamberFront_WirePlane2_PlaneHasBeenHit
vector< Float_t > fCerenkov_PMT_PMTRightNbOfPEs
Float_t fPrimary_CrossSectionRadTotalIntOnly
std::pair< int, int > fRunRange
Requested run range.
Int_t fRegion1_ChamberFront_WirePlane_PlaneHasBeenHit
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_GlobalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane3_PlaneLocalPositionY
Int_t fRegion2_ChamberBack_WirePlane3_PlaneHasBeenHit
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneGlobalMomentumX
vector< Int_t > fRegion3_ChamberFront_WirePlaneV_ParticleType
static int fNumOfSimulated_TS_Tracks
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_GlobalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneLocalMomentumY
Float_t fPrimary_OriginVertexMomentumDirectionY
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_GlobalMomentumX
Int_t fRegion2_ChamberBack_WirePlane6_PlaneHasBeenHit
vector< Float_t > fRegion2_ChamberBack_WirePlane2_PlaneLocalPositionZ
vector< Int_t > fRegion2_ChamberFront_WirePlane2_ParticleType
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_GlobalPositionX
void ClearVectors()
Clear the branch vectors.
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneGlobalMomentumX
void ProcessOptions(QwOptions &options)
Process command line and config file options.
std::vector< QwHit > CreateHitCerenkov(const QwDetectorInfo *detectorinfo, const double x, const double y) const
Create a pair of hits for one track in the cerenkov or trigger scintillator.
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneLocalMomentumX
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneLocalPositionX
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneLocalMomentumZ
vector< Float_t > fRegion2_ChamberFront_WirePlane6_PlaneLocalMomentumZ
vector< Float_t > fRegion1_ChamberFront_WirePlane_PlaneLocalMomentumX
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneGlobalMomentumX
vector< Int_t > fRegion3_ChamberFront_WirePlaneU_PackageID
Float_t fPrimary_CrossSectionWeight
vector< Float_t > fCerenkov_Detector_HitGlobalPositionY
vector< Float_t > fRegion2_ChamberBack_WirePlane4_PlaneLocalMomentumZ
vector< Int_t > fRegion3_ChamberBack_WirePlaneV_PackageID
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneGlobalMomentumY
vector< Float_t > fRegion2_ChamberBack_WirePlane5_PlaneLocalPositionZ
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneGlobalMomentumZ
Int_t fRegion2_ChamberBack_WirePlane2_NbOfHits
void SetEntriesPerEvent(const unsigned int n)
Set the number of entries per event.
vector< Int_t > fCerenkov_Detector_DetectorID
static int fNumOfSimulated_R3_PartialTracks
vector< Float_t > fRegion2_ChamberFront_WirePlane1_PlaneLocalPositionY
vector< Int_t > fRegion2_ChamberFront_WirePlane3_ParticleType
int GetEventNumber() const
Get the current event number.
Contains the straight part of a track in one region only.
Float_t fPrimary_OriginVertexPositionY
vector< Int_t > fRegion2_ChamberFront_WirePlane5_PackageID
Int_t fRegion2_ChamberBack_WirePlane1_PlaneHasBeenHit
Float_t fPrimary_CrossSectionRadElasticPeak
Int_t fRegion3_ChamberBack_WirePlaneU_HasBeenHit
Int_t fRegion3_ChamberFront_WirePlaneU_NbOfHits
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneLocalMomentumY
Float_t fPrimary_CrossSectionBornQE
Int_t fRegion1_ChamberBack_WirePlane_NbOfHits
Float_t fPrimary_OriginVertexMomentumDirectionX
vector< Int_t > fRegion2_ChamberBack_WirePlane6_PackageID
vector< Float_t > fRegion1_ChamberBack_WirePlane_PlaneLocalMomentumZ
vector< Float_t > fRegion3_ChamberFront_WirePlaneU_LocalPositionZ
vector< Int_t > fRegion3_ChamberBack_WirePlaneV_ParticleType
static int fNumOfSimulated_R2_PartialTracks
vector< Float_t > fRegion2_ChamberFront_WirePlane3_PlaneLocalMomentumX
vector< Float_t > fRegion3_ChamberFront_WirePlaneV_LocalPositionZ
Float_t fTriggerScintillator_Detector_HitLocalExitPositionY
Float_t fPrimary_CrossSectionRadElastic
vector< Int_t > fRegion2_ChamberBack_WirePlane2_PackageID
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneGlobalPositionY
vector< Float_t > fRegion3_ChamberBack_WirePlaneV_LocalPositionY
Int_t fRegion2_ChamberFront_WirePlane3_PlaneHasBeenHit
vector< Int_t > fRegion2_ChamberBack_WirePlane1_PackageID
Float_t fPrimary_CrossSectionBornInelastic
Float_t fTriggerScintillator_Detector_HitLocalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane1_PlaneGlobalPositionX
vector< Float_t > fRegion3_ChamberBack_WirePlaneU_GlobalPositionZ
vector< Float_t > fRegion2_ChamberBack_WirePlane6_PlaneGlobalPositionX
Int_t fRegion3_ChamberFront_WirePlaneV_HasBeenHit