CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/MuonAlignmentAlgorithms/src/DTMuonLocalAlignment.cc

Go to the documentation of this file.
00001 #include "Alignment/MuonAlignmentAlgorithms/interface/DTMuonLocalAlignment.h"
00002 
00003 
00004 
00005 
00006 
00007 DTMuonLocalAlignment::DTMuonLocalAlignment() :
00008   tali(0), f(0)
00009 {}
00010 DTMuonLocalAlignment::~DTMuonLocalAlignment(){}
00011 
00012 
00013 void DTMuonLocalAlignment::initNTuples(int nMtxSection) {
00014 
00015   tali = new TChain("InfoTuple");
00016 
00017   int iFile = 0;
00018   if (nMtxSection>0) iFile = (nMtxSection - 1)*numberOfRootFiles; 
00019 
00020   for(int n_file = iFile; n_file < iFile+numberOfRootFiles; ++n_file) {
00021 
00022     char theNameOfTheFile[150];
00023     snprintf(theNameOfTheFile, sizeof(theNameOfTheFile),
00024              "%sMyNtupleResidual_Craft09_%d.root", ntuplePath.c_str(), n_file);
00025     tali->Add(theNameOfTheFile); 
00026 
00027   }
00028 
00029   setBranchAddressTree();
00030 
00031 }
00032 
00033 
00034 
00035 
00036 void DTMuonLocalAlignment::setBranchAddressTree() {
00037 
00038   tali->SetBranchAddress("p", &p);
00039   tali->SetBranchAddress("pt", &pt);
00040   tali->SetBranchAddress("eta", &eta);
00041   tali->SetBranchAddress("phi", &phi);
00042   tali->SetBranchAddress("charge", &charge);
00043   tali->SetBranchAddress("nseg", &nseg);
00044   tali->SetBranchAddress("nphihits", nphihits);
00045   tali->SetBranchAddress("nthetahits", nthetahits);
00046   tali->SetBranchAddress("nhits", nhits);
00047   tali->SetBranchAddress("xSl", xSl);
00048   tali->SetBranchAddress("dxdzSl", dxdzSl);
00049   tali->SetBranchAddress("exSl", exSl);
00050   tali->SetBranchAddress("edxdzSl", edxdzSl);
00051   tali->SetBranchAddress("exdxdzSl", edxdzSl);
00052   tali->SetBranchAddress("ySl", ySl);
00053   tali->SetBranchAddress("dydzSl", dydzSl);
00054   tali->SetBranchAddress("eySl", eySl);
00055   tali->SetBranchAddress("edydzSl", edydzSl);
00056   tali->SetBranchAddress("eydydzSl", eydydzSl);
00057   tali->SetBranchAddress("xSlSL1", xSlSL1);
00058   tali->SetBranchAddress("dxdzSlSL1", dxdzSlSL1);
00059   tali->SetBranchAddress("exSlSL1", exSlSL1);
00060   tali->SetBranchAddress("edxdzSlSL1", edxdzSlSL1);
00061   tali->SetBranchAddress("xSL1SL3", xSL1SL3);
00062   tali->SetBranchAddress("xSlSL3", xSlSL3);
00063   tali->SetBranchAddress("dxdzSlSL3", dxdzSlSL3);
00064   tali->SetBranchAddress("exSlSL3", exSlSL3);
00065   tali->SetBranchAddress("edxdzSlSL3", edxdzSlSL3);
00066   tali->SetBranchAddress("xSL3SL1", xSL3SL1);
00067   tali->SetBranchAddress("xc", xc);
00068   tali->SetBranchAddress("yc", yc);
00069   tali->SetBranchAddress("zc", zc);
00070   tali->SetBranchAddress("ex", ex);
00071   tali->SetBranchAddress("xcp", xcp);
00072   tali->SetBranchAddress("ycp", ycp);
00073   tali->SetBranchAddress("excp", excp);
00074   tali->SetBranchAddress("eycp", eycp);
00075   tali->SetBranchAddress("wh", wh);
00076   tali->SetBranchAddress("st", st);
00077   tali->SetBranchAddress("sr", sr);
00078   tali->SetBranchAddress("sl", sl);
00079   tali->SetBranchAddress("la", la);
00080 
00081 }
00082