24 #include <Riostream.h> 28 #include <TObjArray.h> 50 #include "AliAnalysisDataSlot.h" 51 #include "AliAnalysisManager.h" 80 fClusterInfoTree(0x0),
86 fESDInputHandler(0x0),
98 const Int_t my_calib_option ):
99 AliAnalysisTaskSE( name ),
100 fOCDBPath(
"local://$ALICE_ROOT/OCDB" ),
101 fClusterInfoTree(0x0),
107 fESDInputHandler(0x0),
138 TFile* clusterInfoFile = OpenFile( 0,
"RECREATE" );
139 if( clusterInfoFile ) clusterInfoFile->SetCompressionLevel(1);
140 else AliError(
"no output file created !!!" );
166 if ( !TGeoGlobalMagField::Instance()->GetField() ) {
167 AliInfo(
"Loading field map..." );
183 AliFatal(
"Could not access mapping from OCDB !" );
192 for (Int_t iCh=0; iCh<10; iCh++) {
202 AliInfo(
"reconstruction parameters initialized as follows :" );
228 AliFatal(
"Could not get input ESD event !!! ");
233 AliError(
"Could not get input ESD handler !!!" );
236 tree =
dynamic_cast<TTree*
> (GetInputData(0));
237 if ( tree ) tree->GetReadEntry();
238 else AliFatal(
"Could not read tree from input slot 0 !!!" );
250 static Bool_t first = kTRUE;
258 AliError(
"Input ESD event not available !!! " );
276 if ( nTracks < 1 )
return;
281 while ( (track = static_cast<AliMUONTrack*>(nextTrack())) ) {
288 while ( trackParam ) {
311 TMath::Sqrt( paramCov(2,2) ) );
318 for ( Int_t i=0; i<cluster->
GetNDigits(); i++ ) {
321 if ( !digit )
continue;
338 padInfo.
SetPadId( digit->GetUniqueID() );
355 trackParam =
static_cast<AliMUONTrackParam*
>(track->GetTrackParamAtCluster()->After(trackParam));
360 AliAnalysisDataSlot *out0 = GetOutputSlot(0);
373 UInt_t muonClusterMap = 0;
376 while ( trackParam ) {
383 return muonClusterMap;
virtual Int_t ManuChannel() const =0
The channel within ManuId() this digit belongs to (manuChannel for tracker, localBoardChannel for tri...
void SetCalibrated(Bool_t calibrated=kTRUE)
Set the pad as being calibrated or not.
TString fOCDBPath
! default path to the condition database
void SetTrackNHits(UInt_t NHits)
Set the total number of hits associated to the track leaving this cluster.
void SetPedestal(Float_t mean, Float_t sigma)
Set pedestal parameters.
void ImproveTracks(Bool_t flag)
switch on/off the track improvement and keep the default cut in sigma to apply on cluster (local chi2...
virtual Int_t PadY() const =0
The y-index of this digit (>=0)
void SetClusterXY(Double_t x, Double_t y)
Set cluster coordinates (cm)
AliMUONCalibrationData * fCalibData
! needed to access to the calibration data for each pad within each cluster
static AliMpSegmentation * Instance(Bool_t warn=true)
virtual Double_t GetZ() const =0
Return coordinate Z (cm)
void SetPadDimXY(Double_t dX, Double_t dY)
Set pad dimension (cm)
AliMUONChamberCalibrationTask()
void SetPadCharge(Double_t charge)
Set the calibrated charge.
Double_t GetBendingCoor() const
return bending coordinate (cm)
virtual Float_t ValueAsFloatFast(Int_t i, Int_t j=0) const =0
Same as above but without bound checking.
void LoadEvent(AliESDEvent &esdEvent, Bool_t refit=kTRUE)
AliMUONESDInterface * fESDInterface
! interface to easily access to the ESD content
static void ResetTracker(const AliMUONRecoParam *recoParam=0x0, Bool_t info=kTRUE)
virtual Int_t ADC() const =0
Raw ADC value of this digit.
void SetDefaultNonBendingReso(Int_t iCh, Double_t val)
Set the default non bending resolution of chamber iCh.
void SetClusterCharge(Double_t charge)
Set the total cluster charge.
void SetClusterChi2(Double_t clusterChi2)
set cluster Chi2
virtual Double_t GetErrX() const =0
Return resolution (cm) on coordinate X.
static Bool_t LoadDDLStore(Bool_t warn=false)
TIterator * CreateTrackIterator() const
void SetPadPlaneType(Int_t planeType)
Set the plane type 0=Bending 1=NonBending.
Track parameters in ALICE dimuon spectrometer.
void SetPadADC(Int_t adc)
Set the raw charge.
void SetTrackChi2(Double_t trackChi2)
set track Chi2
virtual void Terminate(Option_t *option="")
void SetZ(Double_t z)
Set cluster/track Z-position (cm)
virtual Float_t Charge() const =0
The charge of this digit, calibrated or not depending on IsCalibrated()
virtual Bool_t IsCalibrated() const =0
Whether this digit has been calibrated or not (see note 1 in AliMUONVDigit.cxx)
virtual AliMpPad PadByIndices(Int_t ix, Int_t iy, Bool_t warning=true) const =0
Find pad by indices.
virtual Int_t DetElemId() const =0
The detection element this digit belongs to.
AliMUONRecoParam * fMuonRecoParam
! reconstruction parameters for track refitting
virtual UInt_t GetDigitId(Int_t i) const =0
Return Id of digits i.
Container of calibration values for a given number of channels.
Double_t GetBendingSlope() const
return bending slope (cm ** -1)
UInt_t BuildClusterMap(AliMUONTrack &track)
virtual void CreateOutputObjects()
abstract base class for clusters
Double_t GetCharge() const
return the charge (assumed forward motion)
void SetSpecificStorage(const char *calibType, const char *dbString, Int_t version=-1, Int_t subVersion=-1)
Int_t GetNumberOfMuonTracks() const
void SetMaxNonBendingDistanceToTrack(Double_t val)
set the maximum distance to the track to search for compatible cluster(s) in non bending direction ...
void SetClusterXYErr(Double_t xErr, Double_t yErr)
Set cluster resolution (cm)
virtual void Clear(Option_t *opt="")
Int_t GetRunNumber() const
virtual Int_t Cathode() const =0
Cathode number this digit is on (0 or 1)
void SetTrackThetaXY(Double_t thetaX, Double_t thetaY)
Set track angles (radian)
static AliMUONRecoParam * GetCosmicParam()
Converter between MUON track/cluster/digit and ESDMuon track/cluster/pad.
Double_t GetPositionY() const
Return the pad x position (in cm)
virtual Double_t GetErrY() const =0
Return resolution (cm) on coordinate Y.
virtual ~AliMUONChamberCalibrationTask()
void SetSaturated(Bool_t saturated=kTRUE)
Set the pad as being saturated or not.
Definition of the task to extract cluster information from MCH tracks after applying the calibration ...
void SetTrackP(Double_t p)
Set track momentum (MeV/c)
virtual Int_t GetNDigits() const =0
Return number of associated digits.
void SetEventId(Int_t eventId)
set event number
virtual Double_t GetChi2() const =0
Return chi2 of cluster.
AliMp::CathodType GetCathodType(Int_t cathodNumber)
Convert integer number in enum;.
virtual Int_t PadX() const =0
The x-index of this digit (>=0)
AliMUONVStore * Pedestals() const
Get the pedestal store.
void SetTrackId(UInt_t trackId)
set track ID
#define AliFatal(message)
void SetTrackXY(Double_t x, Double_t y)
Set track coordinates (cm)
void SetDefaultStorage(const char *dbString)
void Print(Option_t *option="") const
static Int_t GetChamberId(UInt_t uniqueID)
Return chamber id (0..), part of the uniqueID.
virtual Double_t GetY() const =0
Return coordinate Y (cm)
#define AliDebug(logLevel, message)
void SetDefaultBendingReso(Int_t iCh, Double_t val)
Set the default bending resolution of chamber iCh.
Single entry point to access MUON calibration data.
void SetTrackXYErr(Double_t xErr, Double_t yErr)
Set track resolution (cm)
void SetRunId(Int_t runId)
set run number
AliMUONClusterInfo * fClusterInfo
! cluster info used to fill the output TTree
The abstract base class for the segmentation.
Double_t GetDimensionY() const
Return the y pad dimension - half length (in cm)
void SetPadId(UInt_t padId)
Set pad ID.
Int_t GetRunNumber() const
void RequestStation(Int_t iSt, Bool_t flag)
request or not at least one cluster in the station to validate the track
Double_t GetNonBendingCoor() const
return non bending coordinate (cm)
virtual Int_t ManuId() const =0
The electronic card id this digit belongs to (manuId for tracker, localboardId for trigger) ...
AliMUONVDigitStore * fDigitStore
! pointer to the digit stored for the current input ESD event
AliMUONVCluster * GetClusterPtr() const
get pointeur to associated cluster
virtual void Exec(Option_t *option="")
const AliESDRun * GetESDRun() const
Class which encapsuate all information about a pad.
virtual Bool_t IsSaturated() const =0
Whether the ADC has saturated.
virtual Double_t GetX() const =0
Return coordinate X (cm)
void SetTrackChamberHitMap(UInt_t trackChamberHitMap)
Set the map of hit chambers.
void SetMaxBendingDistanceToTrack(Double_t val)
set the maximum distance to the track to search for compatible cluster(s) in bending direction ...
Double_t GetPositionX() const
Return the pad x position (in cm)
Int_t GetEventNumberInFile() const
AliMUONVDigitStore * GetDigits() const
Return internal track store.
Reconstructed track in ALICE dimuon spectrometer.
#define AliError(message)
virtual AliMUONVDigit * FindObject(const TObject *object) const
Find an object (default is to forward to FindObject(object->GetUniqueID())
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
AliESDInputHandler * fESDInputHandler
! ESD input handler
Class to summarize ESD data at cluster.
TTree * fClusterInfoTree
! TTree filled with the cluster information
virtual Double_t GetCharge() const =0
Set the cluster charge.
virtual void ConnectInputData(Option_t *option="")
Class to summarize ESD data at pad.
AliESDEvent * fESDInputEvent
! pointer to the current input ESD event
Double_t GetDimensionX() const
Return the x pad dimension - half length (in cm)
void AddPad(const AliMUONPadInfo &pad)
attach a pad to the cluster
const TMatrixD & GetCovariances() const
void SetTrackCharge(Short_t charge)
Set the muon charge.
class TMatrixT< Double_t > TMatrixD
void SetClusterId(UInt_t clusterId)
set cluster ID
static Int_t ManuMask(AliMp::PlaneType planeType)
TObjArray * GetTrackParamAtCluster() const
void SetPadXY(Double_t x, Double_t y)
Set pad coordinates (cm)
virtual void Print(Option_t *option="") const
Double_t GetNonBendingSlope() const
return non bending slope (cm ** -1)