Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:56

0001 #ifndef Alignment_OfflineValidation_TkOffTreeVariables_h
0002 #define Alignment_OfflineValidation_TkOffTreeVariables_h
0003 
0004 #include <string>
0005 // For ROOT types with '_t':
0006 #include "Rtypes.h"
0007 
0008 /// container to hold data to be written into TTree
0009 struct TkOffTreeVariables {
0010   /// constructor initialises to empty values
0011   TkOffTreeVariables() { this->clear(); }
0012 
0013   /// set to empty values
0014   void clear() {
0015     // First clear things that are changing if TTrees are merged:
0016     this->clearMergeAffectedPart();
0017 
0018     // Now the rest:
0019     // Float_t's
0020     posR = posPhi = posEta = posX = posY = posZ = rDirection = phiDirection = zDirection = rOrZDirection = 0.;
0021     // Int_t's
0022     moduleId = subDetId = layer = side = half = rod = ring = petal = blade = panel = outerInner = module = 0;
0023     // Bool_t's
0024     isDoubleSide = isStereo = false;
0025     // std::string's
0026     histNameLocalX = histNameNormLocalX = histNameLocalY /* = histNameNormLocalY */
0027         = histNameX = histNameNormX = histNameY = histNameNormY = "";
0028     profileNameResXvsX = profileNameResXvsY = profileNameResYvsX = profileNameResYvsY = "";
0029   }
0030   /// set those values to empty that are affected by merging
0031   void clearMergeAffectedPart() {
0032     // variable Float_t's
0033     meanLocalX = meanNormLocalX = meanX = meanNormX = meanY = meanNormY = medianX = medianY = chi2PerDofX =
0034         chi2PerDofY = rmsLocalX = rmsNormLocalX = rmsX = rmsNormX = rmsY = rmsNormY = sigmaX = sigmaNormX = fitMeanX =
0035             fitSigmaX = fitMeanNormX = fitSigmaNormX = fitMeanY = fitSigmaY = fitMeanNormY = fitSigmaNormY =
0036                 numberOfUnderflows = numberOfOverflows = numberOfOutliers = 0.;
0037 
0038     meanResXvsX = meanResXvsY = meanResYvsX = meanResYvsY = rmsResXvsX = rmsResXvsY = rmsResYvsX = rmsResYvsY = 0.;
0039 
0040     // variable Int_t's
0041     entries = 0;
0042   }
0043 
0044   ///////////////////////////////////////////////////////////////////////////////
0045   // Data members:
0046   // They do not follow convention to have '_' at the end since they will appear
0047   // as such in the TTree and that is ugly.
0048   ///////////////////////////////////////////////////////////////////////////////
0049 
0050   Float_t meanLocalX, meanNormLocalX, meanX, meanNormX,                    //mean value read out from module histograms
0051       meanY, meanNormY, medianX, medianY,                                  //median read out from module histograms
0052       chi2PerDofX, chi2PerDofY, rmsLocalX, rmsNormLocalX, rmsX, rmsNormX,  //rms value read out from modul histograms
0053       rmsY, rmsNormY, sigmaX, sigmaNormX, fitMeanX, fitSigmaX, fitMeanNormX, fitSigmaNormX, fitMeanY, fitSigmaY,
0054       fitMeanNormY, fitSigmaNormY, posR, posPhi, posEta,  //global coordiantes
0055       posX, posY, posZ,                                   //global coordiantes
0056       numberOfUnderflows, numberOfOverflows, numberOfOutliers, rDirection, phiDirection, zDirection, rOrZDirection;
0057 
0058   UInt_t entries;              // number of entries for each module
0059   UInt_t moduleId, subDetId,   //moduleId == detId
0060       layer, side, half, rod,  // half = TPB: halfBarrel, TPE: halfCylinder, TIB: halfShell
0061       ring, petal, blade, panel, outerInner,
0062       module;  //orientation of modules in TIB:1/2= int/ext string, TID:1/2=back/front ring, TEC 1/2=back/front petal
0063 
0064   Bool_t isDoubleSide;  // (!isDoubleSide) is a detUnit, (isDoubleSide) is a Det (glued Modules)
0065   Bool_t isStereo;      // (!isStereo) is a rPhi-module, (isStereo) is the stereo module from a Det
0066 
0067   std::string histNameLocalX, histNameNormLocalX, histNameLocalY; /* histNameNormLocalY, */
0068   std::string histNameX, histNameNormX, histNameY, histNameNormY;
0069 
0070   Float_t meanResXvsX, meanResXvsY, meanResYvsX, meanResYvsY;
0071   Float_t rmsResXvsX, rmsResXvsY, rmsResYvsX, rmsResYvsY;
0072 
0073   std::string profileNameResXvsX, profileNameResXvsY, profileNameResYvsX, profileNameResYvsY;
0074 };
0075 
0076 #endif