Esempio n. 1
0
        TFile(
            os.path.join(input_dir, f),
            tree_path_in_file,
        ) for f in os.listdir(input_dir) if ".root" in f
    ],
    xs=1.256,
    sumw=sumw,
    isMC=True,
    plot_name="ZZ",
)
ZZ.param = -1.
ZZ.branches = [
    "mass4l",
    "massZ1",
    "massZ2",
    "pT4l",
    "rapidity4l",
    "pTZ1",
    "pTZ2",
    "pTL1",
    "pTL2",
    "pTL3",
    "pTL4",
    "cosTheta1",
    "cosTheta2",
    "cosThetaStar",
    "Phi",
    "Phi1",
    "passedFullSelection",
]
input_dir = "/cmsuf/data/store/user/t2/users/klo/MLHEP/MuonTree/210112_mg_dyll/"
tree_path_in_file = "LiteTree"

# ____________________________________________________________________________________________________________________________________________ ||
sample_dict = {}
for f in os.listdir(input_dir):
    if ".root" not in f: continue
    mass_str = f.replace(".root", "")
    sample_dict[mass_str] = CMSDataset(
        "DYToLL_M" + mass_str,
        [
            TFile(
                os.path.join(input_dir, f),
                tree_path_in_file,
            ),
        ],
        xs=1.,
        sumw=1.,
        plot_name="DYToLL_M" + mass_str,
    )
    sample_dict[mass_str].mass = float(mass_str)
    sample_dict[mass_str].branches = [
        "Muon_Pt",
        "Muon_Eta",
        "Muon_Phi",
        "Muon_GenPt",
        "Muon_GenEta",
        "Muon_GenPhi",
        "Muon_GenMass",
    ]
Esempio n. 3
0
# ______________________________________________________________________ ||
input_dir = "/cmsuf/data/store/user/t2/users/klo/Higgs/DarkZ/NTuples/ZPlusX_Early2017_v1/"
tree_path_in_file = "passedEvents"

# ______________________________________________________________________ ||
data2017 = CMSDataset(
    "Data2017",
    [
        TFile(
            os.path.join(input_dir,
                         "skimZ1L_Data_Run2017-17Nov2017_noDuplicates.root"),
            tree_path_in_file,
        ),
    ],
    isMC=False,
)

# ______________________________________________________________________ ||

data2017.branches = [
    #"genWeight",
    "passedFullSelection",
    "passedZXCRSelection",
    "passedZ1LSelection",
    #"dataMCWeight",
    #"pileupWeight",
    "massZ1",
    "massZ2",
]
from PyLooper.hep.cms.dataset.CMSDataset import CMSDataset
from PyLooper.hep.root.TFile import TFile

# ____________________________________________________________________________________________________________________________________________ ||
input_dir = "/Users/lucien/CMS/ztoll-ml/Data/"
tree_path_in_file = "LiteTree"

# ____________________________________________________________________________________________________________________________________________ ||
ZJetsToLL_LO_MLM = CMSDataset(
    "ZJetsToLL_LO_MLM",
    [
        TFile(
            os.path.join(input_dir, "2020-07-09_MuonTreeProducer.root"),
            tree_path_in_file,
        ),
    ],
    xs=1.,
    sumw=1.,
    plot_name="ZJetsToLL_LO_MLM",
)

ZJetsToLL_LO_MLM.branches = [
    "Muon_Pt",
    "Muon_Eta",
    "Muon_Phi",
    "Muon_GenPt",
    "Muon_GenEta",
    "Muon_GenPhi",
    "Muon_GenMass",
]