TMBEMCluster.cpp

Go to the documentation of this file.
00001 
00002 //                                                                      //
00003 //  TMBEMCluster                                                        //
00004 //                                                                      //
00005 //  based on TMBTree Emcl class                                         //
00006 //  E. Nagy and E. Thomas                                               //
00007 //  Revised by E. Nagy October 30th 2003                                //
00008 //  Add more variables by Junjie Zhu  Dec. 20th, 2004                   //
00009 //                                                                      //
00011 
00012 #include "tmb_tree/TMBEMCluster.hpp"
00013 
00014 ClassImp(TMBEMCluster);
00015 
00016 TMBEMCluster::TMBEMCluster(Float_t E, Float_t pT, Float_t eta, Float_t phi,
00017                            Float_t uncorrE, Float_t q,
00018                            Int_t id, Float_t iso, Float_t EisoCore, Int_t isol,
00019                            Int_t nb_CPS, Int_t nb_FPS, Float_t EMScalarEt, 
00020                            Float_t* floorE, Float_t* floorX, Float_t* floorY, Float_t* floorZ, 
00021                            Float_t* flrS1, Float_t* flrS2, Float_t* flrC, Int_t* flrNch,
00022                            Float_t EMfrac, Float_t HA, Float_t HMx7, Float_t HMx8,
00023                            Float_t Excess, 
00024                            Float_t* rRC, Float_t* rR1, Float_t* rR2, 
00025                            TRef chptr, TRef vtxref, 
00026                            TRefArray* cpsptr, TRefArray* fpsptr, 
00027                            const std::vector<TMBCellContainer::Index_t>& ecells,
00028                            TMBCellContainer *cont)
00029 
00030 {
00031     
00032     Set(E, pT, eta, phi, uncorrE, q, id, iso, EisoCore, isol,
00033         nb_CPS, nb_FPS, EMScalarEt, floorE, floorX, floorY, floorZ,
00034         flrS1, flrS2, flrC, flrNch,
00035         EMfrac, HA, HMx7, HMx8,
00036         Excess, rRC, rR1, rR2,  
00037         chptr, vtxref, cpsptr, fpsptr, ecells, cont);
00038 
00039 }
00040 void TMBEMCluster::Set(Float_t E, Float_t pT, Float_t eta, Float_t phi,
00041                        Float_t uncorrE, Float_t q,
00042                        Int_t id, Float_t iso, Float_t EisoCore, Int_t isol,
00043                        Int_t nb_CPS, Int_t nb_FPS, Float_t EMScalarEt,
00044                        Float_t* floorE, Float_t* floorX, Float_t* floorY, Float_t* floorZ, 
00045                        Float_t* flrS1, Float_t* flrS2, Float_t* flrC, Int_t* flrNch,
00046                        Float_t EMfrac, Float_t HA, Float_t HMx7, Float_t HMx8, 
00047                        Float_t Excess, 
00048                        Float_t* rRC, Float_t* rR1, Float_t* rR2, 
00049                        TRef chptr, TRef vtxref, 
00050                        TRefArray* cpsptr, TRefArray* fpsptr, 
00051                        const std::vector<TMBCellContainer::Index_t>& ecells,
00052                        TMBCellContainer *cont)
00053 
00054 {
00055 #if 0
00056     _E         = E;
00057     _pT        = pT;
00058     _eta       = eta;
00059     _phi       = phi;
00060 #endif
00061 
00062     SetPtEtaPhiE(pT, eta, TVector2::Phi_mpi_pi(phi), E);
00063    
00064     _uncorrE   = uncorrE;
00065     _q         = q;
00066     _id        = id;
00067     _iso       = iso;
00068     _EisoCore  = EisoCore;
00069     _isol      = isol;
00070     _nb_CPS    = nb_CPS;
00071     _nb_FPS    = nb_FPS;
00072     _EMScalarEt = EMScalarEt;
00073     
00074     for (Int_t j=0; j<6; j++){
00075         _floorE[j] = *(floorE++);
00076         _flrNch[j] = *(flrNch++);
00077         _floorX[j] = *(floorX++);
00078         _floorY[j] = *(floorY++);
00079         _floorZ[j] = *(floorZ++);
00080         _flrS1[j]  = *(flrS1++);
00081         _flrS2[j]  = *(flrS2++);
00082         _flrC[j]   = *(flrC++);
00083     }
00084 
00085     _EMfrac    = EMfrac;                           
00086     _HA        = HA;
00087     _HMx7      = HMx7;
00088     _HMx8      = HMx8;
00089     _Excess    = Excess;
00090 
00091     for (Int_t j=0; j<5; j++){
00092         _rRC[j]    = *(rRC++);
00093         _rR1[j]    = *(rR1++);
00094         _rR2[j]    = *(rR2++);
00095     }
00096     _chptr     = chptr;
00097     _vtxref    = vtxref;
00098 
00099     _cpsptr.Clear();
00100     if (cpsptr) {
00101         for (int i=0; i<cpsptr->GetLast()+1; i++) {
00102             _cpsptr.Add( cpsptr->At(i) );
00103         }
00104     }
00105     _fpsptr.Clear();
00106     if (fpsptr) {
00107         for (int i=0; i<fpsptr->GetLast()+1; i++) {
00108             _fpsptr.Add( fpsptr->At(i) );
00109         }
00110     }
00111 
00112     _ecells    = ecells;
00113     _container = cont;
00114 }
00115 
00116 void TMBEMCluster::Set1(Bool_t is_in_phi_fiducial,
00117                         Bool_t is_in_eta_fiducial, Float_t CalE,
00118                         Float_t CalPhi, Float_t CalEta, Float_t CalDetectorPhi,
00119                         Float_t CalDetectorEta, Float_t sigE, TRef CpsBest,
00120                         Float_t CPSFitZVtxBest, Float_t CPSFitZVtxErrBest,
00121                         Float_t CPSFitDCABest, Float_t CPSFitDCAErrBest,
00122                         Float_t CPSChi2MatchBest, 
00123                         Float_t Lhood8, Float_t LhoodCps, Float_t Lhood3, 
00124                         Float_t Lhood4Iso, Float_t Lhood4EOP, Float_t clusterpx, Float_t clusterpy, Float_t clusterpz,
00125                         Float_t TrMatchChi2ProbBest, TRef chptrBest,
00126                         Float_t SpatialTrMatchChi2ProbBest, TRef chptrBestSpatial,
00127                         Int_t nChPart, TRefArray* ChPart, 
00128                         TArrayF* TrMatchChi2Prob, TArrayF* SpatialTrMatchChi2Prob,
00129                         TArrayF* CPSFitChi2Match, 
00130                         TArrayF* CPSFitZVtx, TArrayF* CPSFitZVtxErr, TArrayF* CPSFitDCA, TArrayF *CPSFitDCAErr)
00131 {
00132     _is_in_phi_fiducial =  is_in_phi_fiducial;
00133     _is_in_eta_fiducial =  is_in_eta_fiducial;
00134     _CalE =  CalE;
00135     _CalPhi =  CalPhi;
00136     _CalEta =  CalEta;
00137     _CalDetectorPhi =  CalDetectorPhi;
00138     _CalDetectorEta =  CalDetectorEta;
00139     _sigE =  sigE;
00140     _CpsBest =  CpsBest;
00141     _CPSFitZVtxBest =  CPSFitZVtxBest;
00142     _CPSFitZVtxErrBest =  CPSFitZVtxErrBest;
00143     _CPSFitDCABest =  CPSFitDCABest;
00144     _CPSFitDCAErrBest =  CPSFitDCAErrBest;
00145     _CPSChi2MatchBest =  CPSChi2MatchBest;
00146     _Lhood8    = Lhood8; 
00147     _LhoodCps  = LhoodCps;
00148     _Lhood3    = Lhood3;
00149     _Lhood4Iso = Lhood4Iso;
00150     _Lhood4EOP = Lhood4EOP;
00151     _TrMatchChi2ProbBest =  TrMatchChi2ProbBest;
00152     _SpatialTrMatchChi2ProbBest =  SpatialTrMatchChi2ProbBest;
00153     _chptrBest =  chptrBest;
00154     _chptrBestSpatial = chptrBestSpatial;
00155     _nChPart =  nChPart;
00156    
00157     _clusterpx = clusterpx;
00158     _clusterpy = clusterpy;
00159     _clusterpz = clusterpz;
00160 
00161     _ChPart.Clear();
00162     if (ChPart) {
00163         for (Int_t i=0; i< ChPart->GetLast()+1; i++) {
00164             _ChPart.Add(ChPart->At(i) );
00165         }
00166     }
00167     if (TrMatchChi2Prob) _TrMatchChi2Prob = *TrMatchChi2Prob;
00168     if (SpatialTrMatchChi2Prob) _SpatialTrMatchChi2Prob = *SpatialTrMatchChi2Prob;
00169 
00170     if (CPSFitChi2Match) _CPSFitChi2Match = *CPSFitChi2Match;
00171     if (CPSFitZVtx) _CPSFitZVtx = *CPSFitZVtx;
00172     if (CPSFitZVtxErr) _CPSFitZVtxErr = *CPSFitZVtxErr;
00173     if (CPSFitDCA) _CPSFitDCA = *CPSFitDCA;
00174     if (CPSFitDCAErr) _CPSFitDCAErr = *CPSFitDCAErr;
00175   
00176 }
00177 
00178 void TMBEMCluster::Set2(Float_t bestPSz, TArrayF* PSz, Int_t has_cps_match, 
00179                         TArrayI* cps_match, 
00180                         Float_t bestcps_match_chi2, TArrayF* cps_match_chi2, 
00181                         Int_t nEMLikeCPSClusters, Float_t* diphoton_p4v,
00182                         Int_t emhits_cpsUsed, 
00183                         Int_t* emhits_cftA, Int_t* emhits_cftS,
00184                         Int_t* emhits_smtA, Int_t* emhits_smtS,
00185                         Float_t* emhits_cftA_chi2, Float_t* emhits_cftS_chi2,
00186                         Float_t* emhits_smtA_chi2, Float_t* emhits_smtS_chi2,
00187                         Float_t emhits_e_f_discriminant) {
00188     _bestPSz = bestPSz;
00189     if (PSz) _PSz = *PSz;
00190     _has_cps_match = has_cps_match;
00191     if (cps_match) _cps_match = *cps_match;
00192     _bestcps_match_chi2 = bestcps_match_chi2;
00193     if (cps_match_chi2) _cps_match_chi2 = *cps_match_chi2;
00194     _nEMLikeCPSClusters = nEMLikeCPSClusters;
00195     for (int i=0; i < 4; ++i ) 
00196         _diphoton_p4v[i] = diphoton_p4v[i];
00197 
00198     _emhits_cpsUsed = emhits_cpsUsed;
00199     for (int i=0; i < 2; ++i) {
00200         _emhits_cftA[i] = emhits_cftA[i];
00201         _emhits_cftS[i] = emhits_cftS[i];
00202         _emhits_smtA[i] = emhits_smtA[i];
00203         _emhits_smtS[i] = emhits_smtS[i];
00204         _emhits_cftA_chi2[i] = emhits_cftA_chi2[i];
00205         _emhits_cftS_chi2[i] = emhits_cftS_chi2[i];
00206         _emhits_smtA_chi2[i] = emhits_smtA_chi2[i];
00207         _emhits_smtS_chi2[i] = emhits_smtS_chi2[i];
00208     }
00209     _emhits_e_f_discriminant = emhits_e_f_discriminant;
00210 }

Generated on Thu Apr 3 04:14:23 2008 for CAF by doxygen 1.3.4