////////////////////////////////////////////////////////// // This class has been automatically generated on // Sat Aug 30 07:53:33 2008 by ROOT version 5.18/00 // from TTree tree/Test Beam Reconst ntuple // found on file: /tmp/SbtNtpTest.root ////////////////////////////////////////////////////////// #ifndef QCAnal_h #define QCAnal_h #include #include #include #include #include #define _maxVectSize 100000 class TH1D; class TH2D; class QCAnal { private: TString _sigType; // addition Int_t _runNumber; // addition Int_t _nEntries; Bool_t _isData; // addition Int_t _nClustU[7]; Int_t _nClustV[7]; Int_t _nClustPxl; Int_t _nDet; // addition Double_t _stripULow; Double_t _stripUHigh; Double_t _pxlULow; Double_t _pxlUHigh; Double_t _stripVLow; Double_t _stripVHigh; Double_t _pxlVLow; Double_t _pxlVHigh; void InitBeamProfileHisto(); void InitDigiHisto(); void InitClusterHisto(); void InitTrkHisto(); void InitResidualHisto(); void FillBeamProfileHisto(double ClustPos, int ClustLayer, int ClustSide ); void FillBeamLayerLayerCorrHisto(double L0ClustPos, int L0ClustSide); void FillOccHisto(int DigiChan, int DigiRow, int DigiColumn, int DigiLayer, int DigiSide); void FillAdcHisto(int DigiAdc, int DigiLayer, int DigiSide); void FillClusterHisto(int clustPH, int clustMul, int clustLayer, int clustSide); void FillClusterMul(); void FillTrkHisto(double Chi2, double Ndof, int FitStatus, double itpX, double itpY, double slopeX, double slopeY ); void FillResidualHisto(); void Normalize1DHisto(TH1D* h1); void Normalize2DHisto(TH2D* h2); void PrintPostScript(); TH1D* _BeamProfU[7]; TH1D* _BeamProfV[7]; TH1D* _OccU[7]; TH1D* _OccV[7]; TH1D* _resU[7]; TH1D* _resV[7]; TH1D* _resX[7]; TH1D* _resY[7]; TH1D* _nclustU[7]; TH1D* _nclustV[7]; TH1D* _nclustPxl; TH1D* _clustMulU[7]; TH1D* _clustMulV[7]; TH1D* _clustMulPxl; TH1D* _clustPhU[7]; TH1D* _clustPhV[7]; TH1D* _AdcU[7]; TH1D* _AdcV[7]; TH2D* _intInside[7]; TH2D* _OccPxl; TH2D* _BeamProfPxl; TH2D* _BeamLayerLayerCorrU[4]; TH2D* _BeamLayerLayerCorrV[4]; TH1D* _DiffLayerCorrU[4]; TH1D* _DiffLayerCorrV[4]; TH1D* _ntrk; TH1D* _trkSlpX; TH1D* _trkSlpY; TH1D* _trkItpX; TH1D* _trkItpY; TH1D* _trkFitStatus; TH1D* _trkChi2; TH1D* _trkProbChi2; public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leaf types Int_t nevent; Int_t ntrk; Double_t chi2[_maxVectSize]; //[ntrk] Double_t ndof[_maxVectSize]; //[ntrk] Int_t fitStatus[_maxVectSize]; //[ntrk] Double_t ItpX[_maxVectSize]; //[ntrk] Double_t ItpY[_maxVectSize]; //[ntrk] Double_t SlpX[_maxVectSize]; //[ntrk] Double_t SlpY[_maxVectSize]; //[ntrk] Double_t XCov00[_maxVectSize]; //[ntrk] Double_t XCov01[_maxVectSize]; //[ntrk] Double_t XCov10[_maxVectSize]; //[ntrk] Double_t XCov11[_maxVectSize]; //[ntrk] Double_t YCov00[_maxVectSize]; //[ntrk] Double_t YCov01[_maxVectSize]; //[ntrk] Double_t YCov10[_maxVectSize]; //[ntrk] Double_t YCov11[_maxVectSize]; //[ntrk] Double_t XrecoT0[_maxVectSize]; //[ntrk] Double_t YrecoT0[_maxVectSize]; //[ntrk] Double_t XrecoT1[_maxVectSize]; //[ntrk] Double_t YrecoT1[_maxVectSize]; //[ntrk] Double_t XrecoT2[_maxVectSize]; //[ntrk] Double_t YrecoT2[_maxVectSize]; //[ntrk] Double_t XrecoT3[_maxVectSize]; //[ntrk] Double_t YrecoT3[_maxVectSize]; //[ntrk] Double_t XfitT0[_maxVectSize]; //[ntrk] Double_t YfitT0[_maxVectSize]; //[ntrk] Double_t XfitT1[_maxVectSize]; //[ntrk] Double_t YfitT1[_maxVectSize]; //[ntrk] Double_t XfitT2[_maxVectSize]; //[ntrk] Double_t YfitT2[_maxVectSize]; //[ntrk] Double_t XfitT3[_maxVectSize]; //[ntrk] Double_t YfitT3[_maxVectSize]; //[ntrk] Int_t nIntersect; Int_t intTrkID[_maxVectSize]; //[nIntersect] Int_t intLayer[_maxVectSize]; //[nIntersect] Int_t intLayerType[_maxVectSize]; //[nIntersect] Int_t intInside[_maxVectSize]; //[nIntersect] Double_t intXPos[_maxVectSize]; //[nIntersect] Double_t intYPos[_maxVectSize]; //[nIntersect] Double_t intZPos[_maxVectSize]; //[nIntersect] Double_t intUPos[_maxVectSize]; //[nIntersect] Double_t intVPos[_maxVectSize]; //[nIntersect] Int_t nSP; Int_t spLayer[_maxVectSize]; //[nSP] Int_t spLayerType[_maxVectSize]; //[nSP] Double_t spXPos[_maxVectSize]; //[nSP] Double_t spYPos[_maxVectSize]; //[nSP] Double_t spZPos[_maxVectSize]; //[nSP] Double_t spUPos[_maxVectSize]; //[nSP] Double_t spVPos[_maxVectSize]; //[nSP] Bool_t spIsOnTrk[_maxVectSize]; //[nSP] Int_t ncluster; Double_t ClustPos[_maxVectSize]; //[ncluster] Double_t ClustPxlUPos[_maxVectSize]; //[ncluster] Double_t ClustPxlVPos[_maxVectSize]; //[ncluster] Int_t ClustPH[_maxVectSize]; //[ncluster] Int_t ClustSide[_maxVectSize]; //[ncluster] Int_t ClustSize[_maxVectSize]; //[ncluster] Int_t ClustLayer[_maxVectSize]; //[ncluster] Int_t ClustLayerType[_maxVectSize]; //[ncluster] Bool_t ClustIsOnTrk[_maxVectSize]; //[ncluster] Int_t ndigi; Double_t DigiPos[_maxVectSize]; //[ndigi] Double_t DigiPxlUPos[_maxVectSize]; //[ndigi] Double_t DigiPxlVPos[_maxVectSize]; //[ndigi] ULong64_t DigiBCO[_maxVectSize]; //[ndigi] Int_t DigiLayer[_maxVectSize]; //[ndigi] Int_t DigiLayerType[_maxVectSize]; //[ndigi] Int_t DigiSide[_maxVectSize]; //[ndigi] Int_t DigiAdc[_maxVectSize]; //[ndigi] Int_t DigiStrip[_maxVectSize]; //[ndigi] Int_t DigiSet[_maxVectSize]; //[ndigi] Int_t DigiChip[_maxVectSize]; //[ndigi] Int_t DigiChan[_maxVectSize]; //[ndigi] Int_t DigiColumn[_maxVectSize]; //[ndigi] Int_t DigiRow[_maxVectSize]; //[ndigi] Bool_t DigiIsOnTrk[_maxVectSize]; //[ndigi] // specific MC quantities Int_t nIdealTrk; Double_t IdealItpX[_maxVectSize]; //[nIdealTrk] Double_t IdealSlpX[_maxVectSize]; //[nIdealTrk] Double_t IdealItpY[_maxVectSize]; //[nIdealTrk] Double_t IdealSlpY[_maxVectSize]; //[nIdealTrk] Int_t nIdealSP[_maxVectSize]; //[nIdealTrk] Double_t IdealT0X[_maxVectSize]; //[nIdealTrk] Double_t IdealT0Y[_maxVectSize]; //[nIdealTrk] Double_t IdealT0Z[_maxVectSize]; //[nIdealTrk] Double_t IdealT1X[_maxVectSize]; //[nIdealTrk] Double_t IdealT1Y[_maxVectSize]; //[nIdealTrk] Double_t IdealT1Z[_maxVectSize]; //[nIdealTrk] Double_t IdealT2X[_maxVectSize]; //[nIdealTrk] Double_t IdealT2Y[_maxVectSize]; //[nIdealTrk] Double_t IdealT2Z[_maxVectSize]; //[nIdealTrk] Double_t IdealT3X[_maxVectSize]; //[nIdealTrk] Double_t IdealT3Y[_maxVectSize]; //[nIdealTrk] Double_t IdealT3Z[_maxVectSize]; //[nIdealTrk] Int_t nMsTrk; Int_t nMsSP[_maxVectSize]; //[nMsTrk] Double_t MsT0X[_maxVectSize]; //[nMsTrk] Double_t MsT0Y[_maxVectSize]; //[nMsTrk] Double_t MsT0Z[_maxVectSize]; //[nMsTrk] Double_t MsT1X[_maxVectSize]; //[nMsTrk] Double_t MsT1Y[_maxVectSize]; //[nMsTrk] Double_t MsT1Z[_maxVectSize]; //[nMsTrk] Double_t MsT2X[_maxVectSize]; //[nMsTrk] Double_t MsT2Y[_maxVectSize]; //[nMsTrk] Double_t MsT2Z[_maxVectSize]; //[nMsTrk] Double_t MsT3X[_maxVectSize]; //[nMsTrk] Double_t MsT3Y[_maxVectSize]; //[nMsTrk] Double_t MsT3Z[_maxVectSize]; //[nMsTrk] // List of branches TBranch *b_nevent; //! TBranch *b_ntrk; //! TBranch *b_chi2; //! TBranch *b_ndof; //! TBranch *b_fitStatus; //! TBranch *b_ItpX; //! TBranch *b_ItpY; //! TBranch *b_SlpX; //! TBranch *b_SlpY; //! TBranch *b_XCov00; //! TBranch *b_XCov01; //! TBranch *b_XCov10; //! TBranch *b_XCov11; //! TBranch *b_YCov00; //! TBranch *b_YCov01; //! TBranch *b_YCov10; //! TBranch *b_YCov11; //! TBranch *b_XrecoT0; //! TBranch *b_YrecoT0; //! TBranch *b_XrecoT1; //! TBranch *b_YrecoT1; //! TBranch *b_XrecoT2; //! TBranch *b_YrecoT2; //! TBranch *b_XrecoT3; //! TBranch *b_YrecoT3; //! TBranch *b_XfitT0; //! TBranch *b_YfitT0; //! TBranch *b_XfitT1; //! TBranch *b_YfitT1; //! TBranch *b_XfitT2; //! TBranch *b_YfitT2; //! TBranch *b_XfitT3; //! TBranch *b_YfitT3; //! TBranch *b_nIntersect; //! TBranch *b_intTrkID; //! TBranch *b_intLayer; //! TBranch *b_intLayerType; //! TBranch *b_intInside; //! TBranch *b_intXPos; //! TBranch *b_intYPos; //! TBranch *b_intZPos; //! TBranch *b_intUPos; //! TBranch *b_intVPos; //! TBranch *b_nSP; //! TBranch *b_spLayer; //! TBranch *b_spLayerType; //! TBranch *b_spXPos; //! TBranch *b_spYPos; //! TBranch *b_spZPos; //! TBranch *b_spUPos; //! TBranch *b_spVPos; //! TBranch *b_spIsOnTrk; //! TBranch *b_ncluster; //! TBranch *b_ClustPos; //! TBranch *b_ClustPxlUPos; //! TBranch *b_ClustPxlVPos; //! TBranch *b_ClustPH; //! TBranch *b_ClustSide; //! TBranch *b_ClustSize; //! TBranch *b_ClustLayer; //! TBranch *b_ClustLayerType; //! TBranch *b_ClustIsOnTrk; //! TBranch *b_ndigi; //! TBranch *b_DigiPos; //! TBranch *b_DigiPxlUPos; //! TBranch *b_DigiPxlVPos; //! TBranch *b_DigiBCO; //! TBranch *b_DigiLayer; //! TBranch *b_DigiLayerType; //! TBranch *b_DigiSide; //! TBranch *b_DigiAdc; //! TBranch *b_DigiStrip; //! TBranch *b_DigiSet; //! TBranch *b_DigiChip; //! TBranch *b_DigiChan; //! TBranch *b_DigiColumn; //! TBranch *b_DigiRow; //! TBranch *b_DigiIsOnTrk; //! TBranch *b_nIdealTrk; //! TBranch *b_IdealItpX; //! TBranch *b_IdealSlpX; //! TBranch *b_IdealItpY; //! TBranch *b_IdealSlpY; //! TBranch *b_nIdealSP; //! TBranch *b_IdealT0X; //! TBranch *b_IdealT0Y; //! TBranch *b_IdealT0Z; //! TBranch *b_IdealT1X; //! TBranch *b_IdealT1Y; //! TBranch *b_IdealT1Z; //! TBranch *b_IdealT2X; //! TBranch *b_IdealT2Y; //! TBranch *b_IdealT2Z; //! TBranch *b_IdealT3X; //! TBranch *b_IdealT3Y; //! TBranch *b_IdealT3Z; //! TBranch *b_nMsTrk; //! TBranch *b_nMsSP; //! TBranch *b_MsT0X; //! TBranch *b_MsT0Y; //! TBranch *b_MsT0Z; //! TBranch *b_MsT1X; //! TBranch *b_MsT1Y; //! TBranch *b_MsT1Z; //! TBranch *b_MsT2X; //! TBranch *b_MsT2Y; //! TBranch *b_MsT2Z; //! TBranch *b_MsT3X; //! TBranch *b_MsT3Y; //! TBranch *b_MsT3Z; //! //QCAnal(TTree *tree=0); QCAnal(Int_t runNumber, char* dir, char* prefix, char* sig_type); virtual ~QCAnal(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry); virtual void Init(TTree *tree); virtual void Loop(); virtual Bool_t Notify(); virtual void Show(Long64_t entry = -1); }; #endif #ifdef QCAnal_cxx /* QCAnal::QCAnal(TTree *tree) */ /* { */ /* // if parameter tree is not specified (or zero), connect the file */ /* // used to generate this class and read the Tree. */ /* if (tree == 0) { */ /* TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/tmp/SbtNtpTest.root"); */ /* if (!f) { */ /* f = new TFile("/tmp/SbtNtpTest.root"); */ /* } */ /* tree = (TTree*)gDirectory->Get("tree"); */ /* } */ /* Init(tree); */ /* } */ QCAnal::QCAnal(Int_t runNumber, char* dir, char* prefix, char* sigType) { // assert( (sigType == "data") || (sigType == "MC") ); //define relevant variables for histogramming _nDet = 7; //define the max number of detectors _stripULow = -1.; _stripUHigh = 1.; _pxlULow = -0.35; _pxlUHigh = 0.35; _stripVLow = -1.; _stripVHigh = 1.; _pxlVLow = -0.1; _pxlVHigh = 0.1; TChain* tree = new TChain("tree"); _runNumber = runNumber; _sigType = sigType; _isData = (_sigType == "data") ? kTRUE : kFALSE; TString filename; if (dir) { filename.Append(dir); filename.Append("/"); } else filename=""; std::cout << "reading event of type: "<<_sigType<Add(filename); Init(tree); InitBeamProfileHisto(); InitDigiHisto(); InitClusterHisto(); InitTrkHisto(); InitResidualHisto(); } QCAnal::~QCAnal() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t QCAnal::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t QCAnal::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (!fChain->InheritsFrom(TChain::Class())) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void QCAnal::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normally not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("nevent", &nevent, &b_nevent); fChain->SetBranchAddress("ntrk", &ntrk, &b_ntrk); fChain->SetBranchAddress("chi2", chi2, &b_chi2); fChain->SetBranchAddress("ndof", ndof, &b_ndof); fChain->SetBranchAddress("fitStatus", fitStatus, &b_fitStatus); fChain->SetBranchAddress("ItpX", ItpX, &b_ItpX); fChain->SetBranchAddress("ItpY", ItpY, &b_ItpY); fChain->SetBranchAddress("SlpX", SlpX, &b_SlpX); fChain->SetBranchAddress("SlpY", SlpY, &b_SlpY); fChain->SetBranchAddress("XCov00", XCov00, &b_XCov00); fChain->SetBranchAddress("XCov01", XCov01, &b_XCov01); fChain->SetBranchAddress("XCov10", XCov10, &b_XCov10); fChain->SetBranchAddress("XCov11", XCov11, &b_XCov11); fChain->SetBranchAddress("YCov00", YCov00, &b_YCov00); fChain->SetBranchAddress("YCov01", YCov01, &b_YCov01); fChain->SetBranchAddress("YCov10", YCov10, &b_YCov10); fChain->SetBranchAddress("YCov11", YCov11, &b_YCov11); fChain->SetBranchAddress("XrecoT0", XrecoT0, &b_XrecoT0); fChain->SetBranchAddress("YrecoT0", YrecoT0, &b_YrecoT0); fChain->SetBranchAddress("XrecoT1", XrecoT1, &b_XrecoT1); fChain->SetBranchAddress("YrecoT1", YrecoT1, &b_YrecoT1); fChain->SetBranchAddress("XrecoT2", XrecoT2, &b_XrecoT2); fChain->SetBranchAddress("YrecoT2", YrecoT2, &b_YrecoT2); fChain->SetBranchAddress("XrecoT3", XrecoT3, &b_XrecoT3); fChain->SetBranchAddress("YrecoT3", YrecoT3, &b_YrecoT3); fChain->SetBranchAddress("XfitT0", XfitT0, &b_XfitT0); fChain->SetBranchAddress("YfitT0", YfitT0, &b_YfitT0); fChain->SetBranchAddress("XfitT1", XfitT1, &b_XfitT1); fChain->SetBranchAddress("YfitT1", YfitT1, &b_YfitT1); fChain->SetBranchAddress("XfitT2", XfitT2, &b_XfitT2); fChain->SetBranchAddress("YfitT2", YfitT2, &b_YfitT2); fChain->SetBranchAddress("XfitT3", XfitT3, &b_XfitT3); fChain->SetBranchAddress("YfitT3", YfitT3, &b_YfitT3); fChain->SetBranchAddress("nIntersect", &nIntersect, &b_nIntersect); fChain->SetBranchAddress("intTrkID", intTrkID, &b_intTrkID); fChain->SetBranchAddress("intLayer", intLayer, &b_intLayer); fChain->SetBranchAddress("intLayerType", intLayerType, &b_intLayerType); fChain->SetBranchAddress("intInside", intInside, &b_intInside); fChain->SetBranchAddress("intXPos", intXPos, &b_intXPos); fChain->SetBranchAddress("intYPos", intYPos, &b_intYPos); fChain->SetBranchAddress("intZPos", intZPos, &b_intZPos); fChain->SetBranchAddress("intUPos", intUPos, &b_intUPos); fChain->SetBranchAddress("intVPos", intVPos, &b_intVPos); fChain->SetBranchAddress("nSP", &nSP, &b_nSP); fChain->SetBranchAddress("spLayer", spLayer, &b_spLayer); fChain->SetBranchAddress("spLayerType", spLayerType, &b_spLayerType); fChain->SetBranchAddress("spXPos", spXPos, &b_spXPos); fChain->SetBranchAddress("spYPos", spYPos, &b_spYPos); fChain->SetBranchAddress("spZPos", spZPos, &b_spZPos); fChain->SetBranchAddress("spUPos", spUPos, &b_spUPos); fChain->SetBranchAddress("spVPos", spVPos, &b_spVPos); fChain->SetBranchAddress("spIsOnTrk", spIsOnTrk, &b_spIsOnTrk); fChain->SetBranchAddress("ncluster", &ncluster, &b_ncluster); fChain->SetBranchAddress("ClustPos", ClustPos, &b_ClustPos); fChain->SetBranchAddress("ClustPxlUPos", ClustPxlUPos, &b_ClustPxlUPos); fChain->SetBranchAddress("ClustPxlVPos", ClustPxlVPos, &b_ClustPxlVPos); fChain->SetBranchAddress("ClustPH", ClustPH, &b_ClustPH); fChain->SetBranchAddress("ClustSide", ClustSide, &b_ClustSide); fChain->SetBranchAddress("ClustSize", ClustSize, &b_ClustSize); fChain->SetBranchAddress("ClustLayer", ClustLayer, &b_ClustLayer); fChain->SetBranchAddress("ClustLayerType", ClustLayerType, &b_ClustLayerType); fChain->SetBranchAddress("ClustIsOnTrk", ClustIsOnTrk, &b_ClustIsOnTrk); fChain->SetBranchAddress("ndigi", &ndigi, &b_ndigi); fChain->SetBranchAddress("DigiPos", DigiPos, &b_DigiPos); fChain->SetBranchAddress("DigiPxlUPos", DigiPxlUPos, &b_DigiPxlUPos); fChain->SetBranchAddress("DigiPxlVPos", DigiPxlVPos, &b_DigiPxlVPos); fChain->SetBranchAddress("DigiBCO", DigiBCO, &b_DigiBCO); fChain->SetBranchAddress("DigiLayer", DigiLayer, &b_DigiLayer); fChain->SetBranchAddress("DigiLayerType", DigiLayerType, &b_DigiLayerType); fChain->SetBranchAddress("DigiSide", DigiSide, &b_DigiSide); fChain->SetBranchAddress("DigiAdc", DigiAdc, &b_DigiAdc); fChain->SetBranchAddress("DigiStrip", DigiStrip, &b_DigiStrip); fChain->SetBranchAddress("DigiSet", DigiSet, &b_DigiSet); fChain->SetBranchAddress("DigiChip", DigiChip, &b_DigiChip); fChain->SetBranchAddress("DigiChan", DigiChan, &b_DigiChan); fChain->SetBranchAddress("DigiColumn", DigiColumn, &b_DigiColumn); fChain->SetBranchAddress("DigiRow", DigiRow, &b_DigiRow); fChain->SetBranchAddress("DigiIsOnTrk", DigiIsOnTrk, &b_DigiIsOnTrk); // MC specific variables if(!_isData) { fChain->SetBranchAddress("nIdealTrk", &nIdealTrk, &b_nIdealTrk); fChain->SetBranchAddress("IdealItpX", IdealItpX, &b_IdealItpX); fChain->SetBranchAddress("IdealSlpX", IdealSlpX, &b_IdealSlpX); fChain->SetBranchAddress("IdealItpY", IdealItpY, &b_IdealItpY); fChain->SetBranchAddress("IdealSlpY", IdealSlpY, &b_IdealSlpY); fChain->SetBranchAddress("nIdealSP", nIdealSP, &b_nIdealSP); fChain->SetBranchAddress("IdealT0X", IdealT0X, &b_IdealT0X); fChain->SetBranchAddress("IdealT0Y", IdealT0Y, &b_IdealT0Y); fChain->SetBranchAddress("IdealT0Z", IdealT0Z, &b_IdealT0Z); fChain->SetBranchAddress("IdealT1X", IdealT1X, &b_IdealT1X); fChain->SetBranchAddress("IdealT1Y", IdealT1Y, &b_IdealT1Y); fChain->SetBranchAddress("IdealT1Z", IdealT1Z, &b_IdealT1Z); fChain->SetBranchAddress("IdealT2X", IdealT2X, &b_IdealT2X); fChain->SetBranchAddress("IdealT2Y", IdealT2Y, &b_IdealT2Y); fChain->SetBranchAddress("IdealT2Z", IdealT2Z, &b_IdealT2Z); fChain->SetBranchAddress("IdealT3X", IdealT3X, &b_IdealT3X); fChain->SetBranchAddress("IdealT3Y", IdealT3Y, &b_IdealT3Y); fChain->SetBranchAddress("IdealT3Z", IdealT3Z, &b_IdealT3Z); fChain->SetBranchAddress("nMsTrk", &nMsTrk, &b_nMsTrk); fChain->SetBranchAddress("nMsSP", nMsSP, &b_nMsSP); fChain->SetBranchAddress("MsT0X", MsT0X, &b_MsT0X); fChain->SetBranchAddress("MsT0Y", MsT0Y, &b_MsT0Y); fChain->SetBranchAddress("MsT0Z", MsT0Z, &b_MsT0Z); fChain->SetBranchAddress("MsT1X", MsT1X, &b_MsT1X); fChain->SetBranchAddress("MsT1Y", MsT1Y, &b_MsT1Y); fChain->SetBranchAddress("MsT1Z", MsT1Z, &b_MsT1Z); fChain->SetBranchAddress("MsT2X", MsT2X, &b_MsT2X); fChain->SetBranchAddress("MsT2Y", MsT2Y, &b_MsT2Y); fChain->SetBranchAddress("MsT2Z", MsT2Z, &b_MsT2Z); fChain->SetBranchAddress("MsT3X", MsT3X, &b_MsT3X); fChain->SetBranchAddress("MsT3Y", MsT3Y, &b_MsT3Y); fChain->SetBranchAddress("MsT3Z", MsT3Z, &b_MsT3Z); } Notify(); } Bool_t QCAnal::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } void QCAnal::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t QCAnal::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. if ( ntrk ==1 && TMath::Prob(chi2[0],int(ndof[0])) > 0.1) return 1; else return -1; } #endif // #ifdef QCAnal_cxx