[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // Rich advanced example for Geant4 |
---|
| 27 | // RichTbAnalysisManager.hh for Rich of LHCb |
---|
| 28 | // History: |
---|
| 29 | // Created: Sajan Easo (Sajan.Easo@cern.ch) |
---|
| 30 | // Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch) |
---|
| 31 | ///////////////////////////////////////////////////////////////////////////// |
---|
| 32 | #ifndef RichTbAnalysisManager_h |
---|
| 33 | #define RichTbAnalysisManager_h 1 |
---|
| 34 | |
---|
| 35 | #include "globals.hh" |
---|
| 36 | #include <vector> |
---|
| 37 | #include "G4ThreeVector.hh" |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | #ifdef G4ANALYSIS_USE |
---|
| 42 | #include "AIDA/AIDA.h" |
---|
| 43 | #endif |
---|
| 44 | #include "RichTbAnalysisMessenger.hh" |
---|
| 45 | |
---|
| 46 | class G4Step; |
---|
| 47 | |
---|
| 48 | #ifdef G4ANALYSIS_USE |
---|
| 49 | namespace AIDA{ |
---|
| 50 | class IAnalysisFactory; |
---|
| 51 | class IHistogramFactory; |
---|
| 52 | class ITree; |
---|
| 53 | class ITupleFactory; |
---|
| 54 | class ITuple; |
---|
| 55 | } |
---|
| 56 | #endif |
---|
| 57 | |
---|
| 58 | class G4Run; |
---|
| 59 | class G4Event; |
---|
| 60 | class G4Step; |
---|
| 61 | class G4Timer; |
---|
| 62 | |
---|
| 63 | class G4SteppingManager; |
---|
| 64 | class RichTbRunConfig; |
---|
| 65 | |
---|
| 66 | class RichTbAnalysisManager{ |
---|
| 67 | public: |
---|
| 68 | |
---|
| 69 | RichTbAnalysisManager(); |
---|
| 70 | virtual ~RichTbAnalysisManager(); |
---|
| 71 | |
---|
| 72 | #ifdef G4ANALYSIS_USE |
---|
| 73 | |
---|
| 74 | void book(); |
---|
| 75 | void finish(); |
---|
| 76 | |
---|
| 77 | static RichTbAnalysisManager* getInstance(); |
---|
| 78 | void SetOutputFileName(G4String); |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | #endif |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | void BeginOfRunAnalysis(); |
---|
| 89 | void EndOfRunAnalysis(); |
---|
| 90 | void BeginOfEventAnalysis(const G4Event*); |
---|
| 91 | void EndOfEventAnalysis(const G4Event*); |
---|
| 92 | void StepAnalysis(const G4SteppingManager* ); |
---|
| 93 | |
---|
| 94 | void bumpNumPhotonsBeforeAerogel() { NumPhotBeforeAerogel++ ; } |
---|
| 95 | G4int getNumPhotBeforeAerogel() {return NumPhotBeforeAerogel; } |
---|
| 96 | |
---|
| 97 | void bumpNumPhotonsAfterFilter(){ NumPhotAfterFilter++ ; } |
---|
| 98 | G4int getNumPhotAfterFilter() {return NumPhotAfterFilter ; } |
---|
| 99 | void bumpNumPhotonsBeforeFilter(){ NumPhotBeforeFilter++ ; } |
---|
| 100 | G4int getNumPhotBeforeFilter() {return NumPhotBeforeFilter ; } |
---|
| 101 | void bumpNumPhotonsBeforeMirror(){ NumPhotBeforeMirror++ ; } |
---|
| 102 | G4int getNumPhotBeforeMirror() {return NumPhotBeforeMirror ; } |
---|
| 103 | |
---|
| 104 | void bumpNumPhotonsAfterMirror(){ NumPhotAfterMirror++ ; } |
---|
| 105 | G4int getNumPhotAfterMirror() {return NumPhotAfterMirror ; } |
---|
| 106 | |
---|
| 107 | void bumpNumPhotonsAtHpd1Input(){ NumPhotAtHpd1Input++ ; } |
---|
| 108 | G4int getNumPhotAtHpd1Input() {return NumPhotAtHpd1Input ; } |
---|
| 109 | void bumpNumPhotonsAtHpd2Input(){ NumPhotAtHpd2Input++ ; } |
---|
| 110 | G4int getNumPhotAtHpd2Input() {return NumPhotAtHpd2Input ; } |
---|
| 111 | void bumpNumPhotonsAtHpd3Input(){ NumPhotAtHpd3Input++ ; } |
---|
| 112 | G4int getNumPhotAtHpd3Input() {return NumPhotAtHpd3Input ; } |
---|
| 113 | void bumpNumPhotonsAtHpd4Input(){ NumPhotAtHpd4Input++ ; } |
---|
| 114 | G4int getNumPhotAtHpd4Input() {return NumPhotAtHpd4Input ; } |
---|
| 115 | void bumpNumHitInSi(){ NumHitInSi++ ; } |
---|
| 116 | G4int getNumHitInSi() {return NumHitInSi ; } |
---|
| 117 | G4double getMeanHXCoord() {return MeanHXCoord ; } |
---|
| 118 | G4double getMeanHYCoord() {return MeanHYCoord ; } |
---|
| 119 | G4double getNumHXCoord() {return NumHXCoord ; } |
---|
| 120 | G4double getNumHYCoord() {return NumHYCoord ; } |
---|
| 121 | void setMeanHXCoord(G4double cx ); |
---|
| 122 | void setMeanHYCoord(G4double cy ); |
---|
| 123 | |
---|
| 124 | public: |
---|
| 125 | |
---|
| 126 | G4String outputFileName; |
---|
| 127 | |
---|
| 128 | static RichTbAnalysisManager* instance; |
---|
| 129 | |
---|
| 130 | #ifdef G4ANALYSIS_USE |
---|
| 131 | |
---|
| 132 | RichTbAnalysisMessenger* analisysMessenger; |
---|
| 133 | |
---|
| 134 | AIDA::IAnalysisFactory* analysisFactory; |
---|
| 135 | AIDA::ITree* tree; |
---|
| 136 | AIDA::IHistogramFactory* histogramFactory; |
---|
| 137 | |
---|
| 138 | AIDA::IHistogram1D* getfhistoNPhotG() {return fhistoNrPhotG;} |
---|
| 139 | AIDA::IHistogram1D* getfhistoNBeforeMirror() {return fhistoNBeforeMirror;} |
---|
| 140 | AIDA::IHistogram1D* getfhistoWBeforeMirror() {return fhistoWBeforeMirror;} |
---|
| 141 | AIDA::IHistogram1D* getfhistoWAfterMirror() {return fhistoWAfterMirror;} |
---|
| 142 | |
---|
| 143 | AIDA::IHistogram1D* getfhistoCkvProdSmall() {return fhistoCkvProdSmall;} |
---|
| 144 | AIDA::IHistogram1D* getfhistoEmisZ() {return fhistoEmisZ;} |
---|
| 145 | |
---|
| 146 | AIDA::IHistogram1D* getfhistoCkvRadius() {return fhistoCkvRadius; } |
---|
| 147 | |
---|
| 148 | #endif |
---|
| 149 | |
---|
| 150 | public: |
---|
| 151 | |
---|
| 152 | #ifdef G4ANALYSIS_USE |
---|
| 153 | |
---|
| 154 | AIDA::IHistogram1D* fhistoNrPhotG; |
---|
| 155 | AIDA::IHistogram1D* fhistoNBeforeMirror; |
---|
| 156 | AIDA::IHistogram1D* fhistoWBeforeMirror; |
---|
| 157 | AIDA::IHistogram1D* fhistoWAfterMirror; |
---|
| 158 | AIDA::IHistogram1D* fhistoCkvProdSmall; |
---|
| 159 | AIDA::IHistogram1D* fhistoEmisZ; |
---|
| 160 | AIDA::IHistogram1D* fhistoCkvRadius; |
---|
| 161 | |
---|
| 162 | #endif |
---|
| 163 | |
---|
| 164 | G4Timer* iTimer; |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | G4int NumPhotBeforeAerogel; |
---|
| 169 | G4int NumPhotBeforeMirror; |
---|
| 170 | G4int NumPhotBeforeFilter; |
---|
| 171 | G4int NumPhotAfterFilter; |
---|
| 172 | G4int NumPhotAtHpd1Input; |
---|
| 173 | G4int NumPhotAtHpd2Input; |
---|
| 174 | G4int NumPhotAtHpd3Input; |
---|
| 175 | G4int NumPhotAtHpd4Input; |
---|
| 176 | G4int NumPhotAfterMirror; |
---|
| 177 | G4int NumHitTotInHpd1; |
---|
| 178 | G4int NumHitTotInHpd2; |
---|
| 179 | G4int NumHitTotInHpd3; |
---|
| 180 | G4int NumHitTotInHpd4; |
---|
| 181 | G4int NumHitInSi; |
---|
| 182 | RichTbRunConfig* rConfig; |
---|
| 183 | G4double MeanHXCoord; |
---|
| 184 | G4double MeanHYCoord; |
---|
| 185 | G4double NumHXCoord; |
---|
| 186 | G4double NumHYCoord; |
---|
| 187 | |
---|
| 188 | }; |
---|
| 189 | |
---|
| 190 | #endif |
---|