void PublicationHisto(TString config=""){ //gROOT->SetStyle("Plain"); gROOT->ForceStyle(); gROOT->ProcessLine(".x /home/aran/.rootlogon.C"); gStyle->SetPadBottomMargin(.160); // Need this for subscripts gStyle->SetPadTopMargin(.08); TEnv *params = new TEnv("PubHisto"); params->ReadFile (config, kEnvChange); TString type=params->GetValue("Histo.Type", "PublicationHisto"); if (type != "PublicationHisto"){ printf(" Must have Histo.Type: PublicationHisto in config file"); return; } // Fetch the histos from the different files: TString hname=params->GetValue("Histo.Name", "BOGUSNAME"); TObjArray sameHistos; if (hname == "3"){// ok this means we want to add 3 histos TString h1=params->GetValue("Histo.1.Name", "BOGUS_H1"); TString h2=params->GetValue("Histo.2.Name", "BOGUS_H2"); TString h3=params->GetValue("Histo.3.Name", "BOGUS_H3"); printf("Adding histos: %s, %s, %s \n",h1.Data(),h2.Data(), h3.Data()); TObjArray sameHistos = GetThreeSameHistos(h1,h2,h3,params); } else {// normal case TObjArray sameHistos = GetSameHistos(hname,params); } // Plot them: printf (" Found %3i histos \n",sameHistos.GetEntriesFast()); TCanvas *c1 = new TCanvas("c1","PubHist"); PlotPubHisto(sameHistos,params); TString outfile=params->GetValue("Output.File", "dummy.eps"); c1->SaveAs(outfile.Data()); }
void readConfigFile (string configFileList, string configFilePath) { // Input stream for data file ifstream inFile; // Open input file inFile.open (configFileList.c_str(), ios::in); // If can't open input file, exit the code if (!inFile) { cerr << "ERROR: Can't open input file: " << configFileList << endl; exit (1); } // ROOT configuration file while (inFile >> inputType) { string configfile=configFilePath + "/" + inputType; TEnv *params = new TEnv ("config_file"); params->ReadFile (configfile.c_str(), kEnvChange); // Get Root file name string rootFileNameNum = params->GetValue ("NormalizedrootfileNum", "file"); inputRootFileNum.push_back (rootFileNameNum.c_str() ); string rootFileNameDen = params->GetValue ("NormalizedrootfileDen", "file"); inputRootFileDen.push_back (rootFileNameDen.c_str() ); // Get process name: data, ttbar, wjets etc. string process = params->GetValue ("process", "theprocess"); inputProcess.push_back(process.c_str()); // Marker Style int themarker = params->GetValue("marketStyle", 20); inputMarkerStyle.push_back(themarker); // Line Color int thecolor = params->GetValue("color" , kRed); inputColor.push_back (thecolor); // Store TLegend text string thelegend = params->GetValue("legend" , "histo"); inputLegend.push_back (thelegend.c_str()); // Use collision data in your plots? --> 99% of the time yes...just in case you do not want to string isSignal = params->GetValue("isSignal", "False"); inputIsSignal.push_back ( isSignal.c_str() ); // Output root file name HistosOutputRootFile = params->GetValue("outputRootFileHistos", "Histos.root"); } inFile.close(); }
void KVINDRAUpDater::SetPHDs(KVDBRun*) { //If the environment variable // name_of_dataset.INDRADB.PHD: name_of_file //is set, then the corresponding file (which must be in $KVROOT/KVFiles/name_of_dataset) //is read and used to set the (Moulton) pulse-height defect parameters of all silicon //detectors. TString phdfile = gExpDB->GetDBEnv("PHD"); if (phdfile != "") { cout << "--> Setting Si pulse height defect parameters (Moulton)" << endl; //get full path to file TString path; if (KVBase::SearchKVFile(phdfile.Data(), path, gDataSet->GetName())) { //read file with a TEnv TEnv phds; if (phds.ReadFile(path.Data(), kEnvLocal) != 0) { Error("SetPHDs", "TEnv::ReadFile != 0, cannot read PHD file"); } //loop over all silicons TIter next_si(GetINDRA()->GetListOfSi()); KVSilicon* si; while ((si = (KVSilicon*)next_si())) { Int_t group = phds.GetValue(si->GetName(), 0); if (group) { Double_t p1 = phds.GetValue(Form("Group%d.p1", group), 0.0); Double_t p2 = phds.GetValue(Form("Group%d.p2", group), 0.0); //set parameters for this detector //using si->SetMoultonPHDParameters(Double_t a_1, Double_t a_2, Double_t b_1, Double_t b_2) //in our case, // a_1 = 0.0223 a_2 = 0.5682 b_1 = p2 b_2 = p1 si->SetMoultonPHDParameters(0.0223, 0.5682, p2, p1); } } //set flag in INDRA to say this has been done GetINDRA()->PHDSet(); } else { Error("SetPHDs", "File %s not found", phdfile.Data()); } } }
void DSelector_kpkm::Init(TTree *locTree) { // USERS: IN THIS FUNCTION, ONLY MODIFY SECTIONS WITH A "USER" OR "EXAMPLE" LABEL. LEAVE THE REST ALONE. // 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. // Init() will be called many times when running on PROOF (once per file to be processed). //USERS: SET OUTPUT FILE NAME //can be overriden by user in PROOF dOutputFileName = "kpkm.root"; //"" for none dOutputTreeFileName = "tree_kpkm.root"; //"" for none dFlatTreeFileName = "flat_tree_kpkm.root"; //output flat tree (one combo per tree entry), "" for none dFlatTreeName = "kpkm_Tree"; //if blank, default name will be chosen //Because this function gets called for each TTree in the TChain, we must be careful: //We need to re-initialize the tree interface & branch wrappers, but don't want to recreate histograms bool locInitializedPriorFlag = dInitializedFlag; //save whether have been initialized previously DSelector::Init(locTree); //This must be called to initialize wrappers for each new TTree //gDirectory now points to the output file with name dOutputFileName (if any) if(locInitializedPriorFlag) return; //have already created histograms, etc. below: exit Get_ComboWrappers(); dPreviousRunNumber = 0; /*********************************** EXAMPLE USER INITIALIZATION: ANALYSIS ACTIONS **********************************/ // Define particles of interest for histogramming std::deque<Particle_t> MyPhi; MyPhi.push_back(KPlus); MyPhi.push_back(KMinus); std::deque<Particle_t> MyLambda; MyLambda.push_back(KMinus); MyLambda.push_back(Proton); // Set up default cut parameters dSlope = 1.0; dYint = 0.0; // Read in parameters from configuration file TEnv *env = new TEnv(dOption); std::cout << "dOption: " << dOption << std::endl; if (!dOption) std::cout << "No configuration file provided for TEnv" << std::endl; else { dSlope = env->GetValue("dSlope", dSlope); dYint = env->GetValue("dYint", dYint); env->PrintEnv(); } //ANALYSIS ACTIONS: //Executed in order if added to dAnalysisActions //false/true below: use measured/kinfit data // Initial histograms dAnalysisActions.push_back(new DHistogramAction_ParticleID(dComboWrapper, false, "Pre-cuts")); dAnalysisActions.push_back(new DHistogramAction_ParticleComboKinematics(dComboWrapper, false, "Pre-cuts")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyPhi, 1000, 0.9, 2.4, "Phi_pre-cut")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyLambda, 1000, 1.0, 3.0, "Lambda_pre-cut")); dAnalysisActions.push_back(new DHistogramAction_MissingMassSquared(dComboWrapper, false, 1000, -0.1, 0.1, "Pre-cuts")); dAnalysisActions.push_back(new DHistogramAction_KinFitResults(dComboWrapper, "Pre-cuts")); // Cut on missing mass squared and histogram the invariant mass dAnalysisActions.push_back(new DCutAction_MissingMassSquared(dComboWrapper, false, -0.02, 0.02)); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyPhi, 1000, 0.9, 2.4, "Phi_MM2-cut")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyLambda, 1000, 1.0, 3.0, "Lambda_MM2-cut")); // Cut on dEdx and histogram the invariant mass dAnalysisActions.push_back(new DCutAction_dEdx(dComboWrapper, false, Proton, SYS_CDC, "dEdx-meas")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyPhi, 1000, 0.9, 2.4, "Phi_dEdx-cut")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyLambda, 1000, 1.0, 3.0, "Lambda_dEdx-cut")); // Cut on the PID delta t and histogram the invariant mass dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 1.0, Proton, SYS_TOF, "p_TOF")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 1.0, Proton, SYS_BCAL, "p_BCAL")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 2.0, Proton, SYS_FCAL, "p_FCAL")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 0.4, KPlus, SYS_TOF, "Kp_TOF")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 0.5, KPlus, SYS_BCAL, "Kp_BCAL")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 1.0, KPlus, SYS_FCAL, "Kp_FCAL")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 0.4, KMinus, SYS_TOF, "Km_TOF")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 0.5, KMinus, SYS_BCAL, "Km_BCAL")); dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 1.0, KMinus, SYS_FCAL, "Km_FCAL")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyPhi, 1000, 0.9, 2.4, "Phi_PID-cuts")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyLambda, 1000, 1.0, 3.0, "Lambda_PID-cuts")); // Histograms dAnalysisActions.push_back(new DHistogramAction_BeamEnergy(dComboWrapper, false)); dAnalysisActions.push_back(new DHistogramAction_ParticleComboKinematics(dComboWrapper, false, "Post_timing")); dAnalysisActions.push_back(new DHistogramAction_ParticleID(dComboWrapper, false, "Post_timing")); // Chisq comparison cut and histogram the invariant mass TF1 *f1 = new TF1("f1", "pol1", 0, 1000); f1->SetParameter(0, dYint); f1->SetParameter(1, dSlope); dAnalysisActions.push_back(new DCutAction_ChiSqOrCL(dComboWrapper, "pippim", true, f1, "Post_timing")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyPhi, 1000, 0.9, 2.4, "Phi_chisq-cut")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyLambda, 1000, 1.0, 3.0, "Lambda_chisq-cut")); // Histograms dAnalysisActions.push_back(new DHistogramAction_KinFitResults(dComboWrapper,"Post_chisq-cut")); dAnalysisActions.push_back(new DHistogramAction_ParticleComboKinematics(dComboWrapper, false, "Post_chisq-cut")); // Cut on Chisq or confidence level after performing comparison cut. Histogram the invariant mass dAnalysisActions.push_back(new DCutAction_KinFitFOM(dComboWrapper, 1E-10)); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyPhi, 1000, 0.9, 2.4, "Phi_CL-cut")); dAnalysisActions.push_back(new DHistogramAction_InvariantMass(dComboWrapper, false, 0, MyLambda, 1000, 1.0, 3.0, "Lambda_CL-cut")); //below: value: +/- N ns, Unknown: All PIDs, SYS_NULL: all timing systems //dAnalysisActions.push_back(new DCutAction_PIDDeltaT(dComboWrapper, false, 0.5, KPlus, SYS_BCAL)); //INITIALIZE ACTIONS //If you create any actions that you want to run manually (i.e. don't add to dAnalysisActions), be sure to initialize them here as well Initialize_Actions(); /******************************** EXAMPLE USER INITIALIZATION: STAND-ALONE HISTOGRAMS *******************************/ //EXAMPLE MANUAL HISTOGRAMS: dHist_MissingMassSquared = new TH1I("MissingMassSquared", ";Missing Mass Squared (GeV/c^{2})^{2}", 600, -0.06, 0.06); dHist_BeamEnergy = new TH1I("BeamEnergy", ";Beam Energy (GeV)", 600, 0.0, 12.0); /************************** EXAMPLE USER INITIALIZATION: CUSTOM OUTPUT BRANCHES - MAIN TREE *************************/ //EXAMPLE MAIN TREE CUSTOM BRANCHES (OUTPUT ROOT FILE NAME MUST FIRST BE GIVEN!!!! (ABOVE: TOP)): //The type for the branch must be included in the brackets //1st function argument is the name of the branch //2nd function argument is the name of the branch that contains the size of the array (for fundamentals only) /* dTreeInterface->Create_Branch_Fundamental<Int_t>("my_int"); //fundamental = char, int, float, double, etc. dTreeInterface->Create_Branch_FundamentalArray<Int_t>("my_int_array", "my_int"); dTreeInterface->Create_Branch_FundamentalArray<Float_t>("my_combo_array", "NumCombos"); dTreeInterface->Create_Branch_NoSplitTObject<TLorentzVector>("my_p4"); dTreeInterface->Create_Branch_ClonesArray<TLorentzVector>("my_p4_array"); */ /************************** EXAMPLE USER INITIALIZATION: CUSTOM OUTPUT BRANCHES - FLAT TREE *************************/ //EXAMPLE FLAT TREE CUSTOM BRANCHES (OUTPUT ROOT FILE NAME MUST FIRST BE GIVEN!!!! (ABOVE: TOP)): //The type for the branch must be included in the brackets //1st function argument is the name of the branch //2nd function argument is the name of the branch that contains the size of the array (for fundamentals only) /* dFlatTreeInterface->Create_Branch_Fundamental<Int_t>("flat_my_int"); //fundamental = char, int, float, double, etc. dFlatTreeInterface->Create_Branch_FundamentalArray<Int_t>("flat_my_int_array", "flat_my_int"); dFlatTreeInterface->Create_Branch_NoSplitTObject<TLorentzVector>("flat_my_p4"); dFlatTreeInterface->Create_Branch_ClonesArray<TLorentzVector>("flat_my_p4_array"); */ /************************************* ADVANCED EXAMPLE: CHOOSE BRANCHES TO READ ************************************/ //TO SAVE PROCESSING TIME //If you know you don't need all of the branches/data, but just a subset of it, you can speed things up //By default, for each event, the data is retrieved for all branches //If you know you only need data for some branches, you can skip grabbing data from the branches you don't need //Do this by doing something similar to the commented code below //dTreeInterface->Clear_GetEntryBranches(); //now get none //dTreeInterface->Register_GetEntryBranch("Proton__P4"); //manually set the branches you want }
bool L1TStage2Wrapper::fillParameters(const string& parameterFile) /*****************************************************************/ { TEnv params; int status = params.ReadFile(parameterFile.c_str(),EEnvLevel(0)); if(status!=0) { cout<<"[ERROR] Cannot read parameter file "<<parameterFile<<"\n"; return false; } // towers m_params.setTowerLsbH (params.GetValue("towerLsbH" , 0.5)); m_params.setTowerLsbE (params.GetValue("towerLsbE" , 0.5)); m_params.setTowerLsbSum (params.GetValue("towerLsbSum" , 0.5)); m_params.setTowerNBitsH (params.GetValue("towerNBitsH" , 8)); m_params.setTowerNBitsE (params.GetValue("towerNBitsE" , 8)); m_params.setTowerNBitsSum (params.GetValue("towerNBitsSum" , 9)); m_params.setTowerNBitsRatio (params.GetValue("towerNBitsRatio" , 3)); m_params.setTowerEncoding (params.GetValue("towerEncoding" , false)); // EG m_params.setEgLsb (params.GetValue("egLsb" , 0.5)); m_params.setEgSeedThreshold (params.GetValue("egSeedThreshold" , 2.)); m_params.setEgNeighbourThreshold (params.GetValue("egNeighbourThreshold" , 1.)); m_params.setEgHcalThreshold (params.GetValue("egHcalThreshold" , 1.)); m_params.setEgMaxHcalEt (params.GetValue("egMaxHcalEt" , 0.)); m_params.setEgEtToRemoveHECut (params.GetValue("egEtToRemoveHECut" , 128.)); m_params.setEgPUSType (params.GetValue("egPUSType" , "None")); stringstream egTrimmingLUTFile; egTrimmingLUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("egTrimmingLUTFile", "L1Trigger/L1TCalorimeter/data/egTrimmingLUT.txt"); std::ifstream egTrimmingLUTStream(egTrimmingLUTFile.str()); if(!egTrimmingLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << egTrimmingLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> egTrimmingLUT( new l1t::LUT(egTrimmingLUTStream) ); m_params.setEgTrimmingLUT(egTrimmingLUT); stringstream egCompressShapesLUTFile; egCompressShapesLUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("egCompressShapesLUTFile", "L1Trigger/L1TCalorimeter/data/egCompressShapesLUT.txt"); std::ifstream egCompressShapesLUTStream(egCompressShapesLUTFile.str()); if(!egCompressShapesLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << egCompressShapesLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> egCompressShapesLUT( new l1t::LUT(egCompressShapesLUTStream) ); m_params.setEgCompressShapesLUT(egCompressShapesLUT); stringstream egMaxHOverELUTFile; egMaxHOverELUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("egMaxHOverELUTFile", "L1Trigger/L1TCalorimeter/data/egMaxHOverELUT.txt"); std::ifstream egMaxHOverELUTStream(egMaxHOverELUTFile.str()); if(!egMaxHOverELUTStream.is_open()) { cout<<"[ERROR] Cannot open " << egMaxHOverELUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> egMaxHOverELUT( new l1t::LUT(egMaxHOverELUTStream) ); m_params.setEgMaxHOverELUT(egMaxHOverELUT); stringstream egShapeIdLUTFile; egShapeIdLUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("egShapeIdLUTFile", "L1Trigger/L1TCalorimeter/data/egShapeIdLUT.txt"); std::ifstream egShapeIdLUTStream(egShapeIdLUTFile.str()); if(!egShapeIdLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << egShapeIdLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> egShapeIdLUT( new l1t::LUT(egShapeIdLUTStream) ); m_params.setEgShapeIdLUT(egShapeIdLUT); stringstream egIsoLUTFile; egIsoLUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("egIsoLUTFile", "L1Trigger/L1TCalorimeter/data/egIsoLUT_PU40bx25.txt"); std::ifstream egIsoLUTStream(egIsoLUTFile.str()); if(!egIsoLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << egIsoLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> egIsoLUT( new l1t::LUT(egIsoLUTStream) ); m_params.setEgIsolationLUT(egIsoLUT); m_params.setEgIsoAreaNrTowersEta (params.GetValue("egIsoAreaNrTowersEta" , 2)); m_params.setEgIsoAreaNrTowersPhi (params.GetValue("egIsoAreaNrTowersPhi" , 4)); m_params.setEgIsoVetoNrTowersPhi (params.GetValue("egIsoVetoNrTowersPhi" , 3)); //m_params.setEgIsoPUEstTowerGranularity (params.GetValue("egIsoPUEstTowerGranularity" , 1)); //m_params.setEgIsoMaxEtaAbsForTowerSum (params.GetValue("egIsoMaxEtaAbsForTowerSum" , 4)); //m_params.setEgIsoMaxEtaAbsForIsoSum (params.GetValue("egIsoMaxEtaAbsForIsoSum" , 27)); std::vector<double> egPUSParams(3); egPUSParams[0] = params.GetValue("egPUSParams.0" , 1.); egPUSParams[1] = params.GetValue("egPUSParams.1" , 4.); egPUSParams[2] = params.GetValue("egPUSParams.2" , 27.); m_params.setEgPUSParams(egPUSParams); stringstream egCalibrationLUTFile; egCalibrationLUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("egCalibrationLUTFile", "L1Trigger/L1TCalorimeter/data/egCalibrationLUT.txt"); std::ifstream egCalibrationLUTStream(egCalibrationLUTFile.str()); if(!egCalibrationLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << egCalibrationLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> egCalibrationLUT( new l1t::LUT(egCalibrationLUTStream) ); m_params.setEgCalibrationLUT(egCalibrationLUT); // Tau m_params.setTauLsb (params.GetValue("tauLsb" , 0.5)); m_params.setTauSeedThreshold (params.GetValue("tauSeedThreshold" , 0.)); m_params.setTauNeighbourThreshold (params.GetValue("tauNeighbourThreshold" , 0.)); m_params.setTauIsoPUSType (params.GetValue("tauIsoPUSType" , "None")); m_params.setTauIsoAreaNrTowersEta (params.GetValue("tauIsoAreaNrTowersEta" , 2)); m_params.setTauIsoAreaNrTowersPhi (params.GetValue("tauIsoAreaNrTowersPhi" , 4)); m_params.setTauIsoVetoNrTowersPhi (params.GetValue("tauIsoVetoNrTowersPhi" , 2)); std::vector<double> tauPUSParams(3); tauPUSParams[0] = params.GetValue("tauPUSParams.0" , 1.); tauPUSParams[1] = params.GetValue("tauPUSParams.1" , 4.); tauPUSParams[2] = params.GetValue("tauPUSParams.2" , 27.); m_params.setTauPUSParams(tauPUSParams); stringstream tauIsoLUTFile; tauIsoLUTFile << getenv("CMSSW_BASE") << "/src/" << params.GetValue("tauIsoLUTFile", "L1Trigger/L1TCalorimeter/data/tauIsoLUT.txt"); std::ifstream tauIsoLUTStream(tauIsoLUTFile.str()); if(!tauIsoLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << tauIsoLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> tauIsoLUT( new l1t::LUT(tauIsoLUTStream) ); m_params.setTauIsolationLUT(tauIsoLUT); stringstream tauCalibrationLUTFile; tauCalibrationLUTFile<< getenv("CMSSW_BASE") << "/src/" << params.GetValue("tauCalibrationLUTFile", "L1Trigger/L1TCalorimeter/data/tauCalibrationLUT.txt"); std::ifstream tauCalibrationLUTStream(tauCalibrationLUTFile.str()); if(!tauCalibrationLUTStream.is_open()) { cout<<"[ERROR] Cannot open " << tauCalibrationLUTFile.str()<<"\n"; return false; } std::shared_ptr<l1t::LUT> tauCalibrationLUT( new l1t::LUT(tauCalibrationLUTStream) ); m_params.setTauCalibrationLUT(tauCalibrationLUT); return true; }
void KVINDRAReconDataAnalyser::PrintTreeInfos() { // Print informations on currently analysed TTree TEnv* treeInfos = GetReconDataTreeInfos(); if(!treeInfos) return; cout << endl << "----------------------------------------------------------------------------------------------------" << endl; cout << "INFORMATIONS ON VERSION OF KALIVEDA USED TO GENERATE FILE:" << endl << endl; fDataVersion = treeInfos->GetValue("KVBase::GetKVVersion()","(unknown)"); cout << "version = " << fDataVersion << endl ; cout << "build date = " << treeInfos->GetValue("KVBase::GetKVBuildDate()","(unknown)")<< endl ; cout << "source directory = " << treeInfos->GetValue("KVBase::GetKVSourceDir()","(unknown)")<< endl ; cout << "KVROOT = " << treeInfos->GetValue("KVBase::GetKVRoot()","(unknown)")<< endl ; cout << "BZR branch name = " << treeInfos->GetValue("KVBase::bzrBranchNick()","(unknown)")<< endl ; cout << "BZR revision #" << treeInfos->GetValue("KVBase::bzrRevisionNumber()","(unknown)")<< endl ; cout << "BZR revision ID = " << treeInfos->GetValue("KVBase::bzrRevisionId()","(unknown)")<< endl ; cout << "BZR revision date = " << treeInfos->GetValue("KVBase::bzrRevisionDate()","(unknown)")<< endl ; cout << endl << "INFORMATIONS ON GENERATION OF FILE:" << endl << endl; cout << "Generated by : " << treeInfos->GetValue("gSystem->GetUserInfo()->fUser","(unknown)")<< endl ; cout << "Analysis task : " << treeInfos->GetValue("AnalysisTask","(unknown)")<< endl ; cout << "Job name : " << treeInfos->GetValue("BatchSystem.JobName","(unknown)")<< endl ; cout << "Job submitted from : " << treeInfos->GetValue("LaunchDirectory","(unknown)")<< endl ; cout << "Runs : " << treeInfos->GetValue("Runs","(unknown)")<< endl ; cout << "Number of events requested : " << treeInfos->GetValue("NbToRead","(unknown)")<< endl ; cout << endl << "----------------------------------------------------------------------------------------------------" << endl; // if possible, parse fDataVersion into series and release number // e.g. if fDataVersion = "1.8.10": // => fDataSeries = "1.8" fDataReleaseNum = 10 Int_t a,b,c; if(fDataVersion!="(unknown)"){ if(sscanf(fDataVersion.Data(), "%d.%d.%d", &a, &b, &c) == 3){ fDataSeries.Form("%d.%d",a,b); fDataReleaseNum=c; } } else { fDataSeries=""; fDataReleaseNum=-1; } }