00001 #ifndef MaterialBudgetData_h
00002 #define MaterialBudgetData_h 1
00003
00004 #include "Validation/Geometry/interface/MaterialBudgetCategorizer.h"
00005 #include "G4ThreeVector.hh"
00006
00007
00008 #include <CLHEP/Vector/LorentzVector.h>
00009
00010
00011 class MaterialBudgetData;
00012 class G4Step;
00013 class G4Track;
00014
00015
00016 typedef std::map< std::string, float > msf;
00017
00018 class MaterialBudgetData {
00019 public:
00020
00021 MaterialBudgetData();
00022 ~MaterialBudgetData();
00023
00024 void dataStartTrack( const G4Track* aTrack );
00025 void dataEndTrack( const G4Track* aTrack );
00026 void dataPerStep( const G4Step* aStep );
00027
00028 void SetAllStepsToTree();
00029 public:
00030 float getTotalMB() const {
00031 return theTotalMB; }
00032
00033 float getSupportFractionMB() const {
00034 return theSupportFractionMB; }
00035 float getSensitiveFractionMB() const {
00036 return theSensitiveFractionMB; }
00037 float getCablesFractionMB() const {
00038 return theCablesFractionMB; }
00039 float getCoolingFractionMB() const {
00040 return theCoolingFractionMB; }
00041 float getElectronicsFractionMB() const {
00042 return theElectronicsFractionMB; }
00043 float getOtherFractionMB() const {
00044 return theOtherFractionMB; }
00045 float getAirFractionMB() const {
00046 return theAirFractionMB; }
00047 float getSupportMB() const {
00048 return theSupportMB; }
00049 float getSensitiveMB() const {
00050 return theSensitiveMB; }
00051 float getCablesMB() const {
00052 return theCablesMB; }
00053 float getCoolingMB() const {
00054 return theCoolingMB; }
00055 float getElectronicsMB() const {
00056 return theElectronicsMB; }
00057 float getOtherMB() const {
00058 return theOtherMB; }
00059 float getAirMB() const {
00060 return theAirMB; }
00061 float getSupportFractionIL() const {
00062 return theSupportFractionIL; }
00063 float getSensitiveFractionIL() const {
00064 return theSensitiveFractionIL; }
00065 float getCablesFractionIL() const {
00066 return theCablesFractionIL; }
00067 float getCoolingFractionIL() const {
00068 return theCoolingFractionIL; }
00069 float getElectronicsFractionIL() const {
00070 return theElectronicsFractionIL; }
00071 float getOtherFractionIL() const {
00072 return theOtherFractionIL; }
00073 float getAirFractionIL() const {
00074 return theAirFractionIL; }
00075 float getTotalIL() const {
00076 return theTotalIL; }
00077 float getSupportIL() const {
00078 return theSupportIL; }
00079 float getSensitiveIL() const {
00080 return theSensitiveIL; }
00081 float getCablesIL() const {
00082 return theCablesIL; }
00083 float getCoolingIL() const {
00084 return theCoolingIL; }
00085 float getElectronicsIL() const {
00086 return theElectronicsIL; }
00087 float getOtherIL() const {
00088 return theOtherIL; }
00089 float getAirIL() const {
00090 return theAirIL; }
00091
00092 float getEta() const {
00093 return theEta; }
00094 float getPhi() const {
00095 return thePhi; }
00096
00097 int getID() const {
00098 return theID; }
00099 float getPt() const {
00100 return thePt; }
00101 float getEnergy() const {
00102 return theEnergy; }
00103 float getMass() const {
00104 return theMass; }
00105
00106
00107 int getNumberOfSteps() const {
00108 return theStepN; }
00109
00110 float getTrkLen() const {
00111 return theTrkLen; }
00112 std::string getPVname() const {
00113 return thePVname; }
00114 int getPVcopyNo() const {
00115 return thePVcopyNo; }
00116 float getRadLen() const {
00117 return theRadLen; }
00118 float getIntLen() const {
00119 return theIntLen; }
00120
00121 float getStepDmb( int is ) {
00122 return theDmb[is];
00123 }
00124 float getSupportDmb( int is ) const {
00125 return theSupportDmb[is]; }
00126 float getSensitiveDmb( int is ) const {
00127 return theSensitiveDmb[is]; }
00128 float getCablesDmb( int is ) const {
00129 return theCablesDmb[is]; }
00130 float getCoolingDmb( int is ) const {
00131 return theCoolingDmb[is]; }
00132 float getElectronicsDmb( int is ) const {
00133 return theElectronicsDmb[is]; }
00134 float getOtherDmb( int is ) const {
00135 return theOtherDmb[is]; }
00136 float getAirDmb( int is ) const {
00137 return theAirDmb[is]; }
00138
00139 float getStepDil( int is ) {
00140 return theDil[is];
00141 }
00142 float getSupportDil( int is ) const {
00143 return theSupportDil[is]; }
00144 float getSensitiveDil( int is ) const {
00145 return theSensitiveDil[is]; }
00146 float getCablesDil( int is ) const {
00147 return theCablesDil[is]; }
00148 float getCoolingDil( int is ) const {
00149 return theCoolingDil[is]; }
00150 float getElectronicsDil( int is ) const {
00151 return theElectronicsDil[is]; }
00152 float getOtherDil( int is ) const {
00153 return theOtherDil[is]; }
00154 float getAirDil( int is ) const {
00155 return theAirDil[is]; }
00156
00157 double getStepInitialX( int is ) {
00158 return theInitialX[is];
00159 }
00160 double getStepInitialY( int is ) {
00161 return theInitialY[is];
00162 }
00163 double getStepInitialZ( int is ) {
00164 return theInitialZ[is];
00165 }
00166 double getStepFinalX( int is ) {
00167 return theFinalX[is];
00168 }
00169 double getStepFinalY( int is ) {
00170 return theFinalY[is];
00171 }
00172 double getStepFinalZ( int is ) {
00173 return theFinalZ[is];
00174 }
00175 int getStepID( int is) {
00176 return theStepID[is];
00177 }
00178 float getStepInitialPt( int is) {
00179 return theStepInitialPt[is];
00180 }
00181 float getStepInitialEta( int is) {
00182 return theStepInitialEta[is];
00183 }
00184 float getStepInitialPhi( int is) {
00185 return theStepInitialPhi[is];
00186 }
00187 float getStepInitialEnergy( int is) {
00188 return theStepInitialEnergy[is];
00189 }
00190 float getStepInitialPx( int is) {
00191 return theStepInitialPx[is];
00192 }
00193 float getStepInitialPy( int is) {
00194 return theStepInitialPy[is];
00195 }
00196 float getStepInitialPz( int is) {
00197 return theStepInitialPz[is];
00198 }
00199 float getStepInitialBeta( int is) {
00200 return theStepInitialBeta[is];
00201 }
00202 float getStepInitialGamma( int is) {
00203 return theStepInitialGamma[is];
00204 }
00205 float getStepInitialMass( int is) {
00206 return theStepInitialMass[is];
00207 }
00208 float getStepFinalPt( int is) {
00209 return theStepFinalPt[is];
00210 }
00211 float getStepFinalEta( int is) {
00212 return theStepFinalEta[is];
00213 }
00214 float getStepFinalPhi( int is) {
00215 return theStepFinalPhi[is];
00216 }
00217 float getStepFinalEnergy( int is) {
00218 return theStepFinalEnergy[is];
00219 }
00220 float getStepFinalPx( int is) {
00221 return theStepFinalPx[is];
00222 }
00223 float getStepFinalPy( int is) {
00224 return theStepFinalPy[is];
00225 }
00226 float getStepFinalPz( int is) {
00227 return theStepFinalPz[is];
00228 }
00229 float getStepFinalBeta( int is) {
00230 return theStepFinalBeta[is];
00231 }
00232 float getStepFinalGamma( int is) {
00233 return theStepFinalGamma[is];
00234 }
00235 float getStepFinalMass( int is) {
00236 return theStepFinalMass[is];
00237 }
00238 int getStepPreProcess( int is) {
00239 return theStepPreProcess[is];
00240 }
00241 int getStepPostProcess( int is) {
00242 return theStepPostProcess[is];
00243 }
00244
00245 int getStepVolumeID( int is ) {
00246 return theVolumeID[is];
00247 }
00248 std::string getStepVolumeName( int is ) {
00249 return theVolumeName[is];
00250 }
00251 int getStepVolumeCopy( int is ) {
00252 return theVolumeCopy[is];
00253 }
00254 float getStepVolumeX( int is ) {
00255 return theVolumeX[is];
00256 }
00257 float getStepVolumeY( int is ) {
00258 return theVolumeY[is];
00259 }
00260 float getStepVolumeZ( int is ) {
00261 return theVolumeZ[is];
00262 }
00263 CLHEP::HepLorentzVector getStepVolumeXaxis( int is ) {
00264 return CLHEP::HepLorentzVector(theVolumeXaxis1[is],theVolumeXaxis2[is],theVolumeXaxis3[is]);
00265 }
00266 CLHEP::HepLorentzVector getStepVolumeYaxis( int is ) {
00267 return CLHEP::HepLorentzVector(theVolumeYaxis1[is],theVolumeYaxis2[is],theVolumeYaxis3[is]);
00268 }
00269 CLHEP::HepLorentzVector getStepVolumeZaxis( int is ) {
00270 return CLHEP::HepLorentzVector(theVolumeZaxis1[is],theVolumeZaxis2[is],theVolumeZaxis3[is]);
00271 }
00272 int getStepMaterialID( int is ) {
00273 return theMaterialID[is];
00274 }
00275 std::string getStepMaterialName( int is ) {
00276 return theMaterialName[is];
00277 }
00278 float getStepMaterialX0( int is ) {
00279 return theMaterialX0[is];
00280 }
00281 float getStepMaterialLambda0( int is ) {
00282 return theMaterialLambda0[is];
00283 }
00284 float getStepMaterialDensity( int is ) {
00285 return theMaterialDensity[is];
00286 }
00287
00288
00289 bool allStepsON() {
00290 return allStepsToTree;
00291 }
00292
00293 private:
00294 float theTotalMB, theEta, thePhi;
00295
00296 float thePt;
00297 int theID;
00298 float theEnergy;
00299 float theMass;
00300 float theSupportFractionMB, theSensitiveFractionMB, theCablesFractionMB,
00301 theCoolingFractionMB, theElectronicsFractionMB, theOtherFractionMB, theAirFractionMB;
00302 float theSupportFractionIL, theSensitiveFractionIL, theCablesFractionIL,
00303 theCoolingFractionIL, theElectronicsFractionIL, theOtherFractionIL, theAirFractionIL;
00304 float theSupportMB, theSensitiveMB, theCablesMB, theCoolingMB, theElectronicsMB, theOtherMB, theAirMB;
00305 float theTotalIL;
00306 float theSupportIL, theSensitiveIL, theCablesIL, theCoolingIL, theElectronicsIL, theOtherIL, theAirIL;
00307
00308 int theStepN;
00309 double *theInitialX, *theInitialY, *theInitialZ;
00310 double *theFinalX, *theFinalY, *theFinalZ;
00311 float *theDmb;
00312 float *theSupportDmb, *theSensitiveDmb, *theCablesDmb, *theCoolingDmb, *theElectronicsDmb, *theOtherDmb, *theAirDmb;
00313 float *theDil;
00314 float *theSupportDil, *theSensitiveDil, *theCablesDil, *theCoolingDil, *theElectronicsDil, *theOtherDil, *theAirDil;
00315
00316
00317
00318 int *theVolumeID;
00319 std::string* theVolumeName;
00320 int* theVolumeCopy;
00321 float* theVolumeX;
00322 float* theVolumeY;
00323 float* theVolumeZ;
00324 float* theVolumeXaxis1;
00325 float* theVolumeXaxis2;
00326 float* theVolumeXaxis3;
00327 float* theVolumeYaxis1;
00328 float* theVolumeYaxis2;
00329 float* theVolumeYaxis3;
00330 float* theVolumeZaxis1;
00331 float* theVolumeZaxis2;
00332 float* theVolumeZaxis3;
00333 int* theMaterialID;
00334 std::string* theMaterialName;
00335 float* theMaterialX0;
00336 float* theMaterialLambda0;
00337 float* theMaterialDensity;
00338 int* theStepID;
00339 float* theStepInitialPt;
00340 float* theStepInitialEta;
00341 float* theStepInitialPhi;
00342 float* theStepInitialEnergy;
00343 float* theStepInitialPx;
00344 float* theStepInitialPy;
00345 float* theStepInitialPz;
00346 float* theStepInitialBeta;
00347 float* theStepInitialGamma;
00348 float* theStepInitialMass;
00349 float* theStepFinalPt;
00350 float* theStepFinalEta;
00351 float* theStepFinalPhi;
00352 float* theStepFinalEnergy;
00353 float* theStepFinalPx;
00354 float* theStepFinalPy;
00355 float* theStepFinalPz;
00356 float* theStepFinalBeta;
00357 float* theStepFinalGamma;
00358 float* theStepFinalMass;
00359 int* theStepPreProcess;
00360 int* theStepPostProcess;
00361
00362 float theTrkLen;
00363 std::string thePVname;
00364 int thePVcopyNo;
00365
00366 MaterialBudgetCategorizer* myMaterialBudgetCategorizer;
00367
00368 float theRadLen;
00369 float theIntLen;
00370 int stepN;
00371 int MAXNUMBERSTEPS;
00372 bool allStepsToTree;
00373
00374 double densityConvertionFactor;
00375 };
00376
00377 #endif