for Ali4Vector.
Also memberfunction SortJets introduced in AliVertex.
Misleading comment modified in AliDevice.cxx.
29-oct-2005 NvE Forgotten angular unit setting fixed w.r.t. begin point etc... in AliTrack::ListAll
ad begin point etc... info also added in AliTrack::List.
Memberfunction SortTracks introduced in AliJet and comment corrected in AliVertex.h.
31-oct-2005 NvE Slight correction in IceCalibrate.cxx and IceCleanhits.cxx to satisfy
the gcc compiler (thanks Dipo).
31-oct-2005 NvE Some unused variables removed in IceCal2Root and IceF2k to prevent warnings
from the gcc compiler.
return fUserId;
}
///////////////////////////////////////////////////////////////////////////
+TObjArray* AliJet::SortTracks(Int_t mode,TObjArray* tracks)
+{
+// Order the references to an array of tracks by looping over the input array "tracks"
+// and checking the value of a certain observable.
+// The ordered array is returned as a TObjArray.
+// In case tracks=0 (default), the registered tracks of the current jet are used.
+// Note that the original track array is not modified.
+// Via the "mode" argument the user can specify the observable to be checked upon
+// and specify whether sorting should be performed in decreasing order (mode<0)
+// or in increasing order (mode>0).
+//
+// The convention for the observable selection is the following :
+// mode : 1 ==> Number of signals associated to the track
+// 2 ==> Track energy
+// 3 ==> Track momentum
+// 4 ==> Mass of the track
+// 5 ==> Transverse momentum of the track
+// 6 ==> Longitudinal momentum of the track
+// 7 ==> Transverse energy of the track
+// 8 ==> Longitudinal energy of the track
+// 9 ==> Transverse mass of the track
+// 10 ==> Track rapidity
+// 11 ==> Pseudo-rapidity of the track
+//
+// The default is mode=-1.
+//
+// Note : This sorting routine uses a common area in memory, which is used
+// by various other sorting facilities as well.
+// This means that the resulting sorted TObjArray may be overwritten
+// when another sorting is invoked.
+// To retain the sorted list of pointers, the user is advised to copy
+// the pointers contained in the returned TObjArray into a private
+// TObjArray instance.
+
+ if (fSelected)
+ {
+ delete fSelected;
+ fSelected=0;
+ }
+
+ if (!tracks) tracks=fTracks;
+
+ if (abs(mode)>11 || !tracks) return fSelected;
+
+ Int_t ntracks=tracks->GetEntries();
+ if (!ntracks)
+ {
+ return fSelected;
+ }
+ else
+ {
+ fSelected=new TObjArray(ntracks);
+ }
+
+ Double_t val1,val2; // Values of the observable to be tested upon
+
+ Int_t nord=0;
+ for (Int_t i=0; i<ntracks; i++) // Loop over all tracks of the array
+ {
+ AliTrack* tx=(AliTrack*)tracks->At(i);
+
+ if (!tx) continue;
+
+ if (nord == 0) // store the first track at the first ordered position
+ {
+ nord++;
+ fSelected->AddAt(tx,nord-1);
+ continue;
+ }
+
+ for (Int_t j=0; j<=nord; j++) // put track in the right ordered position
+ {
+ if (j == nord) // track has smallest (mode<0) or largest (mode>0) observable value seen so far
+ {
+ nord++;
+ fSelected->AddAt(tx,j); // add track at the end
+ break; // go for next track
+ }
+
+ switch (abs(mode))
+ {
+ case 1:
+ val1=tx->GetNsignals();
+ val2=((AliTrack*)fSelected->At(j))->GetNsignals();
+ break;
+ case 2:
+ val1=tx->GetEnergy();
+ val2=((AliTrack*)fSelected->At(j))->GetEnergy();
+ break;
+ case 3:
+ val1=tx->GetMomentum();
+ val2=((AliTrack*)fSelected->At(j))->GetMomentum();
+ break;
+ case 4:
+ val1=tx->GetMass();
+ val2=((AliTrack*)fSelected->At(j))->GetMass();
+ break;
+ case 5:
+ val1=tx->GetPt();
+ val2=((AliTrack*)fSelected->At(j))->GetPt();
+ break;
+ case 6:
+ val1=tx->GetPl();
+ val2=((AliTrack*)fSelected->At(j))->GetPl();
+ break;
+ case 7:
+ val1=tx->GetEt();
+ val2=((AliTrack*)fSelected->At(j))->GetEt();
+ break;
+ case 8:
+ val1=tx->GetEl();
+ val2=((AliTrack*)fSelected->At(j))->GetEl();
+ break;
+ case 9:
+ val1=tx->GetMt();
+ val2=((AliTrack*)fSelected->At(j))->GetMt();
+ break;
+ case 10:
+ val1=tx->GetRapidity();
+ val2=((AliTrack*)fSelected->At(j))->GetRapidity();
+ break;
+ case 11:
+ val1=tx->GetPseudoRapidity();
+ val2=((AliTrack*)fSelected->At(j))->GetPseudoRapidity();
+ break;
+ }
+
+ if (mode<0 && val1 < val2) continue;
+ if (mode>0 && val1 > val2) continue;
+
+ nord++;
+ for (Int_t k=nord-1; k>j; k--) // create empty position
+ {
+ fSelected->AddAt(fSelected->At(k-1),k);
+ }
+ fSelected->AddAt(tx,j); // put track at empty position
+ break; // go for next track
+ }
+ }
+ return fSelected;
+}
+///////////////////////////////////////////////////////////////////////////
TObject* AliJet::Clone(const char* name) const
{
// Make a deep copy of the current object and provide the pointer to the copy.
Int_t GetTrackCopy() const; // Provide TrackCopy flag value
void SetId(Int_t id); // Set the user defined identifier
Int_t GetId() const; // Provide the user defined identifier
+ TObjArray* SortTracks(Int_t mode=-1,TObjArray* tracks=0); // Sort tracks by a certain observable
protected:
void Init(); // Initialisation of pointers etc...
Int_t fUserId; // The user defined identifier
TObjArray* fSelected; //! Temp. array to hold user selected or ordered objects
- ClassDef(AliJet,12) // Creation and investigation of a jet of particle tracks.
+ ClassDef(AliJet,13) // Creation and investigation of a jet of particle tracks.
};
#endif
// The defaults are f="car" and u="rad".
Data(f,u); // Information of the current track
+ if (fBegin) { cout << " Begin-point :"; fBegin->Data(f,u); }
+ if (fEnd) { cout << " End-point :"; fEnd->Data(f,u); }
+ if (fRef) { cout << " Ref-point :"; fRef->Data(f,u); }
// Decay products of this track
AliTrack* td;
// The defaults are f="car" and u="rad".
Data(f,u); // Information of the current track
- if (fBegin) { cout << " Begin-point :"; fBegin->Data(f); }
- if (fEnd) { cout << " End-point :"; fEnd->Data(f); }
- if (fRef) { cout << " Ref-point :"; fRef->Data(f); }
+ if (fBegin) { cout << " Begin-point :"; fBegin->Data(f,u); }
+ if (fEnd) { cout << " End-point :"; fEnd->Data(f,u); }
+ if (fRef) { cout << " Ref-point :"; fRef->Data(f,u); }
Int_t nhyp=GetNhypotheses();
if (nhyp)
Int_t IsJetTrack(AliTrack* t) const; // Indicate if track is resulting from jet addition
virtual void Draw(Option_t*) { Draw(1,1,0); } // Override TObject::Draw for default event display
virtual void Draw(Int_t secs,Int_t cons=1,Int_t jets=0); // Draw the vertex in an event display
- TObjArray* SortJets(Int_t mode=-1,TObjArray* jets=0); // Sort jets by the number of tracks
+ TObjArray* SortJets(Int_t mode=-1,TObjArray* jets=0); // Sort jets by a certain observable
protected:
void Init(); // Initialisation of pointers etc...
for Ali4Vector.
Also memberfunction SortJets introduced in AliVertex.
Misleading comment modified in AliDevice.cxx.
+29-oct-2005 NvE Forgotten angular unit setting fixed w.r.t. begin point etc... in AliTrack::ListAll
+ ad begin point etc... info also added in AliTrack::List.
+ Memberfunction SortTracks introduced in AliJet and comment corrected in AliVertex.h.
// Set global OM constants
if (omd)
{
- ome->SetPosition((Ali3Vector)omd->GetPosition());
+ ome->SetPosition((Ali3Vector&)omd->GetPosition());
for (Int_t isd=4; isd<17; isd++)
{
ome->SetSignal(omd->GetSignal(isd),isd);
// It seems that in 2005 the trigger time was changed within the year
// from 24170 ns to 12138 ns. The latter however shows a 2-bump structure,
// so currently the 24170 ns will be used for the 2005 data.
- Int_t year=fEvt->GetJE();
+ Int_t year=(int)fEvt->GetJE();
Float_t ttrig=23958;
if (year==2003) ttrig=23994;
if (year==2004) ttrig=24059.5;
20-oct-2005 NvE Trigger time window selection introduced in IceCleanHits based
on Dipo's trigger time distributions. For further details see the
docs of IceCleanHits.
+31-oct-2005 NvE Slight correction in IceCalibrate.cxx and IceCleanhits.cxx to satisfy
+ the gcc compiler (thanks Dipo).
Float_t thresh=0;
Float_t sensit=1;
Double_t pos[3]={0,0,0};
- Float_t ped,beta,alpha,kappa;
+ Float_t ped,beta,alpha;
Int_t pol;
Float_t totped;
Int_t jtrans,jrec;
if (fHeader.nch<=0) return;
- Int_t geocal=fHeader.is_calib.geo;
Int_t adccal=fHeader.is_calib.adc;
Int_t tdccal=fHeader.is_calib.tdc;
Int_t totcal=fHeader.is_calib.tot;
- Int_t utccal=fHeader.is_calib.utc;
TF1 fadccal("fadccal","(x-[1])*[0]");
TF1 fadcdecal("fadcdecal","(x/[0])+[1]");
for adc<=0 values. This setting eliminates the ADC dependent TDC correction.
12-oct-2005 NvE CleanTasks() invoked before execution of sub-tasks in IceConvert and IceCal2Root
to ensure proper execution of all the sub-tasks for each new event.
+31-oct-2005 NvE Some unused variables removed in IceCal2Root and IceF2k to prevent warnings
+ from the gcc compiler.