ELOG

10/08/14:

  • Trying to run the code ttgamma3.C to obtain the M3 plots, an error is obtained that produce a segmentation violation. This error is possible related with the correct path of the header file:
Error: cannot open file "../../EGamma/EGammaAnalysisTools/interface/ElectronEffectiveArea.h"  ElectronSelector.h:10:
*** Interpreter error recovered ***

07/16/14:

  • Trying to compile the G4 in the lpc for the HGCal analysis, give the error:
/uscms/home/hectorr4/work/PFCal/PFCalEE/userlib/test/digitizer.cpp:5:38: fatal error: boost/algorithm/string.hpp: No such file or directory
compilation terminated.
make: *** [/uscms/home/hectorr4/work/PFCal/PFCalEE/userlib/bin/digitizer] Error 1

07/07/14:

  • Trying to obtain the new version of the G4 HGCal files with git, at the moment that I tried to checkout the new version the following error appears:
error: pathspec '...' did not match any file(s) known to git.

28/05/14:

  • To solve the problem of setting up Geant4 environment fo the HGCal studies in the lpc run (source command doesn't work):
sh g4env.sh
  • Try to compile geant4 inside the lpc, produces the error (SOLUTION: It is a shell problem, it requires to run in bash shell or translate the shell script to tcsh):
GNUmakefile:23: ../../../config/binmake.gmk: No such file or directory make: *** No rule to make target `../../../config/binmake.gmk'.  Stop.
  • At the moment of use the command make the following error lines appears at the end of the compilation in lxplus:
/cvmfs/cms.cern.ch/slc5_amd64_gcc472/external/gcc/4.7.2/bin/ld: error: cannot find -lPFCalEEuserlib
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'vtable for HGCSSSamplingSection'
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'vtable for HGCSSSimHit'
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'vtable for HGCSSGenParticle'
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'vtable for HGCSSEvent'
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'typeinfo for HGCSSEvent'
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'HGCSSSimHit::HGCSSSimHit(G4SiHit const&, unsigned int const&, float)'
/afs/cern.ch/user/h/hhernand/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so: error: undefined reference to 'HGCSSSimHit::Add(G4SiHit const&)'
collect2: ld returned 1 exit status
make: *** [/afs/cern.ch/user/h/hhernand/geant4_workdir/bin/Linux-g++/PFCalEE] Error 1
  • At the moment of use the command make (using bash shell) the following error lines appears at the end of the compilation in cmslpc:
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/external/gcc/4.8.1/bin/ld: cannot find -lXm
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/external/gcc/4.8.1/bin/ld: cannot find -lXmu
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/external/gcc/4.8.1/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
make: *** [/uscms/home/hectorr4/geant4_workdir/tmp/Linux-g++/PFCalEE/libPFCalEE.so] Error 1

23/05/14:

  • To solve the problem of install a CMSSW release in LC6 is required to use the commands:
source /uscmst1/prod/sw/cms/cshrc cvmfs
scram --arch slc6_amd64_gcc481 list CMSSW | grep CMSSW_7_1
scram --arch slc6_amd64_gcc481 project CMSSW_7_1_0_pre8
cd CMSSW_7_1_0_pre8/src/
cmsenv
scram b

  • With this, the set up of the CMS environment work in the lpc machines!
  • Update MG part of the twiki and start with the HGCal part

22/05/14:

  • Try to install a CMSSW release in my lxplus6 account and give me the error:
ERROR: Unable to find release area for "CMSSW" version "5_3_14_patch1" for arch slc6_amd64_gcc472.
Please make sure you have used the correct name/version.
You can run "scram list CMSSW" to get the list of available versions.
  • Clone the files for the HGCal simulations to my lxplus6 account and the setting up of the environment works

22/05/14:

  • Updated the Twiki.
  • Clone the files for the HGCal simulations to my lpc account, and try to set up the environment running:
source g4env.sh
  • An error was obtained
export: Command not found.
gcc_config_version=4.6.3: Command not found.
mpfr_config_version=2.4.2: Command not found.
gmp_config_version=4.3.2: Command not found.
LCGPLAT=x86_64-slc6: Command not found.
LCG_lib_name=lib64: Command not found.
LCG_arch=x86_64: Command not found.
if: Expression Syntax.

05/05/14:

Analysis Report (05/05/14):

  • Root files produced using the .lhe files
  • An email was sent to Till Arndt (Aachen) to check the validity of the MG cards
  • The cross check between Daniel production and mine, shown that we were using different cards

04/05/13 Storage at the LPC:

  • My area in eos: ls /eos/uscms/store/user/hectorr4/

04/08/13 CRAB Tutorial:

  • Finish the CRAB tutorial.

05/26/13 Root Exercise:

  • The first code generate to obtain the invarian mass of a Sample (muon.root) using two different methods, the first one is the invariant mass as a function of the 4-momentum of the two hardest muons, and the second one using the variables pt, etha and phi for the 2 hardest muons:
{
//Remove StatBox
gStyle->SetOptStat(0);

//Open a file
TFile* f = new TFile("muons.root","read");

//Get the TTree we want from ROOT file
TTree* mytree = (TTree*)f->Get("mytree");

//Declare some needed variables, histograms
int nmu;
float mu_pt[200];
float mu_eta[200];
float mu_phi[200];
float mu_e[200];
float mu_px[200];
float mu_py[200];
float mu_pz[200];

//Canvas
//TCanvas *c1 = new TCanvas("c1","Invariant Mass",600, 600);


//TH1F h1("h1","",15,0,15);
TH1F* h1 = new TH1F("h1","",200,0,100);
TH1F* h2 = new TH1F("h2","",200,0,100);

//Set the branch addresses
mytree->SetBranchAddress("nmu",&nmu);
mytree->SetBranchAddress("mu_pt",&mu_pt);
mytree->SetBranchAddress("mu_eta",&mu_eta);
mytree->SetBranchAddress("mu_phi",&mu_phi);
mytree->SetBranchAddress("mu_e",&mu_e);
mytree->SetBranchAddress("mu_px",&mu_px);
mytree->SetBranchAddress("mu_py",&mu_py);
mytree->SetBranchAddress("mu_pz",&mu_pz);

//Get the total number of events (entries)
int nEvents = mytree->GetEntries();

//loop over all events
for(int j = 0;j < nEvents; ++j){

float M;
float M2;
mytree->GetEntry(j);
M2 = sqrt(2*((mu_e[0]+mu_e[1])**2-(mu_px[0]+mu_px[1])**2+(mu_py[0]+mu_py[1])**2+(mu_pz[0]+mu_pz[1])**2)); //+2*(0.1*0.1));
M = sqrt(2*mu_pt[0]*mu_pt[1]*(cosh(mu_eta[0]-mu_eta[2])-cos(mu_phi[0]-mu_phi[1])));
h1->Fill(M);
h2->Fill(M2);
}

h1->SetLineColor(1);
h2->SetLineColor(2);

//Plot Title
h1->SetTitle("Invariant Mass");

//Axis Labels
h1->GetXaxis()->SetTitle("Invariant Mass (GeV)"); //Create the Label
h1->GetYaxis()->SetTitle("Number of Events");
h1->GetXaxis()->CenterTitle(1); //Centering the label
h1->GetYaxis()->CenterTitle(1);

//Draw the histogram
h1->Draw();
h2->Draw("SAME");

//Create Legend
legend = TLegend(0.85,0.7,0.65,0.85); //East edge, South, West, North
legend->AddEntry(h1,"M_{inv}: method 1", "l"); //Define Legend entry 1
legend->AddEntry(h2,"M_{inv}: method 2", "l"); // Define Legend entry 2

legend->Draw(); //Draw Legend

//sprintf("Invariant_Mass.png", c1);
//c1->SaveAs("Invariant Mass.png");

}
  • This file (analyzeRootuple.C) is a macro, to compile this in root is required the command .x analyzeRootuple.C.
  • The image Histogram2 have some corrections respect to the code that creates the image Histogram1.

ROOT Exercise (cont.):

  • New code with a cut in the pt of the muons (mu_pt > 10.0):
{
//Remove StatBox
gStyle->SetOptStat(0);

//Open a file
TFile* f = new TFile("muons.root","read");

//Get the TTree we want from ROOT file
TTree* mytree = (TTree*)f->Get("mytree");

//Declare some needed variables, histograms
int nmu;
float mu_pt[200];
float mu_eta[200];
float mu_phi[200];
float mu_e[200];
float mu_px[200];
float mu_py[200];
float mu_pz[200];

//Canvas
//TCanvas *c1 = new TCanvas("c1","Invariant Mass",600, 600);


//TH1F h1("h1","",15,0,15);
TH1F* h1 = new TH1F("h1","",200,0,300);
TH1F* h2 = new TH1F("h2","",200,0,300);

//Set the branch addresses
mytree->SetBranchAddress("nmu",&nmu);
mytree->SetBranchAddress("mu_pt",&mu_pt);
mytree->SetBranchAddress("mu_eta",&mu_eta);
mytree->SetBranchAddress("mu_phi",&mu_phi);
mytree->SetBranchAddress("mu_e",&mu_e);
mytree->SetBranchAddress("mu_px",&mu_px);
mytree->SetBranchAddress("mu_py",&mu_py);
mytree->SetBranchAddress("mu_pz",&mu_pz);

//Get the total number of events (entries)
int nEvents = mytree->GetEntries();

//loop over all events
for(int j = 0;j < nEvents; ++j){

float pt_cut = 10.0;
float M;
float M2;
mytree->GetEntry(j);

//First cut for the pt of the muons
if(mu_pt[0]>= pt_cut && mu_pt[1]>= pt_cut)
{
M2 = sqrt(2*((mu_e[0]*mu_e[1])-(mu_px[0]*mu_px[1])-(mu_py[0]*mu_py[1])-(mu_pz[0]*mu_pz[1])));
h2->Fill(M2);

M = sqrt(2*mu_pt[0]*mu_pt[1]*(cosh(mu_eta[0]-mu_eta[2])-cos(mu_phi[0]-mu_phi[1])));
h1->Fill(M);
}
else
{
break;
}

}

h1->SetLineColor(1);
h2->SetLineColor(2);

//Plot Title
h1->SetTitle("Invariant Mass");

//Axis Labels
h1->GetXaxis()->SetTitle("Invariant Mass (GeV)"); //Create the Label
h1->GetYaxis()->SetTitle("Number of Events");
h1->GetXaxis()->CenterTitle(1); //Centering the label
h1->GetYaxis()->CenterTitle(1);

//Draw the histogram
h1->Draw();
h2->Draw("SAME");

//Create Legend
legend = TLegend(0.85,0.7,0.65,0.85); //East edge, South, West, North
legend->AddEntry(h1,"M_{inv}: method 1", "l"); //Define Legend entry 1
legend->AddEntry(h2,"M_{inv}: method 2", "l"); // Define Legend entry 2

legend->Draw(); //Draw Legend

//sprintf("Invariant_Mass.png", c1);
//c1->SaveAs("Invariant Mass.png");

}
  • The plots for every method shows a distribution with a peak between 90-100 GeV.

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng Both.png r1 manage 95.8 K 2013-05-28 - 00:14 HectorHernandez  
PNGpng M_inv_first_method.png r1 manage 95.6 K 2013-05-28 - 00:11 HectorHernandez Histogram (First Method)
PNGpng M_inv_second_method.png r1 manage 88.8 K 2013-05-28 - 00:11 HectorHernandez Histogram (Second Method)
PNGpng Screenshot_Histograms_1.png r1 manage 103.6 K 2013-05-26 - 23:11 HectorHernandez  
PNGpng Screenshot_Histograms_2.png r1 manage 100.9 K 2013-05-26 - 23:11 HectorHernandez  
C source code filec analyzeRootuple.C r2 r1 manage 2.3 K 2013-05-28 - 00:12 HectorHernandez Code with Cuts
Unknown file formatroot muons.root r1 manage 1727.5 K 2013-05-26 - 23:01 HectorHernandez  
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r17 - 2014-10-10 - HectorHernandez
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback