////////////////////////////////////////////////////////// // This class has been automatically generated on // Thu Mar 8 10:04:53 2007 by ROOT version 5.10/00e // from TTree CollectionTree/CollectionTree // found on file: MuonAnal.aan.root ////////////////////////////////////////////////////////// #ifndef Align_3_h #define Align_3_h #include #include #include #include #include "SecondFile.h" class Align_3 { public : TTree *fChain; //!pointer to the analyzed TTree or TChain SecondFile *selother2; //Parallel chain to analyze Int_t fCurrent; //!current Tree number in a TChain // Declaration of leave types Int_t RunNumber; Int_t EventNumber; Char_t StreamESD_ref[153]; Char_t Stream1_ref[153]; Char_t Token[153]; Int_t Run; Int_t Event; Int_t Time; Double_t Weight; Int_t IEvent; vector *MSTrk_d0; vector *MSTrk_z0; vector *MSTrk_phi; vector *MSTrk_theta; vector *MSTrk_qOverP; vector *ExtrTrk_cov11; vector *ExtrTrk_cov12; vector *ExtrTrk_cov22; vector *ExtrTrk_cov13; vector *ExtrTrk_cov23; vector *ExtrTrk_cov33; vector *ExtrTrk_cov14; vector *ExtrTrk_cov24; vector *ExtrTrk_cov34; vector *ExtrTrk_cov44; vector *ExtrTrk_cov15; vector *ExtrTrk_cov25; vector *ExtrTrk_cov35; vector *ExtrTrk_cov45; vector *ExtrTrk_cov55; vector *IDTrk_d0; vector *IDTrk_z0; vector *IDTrk_phi; vector *IDTrk_theta; vector *IDTrk_qOverP; vector *ExtrTrk_d0; vector *ExtrTrk_z0; vector *ExtrTrk_phi; vector *ExtrTrk_theta; vector *ExtrTrk_qOverP; vector *ppvtxX; vector *ppvtxY; vector *ppvtxZ; vector *mcMuonEta; vector *mcMuonPt; vector *mcMuonPx; vector *mcMuonPy; vector *mcMuonPz; // List of branches TBranch *b_RunNumber; //! TBranch *b_EventNumber; //! TBranch *b_StreamESD_ref; //! TBranch *b_Stream1_ref; //! TBranch *b_Token; //! TBranch *b_Run; //! TBranch *b_Event; //! TBranch *b_Time; //! TBranch *b_Weight; //! TBranch *b_IEvent; //! TBranch *b_MSTrk_d0; //! TBranch *b_MSTrk_z0; //! TBranch *b_MSTrk_phi; //! TBranch *b_MSTrk_theta; //! TBranch *b_MSTrk_qOverP; //! TBranch *b_ExtrTrk_cov11; //! TBranch *b_ExtrTrk_cov12; //! TBranch *b_ExtrTrk_cov22; //! TBranch *b_ExtrTrk_cov13; //! TBranch *b_ExtrTrk_cov23; //! TBranch *b_ExtrTrk_cov33; //! TBranch *b_ExtrTrk_cov14; //! TBranch *b_ExtrTrk_cov24; //! TBranch *b_ExtrTrk_cov34; //! TBranch *b_ExtrTrk_cov44; //! TBranch *b_ExtrTrk_cov15; //! TBranch *b_ExtrTrk_cov25; //! TBranch *b_ExtrTrk_cov35; //! TBranch *b_ExtrTrk_cov45; //! TBranch *b_ExtrTrk_cov55; //! TBranch *b_IDTrk_d0; //! TBranch *b_IDTrk_z0; //! TBranch *b_IDTrk_phi; //! TBranch *b_IDTrk_theta; //! TBranch *b_IDTrk_qOverP; //! TBranch *b_ExtrTrk_d0; //! TBranch *b_ExtrTrk_z0; //! TBranch *b_ExtrTrk_phi; //! TBranch *b_ExtrTrk_theta; //! TBranch *b_ExtrTrk_qOverP; //! TBranch *b_ppvtxX; //! TBranch *b_ppvtxY; //! TBranch *b_ppvtxZ; //! TBranch *b_mcMuonEta; //! TBranch *b_mcMuonPt; //! TBranch *b_mcMuonPx; //! TBranch *b_mcMuonPy; //! TBranch *b_mcMuonPz; //! Align_3(TTree *tree=0); virtual ~Align_3(); 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); //functions declarations void minexam(); void fcnk0(int &npar, double *gin, double &f, double *x, int iflag); //TH1F Arrays TH1F* DelZ[16]; TH1F* AlDelZ[16]; TH1F* DelZPull[16]; TH1F* DelCt[16]; TH1F* DelThPull[16]; TH1F* AlDelCt[16]; TH1F* etavsZ[16]; TH2F* CotcovZZ[16]; TH2F* CotcovTT[16]; TProfile* CotvsDzprof[16]; TProfile* AlCotvsDzprof[16]; TProfile* DzvsZmuprof[16]; TProfile* AlDzvsZmuprof[16]; }; #endif #ifdef Align_3_cxx Align_3::Align_3(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) { #ifdef SINGLE_TREE // The following code should be used if you want this class to access // a single tree instead of a chain TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("Memory Directory"); if (!f) { f = new TFile("Memory Directory"); } tree = (TTree*)gDirectory->Get("CollectionTree"); #else // SINGLE_TREE // The following code should be used if you want this class to access a chain // of trees. TChain * chain = new TChain("CollectionTree",""); chain->Add("MuonAnal_Sec9pos_muminusNEW_00003.aan.root/CollectionTree"); chain->Add("MuonAnal_Sec9pos_muminusNEW_00004.aan.root/CollectionTree"); tree = chain; /* TChain * chain = new TChain("CollectionTree",""); chain->Add("ntuples/MuonAnal_nominal_1x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_2x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_3x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_4x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_5x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_6x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_7x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_8x.aan.root/CollectionTree"); chain->Add("ntuples/MuonAnal_nominal_9x.aan.root/CollectionTree"); tree=chain; // selother2 = new SecondFile(chain2); //tml */ #endif // SINGLE_TREE } Init(tree); } Align_3::~Align_3() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t Align_3::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t Align_3::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); selother2->LoadTree(entry); if (centry < 0) return centry; if (fChain->IsA() != TChain::Class()) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void Align_3::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses of the tree // will be set. It is normaly 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 with PROOF. // Set object pointer MSTrk_d0 = 0; MSTrk_z0 = 0; MSTrk_phi = 0; MSTrk_theta = 0; MSTrk_qOverP = 0; ExtrTrk_cov11 = 0; ExtrTrk_cov12 = 0; ExtrTrk_cov22 = 0; ExtrTrk_cov13 = 0; ExtrTrk_cov23 = 0; ExtrTrk_cov33 = 0; ExtrTrk_cov14 = 0; ExtrTrk_cov24 = 0; ExtrTrk_cov34 = 0; ExtrTrk_cov44 = 0; ExtrTrk_cov15 = 0; ExtrTrk_cov25 = 0; ExtrTrk_cov35 = 0; ExtrTrk_cov45 = 0; ExtrTrk_cov55 = 0; IDTrk_d0 = 0; IDTrk_z0 = 0; IDTrk_phi = 0; IDTrk_theta = 0; IDTrk_qOverP = 0; ExtrTrk_d0 = 0; ExtrTrk_z0 = 0; ExtrTrk_phi = 0; ExtrTrk_theta = 0; ExtrTrk_qOverP = 0; ppvtxX = 0; ppvtxY = 0; ppvtxZ = 0; mcMuonEta = 0; mcMuonPt = 0; mcMuonPx = 0; mcMuonPy = 0; mcMuonPz = 0; // Set branch addresses if (tree == 0) return; fChain = tree; fCurrent = -1; //fChain->SetMakeClass(1); fChain->SetBranchAddress("RunNumber",&RunNumber); fChain->SetBranchAddress("EventNumber",&EventNumber); fChain->SetBranchAddress("StreamESD_ref",StreamESD_ref); fChain->SetBranchAddress("Stream1_ref",Stream1_ref); fChain->SetBranchAddress("Token",Token); fChain->SetBranchAddress("Run",&Run); fChain->SetBranchAddress("Event",&Event); fChain->SetBranchAddress("Time",&Time); fChain->SetBranchAddress("Weight",&Weight); fChain->SetBranchAddress("IEvent",&IEvent); fChain->SetBranchAddress("MSTrk_d0",&MSTrk_d0); fChain->SetBranchAddress("MSTrk_z0",&MSTrk_z0); fChain->SetBranchAddress("MSTrk_phi",&MSTrk_phi); fChain->SetBranchAddress("MSTrk_theta",&MSTrk_theta); fChain->SetBranchAddress("MSTrk_qOverP",&MSTrk_qOverP); fChain->SetBranchAddress("ExtrTrk_cov11", &ExtrTrk_cov11, &b_ExtrTrk_cov11); fChain->SetBranchAddress("ExtrTrk_cov12", &ExtrTrk_cov12, &b_ExtrTrk_cov12); fChain->SetBranchAddress("ExtrTrk_cov22", &ExtrTrk_cov22, &b_ExtrTrk_cov22); fChain->SetBranchAddress("ExtrTrk_cov13", &ExtrTrk_cov13, &b_ExtrTrk_cov13); fChain->SetBranchAddress("ExtrTrk_cov23", &ExtrTrk_cov23, &b_ExtrTrk_cov23); fChain->SetBranchAddress("ExtrTrk_cov33", &ExtrTrk_cov33, &b_ExtrTrk_cov33); fChain->SetBranchAddress("ExtrTrk_cov14", &ExtrTrk_cov14, &b_ExtrTrk_cov14); fChain->SetBranchAddress("ExtrTrk_cov24", &ExtrTrk_cov24, &b_ExtrTrk_cov24); fChain->SetBranchAddress("ExtrTrk_cov34", &ExtrTrk_cov34, &b_ExtrTrk_cov34); fChain->SetBranchAddress("ExtrTrk_cov44", &ExtrTrk_cov44, &b_ExtrTrk_cov44); fChain->SetBranchAddress("ExtrTrk_cov15", &ExtrTrk_cov15, &b_ExtrTrk_cov15); fChain->SetBranchAddress("ExtrTrk_cov25", &ExtrTrk_cov25, &b_ExtrTrk_cov25); fChain->SetBranchAddress("ExtrTrk_cov35", &ExtrTrk_cov35, &b_ExtrTrk_cov35); fChain->SetBranchAddress("ExtrTrk_cov45", &ExtrTrk_cov45, &b_ExtrTrk_cov45); fChain->SetBranchAddress("ExtrTrk_cov55", &ExtrTrk_cov55, &b_ExtrTrk_cov55); fChain->SetBranchAddress("IDTrk_d0",&IDTrk_d0); fChain->SetBranchAddress("IDTrk_z0",&IDTrk_z0); fChain->SetBranchAddress("IDTrk_phi",&IDTrk_phi); fChain->SetBranchAddress("IDTrk_theta",&IDTrk_theta); fChain->SetBranchAddress("IDTrk_qOverP",&IDTrk_qOverP); fChain->SetBranchAddress("ExtrTrk_d0",&ExtrTrk_d0); fChain->SetBranchAddress("ExtrTrk_z0",&ExtrTrk_z0); fChain->SetBranchAddress("ExtrTrk_phi",&ExtrTrk_phi); fChain->SetBranchAddress("ExtrTrk_theta",&ExtrTrk_theta); fChain->SetBranchAddress("ExtrTrk_qOverP",&ExtrTrk_qOverP); fChain->SetBranchAddress("ppvtxX",&ppvtxX); fChain->SetBranchAddress("ppvtxY",&ppvtxY); fChain->SetBranchAddress("ppvtxZ",&ppvtxZ); fChain->SetBranchAddress("mcMuonEta",&mcMuonEta); fChain->SetBranchAddress("mcMuonPt",&mcMuonPt); fChain->SetBranchAddress("mcMuonPx",&mcMuonPx); fChain->SetBranchAddress("mcMuonPy",&mcMuonPy); fChain->SetBranchAddress("mcMuonPz",&mcMuonPz); Notify(); } Bool_t Align_3::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. Typically here the branch pointers // will be retrieved. It is normaly not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. // Get branch pointers b_RunNumber = fChain->GetBranch("RunNumber"); b_EventNumber = fChain->GetBranch("EventNumber"); b_StreamESD_ref = fChain->GetBranch("StreamESD_ref"); b_Stream1_ref = fChain->GetBranch("Stream1_ref"); b_Token = fChain->GetBranch("Token"); b_Run = fChain->GetBranch("Run"); b_Event = fChain->GetBranch("Event"); b_Time = fChain->GetBranch("Time"); b_Weight = fChain->GetBranch("Weight"); b_IEvent = fChain->GetBranch("IEvent"); b_MSTrk_d0 = fChain->GetBranch("MSTrk_d0"); b_MSTrk_z0 = fChain->GetBranch("MSTrk_z0"); b_MSTrk_phi = fChain->GetBranch("MSTrk_phi"); b_MSTrk_theta = fChain->GetBranch("MSTrk_theta"); b_MSTrk_qOverP = fChain->GetBranch("MSTrk_qOverP"); b_IDTrk_d0 = fChain->GetBranch("IDTrk_d0"); b_IDTrk_z0 = fChain->GetBranch("IDTrk_z0"); b_IDTrk_phi = fChain->GetBranch("IDTrk_phi"); b_IDTrk_theta = fChain->GetBranch("IDTrk_theta"); b_IDTrk_qOverP = fChain->GetBranch("IDTrk_qOverP"); b_ExtrTrk_d0 = fChain->GetBranch("ExtrTrk_d0"); b_ExtrTrk_z0 = fChain->GetBranch("ExtrTrk_z0"); b_ExtrTrk_phi = fChain->GetBranch("ExtrTrk_phi"); b_ExtrTrk_theta = fChain->GetBranch("ExtrTrk_theta"); b_ExtrTrk_qOverP = fChain->GetBranch("ExtrTrk_qOverP"); b_ppvtxX = fChain->GetBranch("ppvtxX"); b_ppvtxY = fChain->GetBranch("ppvtxY"); b_ppvtxZ = fChain->GetBranch("ppvtxZ"); b_mcMuonEta = fChain->GetBranch("mcMuonEta"); b_mcMuonPt = fChain->GetBranch("mcMuonPt"); b_mcMuonPx = fChain->GetBranch("mcMuonPx"); b_mcMuonPy = fChain->GetBranch("mcMuonPy"); b_mcMuonPz = fChain->GetBranch("mcMuonPz"); return kTRUE; } void Align_3::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t Align_3::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef Align_3_cxx