EEsmdProfile
class description - source file - inheritance tree
class EEsmdProfile : public TDirectory
public:
EEsmdProfile()
EEsmdProfile(const Char_t* name, const Char_t* title = "EEsmdProfiler")
virtual ~EEsmdProfile()
static TClass* Class()
virtual void Clear(Option_t* opts)
void estimateSinglePeak(EEezCluster* cluster, Int_t iuv)
void fitDoublePeak(Int_t icluster, Int_t iuv, Float_t mean1, Float_t mean2, Float_t min = 0., Float_t max = -1., Option_t* opts = "RQO")
void fitProfile(Int_t iprofile, Int_t iuv)
void fitProfiles(Int_t icluster)
void fitSinglePeak(Int_t icluster, Int_t iuv, Float_t mean, Float_t min = 0., Float_t max = -1., Option_t* opts = "RQ0")
TF1* getDoublePeak()
TF1* getFitU(Int_t i)
TF1* getFitU(const Char_t* c)
TF1* getFitU(EEezCluster* c)
TF1* getFitV(Int_t i)
TF1* getFitV(const Char_t* c)
TF1* getFitV(EEezCluster* c)
TList* getListU()
TList* getListV()
TH1F* getProfileChi2U(Int_t i)
TH1F* getProfileChi2U(const Char_t* c)
TH1F* getProfileChi2U(EEezCluster* c)
TH1F* getProfileChi2V(Int_t i)
TH1F* getProfileChi2V(const Char_t* c)
TH1F* getProfileChi2V(EEezCluster* c)
TH1F* getProfileInitU(Int_t i)
TH1F* getProfileInitU(const Char_t* c)
TH1F* getProfileInitU(EEezCluster* c)
TH1F* getProfileInitV(Int_t i)
TH1F* getProfileInitV(const Char_t* c)
TH1F* getProfileInitV(EEezCluster* c)
TH1F* getProfileSum5U(Int_t i)
TH1F* getProfileSum5U(const Char_t* c)
TH1F* getProfileSum5U(EEezCluster* c)
TH1F* getProfileSum5V(Int_t i)
TH1F* getProfileSum5V(const Char_t* c)
TH1F* getProfileSum5V(EEezCluster* c)
TH1F* getProfileSum9U(Int_t i)
TH1F* getProfileSum9U(const Char_t* c)
TH1F* getProfileSum9U(EEezCluster* c)
TH1F* getProfileSum9V(Int_t i)
TH1F* getProfileSum9V(const Char_t* c)
TH1F* getProfileSum9V(EEezCluster* c)
TH1F* getProfileU(Int_t i)
TH1F* getProfileU(const Char_t* c)
TH1F* getProfileU(EEezCluster* c)
TH1F* getProfileV(Int_t i)
TH1F* getProfileV(const Char_t* c)
TH1F* getProfileV(EEezCluster* c)
TH1F* getResidualU(Int_t i)
TH1F* getResidualV(Int_t i)
TF1* getSinglePeak()
TH1F* getSumOverStrips(EEezCluster* cluster, Int_t nstrip, Int_t iuv)
Int_t Init()
virtual TClass* IsA() const
Int_t Make(EEezClAnalysis* cl, EEmcEventHeader* header)
void MakeFits(Option_t* opts = "RQ0L")
void MakeQA()
void setEnergyThreshold(Float_t min, Float_t max = 999999.)
void setShowerShape(TF1* shape)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
EEezClAnalysis* m_EEezClust
TH1F* m_Converge
EEezClusterQA* m_EEClusterQA[12]
protected:
TList m_UProfile TMap used to associate an SMD profile
TList m_VProfile with each (tower only) cluster in the event
TList m_UProfileSum9 Sum over 9 strips vs i start + 4
TList m_VProfileSum9 Sum over 9 strips vs i start + 4
TList m_UProfileSum5 Sum over 9 strips vs i start + 2;
TList m_VProfileSum5 Sum over 9 strips vs i start + 2;
TList m_UProfileChi2 Chi2/ndf for each strip +/- 4.5 strips from mean
TList m_VProfileChi2 Chi2/ndf for each strip +/- 4.5 strips from mean
TList m_UProfileInit Initial parameterization of U profile fit
TList m_VProfileInit Initial parameterization of V profile fit
TList m_UResidual
TList m_VResidual
Float_t m_MinEnergy
Float_t m_MaxEnergy
TF1* m_ShowerShape
TF1* m_SinglePeak
TF1* m_DoublePeak
map<TString,int,less<TString>,allocator<pair<const TString,int> > > m_Name2IndexU
map<TString,int,less<TString>,allocator<pair<const TString,int> > > m_Name2IndexV
EEsmdProfile
Author: Jason C. Webb <jwebb@iucf.indiana.edu>
EEsmdProfile creates histograms of the SMD distributions which are
beneath the seed towers of each cluster.
Example of how to improve cluster position with EEsmdProfile. This
example neglects several things, including the overlap of
strips in neighboring sectors and other edge effects, and is not
meant for production.
// Will need the smd geometry class
EEmcSmdGeom *geom = EEmcSmdGeom::instance();
// We have a cluster finder from somewhere
EEezClAnalysis *clust = ...
// The profile analysis
EEsmdProfile *prof = new EEsmdProfile();
... code which runs the cluster finder ...
// Create the SMD profiles for each cluster
prof -> Make ( clust );
// Improve the first cluster's position. First, obtain a pointer
// to the cluster.
EEezCluster *cluster = clust -> getClusterPtr(0);
// We will need to know what sector we are in
Int_t sector = cluster -> getSeedTower() -> getSector();
// Next, obtain the SMD histograms corresponding to the cluster
TH1F *uHisto = prof -> getProfileU(0);
TH1F *vHisto = prof -> getProfileV(0);
// Somehow obtain the mean of these histograms... Fit to the correct
// shower shape, once we know it...
Float_t uMean = ...
Float_t vMean = ...
// Now, find the intersection of these two strips within the
// sector of the seed tower using the geometry class
TVector3 intersection = geom -> getIntersection(sector,(Int_t)uMean,(Int_t)vMean);
// Make intersection a unit vector
intersection = intersection.Unit();
// Recalculate cluster momentum
TVector3 momentum = intersection * cluster -> getEnergy();
// And set its momentum
cluster -> setMomentum( momentum );
**** NOTE **** **** NOTE **** **** NOTE **** **** NOTE **** **** NOTE ****
Will need to think about whether the fit to the centroid of this
distribution will obtain the correct position/index or not... since
the strips are indexed from 0... i.e. if strip number 64 (index 63)
is fit to a gaussian... I bet the mean comes out to be 63.5... so the
fits to these distributions should probably be incremented by 0.5,
before being passed to EEmcSmdGeom::getIntersection().
**** NOTE **** **** NOTE **** **** NOTE **** **** NOTE **** **** NOTE ****
To Do List:
1. Need to handle/flag empty histograms
EEsmdProfile()
Default Constructor (not meant to be called, use the name/title version).
EEsmdProfile( const Char_t *name, const Char_t *title )
:TDirectory(name,title)
Constructor w/ name and title
Int_t Init()
Initialization
Int_t Make( EEezClAnalysis *analy,
EEmcEventHeader *header
)
Takes as input a pointer to the cluster finder and to an
EEmcEventHeader. Loops over all clusters and creates a
histogram of the energy response of SMD strips versus
strip number. The histograms ordering of the histograms
matches the ordering of the clusters.
void MakeFits( Option_t *opts )
Loop over all histograms and fit them to a single "eeSinglePeak()"
shower shape (double gaussian with common mean, constrained widths).
void MakeQA()
Fills QA histograms
void Clear( Option_t *opts )
Clear the list of profiles and delete the histograms
void fitProfile ( Int_t iprofile, Int_t iuv )
Fits the SMD profile ( U = 0, V = 1 ) to the functional form
specified in setShowerShape(). If none was specified, the
method defaults to a gaussian shower shape.
void fitDoublePeak ( Int_t iprofile,
Int_t iuv,
Float_t mean1,
Float_t mean2,
Float_t min,
Float_t max,
Option_t *opts
)
Fit the specified cluster's profile (either U or V plane) to
a double shower-shape peak, over the specfied range in strip
number, centered on the specified mean values.
... essentially, the first steps towards the "final" pi0 finder.
void fitSinglePeak ( Int_t iprofile,
Int_t iuv,
Float_t mean,
Float_t min,
Float_t max,
Option_t *opts )
Fit the specified cluster's SMD profile (either U or V plane) to
a single shower-shape peak, over the specified range in strip
number, centered on the specified mean value. If the histogram
is empty, no fit will be performed. The fit is stored within
this histogram's list of fits (see TH1F::GetListOfFunctions()).
TH1F* getResidualU( Int_t i )
If it doesn't exist, it calculates the residual histogram for
the specified U profile, stores it in m_UResidual, and returns
a pointer to it. Otherwise, returns a pointer to the histogram.
NOTE: After looking at root's TList::AddAt() function, I do not
believe the documentation! It looks like if you attempt to add
an object at a position beyond the end of the list, it blindly
assumes that you want to add the object at the end of the list...
This means that, for instance, if you were to call getResidualU(5)
BEFORE calling getResidual(1), the residual corresponding to the
5th cluster will be inserted into the list at position 2... and
subsequent calls to getResidualU(2) will return the 5th cluster's
residual! This is why I really hate CERN code.
TH1F* getResidualV( Int_t i )
If it doesn't exist, it calculates the residual histogram for
the specified V profile, stores it in m_UResidual, and returns
a pointer to it. Otherwise, returns a pointer to the histogram.
See warnings in getResidualU().
TF1* getSinglePeak()
Returns a pointer to the single-peak function used in the call
to fitSinglePeak().
TF1* getDoublePeak()
Returns a pointer to the double-peak function used in the call
to fitDoublePeak().
TH1F* getSumOverStrips ( EEezCluster *cluster, Int_t nstrip, Int_t iuv )
Creates a new histogram whose entries correspond to the integral
over nstrip strips, versus the index of the strip in the center.
(NOTE-- please make sure that nstrips is odd. It won't crash, but
it will be harder to interpret, and its not trapped.)
This histogram MUST be deleted by the user! To retrieve this
histogram once it has been created, getSumStrips ( EEezCluster *cluster ),
or by index or name.
void estimateSinglePeak ( EEezCluster *cluster, Int_t iuv )
For the specified cluster and plane, initialize starting parameters
for the single-peak fit
Inline Functions
TH1F* getProfileU(Int_t i)
TH1F* getProfileV(Int_t i)
TH1F* getProfileU(const Char_t* c)
TH1F* getProfileV(const Char_t* c)
TH1F* getProfileU(EEezCluster* c)
TH1F* getProfileV(EEezCluster* c)
TH1F* getProfileSum5U(Int_t i)
TH1F* getProfileSum5V(Int_t i)
TH1F* getProfileSum5U(const Char_t* c)
TH1F* getProfileSum5V(const Char_t* c)
TH1F* getProfileSum5U(EEezCluster* c)
TH1F* getProfileSum5V(EEezCluster* c)
TH1F* getProfileSum9U(Int_t i)
TH1F* getProfileSum9V(Int_t i)
TH1F* getProfileSum9U(const Char_t* c)
TH1F* getProfileSum9V(const Char_t* c)
TH1F* getProfileSum9U(EEezCluster* c)
TH1F* getProfileSum9V(EEezCluster* c)
TH1F* getProfileChi2U(Int_t i)
TH1F* getProfileChi2V(Int_t i)
TH1F* getProfileChi2U(const Char_t* c)
TH1F* getProfileChi2V(const Char_t* c)
TH1F* getProfileChi2U(EEezCluster* c)
TH1F* getProfileChi2V(EEezCluster* c)
TH1F* getProfileInitU(Int_t i)
TH1F* getProfileInitV(Int_t i)
TH1F* getProfileInitU(const Char_t* c)
TH1F* getProfileInitV(const Char_t* c)
TH1F* getProfileInitU(EEezCluster* c)
TH1F* getProfileInitV(EEezCluster* c)
TF1* getFitU(Int_t i)
TF1* getFitV(Int_t i)
TF1* getFitU(const Char_t* c)
TF1* getFitV(const Char_t* c)
TF1* getFitU(EEezCluster* c)
TF1* getFitV(EEezCluster* c)
TList* getListU()
TList* getListV()
void fitProfiles(Int_t icluster)
void setEnergyThreshold(Float_t min, Float_t max = 999999.)
void setShowerShape(TF1* shape)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
void ~EEsmdProfile()
Author: Jason C. Webb //
Last update: Tue Jun 1 11:21:14 2004
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.