Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "Alignment/MuonAlignmentAlgorithms/interface/DTMuonLocalAlignment.h"
0002 
0003 DTMuonLocalAlignment::DTMuonLocalAlignment() : tali(nullptr), f(nullptr) {}
0004 DTMuonLocalAlignment::~DTMuonLocalAlignment() {}
0005 
0006 void DTMuonLocalAlignment::initNTuples(int nMtxSection) {
0007   tali = new TChain("InfoTuple");
0008 
0009   int iFile = 0;
0010   if (nMtxSection > 0)
0011     iFile = (nMtxSection - 1) * numberOfRootFiles;
0012 
0013   for (int n_file = iFile; n_file < iFile + numberOfRootFiles; ++n_file) {
0014     char theNameOfTheFile[150];
0015     snprintf(
0016         theNameOfTheFile, sizeof(theNameOfTheFile), "%sMyNtupleResidual_Craft09_%d.root", ntuplePath.c_str(), n_file);
0017     tali->Add(theNameOfTheFile);
0018   }
0019 
0020   setBranchAddressTree();
0021 }
0022 
0023 void DTMuonLocalAlignment::setBranchAddressTree() {
0024   tali->SetBranchAddress("p", &p);
0025   tali->SetBranchAddress("pt", &pt);
0026   tali->SetBranchAddress("eta", &eta);
0027   tali->SetBranchAddress("phi", &phi);
0028   tali->SetBranchAddress("charge", &charge);
0029   tali->SetBranchAddress("nseg", &nseg);
0030   tali->SetBranchAddress("nphihits", nphihits);
0031   tali->SetBranchAddress("nthetahits", nthetahits);
0032   tali->SetBranchAddress("nhits", nhits);
0033   tali->SetBranchAddress("xSl", xSl);
0034   tali->SetBranchAddress("dxdzSl", dxdzSl);
0035   tali->SetBranchAddress("exSl", exSl);
0036   tali->SetBranchAddress("edxdzSl", edxdzSl);
0037   tali->SetBranchAddress("exdxdzSl", edxdzSl);
0038   tali->SetBranchAddress("ySl", ySl);
0039   tali->SetBranchAddress("dydzSl", dydzSl);
0040   tali->SetBranchAddress("eySl", eySl);
0041   tali->SetBranchAddress("edydzSl", edydzSl);
0042   tali->SetBranchAddress("eydydzSl", eydydzSl);
0043   tali->SetBranchAddress("xSlSL1", xSlSL1);
0044   tali->SetBranchAddress("dxdzSlSL1", dxdzSlSL1);
0045   tali->SetBranchAddress("exSlSL1", exSlSL1);
0046   tali->SetBranchAddress("edxdzSlSL1", edxdzSlSL1);
0047   tali->SetBranchAddress("xSL1SL3", xSL1SL3);
0048   tali->SetBranchAddress("xSlSL3", xSlSL3);
0049   tali->SetBranchAddress("dxdzSlSL3", dxdzSlSL3);
0050   tali->SetBranchAddress("exSlSL3", exSlSL3);
0051   tali->SetBranchAddress("edxdzSlSL3", edxdzSlSL3);
0052   tali->SetBranchAddress("xSL3SL1", xSL3SL1);
0053   tali->SetBranchAddress("xc", xc);
0054   tali->SetBranchAddress("yc", yc);
0055   tali->SetBranchAddress("zc", zc);
0056   tali->SetBranchAddress("ex", ex);
0057   tali->SetBranchAddress("xcp", xcp);
0058   tali->SetBranchAddress("ycp", ycp);
0059   tali->SetBranchAddress("excp", excp);
0060   tali->SetBranchAddress("eycp", eycp);
0061   tali->SetBranchAddress("wh", wh);
0062   tali->SetBranchAddress("st", st);
0063   tali->SetBranchAddress("sr", sr);
0064   tali->SetBranchAddress("sl", sl);
0065   tali->SetBranchAddress("la", la);
0066 }