I’m undertaking a 3rd year project called ‘Electrons and Photons at the LHC’. The aim is to eventually work out a correction for the 5x5 algorithm for the Endcap crystals on the ECAL. The crystals darken due to the formation of colour centers, so scintillation photons are lost and possibly the resolution of the ECAL is lowered because of this.
This requires coding, lots and lots of it. And I only just started using C++ and ROOT when I started doing this project. Now obviously I will have alot of issues and need help, the HyperNews forums are somewhat hostile to anyone who doesn’t know what they are talking about. I have a computer account at CERN, I’m using lx.cern.plus and I have written my own analyzer and steadily giving it more functions and making it better.
So I figured I could make my own little thread in the general section asking for help on any serious problems I encounter in my project. Is that ok with you guys?
First question:
I’ve asked my analyzer to start plotting the Pseudorapidity and Azimuth Angles of clusters in the data file that I’m using. The Azimuth Angles are giving negatives values when they are supposed to be in degrees. How do I get the code to account for the fact that I need it in degrees? Here is the code:
I’m guessing it has something to do with me defining eta as ‘double’… What is the definition for an angular value? Has it also got something to do with ‘reco::GsfElectronCollection::const_iterator’? Because I’m not looking at individual electrons anymore I’m now looking at them in the clusters, or the cluster positions. I included the appropriate module (CaloCluster.h) but I don’t know what the “rec::_______” is for CaloCluster.
Lastly, I think I have my formula wrong! I have a horrible feeling that I’m adding 2 clusters/electrons together in the array of 2! How to I state them separately and not add them together but still taking all of them into account?
How do I make the points larger on a 2D Histogram? I have 32 entries on a histogram that I drew using C++ code and using root to view the ROOT file, but the points appear too small.
My plot is wrong because it seems like I’m adding both electrons in the array . I just want it to run through each electron in the array and plot the data.
I’m thinking:
if (electrons->sixe()==2)
{
reco::GsfElectronCollection::const_iterator e0=electrons->begin();
reco::GsfElectronCollection::const_iterator e1=electrons->end()-1;
LogInfo("Demo")<<"Pseudorapidity "<<e0->eta()<<" "<<e1->eta();
LogInfo("Demo")<<"Azimuth Angle "<<e0->phi()<<" "<<e1->phi();
for e0, e1
do { eta();
}
return;
for e0, e1
do { phi();
}
return;
double eta= eta()
double phi= phi()
h_clusterposition->Fill(eta,phi)
}
Basically I want to plot cluster size/position/energies ect. But I need to make a point to cluster functions in order to do that.
I have a module GsfElectrons which has basicClustersBegin ( ) as one of it’s functions. basicClustersBegin has references to superCluster( ) which then has a direct access of:
I can somehow use this to be able to call out functions from calocluster in order to plot/analyze what I need. But I am unsure of how to write the code.